diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 9bcb4699e93a..3d823e234dc6 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -446,7 +446,7 @@ stages: jobName: Linux_musl_x64_build jobDisplayName: "Build: Linux Musl x64" agentOs: Linux - container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64 buildArgs: --arch x64 --os-name linux-musl @@ -480,7 +480,7 @@ stages: jobDisplayName: "Build: Linux Musl ARM" agentOs: Linux useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64 buildArgs: --arch arm --os-name linux-musl @@ -513,7 +513,7 @@ stages: jobDisplayName: "Build: Linux Musl ARM64" agentOs: Linux useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64 buildArgs: --arch arm64 --os-name linux-musl @@ -645,7 +645,7 @@ stages: parameters: platform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64' buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)' skipPublishValidation: true jobProperties: diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index b0d73169f2b3..08eab9052b12 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -97,14 +97,14 @@ variables: - name: WindowsArm64InstallersLogArgs value: /bl:artifacts/log/Release/Build.Installers.Arm64.binlog - name: _InternalRuntimeDownloadArgs - value: -RuntimeSourceFeed https://dotnetbuilds.blob.core.windows.net/internal + value: -RuntimeSourceFeed https://ci.dot.net/internal -RuntimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetbuilds-internal-container-read-token-base64)' # The code signing doesn't use the aspnet build scripts, so the msbuild parameters have to be passed directly. This # is awkward but necessary because the eng/common/ build scripts don't add the msbuild properties automatically. - name: _InternalRuntimeDownloadCodeSignArgs value: $(_InternalRuntimeDownloadArgs) - /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - group: DotNet-HelixApi-Access - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: @@ -144,13 +144,13 @@ extends: os: windows spotBugs: enabled: false + policheck: + enabled: true + tsa: + enabled: true containers: - alpine319WithNode: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode - mariner20CrossArmAlpine: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine - mariner20CrossArm64Alpine: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine + azureLinux30Net9BuildAmd64: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64 stages: - stage: build displayName: Build @@ -511,7 +511,7 @@ extends: jobName: Linux_musl_x64_build jobDisplayName: "Build: Linux Musl x64" agentOs: Linux - container: alpine319WithNode + container: azureLinux30Net9BuildAmd64 buildArgs: --arch x64 --os-name linux-musl @@ -545,7 +545,7 @@ extends: jobDisplayName: "Build: Linux Musl ARM" agentOs: Linux useHostedUbuntu: false - container: mariner20CrossArmAlpine + container: azureLinux30Net9BuildAmd64 buildArgs: --arch arm --os-name linux-musl @@ -578,7 +578,7 @@ extends: jobDisplayName: "Build: Linux Musl ARM64" agentOs: Linux useHostedUbuntu: false - container: mariner20CrossArm64Alpine + container: azureLinux30Net9BuildAmd64 buildArgs: --arch arm64 --os-name linux-musl diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index f328550c60c2..15cf2272358c 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -106,13 +106,13 @@ jobs: # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md pool: ${{ if eq(parameters.agentOs, 'macOS') }}: - vmImage: macOS-12 + vmImage: macOS-13 ${{ if eq(parameters.agentOs, 'Linux') }}: ${{ if eq(parameters.useHostedUbuntu, true) }}: - vmImage: ubuntu-20.04 + vmImage: ubuntu-22.04 ${{ else }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open ${{ if eq(parameters.agentOs, 'Windows') }}: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals windows.vs2022preview.amd64.open @@ -164,8 +164,8 @@ jobs: - script: df -h displayName: Disk size - ${{ if eq(parameters.agentOs, 'macOS') }}: - - script: sudo xcode-select -s /Applications/Xcode_14.2.0.app/Contents/Developer - displayName: Use XCode 14.2.0 + - script: sudo xcode-select -s /Applications/Xcode_15.2.0.app/Contents/Developer + displayName: Use XCode 15.2.0 - checkout: self clean: true - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}: @@ -323,11 +323,11 @@ jobs: pool: ${{ if eq(parameters.agentOs, 'macOS') }}: name: Azure Pipelines - image: macOS-12 + image: macOS-13 os: macOS ${{ if eq(parameters.agentOs, 'Linux') }}: name: $(DncEngInternalBuildPool) - image: 1es-ubuntu-2004 + image: 1es-ubuntu-2204 os: linux ${{ if eq(parameters.agentOs, 'Windows') }}: name: $(DncEngInternalBuildPool) @@ -391,8 +391,8 @@ jobs: - script: df -h displayName: Disk size - ${{ if eq(parameters.agentOs, 'macOS') }}: - - script: sudo xcode-select -s /Applications/Xcode_14.2.0.app/Contents/Developer - displayName: Use XCode 14.2.0 + - script: sudo xcode-select -s /Applications/Xcode_15.2.0.app/Contents/Developer + displayName: Use XCode 15.2.0 - checkout: self clean: true - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}: @@ -419,8 +419,12 @@ jobs: - ${{ parameters.beforeBuild }} - # - template: /eng/common/templates-official/steps/enable-internal-sources.yml@self + - template: /eng/common/templates-official/steps/enable-internal-sources.yml@self + parameters: + legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw) - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml@self + parameters: + expiryInHours: 3 # Populate dotnetbuilds-internal-container-read-token - template: /eng/common/templates-official/steps/get-delegation-sas.yml diff --git a/NuGet.config b/NuGet.config index 9c0abd15023f..66f5d2f4634d 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,6 +2,12 @@ + + + + + + @@ -20,5 +26,11 @@ + + + + + + diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 9effde6fbf51..ffeba29a66d4 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,485 +2,488 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 8.0.0 + 9.0.7 - - - 8.0.0 + + + 9.0.7 - - - 8.0.0 + + + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - - + + + - - - - + + + + - - - + + + - 8.0.0 + 9.0.7 - - - + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - - - - - - + + + + + + - 8.0.0 + 9.0.7 - - - - - - + + + + + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - - - - - + + + + + + + - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - - - + + + - - - + + - - - + + + - - - + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - + - - + + - + - 8.0.0 + 9.0.7 - - - - - - + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - + + - - - + + + - - + + - 8.0.0 + 9.0.7 - - + + - - - + + + - - + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - + + + + - - - - + + + + + - - - + + + + - - - + + + + - 8.0.0 + 9.0.7 - - + + - - + + - - + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - - - + + + - 8.0.0 + 9.0.7 - + @@ -490,505 +493,510 @@ - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - + - + - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - - - + + + - - + + - 8.0.0 + 9.0.7 - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - 8.0.0 + 9.0.7 - - + + - + - - - + + + - - - + + + - 8.0.0 + 9.0.7 - + - - + + - + - 8.0.0 + 9.0.7 - - + + - - - + + + - - + + - 8.0.0 + 9.0.7 - + - - + + - + - 8.0.0 + 9.0.7 - - - - - + + + + + - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - - - 8.0.0 + 9.0.7 - - - + + - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - 8.0.0 + + + 9.0.7 - - - 8.0.0 + + + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - + + + + - - - - + + + + + - - - + + + + - 8.0.0 + 9.0.7 - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - 8.0.0 + 9.0.7 - - + + - - - + + + - - + + - 8.0.0 + 9.0.7 - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - - + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - + - 8.0.0 + 9.0.7 - + - 8.0.0 + 9.0.7 - - - + + + - - - - + + + + - - - + + + - 8.0.0 + 9.0.7 - - - + + + - - - - + + + + - - - + + + - 8.0.0 + 9.0.7 - - - - + + + + - - - - - + + + + + - - - - + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - - + + + - - - + + + - - - + + + - 8.0.0 + 9.0.7 - 8.0.0 + 9.0.7 - - + + - 8.0.0 + 9.0.7 - - + + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index a53374025b2a..3efad5672524 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,110 +4,110 @@ This file contains a list of all the packages and their versions which were rele Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/PackageOverrides.txt b/eng/PackageOverrides.txt new file mode 100644 index 000000000000..7a6ce5189796 --- /dev/null +++ b/eng/PackageOverrides.txt @@ -0,0 +1,138 @@ +Microsoft.Extensions.Caching.Abstractions|9.0.0 +Microsoft.Extensions.Caching.Memory|9.0.0 +Microsoft.Extensions.Configuration.Abstractions|9.0.0 +Microsoft.Extensions.Configuration.Binder|9.0.0 +Microsoft.Extensions.Configuration.CommandLine|9.0.0 +Microsoft.Extensions.Configuration|9.0.0 +Microsoft.Extensions.Configuration.EnvironmentVariables|9.0.0 +Microsoft.Extensions.Configuration.FileExtensions|9.0.0 +Microsoft.Extensions.Configuration.Ini|9.0.0 +Microsoft.Extensions.Configuration.Json|9.0.0 +Microsoft.Extensions.Configuration.UserSecrets|9.0.0 +Microsoft.Extensions.Configuration.Xml|9.0.0 +Microsoft.Extensions.DependencyInjection.Abstractions|9.0.0 +Microsoft.Extensions.DependencyInjection|9.0.0 +Microsoft.Extensions.Diagnostics.Abstractions|9.0.0 +Microsoft.Extensions.Diagnostics|9.0.0 +Microsoft.Extensions.FileProviders.Abstractions|9.0.0 +Microsoft.Extensions.FileProviders.Composite|9.0.0 +Microsoft.Extensions.FileProviders.Physical|9.0.0 +Microsoft.Extensions.FileSystemGlobbing|9.0.0 +Microsoft.Extensions.Hosting.Abstractions|9.0.0 +Microsoft.Extensions.Hosting|9.0.0 +Microsoft.Extensions.Http|9.0.0 +Microsoft.Extensions.Logging.Abstractions|9.0.0 +Microsoft.Extensions.Logging.Configuration|9.0.0 +Microsoft.Extensions.Logging.Console|9.0.0 +Microsoft.Extensions.Logging.Debug|9.0.0 +Microsoft.Extensions.Logging|9.0.0 +Microsoft.Extensions.Logging.EventLog|9.0.0 +Microsoft.Extensions.Logging.EventSource|9.0.0 +Microsoft.Extensions.Logging.TraceSource|9.0.0 +Microsoft.Extensions.Options.ConfigurationExtensions|9.0.0 +Microsoft.Extensions.Options.DataAnnotations|9.0.0 +Microsoft.Extensions.Options|9.0.0 +Microsoft.Extensions.Primitives|9.0.0 +System.Diagnostics.EventLog|9.0.0 +System.Security.Cryptography.Xml|9.0.0 +System.Threading.RateLimiting|9.0.0 +Microsoft.AspNetCore.Antiforgery|9.0.0 +Microsoft.AspNetCore.Authentication.Abstractions|9.0.0 +Microsoft.AspNetCore.Authentication.BearerToken|9.0.0 +Microsoft.AspNetCore.Authentication.Cookies|9.0.0 +Microsoft.AspNetCore.Authentication.Core|9.0.0 +Microsoft.AspNetCore.Authentication|9.0.0 +Microsoft.AspNetCore.Authentication.OAuth|9.0.0 +Microsoft.AspNetCore.Authorization|9.0.0 +Microsoft.AspNetCore.Authorization.Policy|9.0.0 +Microsoft.AspNetCore.Components.Authorization|9.0.0 +Microsoft.AspNetCore.Components|9.0.0 +Microsoft.AspNetCore.Components.Endpoints|9.0.0 +Microsoft.AspNetCore.Components.Forms|9.0.0 +Microsoft.AspNetCore.Components.Server|9.0.0 +Microsoft.AspNetCore.Components.Web|9.0.0 +Microsoft.AspNetCore.Connections.Abstractions|9.0.0 +Microsoft.AspNetCore.CookiePolicy|9.0.0 +Microsoft.AspNetCore.Cors|9.0.0 +Microsoft.AspNetCore.Cryptography.Internal|9.0.0 +Microsoft.AspNetCore.Cryptography.KeyDerivation|9.0.0 +Microsoft.AspNetCore.DataProtection.Abstractions|9.0.0 +Microsoft.AspNetCore.DataProtection|9.0.0 +Microsoft.AspNetCore.DataProtection.Extensions|9.0.0 +Microsoft.AspNetCore.Diagnostics.Abstractions|9.0.0 +Microsoft.AspNetCore.Diagnostics|9.0.0 +Microsoft.AspNetCore.Diagnostics.HealthChecks|9.0.0 +Microsoft.AspNetCore|9.0.0 +Microsoft.AspNetCore.HostFiltering|9.0.0 +Microsoft.AspNetCore.Hosting.Abstractions|9.0.0 +Microsoft.AspNetCore.Hosting|9.0.0 +Microsoft.AspNetCore.Hosting.Server.Abstractions|9.0.0 +Microsoft.AspNetCore.Html.Abstractions|9.0.0 +Microsoft.AspNetCore.Http.Abstractions|9.0.0 +Microsoft.AspNetCore.Http.Connections.Common|9.0.0 +Microsoft.AspNetCore.Http.Connections|9.0.0 +Microsoft.AspNetCore.Http|9.0.0 +Microsoft.AspNetCore.Http.Extensions|9.0.0 +Microsoft.AspNetCore.Http.Features|9.0.0 +Microsoft.AspNetCore.Http.Results|9.0.0 +Microsoft.AspNetCore.HttpLogging|9.0.0 +Microsoft.AspNetCore.HttpOverrides|9.0.0 +Microsoft.AspNetCore.HttpsPolicy|9.0.0 +Microsoft.AspNetCore.Identity|9.0.0 +Microsoft.AspNetCore.Localization|9.0.0 +Microsoft.AspNetCore.Localization.Routing|9.0.0 +Microsoft.AspNetCore.Metadata|9.0.0 +Microsoft.AspNetCore.Mvc.Abstractions|9.0.0 +Microsoft.AspNetCore.Mvc.ApiExplorer|9.0.0 +Microsoft.AspNetCore.Mvc.Core|9.0.0 +Microsoft.AspNetCore.Mvc.Cors|9.0.0 +Microsoft.AspNetCore.Mvc.DataAnnotations|9.0.0 +Microsoft.AspNetCore.Mvc|9.0.0 +Microsoft.AspNetCore.Mvc.Formatters.Json|9.0.0 +Microsoft.AspNetCore.Mvc.Formatters.Xml|9.0.0 +Microsoft.AspNetCore.Mvc.Localization|9.0.0 +Microsoft.AspNetCore.Mvc.Razor|9.0.0 +Microsoft.AspNetCore.Mvc.RazorPages|9.0.0 +Microsoft.AspNetCore.Mvc.TagHelpers|9.0.0 +Microsoft.AspNetCore.Mvc.ViewFeatures|9.0.0 +Microsoft.AspNetCore.OutputCaching|9.0.0 +Microsoft.AspNetCore.RateLimiting|9.0.0 +Microsoft.AspNetCore.Razor|9.0.0 +Microsoft.AspNetCore.Razor.Runtime|9.0.0 +Microsoft.AspNetCore.RequestDecompression|9.0.0 +Microsoft.AspNetCore.ResponseCaching.Abstractions|9.0.0 +Microsoft.AspNetCore.ResponseCaching|9.0.0 +Microsoft.AspNetCore.ResponseCompression|9.0.0 +Microsoft.AspNetCore.Rewrite|9.0.0 +Microsoft.AspNetCore.Routing.Abstractions|9.0.0 +Microsoft.AspNetCore.Routing|9.0.0 +Microsoft.AspNetCore.Server.HttpSys|9.0.0 +Microsoft.AspNetCore.Server.IIS|9.0.0 +Microsoft.AspNetCore.Server.IISIntegration|9.0.0 +Microsoft.AspNetCore.Server.Kestrel.Core|9.0.0 +Microsoft.AspNetCore.Server.Kestrel|9.0.0 +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes|9.0.0 +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic|9.0.0 +Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|9.0.0 +Microsoft.AspNetCore.Session|9.0.0 +Microsoft.AspNetCore.SignalR.Common|9.0.0 +Microsoft.AspNetCore.SignalR.Core|9.0.0 +Microsoft.AspNetCore.SignalR|9.0.0 +Microsoft.AspNetCore.SignalR.Protocols.Json|9.0.0 +Microsoft.AspNetCore.StaticAssets|9.0.0 +Microsoft.AspNetCore.StaticFiles|9.0.0 +Microsoft.AspNetCore.WebSockets|9.0.0 +Microsoft.AspNetCore.WebUtilities|9.0.0 +Microsoft.Extensions.Configuration.KeyPerFile|9.0.0 +Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions|9.0.0 +Microsoft.Extensions.Diagnostics.HealthChecks|9.0.0 +Microsoft.Extensions.Features|9.0.0 +Microsoft.Extensions.FileProviders.Embedded|9.0.0 +Microsoft.Extensions.Identity.Core|9.0.0 +Microsoft.Extensions.Identity.Stores|9.0.0 +Microsoft.Extensions.Localization.Abstractions|9.0.0 +Microsoft.Extensions.Localization|9.0.0 +Microsoft.Extensions.ObjectPool|9.0.0 +Microsoft.Extensions.WebEncoders|9.0.0 +Microsoft.JSInterop|9.0.0 +Microsoft.Net.Http.Headers|9.0.0 diff --git a/eng/PlatformManifest.txt b/eng/PlatformManifest.txt new file mode 100644 index 000000000000..c493b0164a6c --- /dev/null +++ b/eng/PlatformManifest.txt @@ -0,0 +1,141 @@ +aspnetcorev2_inprocess.dll|Microsoft.AspNetCore.App.Ref||19.0.24303.0 +Microsoft.AspNetCore.Antiforgery.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.BearerToken.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.Cookies.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.Core.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authentication.OAuth.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authorization.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Authorization.Policy.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.Authorization.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.Endpoints.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.Forms.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.Server.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Components.Web.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Connections.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.CookiePolicy.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Cors.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Cryptography.Internal.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Cryptography.KeyDerivation.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.DataProtection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.DataProtection.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.DataProtection.Extensions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Diagnostics.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Diagnostics.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.HostFiltering.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Hosting.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Hosting.Server.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Html.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Connections.Common.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Connections.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Extensions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Features.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Http.Results.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.HttpLogging.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.HttpOverrides.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.HttpsPolicy.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Identity.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Localization.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Localization.Routing.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Metadata.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.ApiExplorer.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Core.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Cors.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Formatters.Json.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Formatters.Xml.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Localization.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.Razor.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.RazorPages.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.TagHelpers.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Mvc.ViewFeatures.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.OutputCaching.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.RateLimiting.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Razor.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Razor.Runtime.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.RequestDecompression.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.ResponseCaching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.ResponseCaching.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.ResponseCompression.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Rewrite.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Routing.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Routing.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.HttpSys.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.IIS.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.IISIntegration.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.Kestrel.Core.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.Kestrel.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.Session.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.SignalR.Common.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.SignalR.Core.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.SignalR.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.SignalR.Protocols.Json.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.StaticAssets.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.StaticFiles.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.WebSockets.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.AspNetCore.WebUtilities.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Caching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Caching.Memory.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.Binder.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.CommandLine.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.EnvironmentVariables.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.FileExtensions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.Ini.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.Json.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.KeyPerFile.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Configuration.UserSecrets.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Configuration.Xml.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.DependencyInjection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.DependencyInjection.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Diagnostics.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Diagnostics.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Features.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.FileProviders.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.FileProviders.Composite.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.FileProviders.Embedded.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.FileProviders.Physical.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.FileSystemGlobbing.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Hosting.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Http.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Identity.Core.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Identity.Stores.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Localization.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Localization.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Logging.Abstractions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.Configuration.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.Console.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.Debug.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.EventLog.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.EventSource.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Logging.TraceSource.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.ObjectPool.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Extensions.Options.ConfigurationExtensions.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Options.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Options.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.Primitives.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +Microsoft.Extensions.WebEncoders.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.JSInterop.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +Microsoft.Net.Http.Headers.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52903 +System.Diagnostics.EventLog.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +System.Diagnostics.EventLog.Messages.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|0.0.0.0 +System.Security.Cryptography.Pkcs.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +System.Security.Cryptography.Xml.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 +System.Threading.RateLimiting.dll|Microsoft.AspNetCore.App.Ref|9.0.0.0|9.0.24.52809 \ No newline at end of file diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index 4c14fddbe34c..2c8d20d3234b 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -46,5 +46,18 @@ + + + + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a65febf0683c..282ff4ff3cf4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,334 +9,334 @@ --> - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/efcore - c7035b3ccc485a63bd03a64da4d9f0ec18f27948 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 67d253c17619e6ba325e5390905ea2a13cc7f532 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - + https://github.com/dotnet/xdt - c2a9df9c1867454039a1223cef1c090359e33646 + 63ae81154c50a1cf9287cc47d8351d55b4289e6d - + https://github.com/dotnet/xdt - c2a9df9c1867454039a1223cef1c090359e33646 + 63ae81154c50a1cf9287cc47d8351d55b4289e6d @@ -345,82 +345,82 @@ - + https://github.com/dotnet/roslyn - afa1eb6821f62183651ab017b2f5c3fbeb934904 + bc1c3011064a493b0ca527df6fb7215e2e5cfa96 - + https://github.com/dotnet/roslyn - afa1eb6821f62183651ab017b2f5c3fbeb934904 + bc1c3011064a493b0ca527df6fb7215e2e5cfa96 - + https://github.com/dotnet/roslyn - afa1eb6821f62183651ab017b2f5c3fbeb934904 + bc1c3011064a493b0ca527df6fb7215e2e5cfa96 - + https://github.com/dotnet/roslyn - afa1eb6821f62183651ab017b2f5c3fbeb934904 + bc1c3011064a493b0ca527df6fb7215e2e5cfa96 - + https://github.com/dotnet/roslyn - afa1eb6821f62183651ab017b2f5c3fbeb934904 + bc1c3011064a493b0ca527df6fb7215e2e5cfa96 - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - + https://github.com/dotnet/source-build-externals - eab3dc5eabdf8bcd9bbdf917741aab335c74373d + ab469606a3e6b026dcac301e2dab96117c94faeb - - https://github.com/dotnet/runtime - 3d9da91a9720f7bda3e4cef127b8195441fb2580 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 3c298d9f00936d651cc47d221762474e25277672 - + https://github.com/dotnet/winforms - ed3e6c60a08cae482f78e5f31e87393a995bfbd4 + 9b822fd70005bf5632d12fe76811b97b3dd044e4 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/arcade - 04b9022eba9c184a8036328af513c22e6949e8b6 + 7e67a7b4b62513a475afe46c4cd74d54b68f65c9 - + https://github.com/dotnet/extensions - 43e4b5c99ad3ebcb2b05285ba8aabbfc6acd42e7 + c6529a0a68989cc881e4add4872c344917bc1ca9 - + https://github.com/dotnet/extensions - 43e4b5c99ad3ebcb2b05285ba8aabbfc6acd42e7 + c6529a0a68989cc881e4add4872c344917bc1ca9 https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 9df28b4590d1..a4263f410f92 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,19 +8,19 @@ 9 0 - 0 + 9 - true + false 8.0.1 *-* - false + true release - rtm - RTM + servicing + Servicing true false $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) @@ -68,119 +68,119 @@ --> - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7-servicing.25316.16 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7-servicing.25316.16 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7-servicing.25316.16 + 9.0.7-servicing.25316.16 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 + 9.0.7-servicing.25316.16 + 9.0.7 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 - 9.0.0-rtm.24473.2 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 - 9.0.0-preview.9.24472.1 - 9.0.0-preview.9.24472.1 + 9.8.0-preview.1.25401.1 + 9.8.0-preview.1.25401.1 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 - 9.0.0-rtm.24473.8 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 + 9.0.7 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 6.2.4 6.2.4 6.2.4 - 9.0.0-beta.24466.2 - 9.0.0-beta.24466.2 - 9.0.0-beta.24466.2 - 9.0.0-beta.24466.2 + 9.0.0-beta.25380.1 + 9.0.0-beta.25380.1 + 9.0.0-beta.25380.1 + 9.0.0-beta.25380.1 - 9.0.0-alpha.1.24452.1 + 9.0.0-alpha.1.24575.1 9.0.0-alpha.1.24413.1 2.2.0-beta.24327.2 - 9.0.0-rtm.24472.2 + 9.0.0-rtm.24512.2 - 9.0.0-preview.24453.1 - 9.0.0-preview.24453.1 + 10.0.0-preview.24609.2 + 10.0.0-preview.24609.2 1.1.1 - 17.4.0 + 17.8.29 1.2.0 - 17.4.0 - 17.4.0 - 17.4.0 + 17.8.29 + 17.8.29 + 17.8.29 1.2.6 - 17.4.0 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 - 4.11.0-1.24218.5 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 + 4.11.0-3.24554.2 3.3.3 1.1.2-beta1.24121.1 1.1.2-beta1.24121.1 @@ -296,7 +295,7 @@ 2.64.0 2.64.0 2.64.0 - 2.5.108 + 2.5.187 3.0.0 3.0.0 3.0.0 diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index ba53ebfbd513..abe80a2a0e09 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -134,6 +134,10 @@ jobs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + ${{ else }}: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca env: TeamName: $(_TeamName) MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml index c4713c8b6ede..d47f09d58fd9 100644 --- a/eng/common/core-templates/job/source-build.yml +++ b/eng/common/core-templates/job/source-build.yml @@ -26,6 +26,8 @@ parameters: # Specifies the build script to invoke to perform the build in the repo. The default # './build.sh' should work for typical Arcade repositories, but this is customizable for # difficult situations. + # buildArguments: '' + # Specifies additional build arguments to pass to the build script. # jobProperties: {} # A list of job properties to inject at the top level, for potential extensibility beyond # container and pool. diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 205fb5b3a395..8b833332b3ee 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -1,7 +1,7 @@ parameters: runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20240522.1 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1 + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 454fd75c7aff..a8c0bd3b9214 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -44,6 +44,11 @@ parameters: displayName: Publish installers and checksums type: boolean default: true + + - name: requireDefaultChannels + displayName: Fail the build if there are no default channel(s) registrations for the current build + type: boolean + default: false - name: SDLValidationParameters type: object @@ -312,5 +317,6 @@ stages: -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(System.AccessToken)' -WaitPublishingFinish true + -RequireDefaultChannels ${{ parameters.requireDefaultChannels }} -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index d938b60e1bb5..56a090094824 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -38,7 +38,7 @@ steps: PackageName: ${{ parameters.packageName }} BuildDropPath: ${{ parameters.buildDropPath }} PackageVersion: ${{ parameters.packageVersion }} - ManifestDirPath: ${{ parameters.manifestDirPath }} + ManifestDirPath: ${{ parameters.manifestDirPath }}/$(ARTIFACT_NAME) ${{ if ne(parameters.IgnoreDirectories, '') }}: AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' diff --git a/eng/common/core-templates/steps/get-delegation-sas.yml b/eng/common/core-templates/steps/get-delegation-sas.yml index d2901470a7f0..9db5617ea7de 100644 --- a/eng/common/core-templates/steps/get-delegation-sas.yml +++ b/eng/common/core-templates/steps/get-delegation-sas.yml @@ -31,7 +31,16 @@ steps: # Calculate the expiration of the SAS token and convert to UTC $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads + # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484 + $sas = "" + do { + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + } while($sas.IndexOf('/') -ne -1) if ($LASTEXITCODE -ne 0) { Write-Error "Failed to generate SAS token." diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 2915d29bb7f6..37133b55b754 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -79,6 +79,7 @@ steps: ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ --configuration $buildConfig \ --restore --build --pack $publishArgs -bl \ + ${{ parameters.platform.buildArguments }} \ $officialBuildArgs \ $internalRuntimeDownloadArgs \ $internalRestoreArgs \ diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae3..9a7ecfbd42c5 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -81,7 +81,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +98,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,7 +115,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -127,30 +127,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -272,21 +267,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +292,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1 index 3e5c1c74a1c5..a0c7d792a76f 100644 --- a/eng/common/generate-sbom-prep.ps1 +++ b/eng/common/generate-sbom-prep.ps1 @@ -4,18 +4,26 @@ Param( . $PSScriptRoot\pipeline-logging-functions.ps1 +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" +$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' +$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName + +Write-Host "Artifact name before : $ArtifactName" +Write-Host "Artifact name after : $SafeArtifactName" + Write-Host "Creating dir $ManifestDirPath" + # create directory for sbom manifest to be placed -if (!(Test-Path -path $ManifestDirPath)) +if (!(Test-Path -path $SbomGenerationDir)) { - New-Item -ItemType Directory -path $ManifestDirPath - Write-Host "Successfully created directory $ManifestDirPath" + New-Item -ItemType Directory -path $SbomGenerationDir + Write-Host "Successfully created directory $SbomGenerationDir" } else{ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." } Write-Host "Updating artifact name" -$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_' -Write-Host "Artifact name $artifact_name" -Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name" +Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh index d5c76dc827b4..b8ecca72bbf5 100644 --- a/eng/common/generate-sbom-prep.sh +++ b/eng/common/generate-sbom-prep.sh @@ -14,19 +14,24 @@ done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . $scriptroot/pipeline-logging-functions.sh + +# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. +artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" +safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" manifest_dir=$1 -if [ ! -d "$manifest_dir" ] ; then - mkdir -p "$manifest_dir" - echo "Sbom directory created." $manifest_dir +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +sbom_generation_dir="$manifest_dir/$safe_artifact_name" + +if [ ! -d "$sbom_generation_dir" ] ; then + mkdir -p "$sbom_generation_dir" + echo "Sbom directory created." $sbom_generation_dir else Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." fi -artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" echo "Artifact name before : "$artifact_name -# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. -safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" echo "Artifact name after : "$safe_artifact_name export ARTIFACT_NAME=$safe_artifact_name echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" diff --git a/eng/common/internal/NuGet.config b/eng/common/internal/NuGet.config index 19d3d311b166..f70261ed689b 100644 --- a/eng/common/internal/NuGet.config +++ b/eng/common/internal/NuGet.config @@ -4,4 +4,7 @@ + + + diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index 32f79dfb3402..feaa6d20812d 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -15,16 +15,6 @@ - - - - https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; - - - $(RestoreSources); - https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; - - diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 90b58e32a87b..a261517ef906 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -5,7 +5,8 @@ param( [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, - [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters + [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters, + [Parameter(Mandatory=$false)][string] $RequireDefaultChannels ) try { @@ -33,6 +34,10 @@ try { if ("false" -eq $WaitPublishingFinish) { $optionalParams.Add("--no-wait") | Out-Null } + + if ("true" -eq $RequireDefaultChannels) { + $optionalParams.Add("--default-channels-required") | Out-Null + } & $darc add-build-to-channel ` --id $buildId ` diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index aab40de3fd9a..4f0546dce120 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -64,7 +64,7 @@ try { $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty } if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.10.0-pre.4.0" -MemberType NoteProperty + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.12.0" -MemberType NoteProperty } if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 5ef6c30ba924..98bbc1ded0ba 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -57,7 +57,7 @@ extends: Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). -# Development notes +## Development notes **Folder / file structure** diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 3d16b41c78c1..817555505aa6 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -1,6 +1,7 @@ parameters: # Sbom related params enableSbom: true + runAsPublic: false PackageVersion: 9.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' @@ -15,6 +16,7 @@ jobs: parameters: PackageVersion: ${{ parameters.packageVersion }} BuildDropPath: ${{ parameters.buildDropPath }} + ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom publishArtifacts: false # publish artifacts diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 07d317bf8f9a..d1aeb92fcea5 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -4,6 +4,7 @@ parameters: componentGovernanceIgnoreDirectories: '' # Sbom related params enableSbom: true + runAsPublic: false PackageVersion: 9.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9574f4eb9df0..9b3ad8840fdb 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -42,7 +42,7 @@ [bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true } # Enable repos to use a particular version of the on-line dotnet-install scripts. -# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 +# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1 [string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' } # True to use global NuGet cache instead of restoring packages to repository-local directory. @@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) { if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - $uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1" + $uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1" Retry({ Write-Host "GET $uri" @@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { @@ -383,8 +383,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.10.0-pre.4.0 - $defaultXCopyMSBuildVersion = '17.10.0-pre.4.0' + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0 + $defaultXCopyMSBuildVersion = '17.12.0' if (!$vsRequirements) { if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { @@ -416,7 +416,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # Locate Visual Studio installation or download x-copy msbuild. $vsInfo = LocateVisualStudio $vsRequirements - if ($vsInfo -ne $null) { + if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) { # Ensure vsInstallDir has a trailing slash $vsInstallDir = Join-Path $vsInfo.installationPath "\" $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] @@ -900,7 +900,7 @@ function IsWindowsPlatform() { } function Get-Darc($version) { - $darcPath = "$TempDir\darc\$(New-Guid)" + $darcPath = "$TempDir\darc\$([guid]::NewGuid())" if ($version -ne $null) { & $PSScriptRoot\darc-init.ps1 -toolpath $darcPath -darcVersion $version | Out-Host } else { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 00473c9f918d..01b09b65796c 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -54,7 +54,7 @@ warn_as_error=${warn_as_error:-true} use_installed_dotnet_cli=${use_installed_dotnet_cli:-true} # Enable repos to use a particular version of the on-line dotnet-install scripts. -# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh +# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'} # True to use global NuGet cache instead of restoring packages to repository-local directory. @@ -232,7 +232,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then @@ -295,7 +295,7 @@ function with_retries { function GetDotNetInstallScript { local root=$1 local install_script="$root/dotnet-install.sh" - local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh" + local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh" if [[ ! -a "$install_script" ]]; then mkdir -p "$root" diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index f31e201d516e..a772993a3592 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -58,12 +58,12 @@ runtime - $([System.Environment]::GetEnvironmentVariable('DotNetBuildsInternalReadSasToken')) - $([System.Environment]::GetEnvironmentVariable('DotNetBuildsInternalReadSasToken')) diff --git a/eng/scripts/InstallJdk.ps1 b/eng/scripts/InstallJdk.ps1 index 0872f241a982..1ba711b5eaa4 100644 --- a/eng/scripts/InstallJdk.ps1 +++ b/eng/scripts/InstallJdk.ps1 @@ -22,8 +22,7 @@ $installDir = "$repoRoot\.tools\jdk\win-x64\" $javacExe = "$installDir\bin\javac.exe" $tempDir = "$repoRoot\obj" if (-not $JdkVersion) { - $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json - $JdkVersion = $globalJson.'native-tools'.jdk + $JdkVersion = "11.0.24" } if (Test-Path $javacExe) { diff --git a/eng/scripts/install-nginx-linux.sh b/eng/scripts/install-nginx-linux.sh index bbfb79c48203..f075a899d1cf 100755 --- a/eng/scripts/install-nginx-linux.sh +++ b/eng/scripts/install-nginx-linux.sh @@ -6,7 +6,7 @@ scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" reporoot="$(dirname "$(dirname "$scriptroot")")" nginxinstall="$reporoot/.tools/nginx" -curl -sSL http://nginx.org/download/nginx-1.14.2.tar.gz --retry 5 | tar zxfv - -C /tmp && cd /tmp/nginx-1.14.2/ +curl -sSL http://nginx.org/download/nginx-1.26.3.tar.gz --retry 5 | tar zxfv - -C /tmp && cd /tmp/nginx-1.26.3/ ./configure --prefix=$nginxinstall --with-http_ssl_module --without-http_rewrite_module make make install diff --git a/eng/scripts/update-npm-dependencies.ps1 b/eng/scripts/update-npm-dependencies.ps1 index 8b41b9f63994..f2070df6a129 100644 --- a/eng/scripts/update-npm-dependencies.ps1 +++ b/eng/scripts/update-npm-dependencies.ps1 @@ -9,8 +9,6 @@ param ( $ErrorActionPreference = "Stop" -$env:npm_config_cache = "$PWD/src/submodules/Node-Externals/cache" - Write-Host "Ensuring the repository is clean" if (-not $WhatIf) { git clean -xdff @@ -21,12 +19,6 @@ if (-not $WhatIf) { Remove-Item .\package-lock.json } -if (-not $SkipClearCache -and -not $WhatIf) { - Write-Host "Clearing the npm cache" - Remove-Item -Recurse -Force "$PWD/src/submodules/Node-Externals/cache" - New-Item -ItemType Directory -Path "$PWD/src/submodules/Node-Externals/cache" -} - try { Get-Command vsts-npm-auth -CommandType ExternalScript Write-Host "vsts-npm-auth is already installed" @@ -50,6 +42,7 @@ if (-not $WhatIf) { npm install --prefer-online --include optional } +# Add optional dependencies to the cache to ensure that they get mirrored Write-Host "Adding optional dependencies to the cache" $rollupOptionalDependencies = (Get-Content .\package-lock.json | ConvertFrom-Json -AsHashtable).packages['node_modules/rollup'].optionalDependencies | Select-Object '@rollup/rollup-*'; @@ -76,48 +69,18 @@ if ($null -ne $commonOptionalDependencyVersion) { } } -Write-Host "Verifying the cache" -if(-not $WhatIf) { - npm cache verify -} - -# Navigate to the Node-Externals submodule -# Checkout a branch named infrastructure/update-npm-package-cache- -# Stage the changes in the folder -# Commit the changes with the message "Updated npm package cache " -# Use the GH CLI to create a PR for the branch in the origin remote - -Push-Location src/submodules/Node-Externals -$branchName = "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" -if (-not $WhatIf) { - git branch -D $branchName 2>$null - git checkout -b $branchName - git add . - git commit -m "Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" -} - -if ($WhatIf -or $SkipPullRequestCreation) { - Write-Host "Skipping pull request creation for Node-Externals submodule" -} -else { - Write-Host "Creating pull request for Node-Externals submodule" - git branch --set-upstream-to=origin/main - git push origin $branchName`:$branchName --force; - gh repo set-default dotnet/Node-Externals - gh pr create --base main --head "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body "Do not merge this PR until the one in aspnetcore passes all checks." -} ## Navigate to the root of the repository -## Checkout a branch named infrastructure/update-npm-package-cache- +## Checkout a branch named infrastructure/update-npm-packages- ## Stage the changes in the folder -## Commit the changes with the message "Updated npm package cache " +## Commit the changes with the message "Updated npm packages " ## Use the GH CLI to create a PR for the branch in the origin remote -Pop-Location if(-not $WhatIf) { + $branchName = "infrastructure/update-npm-packages-$(Get-Date -Format 'yyyy-MM-dd')" git branch -D $branchName 2>$null git checkout -b $branchName git add . - git commit -m "Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" + git commit -m "Updated npm packages $(Get-Date -Format 'yyyy-MM-dd')" } if ($WhatIf -or $SkipPullRequestCreation) { @@ -128,5 +91,5 @@ else { git branch --set-upstream-to=origin/main git push origin $branchName`:$branchName --force; gh repo set-default dotnet/aspnetcore - gh pr create --base main --head $branchName --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body "" + gh pr create --base main --head $branchName --title "[Infrastructure] Updated npm packages $(Get-Date -Format 'yyyy-MM-dd')" --body "" } diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props index cedd59cd34ad..1ba8ba99dbe3 100644 --- a/eng/targets/Helix.Common.props +++ b/eng/targets/Helix.Common.props @@ -2,9 +2,9 @@ (AlmaLinux.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix-amd64 - (Alpine.318.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-amd64 + (Alpine.321.Amd64.Open)azurelinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64 (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64 - (Fedora.38.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix + (Fedora.41.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix (Mariner)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 (Debian.12.Arm64.Open)ubuntu.2204.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm64v8 @@ -29,7 +29,7 @@ - + @@ -42,14 +42,14 @@ - + - + - + diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index 43bf0cb7f7f1..0aab28ef20cc 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -17,9 +17,9 @@ $(HelixQueueAlmaLinux8); - $(HelixQueueAlpine318); + $(HelixQueueAlpine); $(HelixQueueDebian12); - $(HelixQueueFedora38); + $(HelixQueueFedora40); $(HelixQueueMariner); Ubuntu.2004.Amd64.Open; diff --git a/eng/targets/Java.Common.targets b/eng/targets/Java.Common.targets index c8905b10c4b6..81c643e60c27 100644 --- a/eng/targets/Java.Common.targets +++ b/eng/targets/Java.Common.targets @@ -64,8 +64,8 @@ - - + + diff --git a/global.json b/global.json index d4c978d226d2..16b496cf514f 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-rc.1.24452.12" + "version": "9.0.108" }, "tools": { - "dotnet": "9.0.100-rc.1.24452.12", + "dotnet": "9.0.108", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" @@ -24,10 +24,10 @@ "xcopy-msbuild": "17.1.0" }, "native-tools": { - "jdk": "11" + "jdk": "latest" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24466.2", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24466.2" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25380.1", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25380.1" } } diff --git a/package-lock.json b/package-lock.json index 01c597224000..dc63ccf881ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "aspnetcore", + "name": "@microsoft/aspnetcore", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "aspnetcore", + "name": "@microsoft/aspnetcore", "version": "1.0.0", "workspaces": [ "src/SignalR/clients/ts/signalr", @@ -74,13 +74,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha1-iC/Z4J6O4yTklr0EBAHG8EbvRGU=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha1-Q48sUkBxUx1kPG8BiOHijxMM68c=", "dev": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/highlight": "^7.25.7", "picocolors": "^1.0.0" }, "engines": { @@ -88,9 +88,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.24.8.tgz", - "integrity": "sha1-+RlkVTNMONBZrIsaFqUd7NqdMNM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.25.7.tgz", + "integrity": "sha1-uEef4AGO8KyHtrelxpFvzWeuLJw=", "dev": true, "license": "MIT", "engines": { @@ -98,22 +98,22 @@ } }, "node_modules/@babel/core": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.24.8.tgz", - "integrity": "sha1-wk+DmFIU9ZnO5fwm05PZqzIDQvQ=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.25.7.tgz", + "integrity": "sha1-Gz0UQVdXXa8TKjvICysY5uPKbs4=", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-module-transforms": "^7.24.8", - "@babel/helpers": "^7.24.8", - "@babel/parser": "^7.24.8", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helpers": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -129,13 +129,13 @@ } }, "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -146,66 +146,59 @@ } } }, - "node_modules/@babel/core/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/generator": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.24.8.tgz", - "integrity": "sha1-GALWrE13qRmcda4+tqCDNuXR05o=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.25.7.tgz", + "integrity": "sha1-3oasvrl1o+Ee6S3VIiPmsDtHnFY=", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.8", + "@babel/types": "^7.25.7", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha1-U3PHvINmsSoDO0vhrBOiBsZlaqs=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.7.tgz", + "integrity": "sha1-Y/Atv6H3y3Wpvbgy8wBYLzC7iXI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", - "integrity": "sha1-N9Zv6wEgJPJCK3Yrmyp8/ifH+6M=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.7.tgz", + "integrity": "sha1-1yFlDB9ZU3Hgoj7oFvHDxIjA1iI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", - "integrity": "sha1-tgfDFhzZ0XRJd9T5cTlXL+d4wnE=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", + "integrity": "sha1-ESYKwzIt2g71Pt+ubpe5YUSfX6Q=", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.8", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", + "@babel/compat-data": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -214,20 +207,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.8.tgz", - "integrity": "sha1-R/VGQI0TwgDAhn+dk1GE6qCFGwk=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.7.tgz", + "integrity": "sha1-XWUHTHbK51YHQhwA1r1Rf+GJLWs=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-annotate-as-pure": "^7.25.7", + "@babel/helper-member-expression-to-functions": "^7.25.7", + "@babel/helper-optimise-call-expression": "^7.25.7", + "@babel/helper-replace-supers": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", + "@babel/traverse": "^7.25.7", "semver": "^6.3.1" }, "engines": { @@ -238,14 +229,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz", - "integrity": "sha1-vk9DWoDcKwU8du60t9Ft0iz8ido=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.7.tgz", + "integrity": "sha1-3LRk8OLN/gwlzCoKWcN6uUDOiU4=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "regexpu-core": "^5.3.1", + "@babel/helper-annotate-as-pure": "^7.25.7", + "regexpu-core": "^6.1.1", "semver": "^6.3.1" }, "engines": { @@ -273,13 +264,13 @@ } }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -290,93 +281,45 @@ } } }, - "node_modules/@babel/helper-define-polyfill-provider/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha1-SzG6lVHR+QeBuoNJHdWc+bJp99k=", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha1-dfHhcldC85rGWE7gsW2UUT2jjdI=", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha1-tO3hzeL9iUNjl/MNyTdu4GsPJe4=", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", - "integrity": "sha1-YVXgeckTNX0kpMIEgNt8cSpcP7Y=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.7.tgz", + "integrity": "sha1-VBozsHHwNVpjoPpL35rDYBFrhXQ=", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha1-8vmAOS3luEwzKPxx04vYG7uDBCs=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", + "integrity": "sha1-26ANlSNTkVKQa6SSY+NtcmEEBHI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.24.8.tgz", - "integrity": "sha1-sfLfT5bzRlsNA1tpfshstR/zSP4=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", + "integrity": "sha1-Ksk3LF4AGxm8YvH+fZahjLCQHRo=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -386,22 +329,22 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", - "integrity": "sha1-iwoEVskvazI9J8/QDR1mTnZpKg8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.7.tgz", + "integrity": "sha1-HeG5lojph69yPu1E+n/A7nuX13o=", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", - "integrity": "sha1-lO5n6OwOXUTqe661Hlcb0mrweHg=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", + "integrity": "sha1-jsWyGBLZkuHviKmwaCYFN7bw42w=", "dev": true, "license": "MIT", "engines": { @@ -409,15 +352,15 @@ } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz", - "integrity": "sha1-s/DyA2KFInE4SdSUA/GkFEaL5Mc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.7.tgz", + "integrity": "sha1-nv3DnfX0ibzRVTPJErbHI6CmUCE=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-wrap-function": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.25.7", + "@babel/helper-wrap-function": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -427,15 +370,15 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz", - "integrity": "sha1-+TO37tgaHAJldA7ckUkc5RJQ92U=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-replace-supers/-/helper-replace-supers-7.25.7.tgz", + "integrity": "sha1-OM/aO26ZCHnHHQjQ/vkja2K9dfU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", - "@babel/helper-optimise-call-expression": "^7.24.7" + "@babel/helper-member-expression-to-functions": "^7.25.7", + "@babel/helper-optimise-call-expression": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -445,50 +388,37 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha1-vK3o2jrsjtFrnElTt05Qa1G17bM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", + "integrity": "sha1-Xrn2pgxday4PdgVwBPjay9364cA=", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", - "integrity": "sha1-X4+oO2ntXCetxWBE+L4rPqlmadk=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.7.tgz", + "integrity": "sha1-OCgxyRA4sabTJkP19JUFuEQsuHw=", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha1-g5SUNokOB/o9aHPGGpbju/aS2FY=", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha1-WzMpyaWIA9XfQl5XhYZYgagcpI0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha1-1Q6NN7EXYge0/prO3sOGxWWkSlQ=", "dev": true, "license": "MIT", "engines": { @@ -496,9 +426,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha1-dbiJz6+eNcKq9Czw1yyOkXGSUds=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha1-d7f2DECxXJffc1s4pmuh18PpPaU=", "dev": true, "license": "MIT", "engines": { @@ -506,9 +436,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", - "integrity": "sha1-NyXN7qi0gOhtNN8VMEgGoGl14z0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", + "integrity": "sha1-l9HWhESCKLMLUG2Qys5JXW9JJyk=", "dev": true, "license": "MIT", "engines": { @@ -516,43 +446,42 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz", - "integrity": "sha1-UtiTr35C7cp8bSxnZFSYJjNqrh8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-wrap-function/-/helper-wrap-function-7.25.7.tgz", + "integrity": "sha1-n2Ah3RxP30rVFcgJln/EusmnD+c=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-function-name": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.24.8.tgz", - "integrity": "sha1-KCDWTV1mhsyoeJ3RWwdM2GJ5WHM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.25.7.tgz", + "integrity": "sha1-CRtSy2l6Fx/gE2q2LlTkByEfCcI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.8" + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha1-oFqx3xNLKGVYquDtQebF9zG/QJ0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha1-IDg7X0QqpgbnteMEOwsar+nzfeU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -562,11 +491,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha1-WKTbvK1+sdSJMFJKP9k9k+kITG8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.25.7.tgz", + "integrity": "sha1-mbkncg9N2/64zRlaNj7UUy+HxZA=", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.7" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -575,14 +507,30 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz", - "integrity": "sha1-/QWf0nsYTqK0x+ZGhoqaOBu8MFU=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.7.tgz", + "integrity": "sha1-k5aaxQ701oslBLAbdYr3FOTL3WQ=", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/traverse": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.7.tgz", + "integrity": "sha1-ozjWEa253NWZuLHvogDIjr7/4EY=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -592,13 +540,13 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz", - "integrity": "sha1-RoCWykS7y+j8xXBXThLrGVDhgQc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.7.tgz", + "integrity": "sha1-xfdV6RHfrH72lXMAwPnEqMGMBvQ=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -608,15 +556,15 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", - "integrity": "sha1-5Oq91RCazDmbONeZmy72b8ICL4k=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.7.tgz", + "integrity": "sha1-O36gRJLe2ZCXi23qod/KEgrURVo=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", + "@babel/plugin-transform-optional-chaining": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -626,14 +574,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz", - "integrity": "sha1-cbIbsChtWBDmOhU4qpAcWOhzdew=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.7.tgz", + "integrity": "sha1-liKx1ZenA6o6kh5vWMnC2aAo0sU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -737,13 +685,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", - "integrity": "sha1-KgtAa1hxogqEEkBYaxMAziCIp3g=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz", + "integrity": "sha1-jOJI+fTtS37Uyy4OtO2e/Z9Skh8=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -753,13 +701,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", - "integrity": "sha1-tPnqlaeeaRJIDEtiZzn4agdmJMo=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", + "integrity": "sha1-143QSZ0w3xmlmOY6uJXiG5CbxD8=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -795,13 +743,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha1-OaH6Sn49PX804qzGvlhbcY0w4C0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", + "integrity": "sha1-U1LTmNEepefvMwyFTeodrgvxgWU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -921,13 +869,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha1-WNRYJxtNO2uyfuaslSWsuyWbrRw=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.7.tgz", + "integrity": "sha1-v8BbDMMevYrwmWRlDO5yO7IoEIs=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -954,13 +902,13 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", - "integrity": "sha1-T2iGwR5CO9afPOUdv0JCSl8nVRQ=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.7.tgz", + "integrity": "sha1-G57SLmiQoOn/RwNxxzuMdJvOw4Y=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -970,16 +918,16 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", - "integrity": "sha1-czClxQ4FGBylI1G4/QFkIADJbP0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.7.tgz", + "integrity": "sha1-r2GgKzDXv/UQjGO9Oax5OEA0Jtc=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-remap-async-to-generator": "^7.25.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -989,15 +937,15 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", - "integrity": "sha1-cqOvbEUdV1hCp+m1oChjQUNVvcw=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.7.tgz", + "integrity": "sha1-pExzI/jUKFpsVo3UPFw2HWNn7FI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7" + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-remap-async-to-generator": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1007,13 +955,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", - "integrity": "sha1-pCUdmOoMDzmdr+GjWAHqukVbvx8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.7.tgz", + "integrity": "sha1-4LiEPVVxcZovG/fihBF6M3n8wXw=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1023,13 +971,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz", - "integrity": "sha1-QgY+TeuFDHvXxV5ia/Tnq0jmzgI=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.7.tgz", + "integrity": "sha1-bauV6YrfeAzu8bHDqw5VzSDdQQo=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1039,14 +987,14 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", - "integrity": "sha1-JWh5RntXsLaMfd/Ft2WE85jNaDQ=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.7.tgz", + "integrity": "sha1-o4nPynoQrIDj/0x1/KCL0JetFSM=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1056,14 +1004,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", - "integrity": "sha1-yCAn67cBC8M8EW1LUET7v4wFSE0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.7.tgz", + "integrity": "sha1-0s88gS47MWLVaq30Vm9FwwU4yyw=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -1074,19 +1022,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.8.tgz", - "integrity": "sha1-rSMwH+W8FTykz3+1cqm8iwtxHPc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.7.tgz", + "integrity": "sha1-UQMgbPgNAig7u9BEUJ6jtl0JBrs=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-annotate-as-pure": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-replace-supers": "^7.25.7", + "@babel/traverse": "^7.25.7", "globals": "^11.1.0" }, "engines": { @@ -1097,14 +1043,14 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", - "integrity": "sha1-TKsyFOgLxx+uOFMjjRPQl7AExwc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.7.tgz", + "integrity": "sha1-f2IfCqE1S1NIqTWrEuOQOEJGb2U=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/template": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/template": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1114,13 +1060,13 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", - "integrity": "sha1-yCjoFNvkKicYqDjCouFqQI4FVVA=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.7.tgz", + "integrity": "sha1-9vJqn+77WqQf1FtvWDiQG1Mz1WA=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1130,14 +1076,14 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", - "integrity": "sha1-X4v4poDyEWpyB+FiiKX5dK1Hp6A=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.7.tgz", + "integrity": "sha1-nXdcSj/xrqZARTAPzUMJtKYQ7wI=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1147,13 +1093,13 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", - "integrity": "sha1-3SAQKJfJojJOWt//tn/zYQNZqO4=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.7.tgz", + "integrity": "sha1-+7p9EVXqt2vU8qA4y9XWWIO9epM=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1162,14 +1108,31 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.7.tgz", + "integrity": "sha1-ECsxYI3MIsCPvKGJThBGhgKdwUE=", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", - "integrity": "sha1-TYuV47risDdnMJGqCc0z/s1kGfQ=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.7.tgz", + "integrity": "sha1-MZBass+pTc8bH4zmYJZyCykI5Rg=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -1180,14 +1143,14 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", - "integrity": "sha1-tinuImRfQSAkKX1SRbzkJcMfmw0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.7.tgz", + "integrity": "sha1-WWGjojo5j6zNbN2zSiGCgH11+18=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1197,13 +1160,13 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", - "integrity": "sha1-F21S2NjtUWrq5wE+6VVtVAxT8Zc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.7.tgz", + "integrity": "sha1-vrJnnbb9O9/mrW3iyMrISobvLaE=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -1214,14 +1177,14 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", - "integrity": "sha1-8lsz9y3x2L52OZ4bjz+dNm61vHA=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.7.tgz", + "integrity": "sha1-Cs/qDyeqKQgYtbSKWkSz8D/BNmk=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1231,15 +1194,15 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz", - "integrity": "sha1-bYYB+//mZciURAq0RwvHId2RMdY=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.7.tgz", + "integrity": "sha1-fjlMzqNpOQKotQ3ti2rh+nuFGf0=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1249,13 +1212,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", - "integrity": "sha1-8+nDfAo3P+6G42iA1Fs2ZM7a9zo=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.7.tgz", + "integrity": "sha1-ZiZDNVSv9L1vdqLGIaH0DoAt+wo=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1266,13 +1229,13 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", - "integrity": "sha1-NrUFweZVFRqddgd5mpmI/FRn0Gw=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.7.tgz", + "integrity": "sha1-cMvcdC8s/bGmPqLL0BjRKmCyE8M=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1282,13 +1245,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", - "integrity": "sha1-pY+27aFsncj5/xx7G6bet/RpTLA=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.7.tgz", + "integrity": "sha1-k4R/61E6HxkcX12QPZkaDuJP6Zs=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1299,13 +1262,13 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", - "integrity": "sha1-O0RU+w4wLhi6SUW6MkassSSDFd8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.7.tgz", + "integrity": "sha1-CjbD+9RQzJ5khcUH8AX6PRvI/KU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1315,14 +1278,14 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", - "integrity": "sha1-ZQkO1JPEqDSXajyhzed25sz/Mtc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.7.tgz", + "integrity": "sha1-u05UO1YR9sjGhaL9SFQIcTo63z0=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1332,15 +1295,15 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", - "integrity": "sha1-q2Qh5WS3F8tHXW//cK5/EDU26jw=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.7.tgz", + "integrity": "sha1-Fz8MeRu3QHwJLObXfukOs/LR0v0=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-simple-access": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1350,16 +1313,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz", - "integrity": "sha1-+AEjFsUJj26N7m7NWOK8bwA9DOc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.7.tgz", + "integrity": "sha1-ixTTGaF3zJyF74sFEq/UKdni5gs=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1369,14 +1332,14 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", - "integrity": "sha1-7dn0PsVJCZYg333yTnuhO1x278g=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.7.tgz", + "integrity": "sha1-AO56fhJCiVSTgb+w4k2H/X+Eg2c=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1386,14 +1349,14 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", - "integrity": "sha1-kELpuFa8azaIwMLkBg6eELFGCSM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.7.tgz", + "integrity": "sha1-ovP21/OGk7RiVClRdI8KcqNNGW0=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1403,13 +1366,13 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", - "integrity": "sha1-Mf9UxOBVXMVJ1YFuSrOSQd+2qwA=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.7.tgz", + "integrity": "sha1-UrK95SO3bFSHSfONwwVPH0XoK8k=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1419,13 +1382,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", - "integrity": "sha1-HeRTTFkK+VlvU9Z/UqkvEtuYQSA=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.7.tgz", + "integrity": "sha1-CvhLhtQzJlTEPPAo29z4eLAKwWg=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1436,13 +1399,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", - "integrity": "sha1-vqYrU4yAYF2KD6ybQPSOl++n3mM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.7.tgz", + "integrity": "sha1-pRa3j4lNHAgoPznYCbIEj9LylEg=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1453,16 +1416,16 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", - "integrity": "sha1-0Tork0Na64oZfhFSIcqyZrpuVdY=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.7.tgz", + "integrity": "sha1-+gkWUhvpb9Q04ttZeAskswjG0Wk=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.7" + "@babel/plugin-transform-parameters": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1472,14 +1435,14 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", - "integrity": "sha1-Zu6v94MLupRd2JibYypAwE7WJb4=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.7.tgz", + "integrity": "sha1-WCqc6ozwoeAnMr5bWnA6ON7fVmE=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-replace-supers": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1489,13 +1452,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", - "integrity": "sha1-AOq9iD0N1qYMHFV1SHhZGbbnF7Q=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.7.tgz", + "integrity": "sha1-QA4tiR+SiPUjFpQjRpaqZxZOSRM=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1506,14 +1469,14 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", - "integrity": "sha1-uwKme2D/BAYIXBPRBMmag1zfNl0=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.7.tgz", + "integrity": "sha1-t/fJMhqh2EFOZ3mcKNh8I2guTWg=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -1524,13 +1487,13 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", - "integrity": "sha1-WIHwriEBhADjIPx+uBflKdElS2g=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.7.tgz", + "integrity": "sha1-gMOLA+9YD21r/+HFJUuzWYaFmsc=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1540,14 +1503,14 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", - "integrity": "sha1-5jGHRrKucKWdAj1cwTRKK6enX14=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.7.tgz", + "integrity": "sha1-x5CgT4N7S9YdawMXtDqhH/Z9zoA=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1557,15 +1520,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", - "integrity": "sha1-TuxrxwEojB+rX3LmpLvJ1n+soGE=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.7.tgz", + "integrity": "sha1-r/h379BbV8StBGEdjel78VWlM2k=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-annotate-as-pure": "^7.25.7", + "@babel/helper-create-class-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1576,13 +1539,13 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", - "integrity": "sha1-8NLtg4DfvtlJxC1NeQJmUl1ju9w=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.7.tgz", + "integrity": "sha1-qGErTqThBDDwABLs8BVWYsfWVQ0=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1592,13 +1555,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", - "integrity": "sha1-AhVi3kU02LSxhRdZ/Xr04F0sR/g=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.7.tgz", + "integrity": "sha1-brAG5tJvYnvC94RKnxl3ByGtbz4=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.25.7", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1609,13 +1572,13 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", - "integrity": "sha1-gAN/5PvwMfwRJQIheP85OLs3Q6Q=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.7.tgz", + "integrity": "sha1-3FayXgKvqr7zzgxbBrCRboUj6ZU=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1625,13 +1588,13 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", - "integrity": "sha1-hUSMa5luEi+p4ol0YUCqqZ2mTnM=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.7.tgz", + "integrity": "sha1-kmkKnGcZFWAtkVM8J4zI9r8SJ18=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1641,14 +1604,14 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", - "integrity": "sha1-6KOMD954guD7jxYDePdL2IXMe7M=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.7.tgz", + "integrity": "sha1-34Poman8ZihO5gGntzhWhDW5KZg=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1658,13 +1621,13 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", - "integrity": "sha1-lq6A16flJR9le1zxjx6mv5JvX+s=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.7.tgz", + "integrity": "sha1-NBxwAr738pA3vn+5aE43RELdDRc=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1674,13 +1637,13 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", - "integrity": "sha1-oF3rtKkHKuj5hbz3fz8hVDTI+Mg=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.7.tgz", + "integrity": "sha1-5WbFgbsW2FQd2HAQk7s0V6384Ws=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1690,13 +1653,13 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", - "integrity": "sha1-OD2rN/sHP1v+bmDGVMqsMJ+Suhw=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.7.tgz", + "integrity": "sha1-3rsShxgu/SBIjxJr40MyjGebZus=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1706,16 +1669,17 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.8.tgz", - "integrity": "sha1-wQTWKG4Ev35EuMuhtobUG61X64Q=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.7.tgz", + "integrity": "sha1-j8fD0o3dNrzkW5tIWUEp0OVgz74=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/plugin-syntax-typescript": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.25.7", + "@babel/helper-create-class-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", + "@babel/plugin-syntax-typescript": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1725,13 +1689,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", - "integrity": "sha1-ICOoLO0ftJcWMKLgeXZFAsQUjg4=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.7.tgz", + "integrity": "sha1-lzWSttE6kUeU4d6M8Tg+UOD4f4E=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1741,14 +1705,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", - "integrity": "sha1-kHOkzRO4bqccMmRllZCsCGYFu80=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.7.tgz", + "integrity": "sha1-JTSRl8zpZLE0P3T6fP33kaGxkZ4=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1758,14 +1722,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", - "integrity": "sha1-38PUpREnEICZsZgXwJY75qKt8Z8=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.7.tgz", + "integrity": "sha1-+TqTRBuvYfcTttVVKqqFa/qzSAk=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1775,14 +1739,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", - "integrity": "sha1-1AcF1nUjgDpXbinGPO9uUWuFjtk=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.7.tgz", + "integrity": "sha1-0bMpXSng+PTfdqvJCa0evukZVgw=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1792,28 +1756,29 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.24.8.tgz", - "integrity": "sha1-4NuU1/F9bw4lZOjSkZC8jNrOwtE=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.25.7.tgz", + "integrity": "sha1-/BsJIVLbS1g3e4XcBciQCBwRV+A=", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.8", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-validator-option": "^7.24.8", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", + "@babel/compat-data": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.7", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.7", - "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-assertions": "^7.25.7", + "@babel/plugin-syntax-import-attributes": "^7.25.7", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", @@ -1825,59 +1790,60 @@ "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.7", - "@babel/plugin-transform-async-generator-functions": "^7.24.7", - "@babel/plugin-transform-async-to-generator": "^7.24.7", - "@babel/plugin-transform-block-scoped-functions": "^7.24.7", - "@babel/plugin-transform-block-scoping": "^7.24.7", - "@babel/plugin-transform-class-properties": "^7.24.7", - "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.24.8", - "@babel/plugin-transform-computed-properties": "^7.24.7", - "@babel/plugin-transform-destructuring": "^7.24.8", - "@babel/plugin-transform-dotall-regex": "^7.24.7", - "@babel/plugin-transform-duplicate-keys": "^7.24.7", - "@babel/plugin-transform-dynamic-import": "^7.24.7", - "@babel/plugin-transform-exponentiation-operator": "^7.24.7", - "@babel/plugin-transform-export-namespace-from": "^7.24.7", - "@babel/plugin-transform-for-of": "^7.24.7", - "@babel/plugin-transform-function-name": "^7.24.7", - "@babel/plugin-transform-json-strings": "^7.24.7", - "@babel/plugin-transform-literals": "^7.24.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", - "@babel/plugin-transform-member-expression-literals": "^7.24.7", - "@babel/plugin-transform-modules-amd": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.8", - "@babel/plugin-transform-modules-systemjs": "^7.24.7", - "@babel/plugin-transform-modules-umd": "^7.24.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", - "@babel/plugin-transform-new-target": "^7.24.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", - "@babel/plugin-transform-numeric-separator": "^7.24.7", - "@babel/plugin-transform-object-rest-spread": "^7.24.7", - "@babel/plugin-transform-object-super": "^7.24.7", - "@babel/plugin-transform-optional-catch-binding": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.8", - "@babel/plugin-transform-parameters": "^7.24.7", - "@babel/plugin-transform-private-methods": "^7.24.7", - "@babel/plugin-transform-private-property-in-object": "^7.24.7", - "@babel/plugin-transform-property-literals": "^7.24.7", - "@babel/plugin-transform-regenerator": "^7.24.7", - "@babel/plugin-transform-reserved-words": "^7.24.7", - "@babel/plugin-transform-shorthand-properties": "^7.24.7", - "@babel/plugin-transform-spread": "^7.24.7", - "@babel/plugin-transform-sticky-regex": "^7.24.7", - "@babel/plugin-transform-template-literals": "^7.24.7", - "@babel/plugin-transform-typeof-symbol": "^7.24.8", - "@babel/plugin-transform-unicode-escapes": "^7.24.7", - "@babel/plugin-transform-unicode-property-regex": "^7.24.7", - "@babel/plugin-transform-unicode-regex": "^7.24.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", + "@babel/plugin-transform-arrow-functions": "^7.25.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.7", + "@babel/plugin-transform-async-to-generator": "^7.25.7", + "@babel/plugin-transform-block-scoped-functions": "^7.25.7", + "@babel/plugin-transform-block-scoping": "^7.25.7", + "@babel/plugin-transform-class-properties": "^7.25.7", + "@babel/plugin-transform-class-static-block": "^7.25.7", + "@babel/plugin-transform-classes": "^7.25.7", + "@babel/plugin-transform-computed-properties": "^7.25.7", + "@babel/plugin-transform-destructuring": "^7.25.7", + "@babel/plugin-transform-dotall-regex": "^7.25.7", + "@babel/plugin-transform-duplicate-keys": "^7.25.7", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.7", + "@babel/plugin-transform-dynamic-import": "^7.25.7", + "@babel/plugin-transform-exponentiation-operator": "^7.25.7", + "@babel/plugin-transform-export-namespace-from": "^7.25.7", + "@babel/plugin-transform-for-of": "^7.25.7", + "@babel/plugin-transform-function-name": "^7.25.7", + "@babel/plugin-transform-json-strings": "^7.25.7", + "@babel/plugin-transform-literals": "^7.25.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.7", + "@babel/plugin-transform-member-expression-literals": "^7.25.7", + "@babel/plugin-transform-modules-amd": "^7.25.7", + "@babel/plugin-transform-modules-commonjs": "^7.25.7", + "@babel/plugin-transform-modules-systemjs": "^7.25.7", + "@babel/plugin-transform-modules-umd": "^7.25.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.7", + "@babel/plugin-transform-new-target": "^7.25.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.7", + "@babel/plugin-transform-numeric-separator": "^7.25.7", + "@babel/plugin-transform-object-rest-spread": "^7.25.7", + "@babel/plugin-transform-object-super": "^7.25.7", + "@babel/plugin-transform-optional-catch-binding": "^7.25.7", + "@babel/plugin-transform-optional-chaining": "^7.25.7", + "@babel/plugin-transform-parameters": "^7.25.7", + "@babel/plugin-transform-private-methods": "^7.25.7", + "@babel/plugin-transform-private-property-in-object": "^7.25.7", + "@babel/plugin-transform-property-literals": "^7.25.7", + "@babel/plugin-transform-regenerator": "^7.25.7", + "@babel/plugin-transform-reserved-words": "^7.25.7", + "@babel/plugin-transform-shorthand-properties": "^7.25.7", + "@babel/plugin-transform-spread": "^7.25.7", + "@babel/plugin-transform-sticky-regex": "^7.25.7", + "@babel/plugin-transform-template-literals": "^7.25.7", + "@babel/plugin-transform-typeof-symbol": "^7.25.7", + "@babel/plugin-transform-unicode-escapes": "^7.25.7", + "@babel/plugin-transform-unicode-property-regex": "^7.25.7", + "@babel/plugin-transform-unicode-regex": "^7.25.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.7", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-corejs3": "^0.10.6", "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.37.1", + "core-js-compat": "^3.38.1", "semver": "^6.3.1" }, "engines": { @@ -1903,17 +1869,17 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", - "integrity": "sha1-Zs2G6o+MAUhVZx1eqac3E5y7/vE=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-typescript/-/preset-typescript-7.25.7.tgz", + "integrity": "sha1-Q8W2jsy4Vq5bUidLd7HDxBPN4bc=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", - "@babel/plugin-transform-typescript": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "@babel/plugin-syntax-jsx": "^7.25.7", + "@babel/plugin-transform-modules-commonjs": "^7.25.7", + "@babel/plugin-transform-typescript": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1922,17 +1888,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha1-8LppsHXh8F+yglt/rZkeetuxgxA=", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/runtime": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.24.8.tgz", - "integrity": "sha1-XZWMOCexPMbQXgOMB/suXjQg2C4=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha1-f/tTw3qPJHyMTTNeic3xai4ND7Y=", "dev": true, "license": "MIT", "dependencies": { @@ -1943,35 +1902,32 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha1-Au/O4xfQYJ0sBxF8tw74+xercxU=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/template/-/template-7.25.7.tgz", + "integrity": "sha1-J/ac44KFXZFbFKsP5ftMv4j6B2k=", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/code-frame": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.24.8.tgz", - "integrity": "sha1-bBTtUjK3VJ3zNx2CD72av819+rc=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.25.7.tgz", + "integrity": "sha1-g+NnYZvhyrjk8oku8wugTCakD6g=", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1980,13 +1936,13 @@ } }, "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1997,22 +1953,15 @@ } } }, - "node_modules/@babel/traverse/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/types": { - "version": "7.24.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.24.8.tgz", - "integrity": "sha1-1R/6kEOxfTZiLvpE6GGknmnhMKg=", + "version": "7.25.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.25.7.tgz", + "integrity": "sha1-G3clwdOlnzKMtwDOcExGNx5u75s=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2113,9 +2062,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha1-sP/QMStKP9LW93I35ySKWtOmgK4=", + "version": "4.11.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha1-pUe638cZ6z5fS1VjJeVC++nXoY8=", "dev": true, "license": "MIT", "engines": { @@ -2154,13 +2103,13 @@ "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2200,13 +2149,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@eslint/eslintrc/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.20.2.tgz", @@ -2221,9 +2163,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha1-pUF66EJ4c/HdCLcLNXS0U+Z7X38=", + "version": "8.57.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha1-3mM9s+wu9qPIni8ZA4Bj6KEi4sI=", "dev": true, "license": "MIT", "engines": { @@ -2238,13 +2180,13 @@ "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha1-145IGgOfdWbsyWYLTqf+ax/sRCs=", + "version": "0.13.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha1-+5B2JN8yVtBLmqLfUNeql+xkh0g=", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -2253,13 +2195,13 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2270,13 +2212,6 @@ } } }, - "node_modules/@humanwhocodes/config-array/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -2317,9 +2252,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha1-MYPjj66aZdfLXlOUXNWJfQJgoGo=", + "version": "6.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha1-lexAnGlhnWyxuLNPFLZg7yjr1lQ=", "dev": true, "license": "MIT", "engines": { @@ -2904,9 +2839,9 @@ } }, "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -3250,10 +3185,42 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@microsoft/client-ts": { + "resolved": "src/SignalR/clients/ts", + "link": true + }, + "node_modules/@microsoft/components.authentication": { + "resolved": "src/Components/WebAssembly/WebAssembly.Authentication/src/Interop", + "link": true + }, "node_modules/@microsoft/dotnet-js-interop": { "resolved": "src/JSInterop/Microsoft.JSInterop.JS/src", "link": true }, + "node_modules/@microsoft/dotnet-runtime": { + "resolved": "src/Components/dotnet-runtime-js", + "link": true + }, + "node_modules/@microsoft/functionaltests": { + "resolved": "src/SignalR/clients/ts/FunctionalTests", + "link": true + }, + "node_modules/@microsoft/microsoft.aspnetcore.components.web.js": { + "resolved": "src/Components/Web.JS", + "link": true + }, + "node_modules/@microsoft/microsoft.aspnetcore.projecttemplates.tests": { + "resolved": "src/ProjectTemplates/test/Templates.Tests", + "link": true + }, + "node_modules/@microsoft/microsoft.components.customelements": { + "resolved": "src/Components/CustomElements/src/js", + "link": true + }, + "node_modules/@microsoft/microsoft.msal.components.webassembly": { + "resolved": "src/Components/WebAssembly/Authentication.Msal/src/Interop", + "link": true + }, "node_modules/@microsoft/signalr": { "resolved": "src/SignalR/clients/ts/signalr", "link": true @@ -3323,9 +3290,9 @@ } }, "node_modules/@npmcli/fs/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -3366,9 +3333,9 @@ } }, "node_modules/@npmcli/git/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -3546,20 +3513,20 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.2.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@puppeteer/browsers/-/browsers-2.2.3.tgz", - "integrity": "sha1-rWt5EpxQgl533auggmgPTa0LZ04=", + "version": "2.4.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@puppeteer/browsers/-/browsers-2.4.0.tgz", + "integrity": "sha1-oN0PTjgeU/UJEJroO4kdtZcnUPU=", "dev": true, "license": "Apache-2.0", "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.4.0", - "semver": "7.6.0", - "tar-fs": "3.0.5", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" @@ -3584,13 +3551,13 @@ } }, "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3601,35 +3568,12 @@ } } }, - "node_modules/@puppeteer/browsers/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@puppeteer/browsers/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@puppeteer/browsers/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3637,13 +3581,6 @@ "node": ">=10" } }, - "node_modules/@puppeteer/browsers/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true, - "license": "ISC" - }, "node_modules/@puppeteer/browsers/node_modules/yargs": { "version": "17.7.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs/-/yargs-17.7.2.tgz", @@ -3690,16 +3627,15 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha1-5eCwWb2FyldIlJLylc6IwtSw2vk=", + "version": "15.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha1-77s1UVyWcuVBwI1Zyrou/0kqVdU=", "dev": true, "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", "resolve": "^1.22.1" }, @@ -3788,9 +3724,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha1-flPt3Ix/SDpK0LlK+x9/X9PHceA=", + "version": "5.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/pluginutils/-/pluginutils-5.1.2.tgz", + "integrity": "sha1-07yfD+pP1AhqqsaqEC8/pYfOi9k=", "dev": true, "license": "MIT", "dependencies": { @@ -3811,9 +3747,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", - "integrity": "sha1-8NpIEkS32eoVKWs19/45zYEVc5Y=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha1-FmH/Xqm+s2J5UwTLkWBJq6esnFQ=", "cpu": [ "arm" ], @@ -3825,9 +3761,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", - "integrity": "sha1-gqs8V19CNftker6l4I7sbPMllk4=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha1-L/qpHxtVoAgrinIlJXQarcvTlx4=", "cpu": [ "arm64" ], @@ -3839,9 +3775,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", - "integrity": "sha1-alMEUuaKkVKAnOWN4fiVl2MqCFs=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha1-YnAHIhskuMwwY3A+7guRd+30nB8=", "cpu": [ "arm64" ], @@ -3853,9 +3789,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", - "integrity": "sha1-R3J0efXKKSz0NNfnWvJyW3JOy8c=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha1-BgVQYUK555bDcNWcWYSulbl1hyQ=", "cpu": [ "x64" ], @@ -3867,9 +3803,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", - "integrity": "sha1-Rhk8SYqnkCqNuJrAASgGAyDoT+8=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha1-Yt/RltSxDAwtuDOJcWTS0xnuDLs=", "cpu": [ "arm" ], @@ -3881,9 +3817,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", - "integrity": "sha1-Itgx/iOWQ8HQXJiQZCAyXO5DnYU=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha1-U85yrrmC8fNLWLOAuq+vaiQP3bM=", "cpu": [ "arm" ], @@ -3895,9 +3831,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", - "integrity": "sha1-GavTNpXsnViLSoWNEiYxQzCE5KM=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha1-FjKZD2KnXHT0PksUqzWX1+1BZJY=", "cpu": [ "arm64" ], @@ -3909,9 +3845,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", - "integrity": "sha1-1gr4wLm+QkQk/5aguhn85l0m9qs=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha1-jAOplu+0HiV7QUsuBWC3oh8tkGU=", "cpu": [ "arm64" ], @@ -3923,9 +3859,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", - "integrity": "sha1-sRlOXtbROP3eCELRJvzN50qQ9Fc=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha1-W5hylijVvMj383tYsE1oRfhce10=", "cpu": [ "ppc64" ], @@ -3937,9 +3873,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", - "integrity": "sha1-9aY1wBe5v/i4VrAiH71cDjNzt+w=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha1-SOQuQfTKvzVzz+/LRIWZxRLiKYM=", "cpu": [ "riscv64" ], @@ -3951,9 +3887,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", - "integrity": "sha1-8QQ9n0Amv2mVhjyz+N1HMmBuS6o=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha1-4LT5qWaHLLfT4hueQSpLfv1/C1g=", "cpu": [ "s390x" ], @@ -3965,9 +3901,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", - "integrity": "sha1-HngXML5EURnwbJ318YXhk7yCxhA=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha1-eBRHQZkxAPR709py/OIV4HeuA2s=", "cpu": [ "x64" ], @@ -3979,9 +3915,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", - "integrity": "sha1-CPEuGWXW8n1omP+TJZISHMpqvEs=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha1-2f4ylxiDzRvYWDNr0zocPKYUYSc=", "cpu": [ "x64" ], @@ -3993,9 +3929,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", - "integrity": "sha1-Sl3Lvnr31ByskrCXmOfBgx2h9Zk=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha1-cfo+o2kxbbcDqQnHkHQ5cumK+uU=", "cpu": [ "arm64" ], @@ -4007,9 +3943,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", - "integrity": "sha1-B1sHE95ieEOnO0zw4IfFa1Pp14A=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha1-ZT9ZiaYGWOF9dXajmW3rOQLjQuI=", "cpu": [ "ia32" ], @@ -4021,9 +3957,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", - "integrity": "sha1-DLJAwUfA39Dj6v9MwGCnctOeFVw=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha1-BXTX6HtE7oUR0IzH+RS8uAK3CBg=", "cpu": [ "x64" ], @@ -4418,9 +4354,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha1-ps4+VW4A/ZiV3Yct0XKtDUvWh/Q=", + "version": "1.0.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha1-Yo7/7q4gZKG055946B2Ht+X8e1A=", "dev": true, "license": "MIT" }, @@ -4525,12 +4461,12 @@ } }, "node_modules/@types/node": { - "version": "20.14.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-20.14.10.tgz", - "integrity": "sha1-oaIYKQ8bZChoLjrwRHheWHTbRpo=", + "version": "22.7.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-22.7.5.tgz", + "integrity": "sha1-z96YFyenqzYRpIFRC0c65URCuSs=", "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/parse5": { @@ -4615,9 +4551,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha1-Awd0cjovf6r+v2RfTlpINx3KYik=", + "version": "17.0.33", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha1-jDIwPag+7AUKhLPHrnufki0T4y0=", "dev": true, "license": "MIT", "dependencies": { @@ -4678,13 +4614,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -4695,17 +4631,10 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -4744,13 +4673,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -4761,13 +4690,6 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", @@ -4815,13 +4737,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -4832,13 +4754,6 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@typescript-eslint/types": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/types/-/types-5.62.0.tgz", @@ -4882,13 +4797,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -4899,17 +4814,10 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -4947,9 +4855,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -5447,9 +5355,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha1-nK6sKe76oMQePUxlE33k1vNN9D4=", + "version": "8.3.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha1-eU3RacOXft9LpOpHWDWHxYZiNrc=", "dev": true, "license": "MIT", "dependencies": { @@ -5473,13 +5381,13 @@ } }, "node_modules/agent-base/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -5490,13 +5398,6 @@ } } }, - "node_modules/agent-base/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/agentkeepalive": { "version": "4.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agentkeepalive/-/agentkeepalive-4.5.0.tgz", @@ -5823,16 +5724,16 @@ } }, "node_modules/ast-types/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/async/-/async-3.2.5.tgz", - "integrity": "sha1-69Uqj9r3oiiaJN85n42Ehcika2Y=", + "version": "3.2.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/async/-/async-3.2.6.tgz", + "integrity": "sha1-Gwco4Ukp1RuFtEm38G4nwRReOM4=", "dev": true, "license": "MIT" }, @@ -5874,9 +5775,9 @@ } }, "node_modules/b4a": { - "version": "1.6.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/b4a/-/b4a-1.6.6.tgz", - "integrity": "sha1-pMw0mjhRmHw8SsLXeFwYdE9tqbo=", + "version": "1.6.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha1-qZWH1Ou/vVpuOyG9tdX6OFdnq+Q=", "dev": true, "license": "Apache-2.0" }, @@ -6027,14 +5928,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", - "integrity": "sha1-eJrIJAWtZkwgR20CM7SFKB3rnHc=", + "version": "0.10.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", + "integrity": "sha1-Le2lfK71D1nFJa60lk07L4Z3EMc=", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1", - "core-js-compat": "^3.36.1" + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -6054,24 +5955,27 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha1-tDmSObibKgEfndvj5PQB/EDP9zs=", + "version": "1.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha1-mpKer+zkGWEu9K5PYLGGLrrY7zA=", "dev": true, "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -6102,17 +6006,17 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.4.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.4.2.tgz", - "integrity": "sha1-MUDMp6DhHUmz7cUEGrVgZZ/Y4fg=", + "version": "2.5.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.5.0.tgz", + "integrity": "sha1-MFtRHiYv/YudVhawVkZPjhszKcw=", "dev": true, "license": "Apache-2.0", "optional": true }, "node_modules/bare-fs": { - "version": "2.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-fs/-/bare-fs-2.3.1.tgz", - "integrity": "sha1-zb1j2selUt+yuH0YyCIpjR79IT0=", + "version": "2.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha1-Bdqo6CBq60bRPC/iWizTeXsNKEo=", "dev": true, "license": "Apache-2.0", "optional": true, @@ -6123,9 +6027,9 @@ } }, "node_modules/bare-os": { - "version": "2.4.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.4.0.tgz", - "integrity": "sha1-XeXjuncE9FnJZWYp7cp8xzbgZgg=", + "version": "2.4.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha1-ASQzkusKbpRxd7t8ikUSPUXJsak=", "dev": true, "license": "Apache-2.0", "optional": true @@ -6142,14 +6046,15 @@ } }, "node_modules/bare-stream": { - "version": "2.1.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-stream/-/bare-stream-2.1.3.tgz", - "integrity": "sha1-BwtpkZljpDfMniBVTt4HnOChKbI=", + "version": "2.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-stream/-/bare-stream-2.3.0.tgz", + "integrity": "sha1-W+8cq4IiUXMV/KE4W9fwjf9X9DU=", "dev": true, "license": "Apache-2.0", "optional": true, "dependencies": { - "streamx": "^2.18.0" + "b4a": "^1.6.6", + "streamx": "^2.20.0" } }, "node_modules/base64-js": { @@ -6227,9 +6132,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha1-b+sOIcRyTQbef/ONo22tT1enR/0=", + "version": "1.20.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha1-GVNDEiHG+1zWPEs21T+rCSjlSMY=", "dev": true, "license": "MIT", "dependencies": { @@ -6241,7 +6146,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -6438,9 +6343,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha1-JE/oA2QfHBnCjEjEtuyXNus9Mu0=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha1-oTJf5LyAtk/aFpYp/AGz1s7NONQ=", "dev": true, "funding": [ { @@ -6458,9 +6363,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", "update-browserslist-db": "^1.1.0" }, "bin": { @@ -6756,9 +6661,9 @@ } }, "node_modules/camel-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -6773,9 +6678,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001642", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", - "integrity": "sha1-aqZhDrJAZ8JG0wxX8FWp0Kf40F8=", + "version": "1.0.30001667", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha1-mfxeoNnG6WiXoQSoNSYEN4N3+Uk=", "dev": true, "funding": [ { @@ -6806,9 +6711,9 @@ } }, "node_modules/capital-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -6849,9 +6754,9 @@ } }, "node_modules/change-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -6989,9 +6894,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.6.0.tgz", - "integrity": "sha1-y6lzfc30KF0MsauCmOA9COE3C2Q=", + "version": "0.8.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.8.0.tgz", + "integrity": "sha1-/9edrX2x/Mh08cVfz0be0FqIQmk=", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -7020,9 +6925,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha1-xIU0Guj9mZyk7lry16HJrgHgCZw=", + "version": "1.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha1-cHQTeE27OnKqEcLysEKgvvQAQXA=", "dev": true, "license": "MIT" }, @@ -7049,10 +6954,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/client-ts": { - "resolved": "src/SignalR/clients/ts", - "link": true - }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cliui/-/cliui-7.0.4.tgz", @@ -7191,10 +7092,6 @@ "dev": true, "license": "MIT" }, - "node_modules/components.authentication": { - "resolved": "src/Components/WebAssembly/WebAssembly.Authentication/src/Interop", - "link": true - }, "node_modules/compress-commons": { "version": "4.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/compress-commons/-/compress-commons-4.1.2.tgz", @@ -7381,9 +7278,9 @@ } }, "node_modules/constant-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -7415,9 +7312,9 @@ } }, "node_modules/core-js": { - "version": "3.37.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js/-/core-js-3.37.1.tgz", - "integrity": "sha1-0hdR3bdWUYrFoA5NZkmd+YGmLbk=", + "version": "3.38.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js/-/core-js-3.38.1.tgz", + "integrity": "sha1-qjdbeaKGpnA4iho2M2PVNnfAOD4=", "hasInstallScript": true, "license": "MIT", "funding": { @@ -7426,13 +7323,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.37.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js-compat/-/core-js-compat-3.37.1.tgz", - "integrity": "sha1-yEQxDHhS9L30m40zlzC5fhf/Ce4=", + "version": "3.38.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js-compat/-/core-js-compat-3.38.1.tgz", + "integrity": "sha1-K8eimHRspae8ucFkvLEg8uvAmgk=", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.23.0" + "browserslist": "^4.23.3" }, "funding": { "type": "opencollective", @@ -7660,10 +7557,11 @@ "license": "MIT" }, "node_modules/css-shorthand-properties": { - "version": "1.1.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz", - "integrity": "sha1-HICOY1U8KD8ony3Vb87o8zN72TU=", - "dev": true + "version": "1.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/css-shorthand-properties/-/css-shorthand-properties-1.1.2.tgz", + "integrity": "sha1-OP4thCIZBgfNsZwnPEIwO3dNr5k=", + "dev": true, + "license": "MIT" }, "node_modules/css-value": { "version": "0.0.1", @@ -8023,9 +7921,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1299070", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz", - "integrity": "sha1-s+TPC2eKRvD5B65uB+A606U8AN8=", + "version": "0.0.1342118", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1342118.tgz", + "integrity": "sha1-6hNvwXAVcsCDAjPctBTchX5YLgo=", "dev": true, "license": "BSD-3-Clause" }, @@ -8120,16 +8018,12 @@ } }, "node_modules/dot-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, - "node_modules/dotnet-runtime": { - "resolved": "src/Components/dotnet-runtime-js", - "link": true - }, "node_modules/duplexer": { "version": "0.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/duplexer/-/duplexer-0.1.1.tgz", @@ -8185,9 +8079,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.827", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.4.827.tgz", - "integrity": "sha1-dgaO0ccd05Y+G+/IroFQBLLaagI=", + "version": "1.5.33", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", + "integrity": "sha1-j2RphmEkDnD9vEsDLmCF45HwXgk=", "dev": true, "license": "ISC" }, @@ -8264,9 +8158,9 @@ } }, "node_modules/engine.io": { - "version": "6.5.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io/-/engine.io-6.5.5.tgz", - "integrity": "sha1-QwuA2IQMqrkaUOniPLVRRVGV/JM=", + "version": "6.6.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io/-/engine.io-6.6.1.tgz", + "integrity": "sha1-qCseVREjmg6V+sFFFocO6ROP68g=", "dev": true, "license": "MIT", "dependencies": { @@ -8296,13 +8190,13 @@ } }, "node_modules/engine.io/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -8313,13 +8207,6 @@ } } }, - "node_modules/engine.io/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/engine.io/node_modules/ws": { "version": "8.17.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.1.tgz", @@ -8393,9 +8280,9 @@ } }, "node_modules/envinfo": { - "version": "7.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/envinfo/-/envinfo-7.13.0.tgz", - "integrity": "sha1-gfu4Hl2jXXToFJQa6rfDJaYG+zE=", + "version": "7.14.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha1-JtrF21RBjypMEVkVOgsq6YCDiq4=", "dev": true, "license": "MIT", "bin": { @@ -8480,9 +8367,9 @@ "license": "MIT" }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha1-VAdumrKepb89jx7WKs/7uIJy3yc=", + "version": "3.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha1-ARo/aYVroYnf+n3I/M6Z0qh5A+U=", "dev": true, "license": "MIT", "engines": { @@ -8539,17 +8426,17 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha1-x4am/Q4LaJQar2JFlvuYcIkZVmg=", + "version": "8.57.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha1-ffEJZUq6fju+XI6uUzxeRh08bKk=", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -8628,13 +8515,13 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -8658,17 +8545,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -8776,13 +8656,13 @@ "license": "MIT" }, "node_modules/eslint/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -8905,13 +8785,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-locate/-/p-locate-5.0.0.tgz", @@ -9180,13 +9053,13 @@ } }, "node_modules/extract-zip/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -9213,13 +9086,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/extract-zip/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -9279,9 +9145,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha1-zd0u7PyDpxwb4swu8gYTMb6KcTQ=", + "version": "3.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-uri/-/fast-uri-3.0.2.tgz", + "integrity": "sha1-14spjPcP07dS/ZURdaPaantI8CQ=", "dev": true, "license": "MIT" }, @@ -9586,9 +9452,9 @@ "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha1-f4FcDNpCScdP8J6V75fCO1/QOZs=", + "version": "1.15.9", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha1-pgT6EORDv5jKlCKNnuvMLoosjuE=", "dev": true, "funding": [ { @@ -9607,9 +9473,9 @@ } }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha1-dnAEzPOlsw3zm+2QcYurQ/4KWfc=", + "version": "3.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha1-CshkTAbkMUOfhWHbjs8pp7VRnHc=", "dev": true, "license": "ISC", "dependencies": { @@ -9652,9 +9518,9 @@ } }, "node_modules/fp-ts": { - "version": "2.16.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.8.tgz", - "integrity": "sha1-36HqHJZ6xnlMQ86HeuuO129eDfc=", + "version": "2.16.9", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.9.tgz", + "integrity": "sha1-mWKPxeC7O0MsShbY9EVSRzgLroo=", "dev": true, "license": "MIT" }, @@ -9732,10 +9598,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functionaltests": { - "resolved": "src/SignalR/clients/ts/FunctionalTests", - "link": true - }, "node_modules/gauge": { "version": "4.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/gauge/-/gauge-4.0.4.tgz", @@ -9856,13 +9718,13 @@ } }, "node_modules/get-uri/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -9888,13 +9750,6 @@ "node": ">=14.14" } }, - "node_modules/get-uri/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-8.1.0.tgz", @@ -9978,9 +9833,9 @@ } }, "node_modules/global-agent/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -10211,9 +10066,9 @@ } }, "node_modules/header-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -10324,13 +10179,13 @@ } }, "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -10341,13 +10196,6 @@ } } }, - "node_modules/http-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/http2-wrapper": { "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http2-wrapper/-/http2-wrapper-1.0.3.tgz", @@ -10376,13 +10224,13 @@ } }, "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -10393,13 +10241,6 @@ } } }, - "node_modules/https-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/human-signals/-/human-signals-2.1.0.tgz", @@ -10454,9 +10295,9 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha1-UHPlVM1CxbM7OUN19Ti4WT401O8=", + "version": "5.3.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", "dev": true, "license": "MIT", "engines": { @@ -10530,9 +10371,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha1-tEed+KX9RPbNziQHBnVnYGPJXLQ=", + "version": "3.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha1-w9XHRXmMAqb4uJdyarpRABhu4mA=", "dev": true, "license": "MIT", "dependencies": { @@ -10780,9 +10621,9 @@ } }, "node_modules/is-core-module": { - "version": "2.14.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-core-module/-/is-core-module-2.14.0.tgz", - "integrity": "sha1-Q7jvn0amoIiI22ex/9Tsnj39WdE=", + "version": "2.15.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha1-pzY6Jb7pQv76sN4Tv2qjcsgtzDc=", "dev": true, "license": "MIT", "dependencies": { @@ -11080,13 +10921,13 @@ } }, "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -11097,13 +10938,6 @@ } } }, - "node_modules/istanbul-lib-source-maps/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-reports/-/istanbul-reports-3.1.7.tgz", @@ -11135,9 +10969,9 @@ } }, "node_modules/jake": { - "version": "10.9.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jake/-/jake-10.9.1.tgz", - "integrity": "sha1-jclrf8xByxmqUCr1BtpOHVb15is=", + "version": "10.9.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jake/-/jake-10.9.2.tgz", + "integrity": "sha1-auSH5qaa/sOl4WdiiZa1nzWuK38=", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -13156,9 +12990,9 @@ "license": "MIT" }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -13662,16 +13496,16 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", + "version": "3.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha1-u4sJpll7pCZCXy5KByRcPQC5ND4=", "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-buffer": { @@ -13744,9 +13578,9 @@ "license": "MIT" }, "node_modules/karma": { - "version": "6.4.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma/-/karma-6.4.3.tgz", - "integrity": "sha1-dj5QD5lZchi7tTbeGhSsxM7qfOg=", + "version": "6.4.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma/-/karma-6.4.4.tgz", + "integrity": "sha1-36WkJs9ai1O0PNVO8NDQl0I1FJI=", "dev": true, "license": "MIT", "dependencies": { @@ -14398,13 +14232,13 @@ } }, "node_modules/log4js/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -14415,17 +14249,10 @@ } } }, - "node_modules/log4js/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/loglevel": { - "version": "1.9.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loglevel/-/loglevel-1.9.1.tgz", - "integrity": "sha1-1jl2rJvNA8fIcxFtQcKoW6//G+c=", + "version": "1.9.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha1-wuAo1sdXcgEH305kUIUw22Yhugg=", "dev": true, "license": "MIT", "engines": { @@ -14454,9 +14281,9 @@ } }, "node_modules/lower-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -14480,13 +14307,13 @@ } }, "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha1-Ej2cQaDLVkDIkrBB1M+zvQqks54=", + "version": "0.30.11", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha1-MBpvk7PowssTrBp6ZzSSwN/RKVQ=", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/make-dir": { @@ -14506,9 +14333,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -14671,9 +14498,9 @@ } }, "node_modules/make-fetch-happen/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -14860,22 +14687,6 @@ "node": ">=8.6" } }, - "node_modules/microsoft.aspnetcore.components.web.js": { - "resolved": "src/Components/Web.JS", - "link": true - }, - "node_modules/microsoft.aspnetcore.projecttemplates.tests": { - "resolved": "src/ProjectTemplates/test/Templates.Tests", - "link": true - }, - "node_modules/microsoft.components.customelements": { - "resolved": "src/Components/CustomElements/src/js", - "link": true - }, - "node_modules/microsoft.msal.components.webassembly": { - "resolved": "src/Components/WebAssembly/Authentication.Msal/src/Interop", - "link": true - }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mime/-/mime-2.6.0.tgz", @@ -15075,9 +14886,9 @@ "license": "ISC" }, "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha1-ftu5JYj7/C/x2y/BA5est7a0Sqc=", + "version": "1.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-json-stream/-/minipass-json-stream-1.0.2.tgz", + "integrity": "sha1-USFhbHehHEBsP/p3UJ4Ld7smfsM=", "dev": true, "license": "MIT", "dependencies": { @@ -15235,7 +15046,6 @@ "version": "2.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.3.tgz", "integrity": "sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=", - "dev": true, "license": "MIT" }, "node_modules/natural-compare": { @@ -15291,9 +15101,9 @@ } }, "node_modules/no-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -15403,9 +15213,9 @@ } }, "node_modules/node-gyp/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -15423,9 +15233,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha1-L/sFO864sr6Elezhq2zmAMRGGws=", + "version": "2.0.18", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha1-8BDo014v6NaylE8D9wIT7O3Eyj8=", "dev": true, "license": "MIT" }, @@ -15462,9 +15272,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -15523,9 +15333,9 @@ } }, "node_modules/npm-install-checks/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -15562,9 +15372,9 @@ } }, "node_modules/npm-package-arg/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -15604,9 +15414,9 @@ } }, "node_modules/npm-pick-manifest/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -15730,9 +15540,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.12", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.12.tgz", - "integrity": "sha1-+2r1wOw1sntFges7utNOyeXGlvg=", + "version": "2.2.13", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha1-5WtOmJYOegQOVHRTZYflmcT/RlU=", "dev": true, "license": "MIT" }, @@ -15973,13 +15783,13 @@ } }, "node_modules/pac-proxy-agent/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -16018,13 +15828,6 @@ "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { "version": "8.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", @@ -16055,9 +15858,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha1-5QHNMJSyeEletCWNTJ9tWsMBnwA=", + "version": "1.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha1-TxRxoBCCeob5TP2bByfjbSZ95QU=", "dev": true, "license": "BlueOak-1.0.0" }, @@ -16106,9 +15909,9 @@ } }, "node_modules/param-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -16179,9 +15982,9 @@ } }, "node_modules/pascal-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -16197,9 +16000,9 @@ } }, "node_modules/path-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -16280,9 +16083,9 @@ "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha1-qK1Xm1cZUvDl0liS3lRFvP4lqqE=", + "version": "1.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha1-U1i3anjN5IO6XO9qnclnFECyfVk=", "dev": true, "license": "ISC" }, @@ -16569,13 +16372,13 @@ } }, "node_modules/proxy-agent/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -16624,13 +16427,6 @@ "node": ">=12" } }, - "node_modules/proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/proxy-agent/node_modules/socks-proxy-agent": { "version": "8.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", @@ -16667,9 +16463,9 @@ "license": "MIT" }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pump/-/pump-3.0.0.tgz", - "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", + "version": "3.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pump/-/pump-3.0.2.tgz", + "integrity": "sha1-g28+3WvC7lmSVskk/+DYhXPdy/g=", "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -16684,20 +16480,22 @@ "license": "MIT" }, "node_modules/puppeteer": { - "version": "22.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-22.13.0.tgz", - "integrity": "sha1-/1ZhYWUsL73C2/LDjIW+hBi4owI=", + "version": "23.5.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-23.5.1.tgz", + "integrity": "sha1-TtI4ilXvbAsNivj4PLM9mkzEBEQ=", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.2.3", + "@puppeteer/browsers": "2.4.0", + "chromium-bidi": "0.8.0", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1299070", - "puppeteer-core": "22.13.0" + "devtools-protocol": "0.0.1342118", + "puppeteer-core": "23.5.1", + "typed-query-selector": "^2.12.0" }, "bin": { - "puppeteer": "lib/esm/puppeteer/node/cli.js" + "puppeteer": "lib/cjs/puppeteer/node/cli.js" }, "engines": { "node": ">=18" @@ -16745,13 +16543,13 @@ "license": "ISC" }, "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -16804,13 +16602,6 @@ "node": ">= 6.0.0" } }, - "node_modules/puppeteer-core/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/puppeteer-core/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", @@ -16863,13 +16654,13 @@ } }, "node_modules/puppeteer/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -16880,24 +16671,18 @@ } } }, - "node_modules/puppeteer/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/puppeteer/node_modules/puppeteer-core": { - "version": "22.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-22.13.0.tgz", - "integrity": "sha1-q6RekAzVN5/eiFELf0kVAXzGtcM=", + "version": "23.5.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-23.5.1.tgz", + "integrity": "sha1-+sQmiCDDXTFy54Oh8aOXc7LA98Y=", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.2.3", - "chromium-bidi": "0.6.0", - "debug": "^4.3.5", - "devtools-protocol": "0.0.1299070", + "@puppeteer/browsers": "2.4.0", + "chromium-bidi": "0.8.0", + "debug": "^4.3.7", + "devtools-protocol": "0.0.1342118", + "typed-query-selector": "^2.12.0", "ws": "^8.18.0" }, "engines": { @@ -16954,13 +16739,13 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/qs/-/qs-6.11.0.tgz", - "integrity": "sha1-/Q2WNEb3pl4TZ+AavYVClFPww3o=", + "version": "6.13.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/qs/-/qs-6.13.0.tgz", + "integrity": "sha1-bKO9WEOffiRWVXmJl3h7DYilGQY=", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -17264,9 +17049,9 @@ "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha1-aw4FSJ2QdrBMQ28xjZsGe7pFlIA=", + "version": "10.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha1-Ym4534w3Izjqm4Ao0fmdw/2cPbA=", "dev": true, "license": "MIT", "dependencies": { @@ -17294,16 +17079,16 @@ } }, "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha1-EaKwaITzUnrsPpPbv0o7lYqVVGs=", + "version": "6.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regexpu-core/-/regexpu-core-6.1.1.tgz", + "integrity": "sha1-tGmyRVlMstCIzuvGNp3OuMAL7Kw=", "dev": true, "license": "MIT", "dependencies": { - "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.11.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -17311,28 +17096,26 @@ "node": ">=4" } }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha1-3yP/JuDFswCmRwytFgqdCQw6N6s=", + "dev": true, + "license": "MIT" + }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha1-Jy0FqhDHwfZwlbH/Ct2uhEL8Vwk=", + "version": "0.11.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regjsparser/-/regjsparser-0.11.1.tgz", + "integrity": "sha1-rlXHT2RtsMj8uSLU2mNeM9pAUUk=", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~0.5.0" + "jsesc": "~3.0.2" }, "bin": { "regjsparser": "bin/parser" } }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/require-directory/-/require-directory-2.1.1.tgz", @@ -17481,9 +17264,9 @@ "license": "MIT" }, "node_modules/rimraf": { - "version": "5.0.9", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.9.tgz", - "integrity": "sha1-w7qhuIbq3C7HmBoGpZPD0BE0/+k=", + "version": "5.0.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha1-I7mEPT3JLbcfluGizpLjn9KoIhw=", "dev": true, "license": "ISC", "dependencies": { @@ -17492,9 +17275,6 @@ "bin": { "rimraf": "dist/esm/bin.mjs" }, - "engines": { - "node": "14 >=14.20 || 16 >=16.20 || >=18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -17582,13 +17362,13 @@ "license": "BSD-3-Clause" }, "node_modules/rollup": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.18.1.tgz", - "integrity": "sha1-GKYG3152ylO4pp8tjqslbWndqFE=", + "version": "4.24.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha1-wUo1dvIGIupqXJytfKyl5ulVXQU=", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -17598,22 +17378,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.1", - "@rollup/rollup-android-arm64": "4.18.1", - "@rollup/rollup-darwin-arm64": "4.18.1", - "@rollup/rollup-darwin-x64": "4.18.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", - "@rollup/rollup-linux-arm-musleabihf": "4.18.1", - "@rollup/rollup-linux-arm64-gnu": "4.18.1", - "@rollup/rollup-linux-arm64-musl": "4.18.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", - "@rollup/rollup-linux-riscv64-gnu": "4.18.1", - "@rollup/rollup-linux-s390x-gnu": "4.18.1", - "@rollup/rollup-linux-x64-gnu": "4.18.1", - "@rollup/rollup-linux-x64-musl": "4.18.1", - "@rollup/rollup-win32-arm64-msvc": "4.18.1", - "@rollup/rollup-win32-ia32-msvc": "4.18.1", - "@rollup/rollup-win32-x64-msvc": "4.18.1", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, @@ -17702,9 +17482,9 @@ "license": "MIT" }, "node_modules/saucelabs": { - "version": "7.5.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/saucelabs/-/saucelabs-7.5.0.tgz", - "integrity": "sha1-dciKleFRmmO3mXjRRqdkou7LTw4=", + "version": "8.0.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/saucelabs/-/saucelabs-8.0.0.tgz", + "integrity": "sha1-YwhHaM5ZUBB9uYh5fk241SKX1yU=", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -17864,12 +17644,12 @@ } }, "node_modules/selenium-standalone/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -17880,12 +17660,6 @@ } } }, - "node_modules/selenium-standalone/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "license": "MIT" - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-6.3.1.tgz", @@ -17916,9 +17690,9 @@ } }, "node_modules/sentence-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -17969,9 +17743,9 @@ "license": "ISC" }, "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha1-Exkh5Q9i/xpmpGHX1i17IdXRWlE=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/set-cookie-parser/-/set-cookie-parser-2.7.0.tgz", + "integrity": "sha1-71VStW3AG6rhAqy1/J+4zQYMMPk=", "license": "MIT" }, "node_modules/set-function-length": { @@ -18191,16 +17965,16 @@ } }, "node_modules/snake-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, "node_modules/socket.io": { - "version": "4.7.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io/-/socket.io-4.7.5.tgz", - "integrity": "sha1-Vustl2rvnRRF83OmLXgaQcet2Pg=", + "version": "4.8.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io/-/socket.io-4.8.0.tgz", + "integrity": "sha1-M9Ba4JFfrRZwvQxO/MB8z6vr47E=", "dev": true, "license": "MIT", "dependencies": { @@ -18208,7 +17982,7 @@ "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.5.2", + "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" }, @@ -18228,13 +18002,13 @@ } }, "node_modules/socket.io-adapter/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -18245,13 +18019,6 @@ } } }, - "node_modules/socket.io-adapter/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/socket.io-adapter/node_modules/ws": { "version": "8.17.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.1.tgz", @@ -18289,13 +18056,13 @@ } }, "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -18306,21 +18073,14 @@ } } }, - "node_modules/socket.io-parser/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/socket.io/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -18331,13 +18091,6 @@ } } }, - "node_modules/socket.io/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/socks": { "version": "2.8.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks/-/socks-2.8.3.tgz", @@ -18369,13 +18122,13 @@ } }, "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -18386,13 +18139,6 @@ } } }, - "node_modules/socks-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/source-map/-/source-map-0.6.1.tgz", @@ -18444,9 +18190,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.18", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", - "integrity": "sha1-IqqSLc8vKIWmSUomHy2LdTRdAyY=", + "version": "3.0.20", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha1-5E7RntMY3R5YiPkzJc7oAPD1G4k=", "dev": true, "license": "CC0-1.0" }, @@ -18549,13 +18295,13 @@ } }, "node_modules/streamroller/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -18591,13 +18337,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/streamroller/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/streamroller/node_modules/universalify": { "version": "0.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/universalify/-/universalify-0.1.2.tgz", @@ -18609,9 +18348,9 @@ } }, "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha1-W8GlHrQSpmfr/c1ObPam/GVyGsc=", + "version": "2.20.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamx/-/streamx-2.20.1.tgz", + "integrity": "sha1-RxxPi4YPe2lv64PVsSXKqy/buTw=", "dev": true, "license": "MIT", "dependencies": { @@ -18809,9 +18548,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha1-+VTXd2fk5u35czhOHrlfj4HWTtk=", + "version": "3.0.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha1-6szTpn1WcvCcqOj5w9K4n6Fz8hc=", "dev": true, "license": "MIT", "dependencies": { @@ -18885,9 +18624,9 @@ "license": "ISC" }, "node_modules/terser": { - "version": "5.31.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.31.2.tgz", - "integrity": "sha1-tcoYgQe3BghNyoL5iAifphAuuhE=", + "version": "5.34.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.34.1.tgz", + "integrity": "sha1-r0A4a9vlSvDQY+BnCv1VwxBavrY=", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -19046,9 +18785,9 @@ } }, "node_modules/text-decoder": { - "version": "1.1.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-decoder/-/text-decoder-1.1.1.tgz", - "integrity": "sha1-XfnCJM66xKeXdyC58IP576Gu/eg=", + "version": "1.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-decoder/-/text-decoder-1.2.0.tgz", + "integrity": "sha1-hfGdTVCI4LRc2EG9+urEWNv/7vw=", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -19196,21 +18935,21 @@ } }, "node_modules/ts-jest": { - "version": "29.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.2.2.tgz", - "integrity": "sha1-DSOHuwTTkXSyCgUXKpaPJYrt/00=", + "version": "29.2.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha1-WRo8EI4fXr0BPTFSFCy1Rys5nWM=", "dev": true, "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "ejs": "^3.0.0", - "fast-json-stable-stringify": "2.x", + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" @@ -19245,9 +18984,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -19342,9 +19081,9 @@ } }, "node_modules/ts-loader/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -19450,13 +19189,13 @@ } }, "node_modules/tuf-js/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -19532,13 +19271,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/tuf-js/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tunnel/-/tunnel-0.0.6.tgz", @@ -19599,10 +19331,17 @@ "node": ">= 0.6" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha1-krZdvApCZV/M9K6xoIsd3c6K9fI=", + "dev": true, + "license": "MIT" + }, "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha1-4bCjw5QZCDigsWjncbCtVqCvD6o=", + "version": "5.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha1-0d5ntr73fEGCP4It+PCzvP9gpaA=", "dev": true, "license": "Apache-2.0", "bin": { @@ -19614,9 +19353,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.38", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ua-parser-js/-/ua-parser-js-0.7.38.tgz", - "integrity": "sha1-9JfYpNwf7G6FTlyqSy+ZE0Iu8FQ=", + "version": "0.7.39", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ua-parser-js/-/ua-parser-js-0.7.39.tgz", + "integrity": "sha1-xx77RuvqvEYcRhLSLVT4iID6vn4=", "dev": true, "funding": [ { @@ -19633,6 +19372,9 @@ } ], "license": "MIT", + "bin": { + "ua-parser-js": "script/cli.js" + }, "engines": { "node": "*" } @@ -19649,15 +19391,15 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha1-vNU5iT0AtW6WT9JlekhmsiGmVhc=", + "version": "6.19.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha1-NREcnRQ3q4OnzcCrri8m2I7aCgI=", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha1-MBrNxSVjFnDTn2FG4Od/9rvevdw=", + "version": "2.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha1-yzFz/kfKdD4ighbko93EyE1ijMI=", "dev": true, "license": "MIT", "engines": { @@ -19679,9 +19421,9 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha1-y1//3NFqBRJPWksL98N3Agisu+A=", + "version": "2.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha1-oEAa7nJxRZj3ObaLEE5P46DLPHE=", "dev": true, "license": "MIT", "engines": { @@ -19744,9 +19486,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha1-fKYcDYZQdmCQcoBG5BaozeaChZ4=", + "version": "1.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha1-gIRvuh156CVH+2YfjRQeCUV1X+U=", "dev": true, "funding": [ { @@ -19764,8 +19506,8 @@ ], "license": "MIT", "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -19795,16 +19537,16 @@ } }, "node_modules/upper-case-first/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, "node_modules/upper-case/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", + "version": "2.7.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha1-2bQMXECrWehzjyl98wh78aJpDAE=", "dev": true, "license": "0BSD" }, @@ -19958,9 +19700,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha1-KTCPLKwVD6jkyS+Q4OyVSp/tf/8=", + "version": "2.4.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha1-L+6u1nQS58MxhOWnnKc4+9OFZNo=", "dev": true, "license": "MIT", "dependencies": { @@ -20080,9 +19822,9 @@ } }, "node_modules/webpack": { - "version": "5.93.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack/-/webpack-5.93.0.tgz", - "integrity": "sha1-LonscDVXm9+6l2DSbGOsXDRipeU=", + "version": "5.95.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha1-j9jEVPpg2tGG++NsQApVhIMHtMA=", "dev": true, "license": "MIT", "dependencies": { @@ -20709,28 +20451,28 @@ } }, "src/Components/CustomElements/src/js": { - "name": "microsoft.components.customelements" + "name": "@microsoft/microsoft.components.customelements" }, "src/Components/dotnet-runtime-js": { - "name": "dotnet-runtime", + "name": "@microsoft/dotnet-runtime", "version": "1.0.0", "license": "MIT" }, "src/Components/Web.JS": { - "name": "microsoft.aspnetcore.components.web.js", + "name": "@microsoft/microsoft.aspnetcore.components.web.js", "version": "0.0.1", "devDependencies": { "@babel/core": "^7.23.6", "@babel/preset-env": "^7.23.6", "@babel/preset-typescript": "^7.23.3", "@microsoft/dotnet-js-interop": "*", + "@microsoft/dotnet-runtime": "*", "@microsoft/signalr": "*", "@microsoft/signalr-protocol-msgpack": "*", "@types/jsdom": "^16.2.14", "@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/parser": "^5.26.0", "babel-jest": "^29.7.0", - "dotnet-runtime": "*", "eslint": "^8.16.0", "eslint-plugin-header": "^3.1.1", "jest": "^29.7.0", @@ -20755,13 +20497,13 @@ } }, "src/Components/WebAssembly/Authentication.Msal/src/Interop": { - "name": "microsoft.msal.components.webassembly", + "name": "@microsoft/microsoft.msal.components.webassembly", "dependencies": { "@azure/msal-browser": "^2.28.3" } }, "src/Components/WebAssembly/WebAssembly.Authentication/src/Interop": { - "name": "components.authentication", + "name": "@microsoft/components.authentication", "dependencies": { "oidc-client": "^1.11.5" } @@ -21014,13 +20756,13 @@ } }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", - "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "version": "4.3.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.7.tgz", + "integrity": "sha1-h5RbQVGgEddtlaGY1xEchlw2ClI=", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -21084,17 +20826,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true, - "license": "MIT" - }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", - "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", + "version": "7.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.3.tgz", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", "dev": true, "license": "ISC", "bin": { @@ -21116,7 +20851,7 @@ } }, "src/ProjectTemplates/test/Templates.Tests": { - "name": "microsoft.aspnetcore.projecttemplates.tests", + "name": "@microsoft/microsoft.aspnetcore.projecttemplates.tests", "version": "0.0.1", "license": "MIT", "dependencies": { @@ -21125,7 +20860,7 @@ } }, "src/SignalR/clients/ts": { - "name": "client-ts", + "name": "@microsoft/client-ts", "version": "1.0.0", "license": "MIT", "devDependencies": { @@ -21150,7 +20885,7 @@ } }, "src/SignalR/clients/ts/FunctionalTests": { - "name": "functionaltests", + "name": "@microsoft/functionaltests", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -21199,9 +20934,9 @@ "license": "MIT" }, "src/SignalR/clients/ts/FunctionalTests/node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha1-4bCjw5QZCDigsWjncbCtVqCvD6o=", + "version": "5.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha1-0d5ntr73fEGCP4It+PCzvP9gpaA=", "dev": true, "license": "Apache-2.0", "bin": { @@ -21279,7 +21014,7 @@ "eventsource": "^2.0.2", "fetch-cookie": "^2.0.3", "node-fetch": "^2.6.7", - "ws": "^7.4.5" + "ws": "^7.5.10" } }, "src/SignalR/clients/ts/signalr-protocol-msgpack": { diff --git a/package.json b/package.json index 32c7d1df34ce..48c94efe5535 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "aspnetcore", + "name": "@microsoft/aspnetcore", "version": "1.0.0", "private": true, "workspaces": [ diff --git a/src/Antiforgery/src/PublicAPI.Shipped.txt b/src/Antiforgery/src/PublicAPI.Shipped.txt index fe55066bc165..a83f5d0b56fc 100644 --- a/src/Antiforgery/src/PublicAPI.Shipped.txt +++ b/src/Antiforgery/src/PublicAPI.Shipped.txt @@ -7,6 +7,8 @@ Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.FormFieldName.get -> string! Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.FormFieldName.set -> void Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.HeaderName.get -> string? Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.HeaderName.set -> void +Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressReadingTokenFromFormBody.get -> bool +Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressReadingTokenFromFormBody.set -> void Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressXFrameOptionsHeader.get -> bool Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressXFrameOptionsHeader.set -> void Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet diff --git a/src/Antiforgery/src/PublicAPI.Unshipped.txt b/src/Antiforgery/src/PublicAPI.Unshipped.txt index cdd99e7d264d..7dc5c58110bf 100644 --- a/src/Antiforgery/src/PublicAPI.Unshipped.txt +++ b/src/Antiforgery/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressReadingTokenFromFormBody.get -> bool -Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressReadingTokenFromFormBody.set -> void diff --git a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt index 7dc5c58110bf..bb997fdc8643 100644 --- a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt +++ b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt @@ -1 +1,26 @@ #nullable enable +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Dispose() -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Get(string! key) -> byte[]? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RedisCache(Microsoft.Extensions.Options.IOptions! optionsAccessor) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Refresh(string! key) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RefreshAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Remove(string! key) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RemoveAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Set(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.SetAsync(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.get -> string? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.get -> StackExchange.Redis.ConfigurationOptions? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.get -> System.Func!>? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.get -> string? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.get -> System.Func? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.RedisCacheOptions() -> void +Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions +static Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions.AddStackExchangeRedisCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt index bb997fdc8643..7dc5c58110bf 100644 --- a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt +++ b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt @@ -1,26 +1 @@ #nullable enable -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Dispose() -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Get(string! key) -> byte[]? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RedisCache(Microsoft.Extensions.Options.IOptions! optionsAccessor) -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Refresh(string! key) -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RefreshAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Remove(string! key) -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RemoveAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Set(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options) -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.SetAsync(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.get -> string? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.set -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.get -> StackExchange.Redis.ConfigurationOptions? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.set -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.get -> System.Func!>? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.set -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.get -> string? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.set -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.get -> System.Func? -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.set -> void -Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.RedisCacheOptions() -> void -Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions -static Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions.AddStackExchangeRedisCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Caching/StackExchangeRedis/src/RedisCache.cs b/src/Caching/StackExchangeRedis/src/RedisCache.cs index debec0237040..95bba7dd0088 100644 --- a/src/Caching/StackExchangeRedis/src/RedisCache.cs +++ b/src/Caching/StackExchangeRedis/src/RedisCache.cs @@ -53,6 +53,8 @@ private static RedisValue[] GetHashFields(bool getData) => getData private long _firstErrorTimeTicks; private long _previousErrorTimeTicks; + internal virtual bool IsHybridCacheActive() => false; + // StackExchange.Redis will also be trying to reconnect internally, // so limit how often we recreate the ConnectionMultiplexer instance // in an attempt to reconnect @@ -375,6 +377,11 @@ private void TryAddSuffix(IConnectionMultiplexer connection) { connection.AddLibraryNameSuffix("aspnet"); connection.AddLibraryNameSuffix("DC"); + + if (IsHybridCacheActive()) + { + connection.AddLibraryNameSuffix("HC"); + } } catch (Exception ex) { diff --git a/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs b/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs index dab5bfc8655b..0a58d43e136d 100644 --- a/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs +++ b/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs @@ -1,6 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using Microsoft.Extensions.Caching.Hybrid; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -8,13 +11,20 @@ namespace Microsoft.Extensions.Caching.StackExchangeRedis; internal sealed class RedisCacheImpl : RedisCache { - public RedisCacheImpl(IOptions optionsAccessor, ILogger logger) + private readonly IServiceProvider _services; + + internal override bool IsHybridCacheActive() + => _services.GetService() is not null; + + public RedisCacheImpl(IOptions optionsAccessor, ILogger logger, IServiceProvider services) : base(optionsAccessor, logger) { + _services = services; // important: do not check for HybridCache here due to dependency - creates a cycle } - public RedisCacheImpl(IOptions optionsAccessor) + public RedisCacheImpl(IOptions optionsAccessor, IServiceProvider services) : base(optionsAccessor) { + _services = services; // important: do not check for HybridCache here due to dependency - creates a cycle } } diff --git a/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs b/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs index 29a49a7cec70..71e31d19928a 100644 --- a/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs +++ b/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs @@ -1,11 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Collections.Generic; using System.Linq; +using System.Threading; +using System.Threading.Tasks; using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.Caching.Hybrid; +using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Options; using Moq; using Xunit; @@ -121,4 +129,71 @@ public void AddStackExchangeRedisCache_UsesLoggerFactoryAlreadyRegisteredWithSer loggerFactory.Verify(); } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public void AddStackExchangeRedisCache_HybridCacheDetected(bool hybridCacheActive) + { + // Arrange + var services = new ServiceCollection(); + + services.AddLogging(); + + // Act + services.AddStackExchangeRedisCache(options => { }); + if (hybridCacheActive) + { + services.AddMemoryCache(); + services.TryAddSingleton(); + } + + using var provider = services.BuildServiceProvider(); + var cache = Assert.IsAssignableFrom(provider.GetRequiredService()); + Assert.Equal(hybridCacheActive, cache.IsHybridCacheActive()); + } + + sealed class DummyHybridCache : HybridCache + { + // emulate the layout from HybridCache in dotnet/extensions + public DummyHybridCache(IOptions options, IServiceProvider services) + { + if (services is null) + { + throw new ArgumentNullException(nameof(services)); + } + + var l1 = services.GetRequiredService(); + _ = options.Value; + var logger = services.GetService()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance; + // var clock = services.GetService() ?? TimeProvider.System; + var l2 = services.GetService(); // note optional + + // ignore L2 if it is really just the same L1, wrapped + // (note not just an "is" test; if someone has a custom subclass, who knows what it does?) + if (l2 is not null + && l2.GetType() == typeof(MemoryDistributedCache) + && l1.GetType() == typeof(MemoryCache)) + { + l2 = null; + } + + IHybridCacheSerializerFactory[] factories = services.GetServices().ToArray(); + Array.Reverse(factories); + } + + public class HybridCacheOptions { } + + public override ValueTask GetOrCreateAsync(string key, TState state, Func> factory, HybridCacheEntryOptions options = null, IEnumerable tags = null, CancellationToken cancellationToken = default) + => throw new NotSupportedException(); + + public override ValueTask RemoveAsync(string key, CancellationToken cancellationToken = default) + => throw new NotSupportedException(); + + public override ValueTask RemoveByTagAsync(string tag, CancellationToken cancellationToken = default) + => throw new NotSupportedException(); + + public override ValueTask SetAsync(string key, T value, HybridCacheEntryOptions options = null, IEnumerable tags = null, CancellationToken cancellationToken = default) + => throw new NotSupportedException(); + } } diff --git a/src/Components/Authorization/src/PublicAPI.Shipped.txt b/src/Components/Authorization/src/PublicAPI.Shipped.txt index 247a98915bb8..2151d091daf8 100644 --- a/src/Components/Authorization/src/PublicAPI.Shipped.txt +++ b/src/Components/Authorization/src/PublicAPI.Shipped.txt @@ -6,6 +6,14 @@ Microsoft.AspNetCore.Components.Authorization.AuthenticationState Microsoft.AspNetCore.Components.Authorization.AuthenticationState.AuthenticationState(System.Security.Claims.ClaimsPrincipal! user) -> void Microsoft.AspNetCore.Components.Authorization.AuthenticationState.User.get -> System.Security.Claims.ClaimsPrincipal! Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.AuthenticationStateData() -> void +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.Claims.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.Claims.set -> void +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.NameClaimType.get -> string! +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.NameClaimType.set -> void +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.RoleClaimType.get -> string! +Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.RoleClaimType.set -> void Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider.AuthenticationStateChanged -> Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler? Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider.AuthenticationStateProvider() -> void @@ -40,6 +48,12 @@ Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState.CascadingAuthenticationState() -> void Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState.ChildContent.get -> Microsoft.AspNetCore.Components.RenderFragment? Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState.ChildContent.set -> void +Microsoft.AspNetCore.Components.Authorization.ClaimData +Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData() -> void +Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData(string! type, string! value) -> void +Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData(System.Security.Claims.Claim! claim) -> void +Microsoft.AspNetCore.Components.Authorization.ClaimData.Type.get -> string! +Microsoft.AspNetCore.Components.Authorization.ClaimData.Value.get -> string! Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void Microsoft.Extensions.DependencyInjection.CascadingAuthenticationStateServiceCollectionExtensions diff --git a/src/Components/Authorization/src/PublicAPI.Unshipped.txt b/src/Components/Authorization/src/PublicAPI.Unshipped.txt index e02769f17caf..7dc5c58110bf 100644 --- a/src/Components/Authorization/src/PublicAPI.Unshipped.txt +++ b/src/Components/Authorization/src/PublicAPI.Unshipped.txt @@ -1,15 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.AuthenticationStateData() -> void -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.Claims.get -> System.Collections.Generic.IList! -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.Claims.set -> void -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.NameClaimType.get -> string! -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.NameClaimType.set -> void -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.RoleClaimType.get -> string! -Microsoft.AspNetCore.Components.Authorization.AuthenticationStateData.RoleClaimType.set -> void -Microsoft.AspNetCore.Components.Authorization.ClaimData -Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData() -> void -Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData(string! type, string! value) -> void -Microsoft.AspNetCore.Components.Authorization.ClaimData.ClaimData(System.Security.Claims.Claim! claim) -> void -Microsoft.AspNetCore.Components.Authorization.ClaimData.Type.get -> string! -Microsoft.AspNetCore.Components.Authorization.ClaimData.Value.get -> string! diff --git a/src/Components/Components/src/ComponentBase.cs b/src/Components/Components/src/ComponentBase.cs index 5de04ae8d70b..a5cf641cae93 100644 --- a/src/Components/Components/src/ComponentBase.cs +++ b/src/Components/Components/src/ComponentBase.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using Microsoft.AspNetCore.Components.Rendering; namespace Microsoft.AspNetCore.Components; @@ -271,10 +272,22 @@ public virtual Task SetParametersAsync(ParameterView parameters) } } + // We do not want the debugger to consider NavigationExceptions caught by this method as user-unhandled. + [DebuggerDisableUserUnhandledExceptions] private async Task RunInitAndSetParametersAsync() { - OnInitialized(); - var task = OnInitializedAsync(); + Task task; + + try + { + OnInitialized(); + task = OnInitializedAsync(); + } + catch (Exception ex) when (ex is not NavigationException) + { + Debugger.BreakForUserUnhandledException(ex); + throw; + } if (task.Status != TaskStatus.RanToCompletion && task.Status != TaskStatus.Canceled) { @@ -307,10 +320,23 @@ private async Task RunInitAndSetParametersAsync() await CallOnParametersSetAsync(); } + // We do not want the debugger to consider NavigationExceptions caught by this method as user-unhandled. + [DebuggerDisableUserUnhandledExceptions] private Task CallOnParametersSetAsync() { - OnParametersSet(); - var task = OnParametersSetAsync(); + Task task; + + try + { + OnParametersSet(); + task = OnParametersSetAsync(); + } + catch (Exception ex) when (ex is not NavigationException) + { + Debugger.BreakForUserUnhandledException(ex); + throw; + } + // If no async work is to be performed, i.e. the task has already ran to completion // or was canceled by the time we got to inspect it, avoid going async and re-invoking // StateHasChanged at the culmination of the async work. @@ -326,6 +352,8 @@ private Task CallOnParametersSetAsync() Task.CompletedTask; } + // We do not want the debugger to stop more than once per user-unhandled exception. + [DebuggerDisableUserUnhandledExceptions] private async Task CallStateHasChangedOnAsyncCompletion(Task task) { try diff --git a/src/Components/Components/src/PublicAPI.Shipped.txt b/src/Components/Components/src/PublicAPI.Shipped.txt index 0aabe63f06c2..c417cab5be3a 100644 --- a/src/Components/Components/src/PublicAPI.Shipped.txt +++ b/src/Components/Components/src/PublicAPI.Shipped.txt @@ -72,10 +72,13 @@ Microsoft.AspNetCore.Components.ChangeEventArgs.Value.get -> object? Microsoft.AspNetCore.Components.ChangeEventArgs.Value.set -> void Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers Microsoft.AspNetCore.Components.ComponentBase +Microsoft.AspNetCore.Components.ComponentBase.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! +Microsoft.AspNetCore.Components.ComponentBase.AssignedRenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? Microsoft.AspNetCore.Components.ComponentBase.ComponentBase() -> void Microsoft.AspNetCore.Components.ComponentBase.DispatchExceptionAsync(System.Exception! exception) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Components.ComponentBase.InvokeAsync(System.Action! workItem) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Components.ComponentBase.InvokeAsync(System.Func! workItem) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Components.ComponentBase.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged() -> void Microsoft.AspNetCore.Components.Dispatcher Microsoft.AspNetCore.Components.Dispatcher.AssertAccess() -> void @@ -150,6 +153,8 @@ Microsoft.AspNetCore.Components.EventHandlerAttribute.EnableStopPropagation.get Microsoft.AspNetCore.Components.EventHandlerAttribute.EventArgsType.get -> System.Type! Microsoft.AspNetCore.Components.EventHandlerAttribute.EventHandlerAttribute(string! attributeName, System.Type! eventArgsType) -> void Microsoft.AspNetCore.Components.EventHandlerAttribute.EventHandlerAttribute(string! attributeName, System.Type! eventArgsType, bool enableStopPropagation, bool enablePreventDefault) -> void +Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute +Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute.ExcludeFromInteractiveRoutingAttribute() -> void Microsoft.AspNetCore.Components.IComponent Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) -> void Microsoft.AspNetCore.Components.IComponent.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) -> System.Threading.Tasks.Task! @@ -260,15 +265,22 @@ Microsoft.AspNetCore.Components.PersistentComponentState.TryTakeFromJson Microsoft.AspNetCore.Components.PersistingComponentStateSubscription Microsoft.AspNetCore.Components.PersistingComponentStateSubscription.Dispose() -> void Microsoft.AspNetCore.Components.PersistingComponentStateSubscription.PersistingComponentStateSubscription() -> void +Microsoft.AspNetCore.Components.RendererInfo +Microsoft.AspNetCore.Components.RendererInfo.IsInteractive.get -> bool +Microsoft.AspNetCore.Components.RendererInfo.Name.get -> string! +Microsoft.AspNetCore.Components.RendererInfo.RendererInfo(string! rendererName, bool isInteractive) -> void Microsoft.AspNetCore.Components.RenderFragment Microsoft.AspNetCore.Components.RenderFragment Microsoft.AspNetCore.Components.RenderHandle +Microsoft.AspNetCore.Components.RenderHandle.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! Microsoft.AspNetCore.Components.RenderHandle.Dispatcher.get -> Microsoft.AspNetCore.Components.Dispatcher! Microsoft.AspNetCore.Components.RenderHandle.DispatchExceptionAsync(System.Exception! exception) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Components.RenderHandle.IsInitialized.get -> bool Microsoft.AspNetCore.Components.RenderHandle.IsRenderingOnMetadataUpdate.get -> bool Microsoft.AspNetCore.Components.RenderHandle.Render(Microsoft.AspNetCore.Components.RenderFragment! renderFragment) -> void +Microsoft.AspNetCore.Components.RenderHandle.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! Microsoft.AspNetCore.Components.RenderHandle.RenderHandle() -> void +Microsoft.AspNetCore.Components.RenderHandle.RenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? Microsoft.AspNetCore.Components.Rendering.ComponentState Microsoft.AspNetCore.Components.Rendering.ComponentState.Component.get -> Microsoft.AspNetCore.Components.IComponent! Microsoft.AspNetCore.Components.Rendering.ComponentState.ComponentId.get -> int @@ -403,6 +415,18 @@ Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.NamedEvent = 10 - Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.None = 0 -> Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.Region = 5 -> Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.Text = 2 -> Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType +Microsoft.AspNetCore.Components.ResourceAsset +Microsoft.AspNetCore.Components.ResourceAsset.Properties.get -> System.Collections.Generic.IReadOnlyList? +Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url, System.Collections.Generic.IReadOnlyList? properties) -> void +Microsoft.AspNetCore.Components.ResourceAsset.Url.get -> string! +Microsoft.AspNetCore.Components.ResourceAssetCollection +Microsoft.AspNetCore.Components.ResourceAssetCollection.IsContentSpecificUrl(string! path) -> bool +Microsoft.AspNetCore.Components.ResourceAssetCollection.ResourceAssetCollection(System.Collections.Generic.IReadOnlyList! resources) -> void +Microsoft.AspNetCore.Components.ResourceAssetCollection.this[string! key].get -> string! +Microsoft.AspNetCore.Components.ResourceAssetProperty +Microsoft.AspNetCore.Components.ResourceAssetProperty.Name.get -> string! +Microsoft.AspNetCore.Components.ResourceAssetProperty.ResourceAssetProperty(string! name, string! value) -> void +Microsoft.AspNetCore.Components.ResourceAssetProperty.Value.get -> string! Microsoft.AspNetCore.Components.RouteAttribute Microsoft.AspNetCore.Components.RouteAttribute.RouteAttribute(string! template) -> void Microsoft.AspNetCore.Components.RouteAttribute.Template.get -> string! @@ -685,6 +709,7 @@ static readonly Microsoft.AspNetCore.Components.EventCallback.Empty -> Microsoft static readonly Microsoft.AspNetCore.Components.EventCallback.Factory -> Microsoft.AspNetCore.Components.EventCallbackFactory! static readonly Microsoft.AspNetCore.Components.EventCallback.Empty -> Microsoft.AspNetCore.Components.EventCallback static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem.Empty -> Microsoft.AspNetCore.Components.EventCallbackWorkItem +static readonly Microsoft.AspNetCore.Components.ResourceAssetCollection.Empty -> Microsoft.AspNetCore.Components.ResourceAssetCollection! virtual Microsoft.AspNetCore.Components.ComponentBase.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void virtual Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool firstRender) -> void virtual Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool firstRender) -> System.Threading.Tasks.Task! @@ -703,11 +728,13 @@ virtual Microsoft.AspNetCore.Components.NavigationManager.SetNavigationLockState virtual Microsoft.AspNetCore.Components.OwningComponentBase.Dispose(bool disposing) -> void virtual Microsoft.AspNetCore.Components.Rendering.ComponentState.DisposeAsync() -> System.Threading.Tasks.ValueTask virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.AddPendingTask(Microsoft.AspNetCore.Components.Rendering.ComponentState? componentState, System.Threading.Tasks.Task! task) -> void +virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.CreateComponentState(int componentId, Microsoft.AspNetCore.Components.IComponent! component, Microsoft.AspNetCore.Components.Rendering.ComponentState? parentComponentState) -> Microsoft.AspNetCore.Components.Rendering.ComponentState! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo? fieldInfo, System.EventArgs! eventArgs) -> System.Threading.Tasks.Task! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo? fieldInfo, System.EventArgs! eventArgs, bool waitForQuiescence) -> System.Threading.Tasks.Task! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(bool disposing) -> void virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.GetComponentRenderMode(Microsoft.AspNetCore.Components.IComponent! component) -> Microsoft.AspNetCore.Components.IComponentRenderMode? virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender() -> void +virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.ResolveComponentForRenderMode(System.Type! componentType, int? parentComponentId, Microsoft.AspNetCore.Components.IComponentActivator! componentActivator, Microsoft.AspNetCore.Components.IComponentRenderMode! renderMode) -> Microsoft.AspNetCore.Components.IComponent! virtual Microsoft.AspNetCore.Components.RouteView.Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void diff --git a/src/Components/Components/src/PublicAPI.Unshipped.txt b/src/Components/Components/src/PublicAPI.Unshipped.txt index e8c43eb034cf..7dc5c58110bf 100644 --- a/src/Components/Components/src/PublicAPI.Unshipped.txt +++ b/src/Components/Components/src/PublicAPI.Unshipped.txt @@ -1,28 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.ComponentBase.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -Microsoft.AspNetCore.Components.ComponentBase.AssignedRenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? -Microsoft.AspNetCore.Components.ComponentBase.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! -Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute -Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute.ExcludeFromInteractiveRoutingAttribute() -> void -Microsoft.AspNetCore.Components.RendererInfo -Microsoft.AspNetCore.Components.RendererInfo.IsInteractive.get -> bool -Microsoft.AspNetCore.Components.RendererInfo.Name.get -> string! -Microsoft.AspNetCore.Components.RendererInfo.RendererInfo(string! rendererName, bool isInteractive) -> void -Microsoft.AspNetCore.Components.RenderHandle.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -Microsoft.AspNetCore.Components.RenderHandle.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! -Microsoft.AspNetCore.Components.RenderHandle.RenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? -Microsoft.AspNetCore.Components.ResourceAsset -Microsoft.AspNetCore.Components.ResourceAsset.Properties.get -> System.Collections.Generic.IReadOnlyList? -Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url, System.Collections.Generic.IReadOnlyList? properties) -> void -Microsoft.AspNetCore.Components.ResourceAsset.Url.get -> string! -Microsoft.AspNetCore.Components.ResourceAssetCollection -Microsoft.AspNetCore.Components.ResourceAssetCollection.IsContentSpecificUrl(string! path) -> bool -Microsoft.AspNetCore.Components.ResourceAssetCollection.ResourceAssetCollection(System.Collections.Generic.IReadOnlyList! resources) -> void -Microsoft.AspNetCore.Components.ResourceAssetCollection.this[string! key].get -> string! -Microsoft.AspNetCore.Components.ResourceAssetProperty -Microsoft.AspNetCore.Components.ResourceAssetProperty.Name.get -> string! -Microsoft.AspNetCore.Components.ResourceAssetProperty.ResourceAssetProperty(string! name, string! value) -> void -Microsoft.AspNetCore.Components.ResourceAssetProperty.Value.get -> string! -static readonly Microsoft.AspNetCore.Components.ResourceAssetCollection.Empty -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! diff --git a/src/Components/Components/src/RenderTree/Renderer.cs b/src/Components/Components/src/RenderTree/Renderer.cs index e0fcfd834340..a1f41cfa4678 100644 --- a/src/Components/Components/src/RenderTree/Renderer.cs +++ b/src/Components/Components/src/RenderTree/Renderer.cs @@ -1039,6 +1039,8 @@ async Task ContinueAfterTask(ArrayRange eventHandlerIds, Task afterTaskIg } } + // We do not want the debugger to stop more than once per user-unhandled exception. + [DebuggerDisableUserUnhandledExceptions] private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState) { try diff --git a/src/Components/Components/src/Rendering/ComponentState.cs b/src/Components/Components/src/Rendering/ComponentState.cs index 4d973398f639..3e30105c2bc7 100644 --- a/src/Components/Components/src/Rendering/ComponentState.cs +++ b/src/Components/Components/src/Rendering/ComponentState.cs @@ -87,6 +87,8 @@ public ComponentState(Renderer renderer, int componentId, IComponent component, internal Renderer Renderer => _renderer; + // We do not want the debugger to consider NavigationExceptions caught by this method as user-unhandled. + [DebuggerDisableUserUnhandledExceptions] internal void RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, out Exception? renderFragmentException) { renderFragmentException = null; @@ -106,6 +108,11 @@ internal void RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment re } catch (Exception ex) { + if (ex is not NavigationException) + { + Debugger.BreakForUserUnhandledException(ex); + } + // If an exception occurs in the render fragment delegate, we won't process the diff in any way, so child components, // event handlers, etc., will all be left untouched as if this component didn't re-render at all. The Renderer will // then forcibly clear the descendant subtree by rendering an empty fragment for this component. diff --git a/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj b/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj index 4c5ae75fa8a4..5d27de7c059f 100644 --- a/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj +++ b/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj @@ -1,4 +1,4 @@ - + $(DefaultNetCoreTargetFramework) @@ -18,7 +18,7 @@ - + <_JsBuildOutput Include="$(InteropWorkingDir)dist\$(Configuration)\**" Exclude="$(InteropWorkingDir)dist\.gitignore" /> diff --git a/src/Components/CustomElements/src/js/package.json b/src/Components/CustomElements/src/js/package.json index 1a0f6c53fbfb..952782ecdec4 100644 --- a/src/Components/CustomElements/src/js/package.json +++ b/src/Components/CustomElements/src/js/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "microsoft.components.customelements", + "name": "@microsoft/microsoft.components.customelements", "scripts": { "clean": "rimraf ./dist/Debug ./dist/Release", "prebuild": "npm run clean", diff --git a/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs b/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs index 09df61c18329..7f5ec9973c75 100644 --- a/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs +++ b/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs @@ -27,7 +27,7 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // We are going to compile a function that maps all the properties for the type. // Beware that the code below is not the actual exact code, just a simplification to understand what is happening at a high level. - // The general flow is as follows. For a type like Address { Street, City, Country, ZipCode } + // The general flow is as follows. For a type like Address { Street, City, CountryRegion, ZipCode } // we will generate a function that looks like: // public bool TryRead(ref FormDataReader reader, Type type, FormDataSerializerOptions options, out Address? result, out bool found) // { @@ -35,11 +35,11 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // bool succeeded = true; // string street; // string city; - // string country; + // string countryRegion; // string zipCode; // FormDataConveter streetConverter; // FormDataConveter cityConverter; - // FormDataConveter countryConverter; + // FormDataConveter countryRegionConverter; // FormDataConveter zipCodeConverter; // var streetConverter = options.ResolveConverter(typeof(string)); @@ -54,11 +54,11 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // found ||= foundProperty; // reader.PopPrefix("City"); // - // var countryConverter = options.ResolveConverter(typeof(string)); - // reader.PushPrefix("Country"); - // succeeded &= countryConverter.TryRead(ref reader, typeof(string), options, out street, out foundProperty); + // var countryRegionConverter = options.ResolveConverter(typeof(string)); + // reader.PushPrefix("CountryRegion"); + // succeeded &= countryRegionConverter.TryRead(ref reader, typeof(string), options, out street, out foundProperty); // found ||= foundProperty; - // reader.PopPrefix("Country"); + // reader.PopPrefix("CountryRegion"); // // var zipCodeConverter = options.ResolveConverter(typeof(string)); // reader.PushPrefix("ZipCode"); @@ -71,7 +71,7 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // result = new Address(); // result.Street = street; // result.City = city; - // result.Country = country; + // result.CountryRegion = countryRegion; // result.ZipCode = zipCode; // } // else diff --git a/src/Components/Endpoints/src/PublicAPI.Shipped.txt b/src/Components/Endpoints/src/PublicAPI.Shipped.txt index ffbad3d28b64..6e93e89dadda 100644 --- a/src/Components/Endpoints/src/PublicAPI.Shipped.txt +++ b/src/Components/Endpoints/src/PublicAPI.Shipped.txt @@ -35,10 +35,27 @@ Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions.Temporar Microsoft.AspNetCore.Components.Endpoints.RootComponentMetadata Microsoft.AspNetCore.Components.Endpoints.RootComponentMetadata.RootComponentMetadata(System.Type! rootComponentType) -> void Microsoft.AspNetCore.Components.Endpoints.RootComponentMetadata.Type.get -> System.Type! +Microsoft.AspNetCore.Components.ImportMap +Microsoft.AspNetCore.Components.ImportMap.AdditionalAttributes.get -> System.Collections.Generic.IReadOnlyDictionary? +Microsoft.AspNetCore.Components.ImportMap.AdditionalAttributes.set -> void +Microsoft.AspNetCore.Components.ImportMap.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext? +Microsoft.AspNetCore.Components.ImportMap.HttpContext.set -> void +Microsoft.AspNetCore.Components.ImportMap.ImportMap() -> void +Microsoft.AspNetCore.Components.ImportMap.ImportMapDefinition.get -> Microsoft.AspNetCore.Components.ImportMapDefinition? +Microsoft.AspNetCore.Components.ImportMap.ImportMapDefinition.set -> void +Microsoft.AspNetCore.Components.ImportMapDefinition +Microsoft.AspNetCore.Components.ImportMapDefinition.ImportMapDefinition(System.Collections.Generic.IReadOnlyDictionary? imports, System.Collections.Generic.IReadOnlyDictionary!>? scopes, System.Collections.Generic.IReadOnlyDictionary? integrity) -> void +Microsoft.AspNetCore.Components.ImportMapDefinition.Imports.get -> System.Collections.Generic.IReadOnlyDictionary? +Microsoft.AspNetCore.Components.ImportMapDefinition.Integrity.get -> System.Collections.Generic.IReadOnlyDictionary? +Microsoft.AspNetCore.Components.ImportMapDefinition.Scopes.get -> System.Collections.Generic.IReadOnlyDictionary!>? Microsoft.AspNetCore.Components.PersistedStateSerializationMode Microsoft.AspNetCore.Components.PersistedStateSerializationMode.Infer = 1 -> Microsoft.AspNetCore.Components.PersistedStateSerializationMode Microsoft.AspNetCore.Components.PersistedStateSerializationMode.Server = 2 -> Microsoft.AspNetCore.Components.PersistedStateSerializationMode Microsoft.AspNetCore.Components.PersistedStateSerializationMode.WebAssembly = 3 -> Microsoft.AspNetCore.Components.PersistedStateSerializationMode +Microsoft.AspNetCore.Components.Routing.RazorComponentsEndpointHttpContextExtensions +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void Microsoft.AspNetCore.Http.HttpResults.RazorComponentResult Microsoft.AspNetCore.Http.HttpResults.RazorComponentResult.ComponentType.get -> System.Type! Microsoft.AspNetCore.Http.HttpResults.RazorComponentResult.ContentType.get -> string? @@ -59,7 +76,14 @@ Microsoft.AspNetCore.Http.HttpResults.RazorComponentResult.RazorComp Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder.Services.get -> Microsoft.Extensions.DependencyInjection.IServiceCollection! Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions +override Microsoft.AspNetCore.Components.ImportMapDefinition.ToString() -> string! +override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! static Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilderExtensions.AddAdditionalAssemblies(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, params System.Reflection.Assembly![]! assemblies) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! +static Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilderExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, string? manifestPath = null) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! static Microsoft.AspNetCore.Components.Endpoints.Infrastructure.ComponentEndpointConventionBuilderHelper.AddRenderMode(Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, Microsoft.AspNetCore.Components.IComponentRenderMode! renderMode) -> void +static Microsoft.AspNetCore.Components.Endpoints.Infrastructure.ComponentEndpointConventionBuilderHelper.GetEndpointRouteBuilder(Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder) -> Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! +static Microsoft.AspNetCore.Components.ImportMapDefinition.Combine(params Microsoft.AspNetCore.Components.ImportMapDefinition![]! sources) -> Microsoft.AspNetCore.Components.ImportMapDefinition! +static Microsoft.AspNetCore.Components.ImportMapDefinition.FromResourceCollection(Microsoft.AspNetCore.Components.ResourceAssetCollection! assets) -> Microsoft.AspNetCore.Components.ImportMapDefinition! +static Microsoft.AspNetCore.Components.Routing.RazorComponentsEndpointHttpContextExtensions.AcceptsInteractiveRouting(this Microsoft.AspNetCore.Http.HttpContext! context) -> bool static Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! diff --git a/src/Components/Endpoints/src/PublicAPI.Unshipped.txt b/src/Components/Endpoints/src/PublicAPI.Unshipped.txt index 83071d81d258..7dc5c58110bf 100644 --- a/src/Components/Endpoints/src/PublicAPI.Unshipped.txt +++ b/src/Components/Endpoints/src/PublicAPI.Unshipped.txt @@ -1,25 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.ImportMap -Microsoft.AspNetCore.Components.ImportMap.AdditionalAttributes.get -> System.Collections.Generic.IReadOnlyDictionary? -Microsoft.AspNetCore.Components.ImportMap.AdditionalAttributes.set -> void -Microsoft.AspNetCore.Components.ImportMap.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext? -Microsoft.AspNetCore.Components.ImportMap.HttpContext.set -> void -Microsoft.AspNetCore.Components.ImportMap.ImportMap() -> void -Microsoft.AspNetCore.Components.ImportMap.ImportMapDefinition.get -> Microsoft.AspNetCore.Components.ImportMapDefinition? -Microsoft.AspNetCore.Components.ImportMap.ImportMapDefinition.set -> void -Microsoft.AspNetCore.Components.ImportMapDefinition -Microsoft.AspNetCore.Components.ImportMapDefinition.ImportMapDefinition(System.Collections.Generic.IReadOnlyDictionary? imports, System.Collections.Generic.IReadOnlyDictionary!>? scopes, System.Collections.Generic.IReadOnlyDictionary? integrity) -> void -Microsoft.AspNetCore.Components.ImportMapDefinition.Imports.get -> System.Collections.Generic.IReadOnlyDictionary? -Microsoft.AspNetCore.Components.ImportMapDefinition.Integrity.get -> System.Collections.Generic.IReadOnlyDictionary? -Microsoft.AspNetCore.Components.ImportMapDefinition.Scopes.get -> System.Collections.Generic.IReadOnlyDictionary!>? -Microsoft.AspNetCore.Components.Routing.RazorComponentsEndpointHttpContextExtensions -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void -override Microsoft.AspNetCore.Components.ImportMapDefinition.ToString() -> string! -override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! -static Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilderExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, string? manifestPath = null) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! -static Microsoft.AspNetCore.Components.Endpoints.Infrastructure.ComponentEndpointConventionBuilderHelper.GetEndpointRouteBuilder(Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder) -> Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! -static Microsoft.AspNetCore.Components.ImportMapDefinition.Combine(params Microsoft.AspNetCore.Components.ImportMapDefinition![]! sources) -> Microsoft.AspNetCore.Components.ImportMapDefinition! -static Microsoft.AspNetCore.Components.ImportMapDefinition.FromResourceCollection(Microsoft.AspNetCore.Components.ResourceAssetCollection! assets) -> Microsoft.AspNetCore.Components.ImportMapDefinition! -static Microsoft.AspNetCore.Components.Routing.RazorComponentsEndpointHttpContextExtensions.AcceptsInteractiveRouting(this Microsoft.AspNetCore.Http.HttpContext! context) -> bool diff --git a/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs b/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs index f7fd6a8860f8..ca70e155825d 100644 --- a/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs +++ b/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs @@ -77,10 +77,6 @@ public async Task SendStreamingUpdatesAsync(HttpContext httpContext, Task untilT } catch (Exception ex) { - // Rethrowing also informs the debugger that this exception should be considered user-unhandled unlike NavigationExceptions, - // but calling BreakForUserUnhandledException here allows the debugger to break before we modify the HttpContext. - Debugger.BreakForUserUnhandledException(ex); - // Theoretically it might be possible to let the error middleware run, capture the output, // then emit it in a special format so the JS code can display the error page. However // for now we're not going to support that and will simply emit a message. diff --git a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Shipped.txt b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Shipped.txt index 412b0191d4fc..1b580b50deff 100644 --- a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Shipped.txt +++ b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Shipped.txt @@ -110,6 +110,8 @@ Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.ItemSize.get -> f Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.ItemSize.set -> void Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.ItemsProvider.get -> Microsoft.AspNetCore.Components.QuickGrid.GridItemsProvider? Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.ItemsProvider.set -> void +Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.OverscanCount.get -> int +Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.OverscanCount.set -> void Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.Pagination.get -> Microsoft.AspNetCore.Components.QuickGrid.PaginationState? Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.Pagination.set -> void Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.QuickGrid() -> void diff --git a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Unshipped.txt b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Unshipped.txt index df5bddfc6bfc..7dc5c58110bf 100644 --- a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Unshipped.txt +++ b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.OverscanCount.get -> int -Microsoft.AspNetCore.Components.QuickGrid.QuickGrid.OverscanCount.set -> void diff --git a/src/Components/Server/src/PublicAPI.Shipped.txt b/src/Components/Server/src/PublicAPI.Shipped.txt index 73d9c9f6fa7a..32aa747a67f0 100644 --- a/src/Components/Server/src/PublicAPI.Shipped.txt +++ b/src/Components/Server/src/PublicAPI.Shipped.txt @@ -46,20 +46,29 @@ Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedSessionS Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedSessionStorage.ProtectedSessionStorage(Microsoft.JSInterop.IJSRuntime! jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider! dataProtectionProvider) -> void Microsoft.AspNetCore.Components.Server.RevalidatingServerAuthenticationStateProvider Microsoft.AspNetCore.Components.Server.RevalidatingServerAuthenticationStateProvider.RevalidatingServerAuthenticationStateProvider(Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) +Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ConfigureWebSocketAcceptContext.get -> System.Func? +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ConfigureWebSocketAcceptContext.set -> void +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ContentSecurityFrameAncestorsPolicy.get -> string? +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ContentSecurityFrameAncestorsPolicy.set -> void +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.DisableWebSocketCompression.get -> bool +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.DisableWebSocketCompression.set -> void +Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ServerComponentsEndpointOptions() -> void Microsoft.Extensions.DependencyInjection.ComponentServiceCollectionExtensions Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder.Services.get -> Microsoft.Extensions.DependencyInjection.IServiceCollection! Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions Microsoft.Extensions.DependencyInjection.ServerSideBlazorBuilderExtensions -override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) static Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions.MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints) -> Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions.MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! path) -> Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions.MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! path, System.Action! configureOptions) -> Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions.MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, System.Action! configureOptions) -> Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! +static Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, System.Action! configure) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! static Microsoft.Extensions.DependencyInjection.ComponentServiceCollectionExtensions.AddServerSideBlazor(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder! static Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents(this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder! static Microsoft.Extensions.DependencyInjection.ServerSideBlazorBuilderExtensions.AddCircuitOptions(this Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder! builder, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder! diff --git a/src/Components/Server/src/PublicAPI.Unshipped.txt b/src/Components/Server/src/PublicAPI.Unshipped.txt index f16893dc154c..7dc5c58110bf 100644 --- a/src/Components/Server/src/PublicAPI.Unshipped.txt +++ b/src/Components/Server/src/PublicAPI.Unshipped.txt @@ -1,18 +1 @@ #nullable enable -*REMOVED*Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider -*REMOVED*Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void -*REMOVED*Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void -*REMOVED*override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.ServerAuthenticationStateProvider() -> void (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) -Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.SetAuthenticationState(System.Threading.Tasks.Task! authenticationStateTask) -> void (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ConfigureWebSocketAcceptContext.get -> System.Func? -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ConfigureWebSocketAcceptContext.set -> void -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ContentSecurityFrameAncestorsPolicy.get -> string? -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ContentSecurityFrameAncestorsPolicy.set -> void -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.DisableWebSocketCompression.get -> bool -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.DisableWebSocketCompression.set -> void -Microsoft.AspNetCore.Components.Server.ServerComponentsEndpointOptions.ServerComponentsEndpointOptions() -> void -override Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider.GetAuthenticationStateAsync() -> System.Threading.Tasks.Task! (forwarded, contained in Microsoft.AspNetCore.Components.Endpoints) -static Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, System.Action! configure) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index 24e89e80d28b..68e717bed149 100644 --- a/src/Components/Web.JS/dist/Release/blazor.server.js +++ b/src/Components/Web.JS/dist/Release/blazor.server.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n;!function(e){const t=[],n="__jsObjectId",o="__dotNetObject",r="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,o=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in o))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=o,o=o[t]})),o instanceof Function)return o=o.bind(n),this._cachedFunctions.set(e,o),o;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h=0,d={[h]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let u,p=1;function f(e){t.push(e)}function g(e){if(e&&"object"==typeof e){d[p]=new l(e);const t={[n]:p};return p++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function m(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const o={[s]:t};try{const t=g(e);o[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return o}function y(e,n){c=e;const o=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,o}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new w(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=g,e.createJSStreamReference=m,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(u=e.JSCallResultType||(e.JSCallResultType={}));class w{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,o){const r=y(this,t),i=k(b(e,o)(...r||[]),n);return null==i?null:D(this,i)}beginInvokeJSFromDotNet(e,t,n,o,r){const i=new Promise((e=>{const o=y(this,n);e(b(t,r)(...o||[]))}));e&&i.then((t=>D(this,[e,!0,k(t,o)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,_(t)]))))}endInvokeDotNetFromJS(e,t,n){const o=t?y(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,o)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,o){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const r=D(this,o),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,r);return i?y(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,o){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const r=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[r]={resolve:e,reject:t}}));try{const i=D(this,o);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(r,e,t,n,i)}catch(e){this.completePendingCall(r,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const o=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?o.resolve(n):o.reject(n)}}function _(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function b(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=b,e.disposeJSObjectReferenceById=S;class E{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[o]:this._id}}}e.DotNetObject=E,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(o))return new E(t[o],c);if(t.hasOwnProperty(n)){const e=t[n],o=d[e];if(o)return o.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(r)){const e=t[r],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new C(n)}}return t}));class C{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function k(e,t){switch(t){case u.Default:return e;case u.JSObjectReference:return g(e);case u.JSStreamReference:return m(e);case u.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let T=0;function D(e,t){T=0,c=e;const n=JSON.stringify(t,R);return c=void 0,n}function R(e,t){if(t instanceof E)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(T,t);const e={[r]:T};return T++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(n||(n={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const r=new Map,i=new Map,s=[];function a(e){return r.get(e)}function c(e){const t=r.get(e);return t?.browserEventName||e}function l(e,t){e.forEach((e=>r.set(e,t)))}function h(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),l(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),l(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...d(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),l(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),l(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),l(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>d(e)}),l(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),l(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),l(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:h(t.touches),targetTouches:h(t.targetTouches),changedTouches:h(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),l(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...d(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),l(["wheel","mousewheel"],{createEventArgs:e=>{return{...d(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),l(["cancel","close","toggle"],{createEventArgs:()=>({})});const u=["date","datetime-local","month","time","week"],p=new Map;let f,g,m=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const o="__bl-dynamic-root:"+(++m).toString();p.set(o,e);const r=await _().invokeMethodAsync("AddRootComponent",t,o),i=new w(r,g[t]);return await i.setParameters(n),i}};class v{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new v)}setParameters(e){const t={},n=Object.entries(e||{}),o=n.length;for(const[e,o]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&o?(n.setCallback(o),t[e]=n.getJSObjectReference()):t[e]=o}return _().invokeMethodAsync("SetRootComponentParameters",this._componentId,o,t)}async dispose(){if(null!==this._componentId){await _().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function _(){if(!f)throw new Error("Dynamic root components have not been enabled in this application.");return f}const b=new Map,S=[],E=new Map;function C(t,n,o,r){if(b.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);b.set(t,n),o&&r&&Object.keys(o).length>0&&function(t,n,o){if(f)throw new Error("Dynamic root components have already been enabled.");f=t,g=n;for(const[t,r]of Object.entries(o)){const o=e.findJSFunction(t,0);for(const e of r)o(e,n[e])}}(k(t),o,r),E.get(t)?.[0]?.(),function(e){for(const t of S)t(e)}(t)}function I(e,t,n){return T(e,t.eventHandlerId,(()=>k(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function k(e){const t=b.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let T=(e,t,n)=>n();const D=M(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),R={submit:!0},x=M(["click","dblclick","mousedown","mousemove","mouseup"]);class A{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++A.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new P(this.onGlobalEvent.bind(this))}setListener(e,t,n,o){const r=this.getEventHandlerInfosForElement(e,!0),i=r.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:o};this.eventInfoStore.add(i),r.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),i=null,s=!1;const c=Object.prototype.hasOwnProperty.call(D,e);let l=!1;for(;r;){const u=r,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(x,d)&&h.disabled))){if(!s){const n=a(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(R,t.type)&&t.preventDefault(),I(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},i)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}r=c||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new N:null}}class P{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},s.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=c(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(D,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=c(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class N{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function M(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const U=Symbol(),B=Symbol(),L=Symbol();function $(e,t){if(U in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const o=$(t,!0);o[B]=e,n.push(o)}))}return e[U]=n,e}function O(e){const t=J(e);for(;t.length;)j(e,0)}function F(e,t){const n=document.createComment("!");return H(n,e,t),n}function H(e,t,n){const o=e;let r=e;if(e instanceof Comment){const t=J(o);if(t?.length>0){const t=G(o),n=new Range;n.setStartBefore(e),n.setEndAfter(t),r=n.extractContents()}}const i=W(o);if(i){const e=J(i),t=Array.prototype.indexOf.call(e,o);e.splice(t,1),delete o[B]}const s=J(t);if(n0;)j(n,0)}const o=n;o.parentNode.removeChild(o)}function W(e){return e[B]||null}function z(e,t){return J(e)[t]}function q(e){const t=X(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function J(e){return e[U]}function V(e){const t=J(W(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function K(e,t){const n=J(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const o=document.createComment("marker");t.moveToBeforeMarker=o;const r=n[t.toSiblingIndex+1];r?r.parentNode.insertBefore(o,r):Y(o,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,o=e.moveRangeStart,r=e.moveRangeEnd;let i=o;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===r)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function X(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function Y(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):Y(e,W(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=W(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function Q(e){return`_bl_${e}`}const Z="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Z)&&"string"==typeof t[Z]?function(e){const t=`[${Q(e)}]`;return document.querySelector(t)}(t[Z]):t));const ee="_blazorDeferredValue";function te(e){return"select-multiple"===e.type}function ne(e,t){e.value=t||""}function oe(e,t){e instanceof HTMLSelectElement?te(e)?function(e,t){t||=[];for(let n=0;n{Ie()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var s;let a=0;for(;i.firstChild;)H(i.firstChild,r,a++)}applyAttribute(e,t,n,o){const r=e.frameReader,i=r.attributeName(o),s=r.attributeEventHandlerId(o);if(s){const e=pe(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=r.attributeValue(o);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,o,r,i,s){const a=o;for(let a=i;a{Fe(t,e)})},enableNavigationInterception:function(e){if(void 0!==ge&&ge!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");ge=e},setHasLocationChangingListeners:function(e,t){const n=xe.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Pe&&e===Re&&(Pe(t),Pe=null)},navigateTo:function(e,t){Me(e,t,!0)},refresh:function(e){!e&&Se()?Ee(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:be};function Me(e,t,n=!1){const o=Ce(e);!t.forceLoad&&_e(o)?We()?Ue(o,!1,t.replaceHistoryEntry,t.historyEntryState,n):Ee(o,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function Ue(e,t,n,o=void 0,r=!1){if($e(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Be(e,n,o),void function(e){const t=e.indexOf("#");t!==e.length-1&&be(e.substring(t+1))}(e);const i=je();(r||!i?.hasLocationChangingEventListeners||await Oe(e,o,t,i))&&(we=!0,Be(e,n,o),await Fe(t))}function Be(e,t,n=void 0){t?history.replaceState({userState:n,_index:De},"",e):(De++,history.pushState({userState:n,_index:De},"",e))}function Le(e){return new Promise((t=>{const n=Ae;Ae=()=>{Ae=n,t()},history.go(e)}))}function $e(){Pe&&(Pe(!1),Pe=null)}function Oe(e,t,n,o){return new Promise((r=>{$e(),Re++,Pe=r,o.locationChanging(Re,e,t,n)}))}async function Fe(e,t){const n=t??location.href;await Promise.all(Array.from(xe,(async([t,o])=>{var r;r=t,b.has(r)&&await o.locationChanged(n,history.state?.userState,e)})))}async function He(e){Ae&&We()&&await Ae(e),De=history.state?._index??0}function je(){const e=ke();if(void 0!==e)return xe.get(e)}function We(){return Ie()||!Se()}const ze={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},qe={init:function(e,t,n,o=50){const r=Ve(t);(r||document.documentElement).style.overflowAnchor="none";const i=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(o){o.forEach((o=>{if(!o.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const r=i.getBoundingClientRect().height,s=o.rootBounds?.height;o.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",o.intersectionRect.top-o.boundingClientRect.top,r,s):o.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",o.boundingClientRect.bottom-o.intersectionRect.bottom,r,s)}))}),{root:r,rootMargin:`${o}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=Ke(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,o)=>{u(e.parentElement)&&(o.disconnect(),e.style.display="table-row",o.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ke(e),o=t[n];o&&(o.intersectionObserver.disconnect(),o.mutationObserverBefore.disconnect(),o.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Je=Symbol();function Ve(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Ve(e.parentElement):null}function Ke(e){const t=e._callDispatcher,n=e._id;return t[Je]??={},{observersByDotNetObjectId:t[Je],id:n}}const Xe={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const o=e[n],r=o.previousSibling;r instanceof Comment&&null!==W(r)||(null===t&&(t=o.textContent),o.parentNode?.removeChild(o))}return t}},Ye={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,o,r){const i=Ge(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,o/s.width),i=Math.min(1,r/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ge(e,t).blob}};function Ge(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Qe=new Set;function Ze(e){e.preventDefault(),e.returnValue=!0}async function et(e,t,n){return e instanceof Blob?await async function(e,t,n){const o=e.slice(t,t+n),r=await o.arrayBuffer();return new Uint8Array(r)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}const tt={navigateTo:function(e,t,n=!1){Me(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(r.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),s.forEach((n=>n(e,t.browserEventName)))}r.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Ne,domWrapper:ze,Virtualize:qe,PageTitle:Xe,InputFile:Ye,NavigationLock:{enableNavigationPrompt:function(e){0===Qe.size&&window.addEventListener("beforeunload",Ze),Qe.add(e)},disableNavigationPrompt:function(e){Qe.delete(e),0===Qe.size&&window.removeEventListener("beforeunload",Ze)}},getJSDataStreamChunk:et,attachWebRendererInterop:C}};var nt;function ot(e){const t={...rt,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...rt.reconnectionOptions,...e.reconnectionOptions}),t}window.Blazor=tt,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(nt||(nt={}));const rt={configureSignalR:e=>{},logLevel:nt.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:30,retryIntervalMilliseconds:function(e,t){return t&&e>=t?null:e<10?0:e<20?5e3:3e4},dialogId:"components-reconnect-modal"}};(class e{static{this.instance=new e}log(e,t){}});let it=class{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${nt[e]}: ${t}`;switch(e){case nt.Critical:case nt.Error:console.error(n);break;case nt.Warning:console.warn(n);break;case nt.Information:console.info(n);break;default:console.log(n)}}}};const st=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/;function at(e){return ct(e,st)}function ct(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",r=t.exec(o),i=r&&r.groups&&r.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function dt(e,t){const n=e.currentElement;var o,r,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=ht.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:o}=e;if(o){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=ht.exec(e.textContent),r=t&&t[1];if(r)return gt(r,o),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return r=n,i=c,ft(o=s),{...o,uniqueId:ut++,start:r,end:i};case"server":return function(e,t,n){return pt(e),{...e,uniqueId:ut++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return pt(e),ft(e),{...e,uniqueId:ut++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let ut=0;function pt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function ft(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function gt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const o=n.prerenderId;if(!o)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(o!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${o}'`)}class mt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Nt(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function Mt(e,t,n,o,r,i){const s={},[a,c]=Lt();s[a]=c,e.log(Tt.Trace,`(${t} transport) sending data. ${Pt(r,i.logMessageContent)}.`);const l=Nt(r)?"arraybuffer":"text",h=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:l,timeout:i.timeout,withCredentials:i.withCredentials});e.log(Tt.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class Ut{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class Bt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${Tt[e]}: ${t}`;switch(e){case Tt.Critical:case Tt.Error:this.out.error(n);break;case Tt.Warning:this.out.warn(n);break;case Tt.Information:this.out.info(n);break;default:this.out.log(n)}}}}function Lt(){return["X-SignalR-User-Agent",$t(Rt,"","Browser",void 0)]}function $t(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&""!==t?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function Ot(e){return e.stack?e.stack:e.message?e.message:`${e}`}class Ft extends kt{constructor(e){if(super(),this._logger=e,"undefined"==typeof fetch){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._jar=new(e("tough-cookie").CookieJar),"undefined"==typeof fetch?this._fetchType=e("node-fetch"):this._fetchType=fetch,this._fetchType=e("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("could not find global")}());if("undefined"==typeof AbortController){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._abortControllerType=e("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new wt;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new wt});let o,r=null;if(e.timeout){const o=e.timeout;r=setTimeout((()=>{t.abort(),this._logger.log(Tt.Warning,"Timeout from HTTP request."),n=new vt}),o)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Nt(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(Tt.Warning,`Error from HTTP request. ${e}.`),e}finally{r&&clearTimeout(r),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const e=await Ht(o,"text");throw new yt(e||o.statusText,o.status)}const i=Ht(o,e.responseType),s=await i;return new It(o.status,o.statusText,s)}getCookieString(e){return""}}function Ht(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class jt extends kt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new wt):e.method?e.url?new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=void 0===e.withCredentials||e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(Nt(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const r=e.headers;r&&Object.keys(r).forEach((e=>{o.setRequestHeader(e,r[e])})),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new wt)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new It(o.status,o.statusText,o.response||o.responseText)):n(new yt(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(Tt.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new yt(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(Tt.Warning,"Timeout from HTTP request."),n(new vt)},o.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Wt extends kt{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new Ft(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new jt(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new wt):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class zt{static write(e){return`${e}${zt.RecordSeparator}`}static parse(e){if(e[e.length-1]!==zt.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(zt.RecordSeparator);return t.pop(),t}}zt.RecordSeparatorCode=30,zt.RecordSeparator=String.fromCharCode(zt.RecordSeparatorCode);class qt{writeHandshakeRequest(e){return zt.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(Nt(e)){const o=new Uint8Array(e),r=o.indexOf(zt.RecordSeparatorCode);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(o.slice(0,i))),n=o.byteLength>i?o.slice(i).buffer:null}else{const o=e,r=o.indexOf(zt.RecordSeparator);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=o.substring(0,i),n=o.length>i?o.substring(i):null}const o=zt.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}}var Jt,Vt;!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(Jt||(Jt={}));class Kt{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Ut(this,e)}}class Xt{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},o=()=>{};Nt(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,o=n}))),this._messages.push(new Yt(t,this._totalMessageCount,e,o))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Jt.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case Jt.Invocation:case Jt.StreamItem:case Jt.Completion:case Jt.StreamInvocation:case Jt.CancelInvocation:return!0;case Jt.Close:case Jt.Sequence:case Jt.Ping:case Jt.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Jt.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class Yt{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(Vt||(Vt={}));class Gt{static create(e,t,n,o,r,i,s){return new Gt(e,t,n,o,r,i,s)}constructor(e,t,n,o,r,i,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(Tt.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},xt.isRequired(e,"connection"),xt.isRequired(t,"logger"),xt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=r?r:3e4,this.keepAliveIntervalInMilliseconds=null!=i?i:15e3,this._statefulReconnectBufferSize=null!=s?s:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new qt,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Vt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Jt.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Vt.Disconnected&&this._connectionState!==Vt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Vt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Vt.Connecting,this._logger.log(Tt.Debug,"Starting HubConnection.");try{await this._startInternal(),At.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Vt.Connected,this._connectionStarted=!0,this._logger.log(Tt.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Vt.Disconnected,this._logger.log(Tt.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(Tt.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(Tt.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new Xt(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(Tt.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===Vt.Disconnected)return this._logger.log(Tt.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Vt.Disconnecting)return this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=Vt.Disconnecting,this._logger.log(Tt.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(Tt.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===Vt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new wt("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o);let i;const s=new Kt;return s.cancelCallback=()=>{const e=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],i.then((()=>this._sendWithProtocol(e)))},this._callbacks[r.invocationId]=(e,t)=>{t?s.error(t):e&&(e.type===Jt.Completion?e.error?s.error(new Error(e.error)):s.complete():s.next(e.item))},i=this._sendWithProtocol(r).catch((e=>{s.error(e),delete this._callbacks[r.invocationId]})),this._launchStreams(n,i),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise(((e,t)=>{this._callbacks[r.invocationId]=(n,o)=>{o?t(o):n&&(n.type===Jt.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const o=this._sendWithProtocol(r).catch((e=>{t(e),delete this._callbacks[r.invocationId]}));this._launchStreams(n,o)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const o=n.indexOf(t);-1!==o&&(n.splice(o,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case Jt.Invocation:this._invokeClientMethod(e).catch((e=>{this._logger.log(Tt.Error,`Invoke client method threw error: ${Ot(e)}`)}));break;case Jt.StreamItem:case Jt.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===Jt.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(Tt.Error,`Stream callback threw error: ${Ot(e)}`)}}break}case Jt.Ping:break;case Jt.Close:{this._logger.log(Tt.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case Jt.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case Jt.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(Tt.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(Tt.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(Tt.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(Tt.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===Vt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(Tt.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(Tt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const o=n.slice(),r=!!e.invocationId;let i,s,a;for(const n of o)try{const o=i;i=await n.apply(this,e.arguments),r&&i&&o&&(this._logger.log(Tt.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),s=void 0}catch(e){s=e,this._logger.log(Tt.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):r?(s?a=this._createCompletionMessage(e.invocationId,`${s}`,null):void 0!==i?a=this._createCompletionMessage(e.invocationId,null,i):(this._logger.log(Tt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):i&&this._logger.log(Tt.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(Tt.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new wt("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Vt.Disconnecting?this._completeClose(e):this._connectionState===Vt.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Vt.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Vt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),At.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Tt.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,o=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(null===r)return this._logger.log(Tt.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=Vt.Reconnecting,e?this._logger.log(Tt.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(Tt.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Tt.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==Vt.Reconnecting)return void this._logger.log(Tt.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==r;){if(this._logger.log(Tt.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,r)})),this._reconnectDelayHandle=void 0,this._connectionState!==Vt.Reconnecting)return void this._logger.log(Tt.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=Vt.Connected,this._logger.log(Tt.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(Tt.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(Tt.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==Vt.Reconnecting)return this._logger.log(Tt.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===Vt.Disconnecting&&this._completeClose());o=e instanceof Error?e:new Error(e.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(Tt.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(Tt.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const o=t[n];try{o(null,e)}catch(t){this._logger.log(Tt.Error,`Stream 'error' callback called with '${e}' threw error: ${Ot(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return 0!==o.length?{target:e,arguments:t,streamIds:o,type:Jt.Invocation}:{target:e,arguments:t,type:Jt.Invocation};{const n=this._invocationId;return this._invocationId++,0!==o.length?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:Jt.Invocation}:{target:e,arguments:t,invocationId:n.toString(),type:Jt.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,o))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let o=0;o0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[en.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[en.Authorization]&&delete e.headers[en.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var nn,on;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(nn||(nn={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(on||(on={}));let rn=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class sn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new rn,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._url=e,this._logger.log(Tt.Trace,"(LongPolling transport) Connecting."),t===on.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Lt(),r={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===on.Binary&&(i.responseType="arraybuffer");const s=`${e}&_=${Date.now()}`;this._logger.log(Tt.Trace,`(LongPolling transport) polling: ${s}.`);const a=await this._httpClient.get(s,i);200!==a.statusCode?(this._logger.log(Tt.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new yt(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(Tt.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,t);204===o.statusCode?(this._logger.log(Tt.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==o.statusCode?(this._logger.log(Tt.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new yt(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(Tt.Trace,`(LongPolling transport) data received. ${Pt(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(Tt.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof vt?this._logger.log(Tt.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(Tt.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(Tt.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Mt(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(Tt.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(Tt.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=Lt();e[t]=n;const o={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let r;try{await this._httpClient.delete(this._url,o)}catch(e){r=e}r?r instanceof yt&&(404===r.statusCode?this._logger.log(Tt.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(Tt.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(Tt.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(Tt.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(Tt.Trace,e),this.onclose(this._closeError)}}}class an{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(e,t){return xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._logger.log(Tt.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,o)=>{let r,i=!1;if(t===on.Text){if(At.isBrowser||At.isWebWorker)r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[o,i]=Lt();n[o]=i,r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{r.onmessage=e=>{if(this.onreceive)try{this._logger.log(Tt.Trace,`(SSE transport) data received. ${Pt(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},r.onerror=e=>{i?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},r.onopen=()=>{this._logger.log(Tt.Information,`SSE connected to ${this._url}`),this._eventSource=r,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?Mt(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class cn{constructor(e,t,n,o,r,i){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){let n;return xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._logger.log(Tt.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((o,r)=>{let i;e=e.replace(/^http/,"ws");const s=this._httpClient.getCookieString(e);let a=!1;if(At.isReactNative){const t={},[o,r]=Lt();t[o]=r,n&&(t[en.Authorization]=`Bearer ${n}`),s&&(t[en.Cookie]=s),i=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(e)),t===on.Binary&&(i.binaryType="arraybuffer"),i.onopen=t=>{this._logger.log(Tt.Information,`WebSocket connected to ${e}.`),this._webSocket=i,a=!0,o()},i.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(Tt.Information,`(WebSockets transport) ${t}.`)},i.onmessage=e=>{if(this._logger.log(Tt.Trace,`(WebSockets transport) data received. ${Pt(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},i.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(Tt.Trace,`(WebSockets transport) sending data. ${Pt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(Tt.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class ln{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,xt.isRequired(e,"url"),this._logger=function(e){return void 0===e?new Bt(Tt.Information):null===e?Dt.instance:void 0!==e.log?e:new Bt(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new tn(t.httpClient||new Wt(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||on.Binary,xt.isIn(e,on,"transferFormat"),this._logger.log(Tt.Debug,`Starting connection with transfer format '${on[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(Tt.Error,e),await this._stopPromise,Promise.reject(new wt(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(Tt.Error,e),Promise.reject(new wt(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new hn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(Tt.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(Tt.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==nn.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(nn.WebSockets),await this._startTransport(t,e)}else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new wt("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<100);if(100===o&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof sn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(Tt.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(Tt.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,o]=Lt();t[n]=o;const r=this._resolveNegotiateUrl(e);this._logger.log(Tt.Debug,`Sending negotiation request: ${r}.`);try{const e=await this._httpClient.post(r,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new Et("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof yt&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(Tt.Error,t),Promise.reject(new Et(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,o){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(Tt.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(r,o),void(this.connectionId=n.connectionId);const i=[],s=n.availableTransports||[];let a=n;for(const n of s){const s=this._resolveTransportOrError(n,t,o,!0===(null==a?void 0:a.useStatefulReconnect));if(s instanceof Error)i.push(`${n.transport} failed:`),i.push(s);else if(this._isITransport(s)){if(this.transport=s,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}r=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(r,o),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(Tt.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,i.push(new St(`${n.transport} failed: ${e}`,nn[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(Tt.Debug,e),Promise.reject(new wt(e))}}}}return i.length>0?Promise.reject(new Ct(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case nn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new cn(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case nn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new an(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case nn.LongPolling:return new sn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{o=!0}o&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){const r=nn[e.transport];if(null==r)return this._logger.log(Tt.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function(e,t){return!e||!!(t&e)}(t,r))return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it was disabled by the client.`),new bt(`'${nn[r]}' is disabled by the client.`,r);if(!(e.transferFormats.map((e=>on[e])).indexOf(n)>=0))return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it does not support the requested transfer format '${on[n]}'.`),new Error(`'${nn[r]}' does not support ${on[n]}.`);if(r===nn.WebSockets&&!this._options.WebSocket||r===nn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it is not supported in your environment.'`),new _t(`'${nn[r]}' is not supported in your environment.`,r);this._logger.log(Tt.Debug,`Selecting transport '${nn[r]}'.`);try{return this.features.reconnect=r===nn.WebSockets?o:void 0,this._constructTransport(r)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(Tt.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(Tt.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(Tt.Error,`Connection disconnected with error '${e}'.`):this._logger.log(Tt.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(Tt.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(Tt.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(Tt.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!At.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(Tt.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class hn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new dn,this._transportResult=new dn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new dn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new dn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):hn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let o=0;for(const t of e)n.set(new Uint8Array(t),o),o+=t.byteLength;return n.buffer}}class dn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class un{constructor(){this.name="json",this.version=2,this.transferFormat=on.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=Dt.instance);const n=zt.parse(e),o=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case Jt.Invocation:this._isInvocationMessage(n);break;case Jt.StreamItem:this._isStreamItemMessage(n);break;case Jt.Completion:this._isCompletionMessage(n);break;case Jt.Ping:case Jt.Close:break;case Jt.Ack:this._isAckMessage(n);break;case Jt.Sequence:this._isSequenceMessage(n);break;default:t.log(Tt.Information,"Unknown message type '"+n.type+"' ignored.");continue}o.push(n)}return o}writeMessage(e){return zt.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const pn={trace:Tt.Trace,debug:Tt.Debug,info:Tt.Information,information:Tt.Information,warn:Tt.Warning,warning:Tt.Warning,error:Tt.Error,critical:Tt.Critical,none:Tt.None};class fn{configureLogging(e){if(xt.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=pn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new Bt(t)}else this.logger=new Bt(e);return this}withUrl(e,t){return xt.isRequired(e,"url"),xt.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return xt.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Zt(e):this.reconnectPolicy=e:this.reconnectPolicy=new Zt,this}withServerTimeout(e){return xt.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return xt.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new ln(this.url,e);return Gt.create(t,this.logger||Dt.instance,this.protocol||new un,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var gn;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(gn||(gn={}));var mn,yn,vn,wn=4294967295;function _n(e,t,n){var o=Math.floor(n/4294967296),r=n;e.setUint32(t,o),e.setUint32(t+4,r)}function bn(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var Sn=("undefined"==typeof process||"never"!==(null===(mn=null===process||void 0===process?void 0:process.env)||void 0===mn?void 0:mn.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function En(e){for(var t=e.length,n=0,o=0;o=55296&&r<=56319&&o65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h)}else i.push(a);else i.push(a);i.length>=4096&&(s+=String.fromCharCode.apply(String,i),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,i)),s}var Dn,Rn=Sn?new TextDecoder:null,xn=Sn?"undefined"!=typeof process&&"force"!==(null===(vn=null===process||void 0===process?void 0:process.env)||void 0===vn?void 0:vn.TEXT_DECODER)?200:0:wn,An=function(e,t){this.type=e,this.data=t},Pn=(Dn=function(e,t){return Dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Dn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Dn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Nn=function(e){function t(n){var o=e.call(this,n)||this,r=Object.create(t.prototype);return Object.setPrototypeOf(o,r),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:t.name}),o}return Pn(t,e),t}(Error),Mn={type:-1,encode:function(e){var t,n,o,r;return e instanceof Date?function(e){var t,n=e.sec,o=e.nsec;if(n>=0&&o>=0&&n<=17179869183){if(0===o&&n<=4294967295){var r=new Uint8Array(4);return(t=new DataView(r.buffer)).setUint32(0,n),r}var i=n/4294967296,s=4294967295&n;return r=new Uint8Array(8),(t=new DataView(r.buffer)).setUint32(0,o<<2|3&i),t.setUint32(4,s),r}return r=new Uint8Array(12),(t=new DataView(r.buffer)).setUint32(0,o),_n(t,4,n),r}((o=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(r=Math.floor(o/1e9)),nsec:o-1e9*r})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:bn(t,4),nsec:t.getUint32(0)};default:throw new Nn("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},Un=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Mn)}return e.prototype.register=function(e){var t=e.type,n=e.encode,o=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=o;else{var r=1+t;this.builtInEncoders[r]=n,this.builtInDecoders[r]=o}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>In){var t=En(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),kn(e,this.bytes,this.pos),this.pos+=t}else t=En(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var o=e.length,r=n,i=0;i=55296&&s<=56319&&i>18&7|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128):(t[r++]=s>>12&15|224,t[r++]=s>>6&63|128)}else t[r++]=s>>6&31|192;t[r++]=63&s|128}else t[r++]=s}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=Bn(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var o=0,r=e;o0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var o=0,r=this.caches[n-1];o=this.maxLengthPerKey?n[Math.random()*n.length|0]=o:n.push(o)},e.prototype.decode=function(e,t,n){var o=this.find(e,t,n);if(null!=o)return this.hit++,o;this.miss++;var r=Tn(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,r),r},e}(),Fn=function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return Fn(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,o,r,i,s,a;return i=this,a=function(){var i,s,a,c,l,h,d,u;return Fn(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=Hn(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof qn))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),o={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(r=t.return)?[4,r.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(o)throw o.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat($n(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function o(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,o)}r((a=a.apply(i,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,s=function(){var n,o,r,i,s,a,c,l,h;return Fn(this,(function(d){switch(d.label){case 0:n=t,o=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),r=Hn(e),d.label=2;case 2:return[4,jn(r.next())];case 3:if((i=d.sent()).done)return[3,12];if(s=i.value,t&&0===o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(o=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,jn(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--o?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof qn))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),i&&!i.done&&(h=r.return)?[4,jn(h.call(r))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,o||[]),a=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(e){s[e]&&(i[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=s[e](t)).value instanceof jn?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(o=e-128)){this.pushMapState(o),this.complete();continue e}t={}}else if(e<160){if(0!=(o=e-144)){this.pushArrayState(o),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(o=this.readU16())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(221===e){if(0!==(o=this.readU32())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(222===e){if(0!==(o=this.readU16())){this.pushMapState(o),this.complete();continue e}t={}}else if(223===e){if(0!==(o=this.readU32())){this.pushMapState(o),this.complete();continue e}t={}}else if(196===e){var o=this.lookU8();t=this.decodeBinary(o,1)}else if(197===e)o=this.lookU16(),t=this.decodeBinary(o,2);else if(198===e)o=this.lookU32(),t=this.decodeBinary(o,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)o=this.lookU8(),t=this.decodeExtension(o,1);else if(200===e)o=this.lookU16(),t=this.decodeExtension(o,2);else{if(201!==e)throw new Nn("Unrecognized type byte: ".concat($n(e)));o=this.lookU32(),t=this.decodeExtension(o,4)}this.complete();for(var r=this.stack;r.length>0;){var i=r[r.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;r.pop(),t=i.array}else{if(1===i.type){if("string"!=(s=typeof t)&&"number"!==s)throw new Nn("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new Nn("The key __proto__ is not allowed");i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}r.pop(),t=i.map}}return t}var s},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Nn("Unrecognized array type byte: ".concat($n(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Nn("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Nn("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new Nn("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthxn?function(e,t,n){var o=e.subarray(t,t+n);return Rn.decode(o)}(this.bytes,r,e):Tn(this.bytes,r,e),this.pos+=t+e,o},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Nn("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Jn;var n=this.pos+t,o=this.bytes.subarray(n,n+e);return this.pos+=t+e,o},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Nn("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),o=this.decodeBinary(e,t+1);return this.extensionCodec.decode(o,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=bn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class Xn{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer}static parse(e){const t=[],n=new Uint8Array(e),o=[0,7,14,21,28];for(let r=0;r7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=r+s+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(r+s,r+s+a):n.subarray(r+s,r+s+a)),r=r+s+a}return t}}const Yn=new Uint8Array([145,Jt.Ping]);class Gn{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=on.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new Ln(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new Kn(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=Dt.instance);const o=Xn.parse(e),r=[];for(const e of o){const n=this._parseMessage(e,t);n&&r.push(n)}return r}writeMessage(e){switch(e.type){case Jt.Invocation:return this._writeInvocation(e);case Jt.StreamInvocation:return this._writeStreamInvocation(e);case Jt.StreamItem:return this._writeStreamItem(e);case Jt.Completion:return this._writeCompletion(e);case Jt.Ping:return Xn.write(Yn);case Jt.CancelInvocation:return this._writeCancelInvocation(e);case Jt.Close:return this._writeClose();case Jt.Ack:return this._writeAck(e);case Jt.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const o=n[0];switch(o){case Jt.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case Jt.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case Jt.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case Jt.Ping:return this._createPingMessage(n);case Jt.Close:return this._createCloseMessage(n);case Jt.Ack:return this._createAckMessage(n);case Jt.Sequence:return this._createSequenceMessage(n);default:return t.log(Tt.Information,"Unknown message type '"+o+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:Jt.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:Jt.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:Jt.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:Jt.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:Jt.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let o,r;switch(n){case this._errorResult:o=t[4];break;case this._nonVoidResult:r=t[4]}return{error:o,headers:e,invocationId:t[2],result:r,type:Jt.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:Jt.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:Jt.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([Jt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([Jt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),Xn.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([Jt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([Jt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),Xn.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([Jt.StreamItem,e.headers||{},e.invocationId,e.item]);return Xn.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t,e.result])}return Xn.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([Jt.CancelInvocation,e.headers||{},e.invocationId]);return Xn.write(t.slice())}_writeClose(){const e=this._encoder.encode([Jt.Close,null]);return Xn.write(e.slice())}_writeAck(e){const t=this._encoder.encode([Jt.Ack,e.sequenceId]);return Xn.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([Jt.Sequence,e.sequenceId]);return Xn.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const Qn="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,Zn=Qn?Qn.decode.bind(Qn):function(e){let t=0;const n=e.length,o=[],r=[];for(;t65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r)}}else o.push(n);o.length>1024&&(r.push(String.fromCharCode.apply(null,o)),o.length=0)}return r.push(String.fromCharCode.apply(null,o)),r.join("")},eo=Math.pow(2,32),to=Math.pow(2,21)-1;function no(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function oo(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function ro(e,t){const n=oo(e,t+4);if(n>to)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*eo+oo(e,t)}class io{constructor(e){this.batchData=e;const t=new lo(e);this.arrayRangeReader=new ho(e),this.arrayBuilderSegmentReader=new uo(e),this.diffReader=new so(e),this.editReader=new ao(e,t),this.frameReader=new co(e,t)}updatedComponents(){return no(this.batchData,this.batchData.length-20)}referenceFrames(){return no(this.batchData,this.batchData.length-16)}disposedComponentIds(){return no(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return no(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return no(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return no(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return ro(this.batchData,n)}}class so{constructor(e){this.batchDataUint8=e}componentId(e){return no(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class ao{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return no(this.batchDataUint8,e)}siblingIndex(e){return no(this.batchDataUint8,e+4)}newTreeIndex(e){return no(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return no(this.batchDataUint8,e+8)}removedAttributeName(e){const t=no(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class co{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return no(this.batchDataUint8,e)}subtreeLength(e){return no(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return no(this.batchDataUint8,e+8)}elementName(e){const t=no(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=no(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return ro(this.batchDataUint8,e+12)}}class lo{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=no(e,e.length-4)}readString(e){if(-1===e)return null;{const n=no(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){let n=0,o=0;for(let r=0;r<4;r++){const i=e[t+r];if(n|=(127&i)<this.nextBatchId)return this.fatalError?(this.logger.log(nt.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(nt.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(nt.Debug,`Applying batch ${e}.`),function(e,t){const n=fe[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const o=t.arrayRangeReader,r=t.updatedComponents(),i=o.values(r),s=o.count(r),a=t.referenceFrames(),c=o.values(a),l=t.diffReader;for(let e=0;e{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class So{constructor(t,n,o,r){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=o,this._logger=r,this._renderQueue=new po(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){return this._firstUpdate?(this._firstUpdate=!1,this._connection?.send("UpdateRootComponents",e,this._applicationState)):this._connection?.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==Vt.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>{return t=e,{...t,start:void 0,end:void 0};var t})));if(this._circuitId=await this._connection.invoke("StartCircuit",Ne.getBaseURI(),Ne.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){const e=new Gn;e.name="blazorpack";const t=(new fn).withUrl("_blazor").withHubProtocol(e);this._options.configureSignalR(t);const n=t.build();n.on("JS.AttachComponent",((e,t)=>function(e,t,n,o){let r=fe[e];r||(r=new he(e),fe[e]=r),r.attachRootComponentToLogicalElement(n,t,!1)}(gn.Server,this.resolveElement(t),e))),n.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),n.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),n.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),n.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{n.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),n.on("JS.RenderBatch",(async(e,t)=>{this._logger.log(Tt.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),this._componentManager.onAfterRenderBatch?.(gn.Server)})),n.on("JS.EndUpdateRootComponents",(e=>{this._componentManager.onAfterUpdateRootComponents?.(e)})),n.on("JS.EndLocationChanging",tt._internal.navigationManager.endLocationChanging),n.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=b.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return b.delete(e),t}(gn.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),n.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),bo()}));try{await n.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;bo(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===nn.WebSockets))?this._logger.log(Tt.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===nn.WebSockets))?this._logger.log(Tt.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===nn.LongPolling))&&this._logger.log(Tt.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return n.connection?.features?.inherentKeepAlive&&this._logger.log(Tt.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),n}async disconnect(){await(this._connection?.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===Vt.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(C(gn.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,o,r){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,o||0,r)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,o){return this._connection.send("OnLocationChanging",e,t,n,o)}sendJsDataStream(e,t,n){return function(e,t,n,o){setTimeout((async()=>{let r=5,i=(new Date).valueOf();try{const s=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),o=t-i;i=t,r=Math.max(1,Math.round(500/Math.max(1,o)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=function(e){const t=p.get(e);if(t)return p.delete(e),t}(e);if(t)return $(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return function(e){const{start:t,end:n}=e,o=t[L];if(o){if(o!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const r=t.parentNode;if(!r)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const i=$(r,!0),s=J(i);t[B]=i,t[L]=e;const a=$(t);if(n){const e=J(a),o=Array.prototype.indexOf.call(s,a)+1;let r=null;for(;r!==n;){const n=s.splice(o,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[B]=t,e.push(n),r=n}}return a}(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(Tt.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,this._connection?.stop();const e=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:e});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}class Eo{static{this.ReconnectOverlayClassName="components-reconnect-overlay"}static{this.ReconnectDialogClassName="components-reconnect-dialog"}static{this.ReconnectVisibleClassName="components-reconnect-visible"}static{this.RejoiningAnimationClassName="components-rejoining-animation"}static{this.AnimationRippleCount=2}constructor(e,t,n){this.document=t,this.logger=n,this.style=this.document.createElement("style"),this.style.innerHTML=Eo.Css,this.overlay=this.document.createElement("div"),this.overlay.className=Eo.ReconnectOverlayClassName,this.host=this.document.createElement("div"),this.host.id=e;const o=this.host.attachShadow({mode:"open"});this.dialog=t.createElement("div"),this.dialog.className=Eo.ReconnectDialogClassName,o.appendChild(this.style),o.appendChild(this.overlay),this.rejoiningAnimation=t.createElement("div"),this.rejoiningAnimation.className=Eo.RejoiningAnimationClassName;for(let e=0;e{"visible"===this.document.visibilityState&&this.retry()}}show(){this.document.contains(this.host)||this.document.body.appendChild(this.host),this.reloadButton.style.display="none",this.rejoiningAnimation.style.display="block",this.status.innerHTML="Rejoining the server...",this.host.style.display="block",this.overlay.classList.add(Eo.ReconnectVisibleClassName)}update(e,t){if(1===e||0===t)this.status.innerHTML="Rejoining the server...";else{const e=1===t?"second":"seconds";this.status.innerHTML=`Rejoin failed... trying again in ${t} ${e}`}}hide(){this.host.style.display="none",this.overlay.classList.remove(Eo.ReconnectVisibleClassName)}failed(){this.reloadButton.style.display="block",this.rejoiningAnimation.style.display="none",this.status.innerHTML="Failed to rejoin.
Please retry or reload the page.",this.document.addEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible)}rejected(){location.reload()}async retry(){this.document.removeEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible),this.show();try{await tt.reconnect()||this.rejected()}catch(e){this.logger.log(nt.Error,e),this.failed()}}static{this.Css=`\n .${this.ReconnectOverlayClassName} {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n display: none;\n overflow: hidden;\n animation: components-reconnect-fade-in;\n }\n\n .${this.ReconnectOverlayClassName}.${this.ReconnectVisibleClassName} {\n display: block;\n }\n\n .${this.ReconnectOverlayClassName}::before {\n content: '';\n background-color: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: components-reconnect-fadeInOpacity 0.5s ease-in-out;\n opacity: 1;\n }\n\n .${this.ReconnectOverlayClassName} p {\n margin: 0;\n text-align: center;\n }\n\n .${this.ReconnectOverlayClassName} button {\n border: 0;\n background-color: #6b9ed2;\n color: white;\n padding: 4px 24px;\n border-radius: 4px;\n }\n\n .${this.ReconnectOverlayClassName} button:hover {\n background-color: #3b6ea2;\n }\n\n .${this.ReconnectOverlayClassName} button:active {\n background-color: #6b9ed2;\n }\n\n .${this.ReconnectDialogClassName} {\n position: relative;\n background-color: white;\n width: 20rem;\n margin: 20vh auto;\n padding: 2rem;\n border-radius: 0.5rem;\n box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n opacity: 0;\n animation: components-reconnect-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-fadeInOpacity 0.5s ease-out 0.3s;\n animation-fill-mode: forwards;\n z-index: 10001;\n }\n\n .${this.RejoiningAnimationClassName} {\n display: block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n\n .${this.RejoiningAnimationClassName} div {\n position: absolute;\n border: 3px solid #0087ff;\n opacity: 1;\n border-radius: 50%;\n animation: ${this.RejoiningAnimationClassName} 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n }\n\n .${this.RejoiningAnimationClassName} div:nth-child(2) {\n animation-delay: -0.5s;\n }\n\n @keyframes ${this.RejoiningAnimationClassName} {\n 0% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 4.9% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 5% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 1;\n }\n\n 100% {\n top: 0px;\n left: 0px;\n width: 80px;\n height: 80px;\n opacity: 0;\n }\n }\n\n @keyframes components-reconnect-fadeInOpacity {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes components-reconnect-slideUp {\n 0% {\n transform: translateY(30px) scale(0.95);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n `}}class Co{static{this.ShowClassName="components-reconnect-show"}static{this.HideClassName="components-reconnect-hide"}static{this.FailedClassName="components-reconnect-failed"}static{this.RejectedClassName="components-reconnect-rejected"}static{this.MaxRetriesId="components-reconnect-max-retries"}static{this.CurrentAttemptId="components-reconnect-current-attempt"}static{this.SecondsToNextAttemptId="components-seconds-to-next-attempt"}constructor(e,t,n){if(this.dialog=e,this.document=t,this.document=t,void 0!==n){const e=this.document.getElementById(Co.MaxRetriesId);e&&(e.innerText=n.toString())}}show(){this.removeClasses(),this.dialog.classList.add(Co.ShowClassName)}update(e,t){const n=this.document.getElementById(Co.CurrentAttemptId);n&&(n.innerText=e.toString());const o=this.document.getElementById(Co.SecondsToNextAttemptId);o&&(o.innerText=t.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Co.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Co.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Co.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Co.ShowClassName,Co.HideClassName,Co.FailedClassName,Co.RejectedClassName)}}class Io{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||tt.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Co(t,document,e.maxRetries):new Eo(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new ko(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class ko{static{this.MaximumFirstRetryInterval=3e3}constructor(e,t,n,o){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=o,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;void 0===e.maxRetries||tko.MaximumFirstRetryInterval?ko.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.runTimer(n,1e3,(e=>{this.reconnectDisplay.update(t+1,Math.round(e/1e3))})),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(nt.Error,e)}}this.reconnectDisplay.failed()}async runTimer(e,t,n){if(e<=0)return void n(0);let o,r,i=Date.now();n(e);const s=()=>{if(this.isDisposed)return void r();const a=Date.now(),c=a-i;i=a;const l=Math.max(1,Math.floor(c/t)),h=t*l;if((e-=h){"visible"===document.visibilityState&&(clearTimeout(o),n(0),r())};o=setTimeout(s,t),document.addEventListener("visibilitychange",a),await new Promise((e=>r=e)),document.removeEventListener("visibilitychange",a)}}class To{constructor(e=!0,t,n,o=0){this.singleRuntime=e,this.logger=t,this.webRendererId=o,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const o=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),r=await import(o);if(void 0!==r){if(e.singleRuntime){const{beforeStart:n,afterStarted:o,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=r;let h=n;e.webRendererId===gn.Server&&c&&(h=c),e.webRendererId===gn.WebAssembly&&s&&(h=s);let d=o;return e.webRendererId===gn.Server&&l&&(d=l),e.webRendererId===gn.WebAssembly&&a&&(d=a),i(e,h,d,t)}return function(e,t,n){const r=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:h,afterWebAssemblyStarted:d,beforeServerStart:u,afterServerStarted:p}=t,f=!(c||l||h||d||u||p||!s&&!a),g=f&&r.enableClassicInitializers;if(f&&!r.enableClassicInitializers)e.logger?.log(nt.Warning,`Initializer '${o}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(g)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(r),h&&r.webAssembly.initializers.beforeStart.push(h),d&&r.webAssembly.initializers.afterStarted.push(d),u&&r.circuit.initializers.beforeStart.push(u),p&&r.circuit.initializers.afterStarted.push(p),l&&e.afterStartedCallbacks.push(l),c)return c(r)}(e,r,t)}function i(e,t,n,o){if(n&&e.afterStartedCallbacks.push(n),t)return t(...o)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,E.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}function Do(e){if(void 0!==wo)throw new Error("Blazor Server has already started.");return wo=new Promise(Ro.bind(null,e)),wo}async function Ro(e,t,n){await fo;const o=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new To(!1,void 0,e.initializers.afterStarted,gn.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),o=new To(!0,void 0,void 0,gn.Server);return await o.importInitializersAsync(n,[e]),o}(yo);if(go=at(document)||"",vo=new it(yo.logLevel),mo=new So(e,go,yo,vo),vo.log(nt.Information,"Starting up Blazor server-side application."),tt.reconnect=async()=>!(mo.didRenderingFail()||!await mo.reconnect()&&(vo.log(nt.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),tt.defaultReconnectionHandler=new Io(vo),yo.reconnectionHandler=yo.reconnectionHandler||tt.defaultReconnectionHandler,tt._internal.navigationManager.listenForNavigationEvents(gn.Server,((e,t,n)=>mo.sendLocationChanged(e,t,n)),((e,t,n,o)=>mo.sendLocationChanging(e,t,n,o))),tt._internal.forceCloseConnection=()=>mo.disconnect(),tt._internal.sendJSDataStream=(e,t,n)=>mo.sendJsDataStream(e,t,n),!await mo.start())return vo.log(nt.Error,"Failed to start the circuit."),void t();const r=()=>{mo.sendDisconnectBeacon()};tt.disconnect=r,window.addEventListener("unload",r,{capture:!1,once:!0}),vo.log(nt.Information,"Blazor server-side application started."),o.invokeAfterStartedCallbacks(tt),t()}class xo{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class Ao{constructor(){this._eventListeners=new Map}static create(e){const t=new Ao;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const o={...t,type:e};for(const e of n)e(o)}}let Po=!1;function No(e){if(Po)throw new Error("Blazor has already started.");Po=!0;const t=ot(e);!function(e){if(yo)throw new Error("Circuit options have already been configured.");fo=async function(e){const t=await e;yo=ot(t)}(e)}(Promise.resolve(t||{})),Ao.create(tt);const n=function(e){return lt(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(document);return Do(new xo(n))}tt.start=No,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&No()}(); +!function(){"use strict";var e,t,n;!function(e){const t=[],n="__jsObjectId",o="__dotNetObject",r="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,o=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in o))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=o,o=o[t]})),o instanceof Function)return o=o.bind(n),this._cachedFunctions.set(e,o),o;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h=0,d={[h]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let u,p=1;function f(e){t.push(e)}function g(e){if(e&&"object"==typeof e){d[p]=new l(e);const t={[n]:p};return p++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function m(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const o={[s]:t};try{const t=g(e);o[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return o}function y(e,n){c=e;const o=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,o}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new w(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=g,e.createJSStreamReference=m,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(u=e.JSCallResultType||(e.JSCallResultType={}));class w{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,o){const r=y(this,t),i=k(b(e,o)(...r||[]),n);return null==i?null:D(this,i)}beginInvokeJSFromDotNet(e,t,n,o,r){const i=new Promise((e=>{const o=y(this,n);e(b(t,r)(...o||[]))}));e&&i.then((t=>D(this,[e,!0,k(t,o)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,_(t)]))))}endInvokeDotNetFromJS(e,t,n){const o=t?y(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,o)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,o){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const r=D(this,o),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,r);return i?y(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,o){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const r=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[r]={resolve:e,reject:t}}));try{const i=D(this,o);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(r,e,t,n,i)}catch(e){this.completePendingCall(r,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const o=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?o.resolve(n):o.reject(n)}}function _(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function b(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=b,e.disposeJSObjectReferenceById=S;class E{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[o]:this._id}}}e.DotNetObject=E,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(o))return new E(t[o],c);if(t.hasOwnProperty(n)){const e=t[n],o=d[e];if(o)return o.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(r)){const e=t[r],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new C(n)}}return t}));class C{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function k(e,t){switch(t){case u.Default:return e;case u.JSObjectReference:return g(e);case u.JSStreamReference:return m(e);case u.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let T=0;function D(e,t){T=0,c=e;const n=JSON.stringify(t,R);return c=void 0,n}function R(e,t){if(t instanceof E)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(T,t);const e={[r]:T};return T++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(n||(n={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const r=new Map,i=new Map,s=[];function a(e){return r.get(e)}function c(e){const t=r.get(e);return t?.browserEventName||e}function l(e,t){e.forEach((e=>r.set(e,t)))}function h(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),l(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),l(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...d(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),l(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),l(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),l(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>d(e)}),l(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),l(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),l(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:h(t.touches),targetTouches:h(t.targetTouches),changedTouches:h(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),l(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...d(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),l(["wheel","mousewheel"],{createEventArgs:e=>{return{...d(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),l(["cancel","close","toggle"],{createEventArgs:()=>({})});const u=["date","datetime-local","month","time","week"],p=new Map;let f,g,m=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const o="__bl-dynamic-root:"+(++m).toString();p.set(o,e);const r=await _().invokeMethodAsync("AddRootComponent",t,o),i=new w(r,g[t]);return await i.setParameters(n),i}};class v{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new v)}setParameters(e){const t={},n=Object.entries(e||{}),o=n.length;for(const[e,o]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&o?(n.setCallback(o),t[e]=n.getJSObjectReference()):t[e]=o}return _().invokeMethodAsync("SetRootComponentParameters",this._componentId,o,t)}async dispose(){if(null!==this._componentId){await _().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function _(){if(!f)throw new Error("Dynamic root components have not been enabled in this application.");return f}const b=new Map,S=[],E=new Map;function C(t,n,o,r){if(b.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);b.set(t,n),o&&r&&Object.keys(o).length>0&&function(t,n,o){if(f)throw new Error("Dynamic root components have already been enabled.");f=t,g=n;for(const[t,r]of Object.entries(o)){const o=e.findJSFunction(t,0);for(const e of r)o(e,n[e])}}(k(t),o,r),E.get(t)?.[0]?.(),function(e){for(const t of S)t(e)}(t)}function I(e,t,n){return T(e,t.eventHandlerId,(()=>k(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function k(e){const t=b.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let T=(e,t,n)=>n();const D=M(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),R={submit:!0},x=M(["click","dblclick","mousedown","mousemove","mouseup"]);class A{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++A.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new P(this.onGlobalEvent.bind(this))}setListener(e,t,n,o){const r=this.getEventHandlerInfosForElement(e,!0),i=r.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:o};this.eventInfoStore.add(i),r.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),i=null,s=!1;const c=Object.prototype.hasOwnProperty.call(D,e);let l=!1;for(;r;){const u=r,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(x,d)&&h.disabled))){if(!s){const n=a(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(R,t.type)&&t.preventDefault(),I(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},i)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}r=c||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new N:null}}class P{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},s.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=c(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(D,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=c(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class N{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function M(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const U=Symbol(),B=Symbol(),L=Symbol();function $(e,t){if(U in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const o=$(t,!0);o[B]=e,n.push(o)}))}return e[U]=n,e}function O(e){const t=J(e);for(;t.length;)j(e,0)}function F(e,t){const n=document.createComment("!");return H(n,e,t),n}function H(e,t,n){const o=e;let r=e;if(e instanceof Comment){const t=J(o);if(t?.length>0){const t=G(o),n=new Range;n.setStartBefore(e),n.setEndAfter(t),r=n.extractContents()}}const i=W(o);if(i){const e=J(i),t=Array.prototype.indexOf.call(e,o);e.splice(t,1),delete o[B]}const s=J(t);if(n0;)j(n,0)}const o=n;o.parentNode.removeChild(o)}function W(e){return e[B]||null}function z(e,t){return J(e)[t]}function q(e){const t=X(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function J(e){return e[U]}function V(e){const t=J(W(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function K(e,t){const n=J(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const o=document.createComment("marker");t.moveToBeforeMarker=o;const r=n[t.toSiblingIndex+1];r?r.parentNode.insertBefore(o,r):Y(o,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,o=e.moveRangeStart,r=e.moveRangeEnd;let i=o;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===r)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function X(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function Y(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):Y(e,W(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=W(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function Q(e){return`_bl_${e}`}const Z="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Z)&&"string"==typeof t[Z]?function(e){const t=`[${Q(e)}]`;return document.querySelector(t)}(t[Z]):t));const ee="_blazorDeferredValue";function te(e){return"select-multiple"===e.type}function ne(e,t){e.value=t||""}function oe(e,t){e instanceof HTMLSelectElement?te(e)?function(e,t){t||=[];for(let n=0;n{Ie()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var s;let a=0;for(;i.firstChild;)H(i.firstChild,r,a++)}applyAttribute(e,t,n,o){const r=e.frameReader,i=r.attributeName(o),s=r.attributeEventHandlerId(o);if(s){const e=pe(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=r.attributeValue(o);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,o,r,i,s){const a=o;for(let a=i;a{Fe(t,e)})},enableNavigationInterception:function(e){if(void 0!==ge&&ge!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");ge=e},setHasLocationChangingListeners:function(e,t){const n=xe.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Pe&&e===Re&&(Pe(t),Pe=null)},navigateTo:function(e,t){Me(e,t,!0)},refresh:function(e){!e&&Se()?Ee(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:be};function Me(e,t,n=!1){const o=Ce(e);!t.forceLoad&&_e(o)?We()?Ue(o,!1,t.replaceHistoryEntry,t.historyEntryState,n):Ee(o,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function Ue(e,t,n,o=void 0,r=!1){if($e(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Be(e,n,o),void function(e){const t=e.indexOf("#");t!==e.length-1&&be(e.substring(t+1))}(e);const i=je();(r||!i?.hasLocationChangingEventListeners||await Oe(e,o,t,i))&&(we=!0,Be(e,n,o),await Fe(t))}function Be(e,t,n=void 0){t?history.replaceState({userState:n,_index:De},"",e):(De++,history.pushState({userState:n,_index:De},"",e))}function Le(e){return new Promise((t=>{const n=Ae;Ae=()=>{Ae=n,t()},history.go(e)}))}function $e(){Pe&&(Pe(!1),Pe=null)}function Oe(e,t,n,o){return new Promise((r=>{$e(),Re++,Pe=r,o.locationChanging(Re,e,t,n)}))}async function Fe(e,t){const n=t??location.href;await Promise.all(Array.from(xe,(async([t,o])=>{var r;r=t,b.has(r)&&await o.locationChanged(n,history.state?.userState,e)})))}async function He(e){Ae&&We()&&await Ae(e),De=history.state?._index??0}function je(){const e=ke();if(void 0!==e)return xe.get(e)}function We(){return Ie()||!Se()}const ze={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},qe={init:function(e,t,n,o=50){const r=Ve(t);(r||document.documentElement).style.overflowAnchor="none";const i=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(o){o.forEach((o=>{if(!o.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const r=i.getBoundingClientRect().height,s=o.rootBounds?.height;o.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",o.intersectionRect.top-o.boundingClientRect.top,r,s):o.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",o.boundingClientRect.bottom-o.intersectionRect.bottom,r,s)}))}),{root:r,rootMargin:`${o}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=Ke(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,o)=>{u(e.parentElement)&&(o.disconnect(),e.style.display="table-row",o.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ke(e),o=t[n];o&&(o.intersectionObserver.disconnect(),o.mutationObserverBefore.disconnect(),o.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Je=Symbol();function Ve(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Ve(e.parentElement):null}function Ke(e){const t=e._callDispatcher,n=e._id;return t[Je]??={},{observersByDotNetObjectId:t[Je],id:n}}const Xe={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const o=e[n],r=o.previousSibling;r instanceof Comment&&null!==W(r)||(null===t&&(t=o.textContent),o.parentNode?.removeChild(o))}return t}},Ye={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,o,r){const i=Ge(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,o/s.width),i=Math.min(1,r/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ge(e,t).blob}};function Ge(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Qe=new Set;function Ze(e){e.preventDefault(),e.returnValue=!0}async function et(e,t,n){return e instanceof Blob?await async function(e,t,n){const o=e.slice(t,t+n),r=await o.arrayBuffer();return new Uint8Array(r)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}const tt={navigateTo:function(e,t,n=!1){Me(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(r.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),s.forEach((n=>n(e,t.browserEventName)))}r.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Ne,domWrapper:ze,Virtualize:qe,PageTitle:Xe,InputFile:Ye,NavigationLock:{enableNavigationPrompt:function(e){0===Qe.size&&window.addEventListener("beforeunload",Ze),Qe.add(e)},disableNavigationPrompt:function(e){Qe.delete(e),0===Qe.size&&window.removeEventListener("beforeunload",Ze)}},getJSDataStreamChunk:et,attachWebRendererInterop:C}};var nt;function ot(e){const t={...rt,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...rt.reconnectionOptions,...e.reconnectionOptions}),t}window.Blazor=tt,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(nt||(nt={}));const rt={configureSignalR:e=>{},logLevel:nt.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:30,retryIntervalMilliseconds:function(e,t){return t&&e>=t?null:e<10?0:e<20?5e3:3e4},dialogId:"components-reconnect-modal"}};(class e{static{this.instance=new e}log(e,t){}});let it=class{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${nt[e]}: ${t}`;switch(e){case nt.Critical:case nt.Error:console.error(n);break;case nt.Warning:console.warn(n);break;case nt.Information:console.info(n);break;default:console.log(n)}}}};const st=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/;function at(e){return ct(e,st)}function ct(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",r=t.exec(o),i=r&&r.groups&&r.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function dt(e,t){const n=e.currentElement;var o,r,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=ht.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:o}=e;if(o){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=ht.exec(e.textContent),r=t&&t[1];if(r)return gt(r,o),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return r=n,i=c,ft(o=s),{...o,uniqueId:ut++,start:r,end:i};case"server":return function(e,t,n){return pt(e),{...e,uniqueId:ut++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return pt(e),ft(e),{...e,uniqueId:ut++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let ut=0;function pt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function ft(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function gt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const o=n.prerenderId;if(!o)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(o!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${o}'`)}class mt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Nt(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function Mt(e,t,n,o,r,i){const s={},[a,c]=Lt();s[a]=c,e.log(Tt.Trace,`(${t} transport) sending data. ${Pt(r,i.logMessageContent)}.`);const l=Nt(r)?"arraybuffer":"text",h=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:l,timeout:i.timeout,withCredentials:i.withCredentials});e.log(Tt.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class Ut{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class Bt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${Tt[e]}: ${t}`;switch(e){case Tt.Critical:case Tt.Error:this.out.error(n);break;case Tt.Warning:this.out.warn(n);break;case Tt.Information:this.out.info(n);break;default:this.out.log(n)}}}}function Lt(){return["X-SignalR-User-Agent",$t(Rt,"","Browser",void 0)]}function $t(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&""!==t?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function Ot(e){return e.stack?e.stack:e.message?e.message:`${e}`}class Ft extends kt{constructor(e){if(super(),this._logger=e,"undefined"==typeof fetch){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._jar=new(e("tough-cookie").CookieJar),"undefined"==typeof fetch?this._fetchType=e("node-fetch"):this._fetchType=fetch,this._fetchType=e("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("could not find global")}());if("undefined"==typeof AbortController){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._abortControllerType=e("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new wt;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new wt});let o,r=null;if(e.timeout){const o=e.timeout;r=setTimeout((()=>{t.abort(),this._logger.log(Tt.Warning,"Timeout from HTTP request."),n=new vt}),o)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Nt(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(Tt.Warning,`Error from HTTP request. ${e}.`),e}finally{r&&clearTimeout(r),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const e=await Ht(o,"text");throw new yt(e||o.statusText,o.status)}const i=Ht(o,e.responseType),s=await i;return new It(o.status,o.statusText,s)}getCookieString(e){return""}}function Ht(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class jt extends kt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new wt):e.method?e.url?new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=void 0===e.withCredentials||e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(Nt(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const r=e.headers;r&&Object.keys(r).forEach((e=>{o.setRequestHeader(e,r[e])})),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new wt)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new It(o.status,o.statusText,o.response||o.responseText)):n(new yt(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(Tt.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new yt(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(Tt.Warning,"Timeout from HTTP request."),n(new vt)},o.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Wt extends kt{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new Ft(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new jt(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new wt):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class zt{static write(e){return`${e}${zt.RecordSeparator}`}static parse(e){if(e[e.length-1]!==zt.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(zt.RecordSeparator);return t.pop(),t}}zt.RecordSeparatorCode=30,zt.RecordSeparator=String.fromCharCode(zt.RecordSeparatorCode);class qt{writeHandshakeRequest(e){return zt.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(Nt(e)){const o=new Uint8Array(e),r=o.indexOf(zt.RecordSeparatorCode);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(o.slice(0,i))),n=o.byteLength>i?o.slice(i).buffer:null}else{const o=e,r=o.indexOf(zt.RecordSeparator);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=o.substring(0,i),n=o.length>i?o.substring(i):null}const o=zt.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}}var Jt,Vt;!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(Jt||(Jt={}));class Kt{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Ut(this,e)}}class Xt{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},o=()=>{};Nt(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,o=n}))),this._messages.push(new Yt(t,this._totalMessageCount,e,o))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Jt.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case Jt.Invocation:case Jt.StreamItem:case Jt.Completion:case Jt.StreamInvocation:case Jt.CancelInvocation:return!0;case Jt.Close:case Jt.Sequence:case Jt.Ping:case Jt.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Jt.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class Yt{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(Vt||(Vt={}));class Gt{static create(e,t,n,o,r,i,s){return new Gt(e,t,n,o,r,i,s)}constructor(e,t,n,o,r,i,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(Tt.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},xt.isRequired(e,"connection"),xt.isRequired(t,"logger"),xt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=r?r:3e4,this.keepAliveIntervalInMilliseconds=null!=i?i:15e3,this._statefulReconnectBufferSize=null!=s?s:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new qt,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Vt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Jt.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Vt.Disconnected&&this._connectionState!==Vt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Vt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Vt.Connecting,this._logger.log(Tt.Debug,"Starting HubConnection.");try{await this._startInternal(),At.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Vt.Connected,this._connectionStarted=!0,this._logger.log(Tt.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Vt.Disconnected,this._logger.log(Tt.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(Tt.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(Tt.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new Xt(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(Tt.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===Vt.Disconnected)return this._logger.log(Tt.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Vt.Disconnecting)return this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=Vt.Disconnecting,this._logger.log(Tt.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(Tt.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===Vt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new wt("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o);let i;const s=new Kt;return s.cancelCallback=()=>{const e=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],i.then((()=>this._sendWithProtocol(e)))},this._callbacks[r.invocationId]=(e,t)=>{t?s.error(t):e&&(e.type===Jt.Completion?e.error?s.error(new Error(e.error)):s.complete():s.next(e.item))},i=this._sendWithProtocol(r).catch((e=>{s.error(e),delete this._callbacks[r.invocationId]})),this._launchStreams(n,i),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise(((e,t)=>{this._callbacks[r.invocationId]=(n,o)=>{o?t(o):n&&(n.type===Jt.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const o=this._sendWithProtocol(r).catch((e=>{t(e),delete this._callbacks[r.invocationId]}));this._launchStreams(n,o)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const o=n.indexOf(t);-1!==o&&(n.splice(o,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case Jt.Invocation:this._invokeClientMethod(e).catch((e=>{this._logger.log(Tt.Error,`Invoke client method threw error: ${Ot(e)}`)}));break;case Jt.StreamItem:case Jt.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===Jt.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(Tt.Error,`Stream callback threw error: ${Ot(e)}`)}}break}case Jt.Ping:break;case Jt.Close:{this._logger.log(Tt.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case Jt.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case Jt.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(Tt.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(Tt.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(Tt.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(Tt.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===Vt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(Tt.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(Tt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const o=n.slice(),r=!!e.invocationId;let i,s,a;for(const n of o)try{const o=i;i=await n.apply(this,e.arguments),r&&i&&o&&(this._logger.log(Tt.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),s=void 0}catch(e){s=e,this._logger.log(Tt.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):r?(s?a=this._createCompletionMessage(e.invocationId,`${s}`,null):void 0!==i?a=this._createCompletionMessage(e.invocationId,null,i):(this._logger.log(Tt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):i&&this._logger.log(Tt.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(Tt.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new wt("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Vt.Disconnecting?this._completeClose(e):this._connectionState===Vt.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Vt.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Vt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),At.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Tt.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,o=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(null===r)return this._logger.log(Tt.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=Vt.Reconnecting,e?this._logger.log(Tt.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(Tt.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Tt.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==Vt.Reconnecting)return void this._logger.log(Tt.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==r;){if(this._logger.log(Tt.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,r)})),this._reconnectDelayHandle=void 0,this._connectionState!==Vt.Reconnecting)return void this._logger.log(Tt.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=Vt.Connected,this._logger.log(Tt.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(Tt.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(Tt.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==Vt.Reconnecting)return this._logger.log(Tt.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===Vt.Disconnecting&&this._completeClose());o=e instanceof Error?e:new Error(e.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(Tt.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(Tt.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const o=t[n];try{o(null,e)}catch(t){this._logger.log(Tt.Error,`Stream 'error' callback called with '${e}' threw error: ${Ot(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return 0!==o.length?{target:e,arguments:t,streamIds:o,type:Jt.Invocation}:{target:e,arguments:t,type:Jt.Invocation};{const n=this._invocationId;return this._invocationId++,0!==o.length?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:Jt.Invocation}:{target:e,arguments:t,invocationId:n.toString(),type:Jt.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,o))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let o=0;o0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[en.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[en.Authorization]&&delete e.headers[en.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var nn,on;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(nn||(nn={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(on||(on={}));let rn=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class sn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new rn,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._url=e,this._logger.log(Tt.Trace,"(LongPolling transport) Connecting."),t===on.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Lt(),r={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===on.Binary&&(i.responseType="arraybuffer");const s=`${e}&_=${Date.now()}`;this._logger.log(Tt.Trace,`(LongPolling transport) polling: ${s}.`);const a=await this._httpClient.get(s,i);200!==a.statusCode?(this._logger.log(Tt.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new yt(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(Tt.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,t);204===o.statusCode?(this._logger.log(Tt.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==o.statusCode?(this._logger.log(Tt.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new yt(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(Tt.Trace,`(LongPolling transport) data received. ${Pt(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(Tt.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof vt?this._logger.log(Tt.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(Tt.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(Tt.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Mt(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(Tt.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(Tt.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=Lt();e[t]=n;const o={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let r;try{await this._httpClient.delete(this._url,o)}catch(e){r=e}r?r instanceof yt&&(404===r.statusCode?this._logger.log(Tt.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(Tt.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(Tt.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(Tt.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(Tt.Trace,e),this.onclose(this._closeError)}}}class an{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(e,t){return xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._logger.log(Tt.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,o)=>{let r,i=!1;if(t===on.Text){if(At.isBrowser||At.isWebWorker)r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[o,i]=Lt();n[o]=i,r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{r.onmessage=e=>{if(this.onreceive)try{this._logger.log(Tt.Trace,`(SSE transport) data received. ${Pt(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},r.onerror=e=>{i?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},r.onopen=()=>{this._logger.log(Tt.Information,`SSE connected to ${this._url}`),this._eventSource=r,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?Mt(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class cn{constructor(e,t,n,o,r,i){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){let n;return xt.isRequired(e,"url"),xt.isRequired(t,"transferFormat"),xt.isIn(t,on,"transferFormat"),this._logger.log(Tt.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((o,r)=>{let i;e=e.replace(/^http/,"ws");const s=this._httpClient.getCookieString(e);let a=!1;if(At.isReactNative){const t={},[o,r]=Lt();t[o]=r,n&&(t[en.Authorization]=`Bearer ${n}`),s&&(t[en.Cookie]=s),i=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(e)),t===on.Binary&&(i.binaryType="arraybuffer"),i.onopen=t=>{this._logger.log(Tt.Information,`WebSocket connected to ${e}.`),this._webSocket=i,a=!0,o()},i.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(Tt.Information,`(WebSockets transport) ${t}.`)},i.onmessage=e=>{if(this._logger.log(Tt.Trace,`(WebSockets transport) data received. ${Pt(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},i.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(Tt.Trace,`(WebSockets transport) sending data. ${Pt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(Tt.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class ln{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,xt.isRequired(e,"url"),this._logger=function(e){return void 0===e?new Bt(Tt.Information):null===e?Dt.instance:void 0!==e.log?e:new Bt(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new tn(t.httpClient||new Wt(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||on.Binary,xt.isIn(e,on,"transferFormat"),this._logger.log(Tt.Debug,`Starting connection with transfer format '${on[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(Tt.Error,e),await this._stopPromise,Promise.reject(new wt(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(Tt.Error,e),Promise.reject(new wt(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new hn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(Tt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(Tt.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(Tt.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==nn.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(nn.WebSockets),await this._startTransport(t,e)}else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new wt("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<100);if(100===o&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof sn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(Tt.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(Tt.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,o]=Lt();t[n]=o;const r=this._resolveNegotiateUrl(e);this._logger.log(Tt.Debug,`Sending negotiation request: ${r}.`);try{const e=await this._httpClient.post(r,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new Et("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof yt&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(Tt.Error,t),Promise.reject(new Et(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,o){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(Tt.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(r,o),void(this.connectionId=n.connectionId);const i=[],s=n.availableTransports||[];let a=n;for(const n of s){const s=this._resolveTransportOrError(n,t,o,!0===(null==a?void 0:a.useStatefulReconnect));if(s instanceof Error)i.push(`${n.transport} failed:`),i.push(s);else if(this._isITransport(s)){if(this.transport=s,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}r=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(r,o),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(Tt.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,i.push(new St(`${n.transport} failed: ${e}`,nn[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(Tt.Debug,e),Promise.reject(new wt(e))}}}}return i.length>0?Promise.reject(new Ct(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case nn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new cn(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case nn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new an(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case nn.LongPolling:return new sn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{o=!0}o&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){const r=nn[e.transport];if(null==r)return this._logger.log(Tt.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function(e,t){return!e||!!(t&e)}(t,r))return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it was disabled by the client.`),new bt(`'${nn[r]}' is disabled by the client.`,r);if(!(e.transferFormats.map((e=>on[e])).indexOf(n)>=0))return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it does not support the requested transfer format '${on[n]}'.`),new Error(`'${nn[r]}' does not support ${on[n]}.`);if(r===nn.WebSockets&&!this._options.WebSocket||r===nn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(Tt.Debug,`Skipping transport '${nn[r]}' because it is not supported in your environment.'`),new _t(`'${nn[r]}' is not supported in your environment.`,r);this._logger.log(Tt.Debug,`Selecting transport '${nn[r]}'.`);try{return this.features.reconnect=r===nn.WebSockets?o:void 0,this._constructTransport(r)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(Tt.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(Tt.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(Tt.Error,`Connection disconnected with error '${e}'.`):this._logger.log(Tt.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(Tt.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(Tt.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(Tt.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!At.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(Tt.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class hn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new dn,this._transportResult=new dn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new dn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new dn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):hn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let o=0;for(const t of e)n.set(new Uint8Array(t),o),o+=t.byteLength;return n.buffer}}class dn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class un{constructor(){this.name="json",this.version=2,this.transferFormat=on.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=Dt.instance);const n=zt.parse(e),o=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case Jt.Invocation:this._isInvocationMessage(n);break;case Jt.StreamItem:this._isStreamItemMessage(n);break;case Jt.Completion:this._isCompletionMessage(n);break;case Jt.Ping:case Jt.Close:break;case Jt.Ack:this._isAckMessage(n);break;case Jt.Sequence:this._isSequenceMessage(n);break;default:t.log(Tt.Information,"Unknown message type '"+n.type+"' ignored.");continue}o.push(n)}return o}writeMessage(e){return zt.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const pn={trace:Tt.Trace,debug:Tt.Debug,info:Tt.Information,information:Tt.Information,warn:Tt.Warning,warning:Tt.Warning,error:Tt.Error,critical:Tt.Critical,none:Tt.None};class fn{configureLogging(e){if(xt.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=pn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new Bt(t)}else this.logger=new Bt(e);return this}withUrl(e,t){return xt.isRequired(e,"url"),xt.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return xt.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Zt(e):this.reconnectPolicy=e:this.reconnectPolicy=new Zt,this}withServerTimeout(e){return xt.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return xt.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new ln(this.url,e);return Gt.create(t,this.logger||Dt.instance,this.protocol||new un,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var gn;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(gn||(gn={}));var mn,yn,vn,wn=4294967295;function _n(e,t,n){var o=Math.floor(n/4294967296),r=n;e.setUint32(t,o),e.setUint32(t+4,r)}function bn(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var Sn=("undefined"==typeof process||"never"!==(null===(mn=null===process||void 0===process?void 0:process.env)||void 0===mn?void 0:mn.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function En(e){for(var t=e.length,n=0,o=0;o=55296&&r<=56319&&o65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h)}else i.push(a);else i.push(a);i.length>=4096&&(s+=String.fromCharCode.apply(String,i),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,i)),s}var Dn,Rn=Sn?new TextDecoder:null,xn=Sn?"undefined"!=typeof process&&"force"!==(null===(vn=null===process||void 0===process?void 0:process.env)||void 0===vn?void 0:vn.TEXT_DECODER)?200:0:wn,An=function(e,t){this.type=e,this.data=t},Pn=(Dn=function(e,t){return Dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Dn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Dn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Nn=function(e){function t(n){var o=e.call(this,n)||this,r=Object.create(t.prototype);return Object.setPrototypeOf(o,r),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:t.name}),o}return Pn(t,e),t}(Error),Mn={type:-1,encode:function(e){var t,n,o,r;return e instanceof Date?function(e){var t,n=e.sec,o=e.nsec;if(n>=0&&o>=0&&n<=17179869183){if(0===o&&n<=4294967295){var r=new Uint8Array(4);return(t=new DataView(r.buffer)).setUint32(0,n),r}var i=n/4294967296,s=4294967295&n;return r=new Uint8Array(8),(t=new DataView(r.buffer)).setUint32(0,o<<2|3&i),t.setUint32(4,s),r}return r=new Uint8Array(12),(t=new DataView(r.buffer)).setUint32(0,o),_n(t,4,n),r}((o=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(r=Math.floor(o/1e9)),nsec:o-1e9*r})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:bn(t,4),nsec:t.getUint32(0)};default:throw new Nn("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},Un=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Mn)}return e.prototype.register=function(e){var t=e.type,n=e.encode,o=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=o;else{var r=1+t;this.builtInEncoders[r]=n,this.builtInDecoders[r]=o}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>In){var t=En(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),kn(e,this.bytes,this.pos),this.pos+=t}else t=En(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var o=e.length,r=n,i=0;i=55296&&s<=56319&&i>18&7|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128):(t[r++]=s>>12&15|224,t[r++]=s>>6&63|128)}else t[r++]=s>>6&31|192;t[r++]=63&s|128}else t[r++]=s}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=Bn(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var o=0,r=e;o0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var o=0,r=this.caches[n-1];o=this.maxLengthPerKey?n[Math.random()*n.length|0]=o:n.push(o)},e.prototype.decode=function(e,t,n){var o=this.find(e,t,n);if(null!=o)return this.hit++,o;this.miss++;var r=Tn(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,r),r},e}(),Fn=function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return Fn(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,o,r,i,s,a;return i=this,a=function(){var i,s,a,c,l,h,d,u;return Fn(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=Hn(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof qn))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),o={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(r=t.return)?[4,r.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(o)throw o.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat($n(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function o(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,o)}r((a=a.apply(i,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,s=function(){var n,o,r,i,s,a,c,l,h;return Fn(this,(function(d){switch(d.label){case 0:n=t,o=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),r=Hn(e),d.label=2;case 2:return[4,jn(r.next())];case 3:if((i=d.sent()).done)return[3,12];if(s=i.value,t&&0===o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(o=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,jn(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--o?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof qn))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),i&&!i.done&&(h=r.return)?[4,jn(h.call(r))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,o||[]),a=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(e){s[e]&&(i[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=s[e](t)).value instanceof jn?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(o=e-128)){this.pushMapState(o),this.complete();continue e}t={}}else if(e<160){if(0!=(o=e-144)){this.pushArrayState(o),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(o=this.readU16())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(221===e){if(0!==(o=this.readU32())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(222===e){if(0!==(o=this.readU16())){this.pushMapState(o),this.complete();continue e}t={}}else if(223===e){if(0!==(o=this.readU32())){this.pushMapState(o),this.complete();continue e}t={}}else if(196===e){var o=this.lookU8();t=this.decodeBinary(o,1)}else if(197===e)o=this.lookU16(),t=this.decodeBinary(o,2);else if(198===e)o=this.lookU32(),t=this.decodeBinary(o,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)o=this.lookU8(),t=this.decodeExtension(o,1);else if(200===e)o=this.lookU16(),t=this.decodeExtension(o,2);else{if(201!==e)throw new Nn("Unrecognized type byte: ".concat($n(e)));o=this.lookU32(),t=this.decodeExtension(o,4)}this.complete();for(var r=this.stack;r.length>0;){var i=r[r.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;r.pop(),t=i.array}else{if(1===i.type){if("string"!=(s=typeof t)&&"number"!==s)throw new Nn("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new Nn("The key __proto__ is not allowed");i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}r.pop(),t=i.map}}return t}var s},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Nn("Unrecognized array type byte: ".concat($n(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Nn("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Nn("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new Nn("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthxn?function(e,t,n){var o=e.subarray(t,t+n);return Rn.decode(o)}(this.bytes,r,e):Tn(this.bytes,r,e),this.pos+=t+e,o},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Nn("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Jn;var n=this.pos+t,o=this.bytes.subarray(n,n+e);return this.pos+=t+e,o},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Nn("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),o=this.decodeBinary(e,t+1);return this.extensionCodec.decode(o,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=bn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class Xn{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer}static parse(e){const t=[],n=new Uint8Array(e),o=[0,7,14,21,28];for(let r=0;r7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=r+s+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(r+s,r+s+a):n.subarray(r+s,r+s+a)),r=r+s+a}return t}}const Yn=new Uint8Array([145,Jt.Ping]);class Gn{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=on.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new Ln(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new Kn(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=Dt.instance);const o=Xn.parse(e),r=[];for(const e of o){const n=this._parseMessage(e,t);n&&r.push(n)}return r}writeMessage(e){switch(e.type){case Jt.Invocation:return this._writeInvocation(e);case Jt.StreamInvocation:return this._writeStreamInvocation(e);case Jt.StreamItem:return this._writeStreamItem(e);case Jt.Completion:return this._writeCompletion(e);case Jt.Ping:return Xn.write(Yn);case Jt.CancelInvocation:return this._writeCancelInvocation(e);case Jt.Close:return this._writeClose();case Jt.Ack:return this._writeAck(e);case Jt.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const o=n[0];switch(o){case Jt.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case Jt.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case Jt.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case Jt.Ping:return this._createPingMessage(n);case Jt.Close:return this._createCloseMessage(n);case Jt.Ack:return this._createAckMessage(n);case Jt.Sequence:return this._createSequenceMessage(n);default:return t.log(Tt.Information,"Unknown message type '"+o+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:Jt.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:Jt.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:Jt.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:Jt.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:Jt.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let o,r;switch(n){case this._errorResult:o=t[4];break;case this._nonVoidResult:r=t[4]}return{error:o,headers:e,invocationId:t[2],result:r,type:Jt.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:Jt.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:Jt.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([Jt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([Jt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),Xn.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([Jt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([Jt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),Xn.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([Jt.StreamItem,e.headers||{},e.invocationId,e.item]);return Xn.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([Jt.Completion,e.headers||{},e.invocationId,t,e.result])}return Xn.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([Jt.CancelInvocation,e.headers||{},e.invocationId]);return Xn.write(t.slice())}_writeClose(){const e=this._encoder.encode([Jt.Close,null]);return Xn.write(e.slice())}_writeAck(e){const t=this._encoder.encode([Jt.Ack,e.sequenceId]);return Xn.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([Jt.Sequence,e.sequenceId]);return Xn.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const Qn="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,Zn=Qn?Qn.decode.bind(Qn):function(e){let t=0;const n=e.length,o=[],r=[];for(;t65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r)}}else o.push(n);o.length>1024&&(r.push(String.fromCharCode.apply(null,o)),o.length=0)}return r.push(String.fromCharCode.apply(null,o)),r.join("")},eo=Math.pow(2,32),to=Math.pow(2,21)-1;function no(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function oo(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function ro(e,t){const n=oo(e,t+4);if(n>to)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*eo+oo(e,t)}class io{constructor(e){this.batchData=e;const t=new lo(e);this.arrayRangeReader=new ho(e),this.arrayBuilderSegmentReader=new uo(e),this.diffReader=new so(e),this.editReader=new ao(e,t),this.frameReader=new co(e,t)}updatedComponents(){return no(this.batchData,this.batchData.length-20)}referenceFrames(){return no(this.batchData,this.batchData.length-16)}disposedComponentIds(){return no(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return no(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return no(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return no(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return ro(this.batchData,n)}}class so{constructor(e){this.batchDataUint8=e}componentId(e){return no(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class ao{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return no(this.batchDataUint8,e)}siblingIndex(e){return no(this.batchDataUint8,e+4)}newTreeIndex(e){return no(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return no(this.batchDataUint8,e+8)}removedAttributeName(e){const t=no(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class co{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return no(this.batchDataUint8,e)}subtreeLength(e){return no(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return no(this.batchDataUint8,e+8)}elementName(e){const t=no(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=no(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=no(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return ro(this.batchDataUint8,e+12)}}class lo{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=no(e,e.length-4)}readString(e){if(-1===e)return null;{const n=no(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){let n=0,o=0;for(let r=0;r<4;r++){const i=e[t+r];if(n|=(127&i)<this.nextBatchId)return this.fatalError?(this.logger.log(nt.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(nt.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(nt.Debug,`Applying batch ${e}.`),function(e,t){const n=fe[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const o=t.arrayRangeReader,r=t.updatedComponents(),i=o.values(r),s=o.count(r),a=t.referenceFrames(),c=o.values(a),l=t.diffReader;for(let e=0;e{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class So{constructor(t,n,o,r){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=o,this._logger=r,this._renderQueue=new po(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){return this._firstUpdate?(this._firstUpdate=!1,this._connection?.send("UpdateRootComponents",e,this._applicationState)):this._connection?.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==Vt.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>{return t=e,{...t,start:void 0,end:void 0};var t})));if(this._circuitId=await this._connection.invoke("StartCircuit",Ne.getBaseURI(),Ne.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){const e=new Gn;e.name="blazorpack";const t=(new fn).withUrl("_blazor").withHubProtocol(e);this._options.configureSignalR(t);const n=t.build();n.on("JS.AttachComponent",((e,t)=>function(e,t,n,o){let r=fe[e];r||(r=new he(e),fe[e]=r),r.attachRootComponentToLogicalElement(n,t,!1)}(gn.Server,this.resolveElement(t),e))),n.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),n.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),n.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),n.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{n.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),n.on("JS.RenderBatch",(async(e,t)=>{this._logger.log(Tt.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),this._componentManager.onAfterRenderBatch?.(gn.Server)})),n.on("JS.EndUpdateRootComponents",(e=>{this._componentManager.onAfterUpdateRootComponents?.(e)})),n.on("JS.EndLocationChanging",tt._internal.navigationManager.endLocationChanging),n.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=b.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return b.delete(e),t}(gn.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),n.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),bo()}));try{await n.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;bo(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===nn.WebSockets))?this._logger.log(Tt.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===nn.WebSockets))?this._logger.log(Tt.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===nn.LongPolling))&&this._logger.log(Tt.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return n.connection?.features?.inherentKeepAlive&&this._logger.log(Tt.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),n}async disconnect(){await(this._connection?.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===Vt.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(C(gn.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,o,r){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,o||0,r)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,o){return this._connection.send("OnLocationChanging",e,t,n,o)}sendJsDataStream(e,t,n){return function(e,t,n,o){setTimeout((async()=>{let r=5,i=(new Date).valueOf();try{const s=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),o=t-i;i=t,r=Math.max(1,Math.round(500/Math.max(1,o)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=function(e){const t=p.get(e);if(t)return p.delete(e),t}(e);if(t)return $(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return function(e){const{start:t,end:n}=e,o=t[L];if(o){if(o!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const r=t.parentNode;if(!r)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const i=$(r,!0),s=J(i);t[B]=i,t[L]=e;const a=$(t);if(n){const e=J(a),o=Array.prototype.indexOf.call(s,a)+1;let r=null;for(;r!==n;){const n=s.splice(o,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[B]=t,e.push(n),r=n}}return a}(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(Tt.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,this._connection?.stop();const e=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:e});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}class Eo{static{this.ReconnectOverlayClassName="components-reconnect-overlay"}static{this.ReconnectDialogClassName="components-reconnect-dialog"}static{this.ReconnectVisibleClassName="components-reconnect-visible"}static{this.RejoiningAnimationClassName="components-rejoining-animation"}static{this.AnimationRippleCount=2}constructor(e,t,n){this.document=t,this.logger=n,this.style=this.document.createElement("style"),this.style.innerHTML=Eo.Css,this.overlay=this.document.createElement("div"),this.overlay.className=Eo.ReconnectOverlayClassName,this.host=this.document.createElement("div"),this.host.id=e;const o=this.host.attachShadow({mode:"open"});this.dialog=t.createElement("div"),this.dialog.className=Eo.ReconnectDialogClassName,o.appendChild(this.style),o.appendChild(this.overlay),this.rejoiningAnimation=t.createElement("div"),this.rejoiningAnimation.className=Eo.RejoiningAnimationClassName;for(let e=0;e{"visible"===this.document.visibilityState&&this.retry()}}show(){this.document.contains(this.host)||this.document.body.appendChild(this.host),this.reloadButton.style.display="none",this.rejoiningAnimation.style.display="block",this.status.innerHTML="Rejoining the server...",this.host.style.display="block",this.overlay.classList.add(Eo.ReconnectVisibleClassName)}update(e,t){if(1===e||0===t)this.status.innerHTML="Rejoining the server...";else{const e=1===t?"second":"seconds";this.status.innerHTML=`Rejoin failed... trying again in ${t} ${e}`}}hide(){this.host.style.display="none",this.overlay.classList.remove(Eo.ReconnectVisibleClassName)}failed(){this.reloadButton.style.display="block",this.rejoiningAnimation.style.display="none",this.status.innerHTML="Failed to rejoin.
Please retry or reload the page.",this.document.addEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible)}rejected(){location.reload()}async retry(){this.document.removeEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible),this.show();try{await tt.reconnect()||this.rejected()}catch(e){this.logger.log(nt.Error,e),this.failed()}}static{this.Css=`\n .${this.ReconnectOverlayClassName} {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n display: none;\n overflow: hidden;\n animation: components-reconnect-fade-in;\n }\n\n .${this.ReconnectOverlayClassName}.${this.ReconnectVisibleClassName} {\n display: block;\n }\n\n .${this.ReconnectOverlayClassName}::before {\n content: '';\n background-color: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: components-reconnect-fadeInOpacity 0.5s ease-in-out;\n opacity: 1;\n }\n\n .${this.ReconnectOverlayClassName} p {\n margin: 0;\n text-align: center;\n }\n\n .${this.ReconnectOverlayClassName} button {\n border: 0;\n background-color: #6b9ed2;\n color: white;\n padding: 4px 24px;\n border-radius: 4px;\n }\n\n .${this.ReconnectOverlayClassName} button:hover {\n background-color: #3b6ea2;\n }\n\n .${this.ReconnectOverlayClassName} button:active {\n background-color: #6b9ed2;\n }\n\n .${this.ReconnectDialogClassName} {\n position: relative;\n background-color: white;\n width: 20rem;\n margin: 20vh auto;\n padding: 2rem;\n border-radius: 0.5rem;\n box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n opacity: 0;\n animation: components-reconnect-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-fadeInOpacity 0.5s ease-out 0.3s;\n animation-fill-mode: forwards;\n z-index: 10001;\n }\n\n .${this.RejoiningAnimationClassName} {\n display: block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n\n .${this.RejoiningAnimationClassName} div {\n position: absolute;\n border: 3px solid #0087ff;\n opacity: 1;\n border-radius: 50%;\n animation: ${this.RejoiningAnimationClassName} 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n }\n\n .${this.RejoiningAnimationClassName} div:nth-child(2) {\n animation-delay: -0.5s;\n }\n\n @keyframes ${this.RejoiningAnimationClassName} {\n 0% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 4.9% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 5% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 1;\n }\n\n 100% {\n top: 0px;\n left: 0px;\n width: 80px;\n height: 80px;\n opacity: 0;\n }\n }\n\n @keyframes components-reconnect-fadeInOpacity {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes components-reconnect-slideUp {\n 0% {\n transform: translateY(30px) scale(0.95);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n `}}class Co{static{this.ShowClassName="components-reconnect-show"}static{this.HideClassName="components-reconnect-hide"}static{this.FailedClassName="components-reconnect-failed"}static{this.RejectedClassName="components-reconnect-rejected"}static{this.MaxRetriesId="components-reconnect-max-retries"}static{this.CurrentAttemptId="components-reconnect-current-attempt"}static{this.SecondsToNextAttemptId="components-seconds-to-next-attempt"}constructor(e,t,n){if(this.dialog=e,this.document=t,this.document=t,void 0!==n){const e=this.document.getElementById(Co.MaxRetriesId);e&&(e.innerText=n.toString())}}show(){this.removeClasses(),this.dialog.classList.add(Co.ShowClassName)}update(e,t){const n=this.document.getElementById(Co.CurrentAttemptId);n&&(n.innerText=e.toString());const o=this.document.getElementById(Co.SecondsToNextAttemptId);o&&(o.innerText=t.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Co.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Co.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Co.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Co.ShowClassName,Co.HideClassName,Co.FailedClassName,Co.RejectedClassName)}}class Io{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||tt.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Co(t,document,e.maxRetries):new Eo(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new ko(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class ko{static{this.MaximumFirstRetryInterval=3e3}constructor(e,t,n,o){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=o,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;void 0===e.maxRetries||tko.MaximumFirstRetryInterval?ko.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.runTimer(n,1e3,(e=>{this.reconnectDisplay.update(t+1,Math.round(e/1e3))})),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(nt.Error,e)}}this.reconnectDisplay.failed()}async runTimer(e,t,n){if(e<=0)return void n(0);let o,r,i=Date.now();n(e);const s=()=>{if(this.isDisposed)return void r();const a=Date.now(),c=a-i;i=a;const l=Math.max(1,Math.floor(c/t)),h=t*l;if((e-=h){"visible"===document.visibilityState&&(clearTimeout(o),n(0),r())};o=setTimeout(s,t),document.addEventListener("visibilitychange",a),await new Promise((e=>r=e)),document.removeEventListener("visibilitychange",a)}}class To{constructor(e=!0,t,n,o=0){this.singleRuntime=e,this.logger=t,this.webRendererId=o,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const o=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),r=await import(o);if(void 0!==r){if(e.singleRuntime){const{beforeStart:n,afterStarted:o,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=r;let h=n;e.webRendererId===gn.Server&&c&&(h=c),e.webRendererId===gn.WebAssembly&&s&&(h=s);let d=o;return e.webRendererId===gn.Server&&l&&(d=l),e.webRendererId===gn.WebAssembly&&a&&(d=a),i(e,h,d,t)}return function(e,t,n){const r=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:h,afterWebAssemblyStarted:d,beforeServerStart:u,afterServerStarted:p}=t,f=!(c||l||h||d||u||p||!s&&!a),g=f&&r.enableClassicInitializers;if(f&&!r.enableClassicInitializers)e.logger?.log(nt.Warning,`Initializer '${o}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(g)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(r),h&&r.webAssembly.initializers.beforeStart.push(h),d&&r.webAssembly.initializers.afterStarted.push(d),u&&r.circuit.initializers.beforeStart.push(u),p&&r.circuit.initializers.afterStarted.push(p),l&&e.afterStartedCallbacks.push(l),c)return c(r)}(e,r,t)}function i(e,t,n,o){if(n&&e.afterStartedCallbacks.push(n),t)return t(...o)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,E.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}function Do(e){if(void 0!==wo)throw new Error("Blazor Server has already started.");return wo=new Promise(Ro.bind(null,e)),wo}async function Ro(e,t,n){await fo;const o=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new To(!1,void 0,e.initializers.afterStarted,gn.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),o=new To(!0,void 0,void 0,gn.Server);return await o.importInitializersAsync(n,[e]),o}(yo);if(go=at(document)||"",vo=new it(yo.logLevel),mo=new So(e,go,yo,vo),vo.log(nt.Information,"Starting up Blazor server-side application."),tt.reconnect=async()=>!(mo.didRenderingFail()||!await mo.reconnect()&&(vo.log(nt.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),tt.defaultReconnectionHandler=new Io(vo),yo.reconnectionHandler=yo.reconnectionHandler||tt.defaultReconnectionHandler,tt._internal.navigationManager.listenForNavigationEvents(gn.Server,((e,t,n)=>mo.sendLocationChanged(e,t,n)),((e,t,n,o)=>mo.sendLocationChanging(e,t,n,o))),tt._internal.forceCloseConnection=()=>mo.disconnect(),tt._internal.sendJSDataStream=(e,t,n)=>mo.sendJsDataStream(e,t,n),!await mo.start())return vo.log(nt.Error,"Failed to start the circuit."),void t();const r=()=>{mo.sendDisconnectBeacon()};tt.disconnect=r,window.addEventListener("unload",r,{capture:!1,once:!0}),vo.log(nt.Information,"Blazor server-side application started."),o.invokeAfterStartedCallbacks(tt),t()}class xo{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class Ao{constructor(){this._eventListeners=new Map}static create(e){const t=new Ao;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const o={...t,type:e};for(const e of n)e(o)}}let Po=!1;function No(e){if(Po)throw new Error("Blazor has already started.");Po=!0;const t=ot(e);!function(e){if(yo)throw new Error("Circuit options have already been configured.");fo=async function(e){const t=await e;yo=ot(t)}(e)}(Promise.resolve(t||{})),Ao.create(tt);const n=function(e){return lt(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(document);return Do(new xo(n))}tt.start=No,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&No()}(); diff --git a/src/Components/Web.JS/dist/Release/blazor.web.js b/src/Components/Web.JS/dist/Release/blazor.web.js index 472cff74a6a5..d2bd92f15c06 100644 --- a/src/Components/Web.JS/dist/Release/blazor.web.js +++ b/src/Components/Web.JS/dist/Release/blazor.web.js @@ -1 +1 @@ -!function(){"use strict";var e;let t;var n,o;!function(e){const t=[],n="__jsObjectId",o="__dotNetObject",r="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,o=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in o))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=o,o=o[t]})),o instanceof Function)return o=o.bind(n),this._cachedFunctions.set(e,o),o;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h=0,d={[h]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let u,p=1;function f(e){t.push(e)}function g(e){if(e&&"object"==typeof e){d[p]=new l(e);const t={[n]:p};return p++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function m(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const o={[s]:t};try{const t=g(e);o[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return o}function y(e,n){c=e;const o=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,o}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new w(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=g,e.createJSStreamReference=m,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(u=e.JSCallResultType||(e.JSCallResultType={}));class w{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,o){const r=y(this,t),i=k(_(e,o)(...r||[]),n);return null==i?null:R(this,i)}beginInvokeJSFromDotNet(e,t,n,o,r){const i=new Promise((e=>{const o=y(this,n);e(_(t,r)(...o||[]))}));e&&i.then((t=>R(this,[e,!0,k(t,o)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,b(t)]))))}endInvokeDotNetFromJS(e,t,n){const o=t?y(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,o)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,o){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const r=R(this,o),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,r);return i?y(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,o){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const r=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[r]={resolve:e,reject:t}}));try{const i=R(this,o);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(r,e,t,n,i)}catch(e){this.completePendingCall(r,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const o=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?o.resolve(n):o.reject(n)}}function b(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function _(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=_,e.disposeJSObjectReferenceById=S;class C{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[o]:this._id}}}e.DotNetObject=C,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(o))return new C(t[o],c);if(t.hasOwnProperty(n)){const e=t[n],o=d[e];if(o)return o.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(r)){const e=t[r],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new E(n)}}return t}));class E{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function k(e,t){switch(t){case u.Default:return e;case u.JSObjectReference:return g(e);case u.JSStreamReference:return m(e);case u.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let T=0;function R(e,t){T=0,c=e;const n=JSON.stringify(t,A);return c=void 0,n}function A(e,t){if(t instanceof C)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(T,t);const e={[r]:T};return T++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(n||(n={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(o||(o={}));class r{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new r(e,t.value)}return null}}const i=new Map,s=new Map,a=[];function c(e){return i.get(e)}function l(e){const t=i.get(e);return t?.browserEventName||e}function h(e,t){e.forEach((e=>i.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),h(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),h(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...u(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),h(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),h(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),h(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>u(e)}),h(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),h(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),h(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...u(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),h(["wheel","mousewheel"],{createEventArgs:e=>{return{...u(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),h(["cancel","close","toggle"],{createEventArgs:()=>({})});const p=["date","datetime-local","month","time","week"],f=new Map;let g,m,y=0;const v={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const o="__bl-dynamic-root:"+(++y).toString();f.set(o,e);const r=await S().invokeMethodAsync("AddRootComponent",t,o),i=new _(r,m[t]);return await i.setParameters(n),i}};function w(e){const t=f.get(e);if(t)return f.delete(e),t}class b{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class _{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new b)}setParameters(e){const t={},n=Object.entries(e||{}),o=n.length;for(const[e,o]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&o?(n.setCallback(o),t[e]=n.getJSObjectReference()):t[e]=o}return S().invokeMethodAsync("SetRootComponentParameters",this._componentId,o,t)}async dispose(){if(null!==this._componentId){await S().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function S(){if(!g)throw new Error("Dynamic root components have not been enabled in this application.");return g}const C=new Map,E=[],I=new Map;function k(t,n,o,r){if(C.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);C.set(t,n),o&&r&&Object.keys(o).length>0&&function(t,n,o){if(g)throw new Error("Dynamic root components have already been enabled.");g=t,m=n;for(const[t,r]of Object.entries(o)){const o=e.findJSFunction(t,0);for(const e of r)o(e,n[e])}}(A(t),o,r),I.get(t)?.[0]?.(),function(e){for(const t of E)t(e)}(t)}function T(e){return C.has(e)}function R(e,t,n){return D(e,t.eventHandlerId,(()=>A(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function A(e){const t=C.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let D=(e,t,n)=>n();const x=B(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),N={submit:!0},M=B(["click","dblclick","mousedown","mousemove","mouseup"]);class P{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++P.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new L(this.onGlobalEvent.bind(this))}setListener(e,t,n,o){const r=this.getEventHandlerInfosForElement(e,!0),i=r.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:o};this.eventInfoStore.add(i),r.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,s.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let o=n.shift(),i=null,s=!1;const a=Object.prototype.hasOwnProperty.call(x,e);let l=!1;for(;o;){const u=o,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(M,d)&&h.disabled))){if(!s){const n=c(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(N,t.type)&&t.preventDefault(),R(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:r.fromEvent(n.renderingComponentId,t)},i)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}o=a||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new U:null}}class L{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(x,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class U{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function B(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const O=Symbol(),$=Symbol(),F=Symbol();function H(e){const{start:t,end:n}=e,o=t[F];if(o){if(o!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const r=t.parentNode;if(!r)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const i=W(r,!0),s=Y(i);t[$]=i,t[F]=e;const a=W(t);if(n){const e=Y(a),o=Array.prototype.indexOf.call(s,a)+1;let r=null;for(;r!==n;){const n=s.splice(o,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[$]=t,e.push(n),r=n}}return a}function W(e,t){if(O in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const o=W(t,!0);o[$]=e,n.push(o)}))}return e[O]=n,e}function j(e){const t=Y(e);for(;t.length;)J(e,0)}function z(e,t){const n=document.createComment("!");return q(n,e,t),n}function q(e,t,n){const o=e;let r=e;if(e instanceof Comment){const t=Y(o);if(t?.length>0){const t=oe(o),n=new Range;n.setStartBefore(e),n.setEndAfter(t),r=n.extractContents()}}const i=V(o);if(i){const e=Y(i),t=Array.prototype.indexOf.call(e,o);e.splice(t,1),delete o[$]}const s=Y(t);if(n0;)J(n,0)}const o=n;o.parentNode.removeChild(o)}function V(e){return e[$]||null}function K(e,t){return Y(e)[t]}function X(e){return e[F]||null}function G(e){const t=te(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function Y(e){return e[O]}function Q(e){const t=Y(V(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function Z(e){return O in e}function ee(e,t){const n=Y(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=oe(e.moveRangeStart)})),t.forEach((t=>{const o=document.createComment("marker");t.moveToBeforeMarker=o;const r=n[t.toSiblingIndex+1];r?r.parentNode.insertBefore(o,r):ne(o,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,o=e.moveRangeStart,r=e.moveRangeEnd;let i=o;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===r)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function te(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function ne(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=Q(t);n?n.parentNode.insertBefore(e,n):ne(e,V(t))}}}function oe(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=Q(e);if(t)return t.previousSibling;{const t=V(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:oe(t)}}function re(e){return`_bl_${e}`}const ie="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,ie)&&"string"==typeof t[ie]?function(e){const t=`[${re(e)}]`;return document.querySelector(t)}(t[ie]):t));const se="_blazorDeferredValue";function ae(e){e instanceof HTMLOptionElement?de(e):se in e&&he(e,e[se])}function ce(e){return"select-multiple"===e.type}function le(e,t){e.value=t||""}function he(e,t){e instanceof HTMLSelectElement?ce(e)?function(e,t){t||=[];for(let n=0;n{He()&&Ne(e,(e=>{Ye(e,!0,!1)}))}))}getRootComponentCount(){return this.rootComponentIds.size}attachRootComponentToLogicalElement(e,t,n){if(we(t))throw new Error(`Root component '${e}' could not be attached because its target element is already associated with a root component`);n&&(t=z(t,Y(t).length)),ve(t,!0),this.attachComponentToElement(e,t),this.rootComponentIds.add(e),fe.add(t)}updateComponent(e,t,n,o){const r=this.childComponentLocations[t];if(!r)throw new Error(`No element is currently associated with component ${t}`);fe.delete(r)&&(j(r),r instanceof Comment&&(r.textContent="!"));const i=te(r)?.getRootNode(),s=i&&i.activeElement;this.applyEdits(e,t,r,0,n,o),s instanceof HTMLElement&&i&&i.activeElement!==s&&s.focus()}disposeComponent(e){if(this.rootComponentIds.delete(e)){const t=this.childComponentLocations[e];ve(t,!1),!0===t[me]?fe.add(t):j(t)}delete this.childComponentLocations[e]}disposeEventHandler(e){this.eventDelegator.removeListener(e)}attachComponentToElement(e,t){this.childComponentLocations[e]=t}applyEdits(e,t,o,r,i,s){let a,c=0,l=r;const h=e.arrayBuilderSegmentReader,d=e.editReader,u=e.frameReader,p=h.values(i),f=h.offset(i),g=f+h.count(i);for(let i=f;i{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ue.content));var s;let a=0;for(;i.firstChild;)q(i.firstChild,r,a++)}applyAttribute(e,t,n,o){const r=e.frameReader,i=r.attributeName(o),s=r.attributeEventHandlerId(o);if(s){const e=Se(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=r.attributeValue(o);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,o,r,i,s){const a=o;for(let a=i;a{nt(t,e)})},enableNavigationInterception:function(e){if(void 0!==Ee&&Ee!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");Ee=e},setHasLocationChangingListeners:function(e,t){const n=Je.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Ke&&e===qe&&(Ke(t),Ke=null)},navigateTo:function(e,t){Ge(e,t,!0)},refresh:function(e){!e&&Oe()?$e(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Be};function Ge(e,t,n=!1){const o=Fe(e);!t.forceLoad&&Me(o)?it()?Ye(o,!1,t.replaceHistoryEntry,t.historyEntryState,n):$e(o,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function Ye(e,t,n,o=void 0,r=!1){if(et(),Pe(e))return Qe(e,n,o),void Ue(e);const i=rt();(r||!i?.hasLocationChangingEventListeners||await tt(e,o,t,i))&&(Re=!0,Qe(e,n,o),await nt(t))}function Qe(e,t,n=void 0){t?history.replaceState({userState:n,_index:ze},"",e):(ze++,history.pushState({userState:n,_index:ze},"",e))}function Ze(e){return new Promise((t=>{const n=Ve;Ve=()=>{Ve=n,t()},history.go(e)}))}function et(){Ke&&(Ke(!1),Ke=null)}function tt(e,t,n,o){return new Promise((r=>{et(),qe++,Ke=r,o.locationChanging(qe,e,t,n)}))}async function nt(e,t){const n=t??location.href;await Promise.all(Array.from(Je,(async([t,o])=>{T(t)&&await o.locationChanged(n,history.state?.userState,e)})))}async function ot(e){Ve&&it()&&await Ve(e),ze=history.state?._index??0}function rt(){const e=We();if(void 0!==e)return Je.get(e)}function it(){return He()||!Oe()}const st={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},at={init:function(e,t,n,o=50){const r=lt(t);(r||document.documentElement).style.overflowAnchor="none";const i=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(o){o.forEach((o=>{if(!o.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const r=i.getBoundingClientRect().height,s=o.rootBounds?.height;o.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",o.intersectionRect.top-o.boundingClientRect.top,r,s):o.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",o.boundingClientRect.bottom-o.intersectionRect.bottom,r,s)}))}),{root:r,rootMargin:`${o}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=ht(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,o)=>{u(e.parentElement)&&(o.disconnect(),e.style.display="table-row",o.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=ht(e),o=t[n];o&&(o.intersectionObserver.disconnect(),o.mutationObserverBefore.disconnect(),o.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},ct=Symbol();function lt(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:lt(e.parentElement):null}function ht(e){const t=e._callDispatcher,n=e._id;return t[ct]??={},{observersByDotNetObjectId:t[ct],id:n}}const dt={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const o=e[n],r=o.previousSibling;r instanceof Comment&&null!==V(r)||(null===t&&(t=o.textContent),o.parentNode?.removeChild(o))}return t}},ut={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,o,r){const i=pt(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,o/s.width),i=Math.min(1,r/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return pt(e,t).blob}};function pt(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const ft=new Set,gt={enableNavigationPrompt:function(e){0===ft.size&&window.addEventListener("beforeunload",mt),ft.add(e)},disableNavigationPrompt:function(e){ft.delete(e),0===ft.size&&window.removeEventListener("beforeunload",mt)}};function mt(e){e.preventDefault(),e.returnValue=!0}async function yt(e,t,n){return e instanceof Blob?await async function(e,t,n){const o=e.slice(t,t+n),r=await o.arrayBuffer();return new Uint8Array(r)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}const vt=new Map,wt={navigateTo:function(e,t,n=!1){Ge(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(i.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=s.get(t.browserEventName);n?n.push(e):s.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}i.set(e,t)},rootComponents:v,runtime:{},_internal:{navigationManager:Xe,domWrapper:st,Virtualize:at,PageTitle:dt,InputFile:ut,NavigationLock:gt,getJSDataStreamChunk:yt,attachWebRendererInterop:k}};var bt;window.Blazor=wt,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(bt||(bt={})),class e{static{this.instance=new e}log(e,t){}};let _t=class{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${bt[e]}: ${t}`;switch(e){case bt.Critical:case bt.Error:console.error(n);break;case bt.Warning:console.warn(n);break;case bt.Information:console.info(n);break;default:console.log(n)}}}};function St(e,t){switch(t){case"webassembly":return Rt(e,"webassembly");case"server":return function(e){return Rt(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(e);case"auto":return Rt(e,"auto")}}const Ct=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/,Et=/^\s*Blazor-WebAssembly-Component-State:(?[a-zA-Z0-9+/=]+)$/,It=/^\s*Blazor-Web-Initializers:(?[a-zA-Z0-9+/=]+)$/;function kt(e){return Tt(e,Ct)}function Tt(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",r=t.exec(o),i=r&&r.groups&&r.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function Dt(e,t){const n=e.currentElement;var o,r,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=At.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:o}=e;if(o){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=At.exec(e.textContent),r=t&&t[1];if(r)return Pt(r,o),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return r=n,i=c,Mt(o=s),{...o,uniqueId:xt++,start:r,end:i};case"server":return function(e,t,n){return Nt(e),{...e,uniqueId:xt++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return Nt(e),Mt(e),{...e,uniqueId:xt++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let xt=0;function Nt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function Mt(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function Pt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const o=n.prerenderId;if(!o)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(o!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${o}'`)}class Lt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function en(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function tn(e,t,n,o,r,i){const s={},[a,c]=rn();s[a]=c,e.log(Kt.Trace,`(${t} transport) sending data. ${Zt(r,i.logMessageContent)}.`);const l=en(r)?"arraybuffer":"text",h=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:l,timeout:i.timeout,withCredentials:i.withCredentials});e.log(Kt.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class nn{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class on{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${Kt[e]}: ${t}`;switch(e){case Kt.Critical:case Kt.Error:this.out.error(n);break;case Kt.Warning:this.out.warn(n);break;case Kt.Information:this.out.info(n);break;default:this.out.log(n)}}}}function rn(){return["X-SignalR-User-Agent",sn(Gt,"","Browser",void 0)]}function sn(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&""!==t?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function an(e){return e.stack?e.stack:e.message?e.message:`${e}`}class cn extends Vt{constructor(e){if(super(),this._logger=e,"undefined"==typeof fetch){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._jar=new(e("tough-cookie").CookieJar),"undefined"==typeof fetch?this._fetchType=e("node-fetch"):this._fetchType=fetch,this._fetchType=e("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("could not find global")}());if("undefined"==typeof AbortController){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._abortControllerType=e("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Ft;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new Ft});let o,r=null;if(e.timeout){const o=e.timeout;r=setTimeout((()=>{t.abort(),this._logger.log(Kt.Warning,"Timeout from HTTP request."),n=new $t}),o)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},en(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(Kt.Warning,`Error from HTTP request. ${e}.`),e}finally{r&&clearTimeout(r),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const e=await ln(o,"text");throw new Ot(e||o.statusText,o.status)}const i=ln(o,e.responseType),s=await i;return new Jt(o.status,o.statusText,s)}getCookieString(e){return""}}function ln(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class hn extends Vt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ft):e.method?e.url?new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=void 0===e.withCredentials||e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(en(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const r=e.headers;r&&Object.keys(r).forEach((e=>{o.setRequestHeader(e,r[e])})),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new Ft)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new Jt(o.status,o.statusText,o.response||o.responseText)):n(new Ot(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(Kt.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new Ot(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(Kt.Warning,"Timeout from HTTP request."),n(new $t)},o.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class dn extends Vt{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new cn(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new hn(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ft):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class un{static write(e){return`${e}${un.RecordSeparator}`}static parse(e){if(e[e.length-1]!==un.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(un.RecordSeparator);return t.pop(),t}}un.RecordSeparatorCode=30,un.RecordSeparator=String.fromCharCode(un.RecordSeparatorCode);class pn{writeHandshakeRequest(e){return un.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(en(e)){const o=new Uint8Array(e),r=o.indexOf(un.RecordSeparatorCode);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(o.slice(0,i))),n=o.byteLength>i?o.slice(i).buffer:null}else{const o=e,r=o.indexOf(un.RecordSeparator);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=o.substring(0,i),n=o.length>i?o.substring(i):null}const o=un.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}}var fn,gn;!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(fn||(fn={}));class mn{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new nn(this,e)}}class yn{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},o=()=>{};en(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,o=n}))),this._messages.push(new vn(t,this._totalMessageCount,e,o))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:fn.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case fn.Invocation:case fn.StreamItem:case fn.Completion:case fn.StreamInvocation:case fn.CancelInvocation:return!0;case fn.Close:case fn.Sequence:case fn.Ping:case fn.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:fn.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class vn{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(gn||(gn={}));class wn{static create(e,t,n,o,r,i,s){return new wn(e,t,n,o,r,i,s)}constructor(e,t,n,o,r,i,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(Kt.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Yt.isRequired(e,"connection"),Yt.isRequired(t,"logger"),Yt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=r?r:3e4,this.keepAliveIntervalInMilliseconds=null!=i?i:15e3,this._statefulReconnectBufferSize=null!=s?s:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new pn,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=gn.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:fn.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==gn.Disconnected&&this._connectionState!==gn.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==gn.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=gn.Connecting,this._logger.log(Kt.Debug,"Starting HubConnection.");try{await this._startInternal(),Qt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=gn.Connected,this._connectionStarted=!0,this._logger.log(Kt.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=gn.Disconnected,this._logger.log(Kt.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(Kt.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(Kt.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new yn(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(Kt.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===gn.Disconnected)return this._logger.log(Kt.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===gn.Disconnecting)return this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=gn.Disconnecting,this._logger.log(Kt.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(Kt.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===gn.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Ft("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o);let i;const s=new mn;return s.cancelCallback=()=>{const e=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],i.then((()=>this._sendWithProtocol(e)))},this._callbacks[r.invocationId]=(e,t)=>{t?s.error(t):e&&(e.type===fn.Completion?e.error?s.error(new Error(e.error)):s.complete():s.next(e.item))},i=this._sendWithProtocol(r).catch((e=>{s.error(e),delete this._callbacks[r.invocationId]})),this._launchStreams(n,i),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise(((e,t)=>{this._callbacks[r.invocationId]=(n,o)=>{o?t(o):n&&(n.type===fn.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const o=this._sendWithProtocol(r).catch((e=>{t(e),delete this._callbacks[r.invocationId]}));this._launchStreams(n,o)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const o=n.indexOf(t);-1!==o&&(n.splice(o,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case fn.Invocation:this._invokeClientMethod(e).catch((e=>{this._logger.log(Kt.Error,`Invoke client method threw error: ${an(e)}`)}));break;case fn.StreamItem:case fn.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===fn.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(Kt.Error,`Stream callback threw error: ${an(e)}`)}}break}case fn.Ping:break;case fn.Close:{this._logger.log(Kt.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case fn.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case fn.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(Kt.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(Kt.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(Kt.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(Kt.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===gn.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(Kt.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(Kt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const o=n.slice(),r=!!e.invocationId;let i,s,a;for(const n of o)try{const o=i;i=await n.apply(this,e.arguments),r&&i&&o&&(this._logger.log(Kt.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),s=void 0}catch(e){s=e,this._logger.log(Kt.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):r?(s?a=this._createCompletionMessage(e.invocationId,`${s}`,null):void 0!==i?a=this._createCompletionMessage(e.invocationId,null,i):(this._logger.log(Kt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):i&&this._logger.log(Kt.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(Kt.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Ft("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===gn.Disconnecting?this._completeClose(e):this._connectionState===gn.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===gn.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=gn.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),Qt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Kt.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,o=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(null===r)return this._logger.log(Kt.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=gn.Reconnecting,e?this._logger.log(Kt.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(Kt.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Kt.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==gn.Reconnecting)return void this._logger.log(Kt.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==r;){if(this._logger.log(Kt.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,r)})),this._reconnectDelayHandle=void 0,this._connectionState!==gn.Reconnecting)return void this._logger.log(Kt.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=gn.Connected,this._logger.log(Kt.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(Kt.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(Kt.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==gn.Reconnecting)return this._logger.log(Kt.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===gn.Disconnecting&&this._completeClose());o=e instanceof Error?e:new Error(e.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(Kt.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(Kt.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const o=t[n];try{o(null,e)}catch(t){this._logger.log(Kt.Error,`Stream 'error' callback called with '${e}' threw error: ${an(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return 0!==o.length?{target:e,arguments:t,streamIds:o,type:fn.Invocation}:{target:e,arguments:t,type:fn.Invocation};{const n=this._invocationId;return this._invocationId++,0!==o.length?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:fn.Invocation}:{target:e,arguments:t,invocationId:n.toString(),type:fn.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,o))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let o=0;o0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Sn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Sn.Authorization]&&delete e.headers[Sn.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var En,In;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(En||(En={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(In||(In={}));let kn=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Tn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new kn,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._url=e,this._logger.log(Kt.Trace,"(LongPolling transport) Connecting."),t===In.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=rn(),r={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===In.Binary&&(i.responseType="arraybuffer");const s=`${e}&_=${Date.now()}`;this._logger.log(Kt.Trace,`(LongPolling transport) polling: ${s}.`);const a=await this._httpClient.get(s,i);200!==a.statusCode?(this._logger.log(Kt.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Ot(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(Kt.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,t);204===o.statusCode?(this._logger.log(Kt.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==o.statusCode?(this._logger.log(Kt.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new Ot(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(Kt.Trace,`(LongPolling transport) data received. ${Zt(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(Kt.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof $t?this._logger.log(Kt.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(Kt.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(Kt.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?tn(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(Kt.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(Kt.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=rn();e[t]=n;const o={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let r;try{await this._httpClient.delete(this._url,o)}catch(e){r=e}r?r instanceof Ot&&(404===r.statusCode?this._logger.log(Kt.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(Kt.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(Kt.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(Kt.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(Kt.Trace,e),this.onclose(this._closeError)}}}class Rn{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(e,t){return Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._logger.log(Kt.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,o)=>{let r,i=!1;if(t===In.Text){if(Qt.isBrowser||Qt.isWebWorker)r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[o,i]=rn();n[o]=i,r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{r.onmessage=e=>{if(this.onreceive)try{this._logger.log(Kt.Trace,`(SSE transport) data received. ${Zt(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},r.onerror=e=>{i?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},r.onopen=()=>{this._logger.log(Kt.Information,`SSE connected to ${this._url}`),this._eventSource=r,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?tn(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class An{constructor(e,t,n,o,r,i){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){let n;return Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._logger.log(Kt.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((o,r)=>{let i;e=e.replace(/^http/,"ws");const s=this._httpClient.getCookieString(e);let a=!1;if(Qt.isReactNative){const t={},[o,r]=rn();t[o]=r,n&&(t[Sn.Authorization]=`Bearer ${n}`),s&&(t[Sn.Cookie]=s),i=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(e)),t===In.Binary&&(i.binaryType="arraybuffer"),i.onopen=t=>{this._logger.log(Kt.Information,`WebSocket connected to ${e}.`),this._webSocket=i,a=!0,o()},i.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(Kt.Information,`(WebSockets transport) ${t}.`)},i.onmessage=e=>{if(this._logger.log(Kt.Trace,`(WebSockets transport) data received. ${Zt(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},i.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(Kt.Trace,`(WebSockets transport) sending data. ${Zt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(Kt.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class Dn{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Yt.isRequired(e,"url"),this._logger=function(e){return void 0===e?new on(Kt.Information):null===e?Xt.instance:void 0!==e.log?e:new on(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new Cn(t.httpClient||new dn(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||In.Binary,Yt.isIn(e,In,"transferFormat"),this._logger.log(Kt.Debug,`Starting connection with transfer format '${In[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(Kt.Error,e),await this._stopPromise,Promise.reject(new Ft(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(Kt.Error,e),Promise.reject(new Ft(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new xn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(Kt.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(Kt.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==En.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(En.WebSockets),await this._startTransport(t,e)}else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new Ft("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<100);if(100===o&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof Tn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(Kt.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(Kt.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,o]=rn();t[n]=o;const r=this._resolveNegotiateUrl(e);this._logger.log(Kt.Debug,`Sending negotiation request: ${r}.`);try{const e=await this._httpClient.post(r,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new zt("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof Ot&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(Kt.Error,t),Promise.reject(new zt(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,o){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(Kt.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(r,o),void(this.connectionId=n.connectionId);const i=[],s=n.availableTransports||[];let a=n;for(const n of s){const s=this._resolveTransportOrError(n,t,o,!0===(null==a?void 0:a.useStatefulReconnect));if(s instanceof Error)i.push(`${n.transport} failed:`),i.push(s);else if(this._isITransport(s)){if(this.transport=s,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}r=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(r,o),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(Kt.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,i.push(new jt(`${n.transport} failed: ${e}`,En[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(Kt.Debug,e),Promise.reject(new Ft(e))}}}}return i.length>0?Promise.reject(new qt(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case En.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new An(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case En.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Rn(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case En.LongPolling:return new Tn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{o=!0}o&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){const r=En[e.transport];if(null==r)return this._logger.log(Kt.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function(e,t){return!e||!!(t&e)}(t,r))return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it was disabled by the client.`),new Wt(`'${En[r]}' is disabled by the client.`,r);if(!(e.transferFormats.map((e=>In[e])).indexOf(n)>=0))return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it does not support the requested transfer format '${In[n]}'.`),new Error(`'${En[r]}' does not support ${In[n]}.`);if(r===En.WebSockets&&!this._options.WebSocket||r===En.ServerSentEvents&&!this._options.EventSource)return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it is not supported in your environment.'`),new Ht(`'${En[r]}' is not supported in your environment.`,r);this._logger.log(Kt.Debug,`Selecting transport '${En[r]}'.`);try{return this.features.reconnect=r===En.WebSockets?o:void 0,this._constructTransport(r)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(Kt.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(Kt.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(Kt.Error,`Connection disconnected with error '${e}'.`):this._logger.log(Kt.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(Kt.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(Kt.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(Kt.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!Qt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(Kt.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class xn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new Nn,this._transportResult=new Nn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new Nn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Nn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):xn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let o=0;for(const t of e)n.set(new Uint8Array(t),o),o+=t.byteLength;return n.buffer}}class Nn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class Mn{constructor(){this.name="json",this.version=2,this.transferFormat=In.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=Xt.instance);const n=un.parse(e),o=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case fn.Invocation:this._isInvocationMessage(n);break;case fn.StreamItem:this._isStreamItemMessage(n);break;case fn.Completion:this._isCompletionMessage(n);break;case fn.Ping:case fn.Close:break;case fn.Ack:this._isAckMessage(n);break;case fn.Sequence:this._isSequenceMessage(n);break;default:t.log(Kt.Information,"Unknown message type '"+n.type+"' ignored.");continue}o.push(n)}return o}writeMessage(e){return un.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const Pn={trace:Kt.Trace,debug:Kt.Debug,info:Kt.Information,information:Kt.Information,warn:Kt.Warning,warning:Kt.Warning,error:Kt.Error,critical:Kt.Critical,none:Kt.None};class Ln{configureLogging(e){if(Yt.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=Pn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new on(t)}else this.logger=new on(e);return this}withUrl(e,t){return Yt.isRequired(e,"url"),Yt.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return Yt.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new _n(e):this.reconnectPolicy=e:this.reconnectPolicy=new _n,this}withServerTimeout(e){return Yt.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return Yt.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new Dn(this.url,e);return wn.create(t,this.logger||Xt.instance,this.protocol||new Mn,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var Un;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(Un||(Un={}));var Bn,On,$n,Fn=4294967295;function Hn(e,t,n){var o=Math.floor(n/4294967296),r=n;e.setUint32(t,o),e.setUint32(t+4,r)}function Wn(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var jn=("undefined"==typeof process||"never"!==(null===(Bn=null===process||void 0===process?void 0:process.env)||void 0===Bn?void 0:Bn.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function zn(e){for(var t=e.length,n=0,o=0;o=55296&&r<=56319&&o65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h)}else i.push(a);else i.push(a);i.length>=4096&&(s+=String.fromCharCode.apply(String,i),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,i)),s}var Xn,Gn=jn?new TextDecoder:null,Yn=jn?"undefined"!=typeof process&&"force"!==(null===($n=null===process||void 0===process?void 0:process.env)||void 0===$n?void 0:$n.TEXT_DECODER)?200:0:Fn,Qn=function(e,t){this.type=e,this.data=t},Zn=(Xn=function(e,t){return Xn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Xn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Xn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),eo=function(e){function t(n){var o=e.call(this,n)||this,r=Object.create(t.prototype);return Object.setPrototypeOf(o,r),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:t.name}),o}return Zn(t,e),t}(Error),to={type:-1,encode:function(e){var t,n,o,r;return e instanceof Date?function(e){var t,n=e.sec,o=e.nsec;if(n>=0&&o>=0&&n<=17179869183){if(0===o&&n<=4294967295){var r=new Uint8Array(4);return(t=new DataView(r.buffer)).setUint32(0,n),r}var i=n/4294967296,s=4294967295&n;return r=new Uint8Array(8),(t=new DataView(r.buffer)).setUint32(0,o<<2|3&i),t.setUint32(4,s),r}return r=new Uint8Array(12),(t=new DataView(r.buffer)).setUint32(0,o),Hn(t,4,n),r}((o=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(r=Math.floor(o/1e9)),nsec:o-1e9*r})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:Wn(t,4),nsec:t.getUint32(0)};default:throw new eo("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},no=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(to)}return e.prototype.register=function(e){var t=e.type,n=e.encode,o=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=o;else{var r=1+t;this.builtInEncoders[r]=n,this.builtInDecoders[r]=o}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>Jn){var t=zn(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),Vn(e,this.bytes,this.pos),this.pos+=t}else t=zn(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var o=e.length,r=n,i=0;i=55296&&s<=56319&&i>18&7|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128):(t[r++]=s>>12&15|224,t[r++]=s>>6&63|128)}else t[r++]=s>>6&31|192;t[r++]=63&s|128}else t[r++]=s}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=oo(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var o=0,r=e;o0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var o=0,r=this.caches[n-1];o=this.maxLengthPerKey?n[Math.random()*n.length|0]=o:n.push(o)},e.prototype.decode=function(e,t,n){var o=this.find(e,t,n);if(null!=o)return this.hit++,o;this.miss++;var r=Kn(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,r),r},e}(),ao=function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return ao(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,o,r,i,s,a;return i=this,a=function(){var i,s,a,c,l,h,d,u;return ao(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=co(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof po))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),o={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(r=t.return)?[4,r.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(o)throw o.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat(io(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function o(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,o)}r((a=a.apply(i,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,s=function(){var n,o,r,i,s,a,c,l,h;return ao(this,(function(d){switch(d.label){case 0:n=t,o=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),r=co(e),d.label=2;case 2:return[4,lo(r.next())];case 3:if((i=d.sent()).done)return[3,12];if(s=i.value,t&&0===o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(o=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,lo(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--o?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof po))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),i&&!i.done&&(h=r.return)?[4,lo(h.call(r))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,o||[]),a=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(e){s[e]&&(i[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=s[e](t)).value instanceof lo?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(o=e-128)){this.pushMapState(o),this.complete();continue e}t={}}else if(e<160){if(0!=(o=e-144)){this.pushArrayState(o),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(o=this.readU16())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(221===e){if(0!==(o=this.readU32())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(222===e){if(0!==(o=this.readU16())){this.pushMapState(o),this.complete();continue e}t={}}else if(223===e){if(0!==(o=this.readU32())){this.pushMapState(o),this.complete();continue e}t={}}else if(196===e){var o=this.lookU8();t=this.decodeBinary(o,1)}else if(197===e)o=this.lookU16(),t=this.decodeBinary(o,2);else if(198===e)o=this.lookU32(),t=this.decodeBinary(o,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)o=this.lookU8(),t=this.decodeExtension(o,1);else if(200===e)o=this.lookU16(),t=this.decodeExtension(o,2);else{if(201!==e)throw new eo("Unrecognized type byte: ".concat(io(e)));o=this.lookU32(),t=this.decodeExtension(o,4)}this.complete();for(var r=this.stack;r.length>0;){var i=r[r.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;r.pop(),t=i.array}else{if(1===i.type){if("string"!=(s=typeof t)&&"number"!==s)throw new eo("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new eo("The key __proto__ is not allowed");i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}r.pop(),t=i.map}}return t}var s},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new eo("Unrecognized array type byte: ".concat(io(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new eo("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new eo("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new eo("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthYn?function(e,t,n){var o=e.subarray(t,t+n);return Gn.decode(o)}(this.bytes,r,e):Kn(this.bytes,r,e),this.pos+=t+e,o},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new eo("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw fo;var n=this.pos+t,o=this.bytes.subarray(n,n+e);return this.pos+=t+e,o},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new eo("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),o=this.decodeBinary(e,t+1);return this.extensionCodec.decode(o,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=Wn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class yo{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer}static parse(e){const t=[],n=new Uint8Array(e),o=[0,7,14,21,28];for(let r=0;r7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=r+s+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(r+s,r+s+a):n.subarray(r+s,r+s+a)),r=r+s+a}return t}}const vo=new Uint8Array([145,fn.Ping]);class wo{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=In.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new ro(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new mo(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=Xt.instance);const o=yo.parse(e),r=[];for(const e of o){const n=this._parseMessage(e,t);n&&r.push(n)}return r}writeMessage(e){switch(e.type){case fn.Invocation:return this._writeInvocation(e);case fn.StreamInvocation:return this._writeStreamInvocation(e);case fn.StreamItem:return this._writeStreamItem(e);case fn.Completion:return this._writeCompletion(e);case fn.Ping:return yo.write(vo);case fn.CancelInvocation:return this._writeCancelInvocation(e);case fn.Close:return this._writeClose();case fn.Ack:return this._writeAck(e);case fn.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const o=n[0];switch(o){case fn.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case fn.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case fn.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case fn.Ping:return this._createPingMessage(n);case fn.Close:return this._createCloseMessage(n);case fn.Ack:return this._createAckMessage(n);case fn.Sequence:return this._createSequenceMessage(n);default:return t.log(Kt.Information,"Unknown message type '"+o+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:fn.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:fn.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:fn.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:fn.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:fn.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let o,r;switch(n){case this._errorResult:o=t[4];break;case this._nonVoidResult:r=t[4]}return{error:o,headers:e,invocationId:t[2],result:r,type:fn.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:fn.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:fn.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([fn.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([fn.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),yo.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([fn.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([fn.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),yo.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([fn.StreamItem,e.headers||{},e.invocationId,e.item]);return yo.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t,e.result])}return yo.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([fn.CancelInvocation,e.headers||{},e.invocationId]);return yo.write(t.slice())}_writeClose(){const e=this._encoder.encode([fn.Close,null]);return yo.write(e.slice())}_writeAck(e){const t=this._encoder.encode([fn.Ack,e.sequenceId]);return yo.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([fn.Sequence,e.sequenceId]);return yo.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const bo="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,_o=bo?bo.decode.bind(bo):function(e){let t=0;const n=e.length,o=[],r=[];for(;t65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r)}}else o.push(n);o.length>1024&&(r.push(String.fromCharCode.apply(null,o)),o.length=0)}return r.push(String.fromCharCode.apply(null,o)),r.join("")},So=Math.pow(2,32),Co=Math.pow(2,21)-1;function Eo(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Io(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function ko(e,t){const n=Io(e,t+4);if(n>Co)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*So+Io(e,t)}class To{constructor(e){this.batchData=e;const t=new xo(e);this.arrayRangeReader=new No(e),this.arrayBuilderSegmentReader=new Mo(e),this.diffReader=new Ro(e),this.editReader=new Ao(e,t),this.frameReader=new Do(e,t)}updatedComponents(){return Eo(this.batchData,this.batchData.length-20)}referenceFrames(){return Eo(this.batchData,this.batchData.length-16)}disposedComponentIds(){return Eo(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return Eo(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return Eo(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return Eo(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return ko(this.batchData,n)}}class Ro{constructor(e){this.batchDataUint8=e}componentId(e){return Eo(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class Ao{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return Eo(this.batchDataUint8,e)}siblingIndex(e){return Eo(this.batchDataUint8,e+4)}newTreeIndex(e){return Eo(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return Eo(this.batchDataUint8,e+8)}removedAttributeName(e){const t=Eo(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class Do{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return Eo(this.batchDataUint8,e)}subtreeLength(e){return Eo(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return Eo(this.batchDataUint8,e+8)}elementName(e){const t=Eo(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=Eo(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return ko(this.batchDataUint8,e+12)}}class xo{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=Eo(e,e.length-4)}readString(e){if(-1===e)return null;{const n=Eo(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){let n=0,o=0;for(let r=0;r<4;r++){const i=e[t+r];if(n|=(127&i)<this.nextBatchId)return this.fatalError?(this.logger.log(bt.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(bt.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(bt.Debug,`Applying batch ${e}.`),xe(Un.Server,new To(t)),await this.completeBatch(n,e)}catch(t){throw this.fatalError=t.toString(),this.logger.log(bt.Error,`There was an error applying batch ${e}.`),n.send("OnRenderCompleted",e,t.toString()),t}}getLastBatchid(){return this.nextBatchId-1}async completeBatch(e,t){try{await e.send("OnRenderCompleted",t,null)}catch{this.logger.log(bt.Warning,`Failed to deliver completion notification for render '${t}'.`)}}}let Lo=!1;function Uo(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),Lo||(Lo=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class Bo{constructor(t,n,o,r){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=o,this._logger=r,this._renderQueue=new Po(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){return this._firstUpdate?(this._firstUpdate=!1,this._connection?.send("UpdateRootComponents",e,this._applicationState)):this._connection?.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==gn.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>Ut(e))));if(this._circuitId=await this._connection.invoke("StartCircuit",Xe.getBaseURI(),Xe.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){const e=new wo;e.name="blazorpack";const t=(new Ln).withUrl("_blazor").withHubProtocol(e);this._options.configureSignalR(t);const n=t.build();n.on("JS.AttachComponent",((e,t)=>Ae(Un.Server,this.resolveElement(t),e,!1))),n.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),n.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),n.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),n.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{n.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),n.on("JS.RenderBatch",(async(e,t)=>{this._logger.log(Kt.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),this._componentManager.onAfterRenderBatch?.(Un.Server)})),n.on("JS.EndUpdateRootComponents",(e=>{this._componentManager.onAfterUpdateRootComponents?.(e)})),n.on("JS.EndLocationChanging",wt._internal.navigationManager.endLocationChanging),n.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=C.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return C.delete(e),t}(Un.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),n.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),Uo()}));try{await n.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;Uo(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===En.WebSockets))?this._logger.log(Kt.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===En.WebSockets))?this._logger.log(Kt.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===En.LongPolling))&&this._logger.log(Kt.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return n.connection?.features?.inherentKeepAlive&&this._logger.log(Kt.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),n}async disconnect(){await(this._connection?.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===gn.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(k(Un.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,o,r){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,o||0,r)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,o){return this._connection.send("OnLocationChanging",e,t,n,o)}sendJsDataStream(e,t,n){return function(e,t,n,o){setTimeout((async()=>{let r=5,i=(new Date).valueOf();try{const s=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),o=t-i;i=t,r=Math.max(1,Math.round(500/Math.max(1,o)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=w(e);if(t)return W(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return H(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(Kt.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,this._connection?.stop();const e=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:e});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}function Oo(e){const t={...$o,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...$o.reconnectionOptions,...e.reconnectionOptions}),t}const $o={configureSignalR:e=>{},logLevel:bt.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:30,retryIntervalMilliseconds:function(e,t){return t&&e>=t?null:e<10?0:e<20?5e3:3e4},dialogId:"components-reconnect-modal"}};class Fo{static{this.ReconnectOverlayClassName="components-reconnect-overlay"}static{this.ReconnectDialogClassName="components-reconnect-dialog"}static{this.ReconnectVisibleClassName="components-reconnect-visible"}static{this.RejoiningAnimationClassName="components-rejoining-animation"}static{this.AnimationRippleCount=2}constructor(e,t,n){this.document=t,this.logger=n,this.style=this.document.createElement("style"),this.style.innerHTML=Fo.Css,this.overlay=this.document.createElement("div"),this.overlay.className=Fo.ReconnectOverlayClassName,this.host=this.document.createElement("div"),this.host.id=e;const o=this.host.attachShadow({mode:"open"});this.dialog=t.createElement("div"),this.dialog.className=Fo.ReconnectDialogClassName,o.appendChild(this.style),o.appendChild(this.overlay),this.rejoiningAnimation=t.createElement("div"),this.rejoiningAnimation.className=Fo.RejoiningAnimationClassName;for(let e=0;e{"visible"===this.document.visibilityState&&this.retry()}}show(){this.document.contains(this.host)||this.document.body.appendChild(this.host),this.reloadButton.style.display="none",this.rejoiningAnimation.style.display="block",this.status.innerHTML="Rejoining the server...",this.host.style.display="block",this.overlay.classList.add(Fo.ReconnectVisibleClassName)}update(e,t){if(1===e||0===t)this.status.innerHTML="Rejoining the server...";else{const e=1===t?"second":"seconds";this.status.innerHTML=`Rejoin failed... trying again in ${t} ${e}`}}hide(){this.host.style.display="none",this.overlay.classList.remove(Fo.ReconnectVisibleClassName)}failed(){this.reloadButton.style.display="block",this.rejoiningAnimation.style.display="none",this.status.innerHTML="Failed to rejoin.
Please retry or reload the page.",this.document.addEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible)}rejected(){location.reload()}async retry(){this.document.removeEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible),this.show();try{await wt.reconnect()||this.rejected()}catch(e){this.logger.log(bt.Error,e),this.failed()}}static{this.Css=`\n .${this.ReconnectOverlayClassName} {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n display: none;\n overflow: hidden;\n animation: components-reconnect-fade-in;\n }\n\n .${this.ReconnectOverlayClassName}.${this.ReconnectVisibleClassName} {\n display: block;\n }\n\n .${this.ReconnectOverlayClassName}::before {\n content: '';\n background-color: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: components-reconnect-fadeInOpacity 0.5s ease-in-out;\n opacity: 1;\n }\n\n .${this.ReconnectOverlayClassName} p {\n margin: 0;\n text-align: center;\n }\n\n .${this.ReconnectOverlayClassName} button {\n border: 0;\n background-color: #6b9ed2;\n color: white;\n padding: 4px 24px;\n border-radius: 4px;\n }\n\n .${this.ReconnectOverlayClassName} button:hover {\n background-color: #3b6ea2;\n }\n\n .${this.ReconnectOverlayClassName} button:active {\n background-color: #6b9ed2;\n }\n\n .${this.ReconnectDialogClassName} {\n position: relative;\n background-color: white;\n width: 20rem;\n margin: 20vh auto;\n padding: 2rem;\n border-radius: 0.5rem;\n box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n opacity: 0;\n animation: components-reconnect-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-fadeInOpacity 0.5s ease-out 0.3s;\n animation-fill-mode: forwards;\n z-index: 10001;\n }\n\n .${this.RejoiningAnimationClassName} {\n display: block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n\n .${this.RejoiningAnimationClassName} div {\n position: absolute;\n border: 3px solid #0087ff;\n opacity: 1;\n border-radius: 50%;\n animation: ${this.RejoiningAnimationClassName} 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n }\n\n .${this.RejoiningAnimationClassName} div:nth-child(2) {\n animation-delay: -0.5s;\n }\n\n @keyframes ${this.RejoiningAnimationClassName} {\n 0% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 4.9% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 5% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 1;\n }\n\n 100% {\n top: 0px;\n left: 0px;\n width: 80px;\n height: 80px;\n opacity: 0;\n }\n }\n\n @keyframes components-reconnect-fadeInOpacity {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes components-reconnect-slideUp {\n 0% {\n transform: translateY(30px) scale(0.95);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n `}}class Ho{static{this.ShowClassName="components-reconnect-show"}static{this.HideClassName="components-reconnect-hide"}static{this.FailedClassName="components-reconnect-failed"}static{this.RejectedClassName="components-reconnect-rejected"}static{this.MaxRetriesId="components-reconnect-max-retries"}static{this.CurrentAttemptId="components-reconnect-current-attempt"}static{this.SecondsToNextAttemptId="components-seconds-to-next-attempt"}constructor(e,t,n){if(this.dialog=e,this.document=t,this.document=t,void 0!==n){const e=this.document.getElementById(Ho.MaxRetriesId);e&&(e.innerText=n.toString())}}show(){this.removeClasses(),this.dialog.classList.add(Ho.ShowClassName)}update(e,t){const n=this.document.getElementById(Ho.CurrentAttemptId);n&&(n.innerText=e.toString());const o=this.document.getElementById(Ho.SecondsToNextAttemptId);o&&(o.innerText=t.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Ho.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Ho.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Ho.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Ho.ShowClassName,Ho.HideClassName,Ho.FailedClassName,Ho.RejectedClassName)}}class Wo{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||wt.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Ho(t,document,e.maxRetries):new Fo(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new jo(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class jo{static{this.MaximumFirstRetryInterval=3e3}constructor(e,t,n,o){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=o,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;void 0===e.maxRetries||tjo.MaximumFirstRetryInterval?jo.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.runTimer(n,1e3,(e=>{this.reconnectDisplay.update(t+1,Math.round(e/1e3))})),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(bt.Error,e)}}this.reconnectDisplay.failed()}async runTimer(e,t,n){if(e<=0)return void n(0);let o,r,i=Date.now();n(e);const s=()=>{if(this.isDisposed)return void r();const a=Date.now(),c=a-i;i=a;const l=Math.max(1,Math.floor(c/t)),h=t*l;if((e-=h){"visible"===document.visibilityState&&(clearTimeout(o),n(0),r())};o=setTimeout(s,t),document.addEventListener("visibilitychange",a),await new Promise((e=>r=e)),document.removeEventListener("visibilitychange",a)}}class zo{constructor(e=!0,t,n,o=0){this.singleRuntime=e,this.logger=t,this.webRendererId=o,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const o=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),r=await import(o);if(void 0!==r){if(e.singleRuntime){const{beforeStart:n,afterStarted:o,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=r;let h=n;e.webRendererId===Un.Server&&c&&(h=c),e.webRendererId===Un.WebAssembly&&s&&(h=s);let d=o;return e.webRendererId===Un.Server&&l&&(d=l),e.webRendererId===Un.WebAssembly&&a&&(d=a),i(e,h,d,t)}return function(e,t,n){const r=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:h,afterWebAssemblyStarted:d,beforeServerStart:u,afterServerStarted:p}=t,f=!(c||l||h||d||u||p||!s&&!a),g=f&&r.enableClassicInitializers;if(f&&!r.enableClassicInitializers)e.logger?.log(bt.Warning,`Initializer '${o}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(g)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(r),h&&r.webAssembly.initializers.beforeStart.push(h),d&&r.webAssembly.initializers.afterStarted.push(d),u&&r.circuit.initializers.beforeStart.push(u),p&&r.circuit.initializers.afterStarted.push(p),l&&e.afterStartedCallbacks.push(l),c)return c(r)}(e,r,t)}function i(e,t,n,o){if(n&&e.afterStartedCallbacks.push(n),t)return t(...o)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,I.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let qo,Jo,Vo,Ko,Xo,Go,Yo;function Qo(e){if(void 0!==Go)throw new Error("Blazor Server has already started.");return Go=new Promise(Zo.bind(null,e)),Go}async function Zo(e,t,n){await qo;const o=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new zo(!1,void 0,e.initializers.afterStarted,Un.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),o=new zo(!0,void 0,void 0,Un.Server);return await o.importInitializersAsync(n,[e]),o}(Ko);if(Jo=kt(document)||"",Xo=new _t(Ko.logLevel),Vo=new Bo(e,Jo,Ko,Xo),Xo.log(bt.Information,"Starting up Blazor server-side application."),wt.reconnect=async()=>!(Vo.didRenderingFail()||!await Vo.reconnect()&&(Xo.log(bt.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),wt.defaultReconnectionHandler=new Wo(Xo),Ko.reconnectionHandler=Ko.reconnectionHandler||wt.defaultReconnectionHandler,wt._internal.navigationManager.listenForNavigationEvents(Un.Server,((e,t,n)=>Vo.sendLocationChanged(e,t,n)),((e,t,n,o)=>Vo.sendLocationChanging(e,t,n,o))),wt._internal.forceCloseConnection=()=>Vo.disconnect(),wt._internal.sendJSDataStream=(e,t,n)=>Vo.sendJsDataStream(e,t,n),!await Vo.start())return Xo.log(bt.Error,"Failed to start the circuit."),void t();const r=()=>{Vo.sendDisconnectBeacon()};wt.disconnect=r,window.addEventListener("unload",r,{capture:!1,once:!0}),Xo.log(bt.Information,"Blazor server-side application started."),o.invokeAfterStartedCallbacks(wt),t()}async function er(){if(!Go)throw new Error("Cannot start the circuit until Blazor Server has started.");return!(!Vo||Vo.isDisposedOrDisposing())||(Yo?await Yo:(await Go,(!Vo||!Vo.didRenderingFail())&&(Vo&&Vo.isDisposedOrDisposing()&&(Jo=kt(document)||"",Vo=new Bo(Vo.getRootComponentManager(),Jo,Ko,Xo)),Yo=Vo.start(),async function(e){await e,Yo===e&&(Yo=void 0)}(Yo),Yo)))}function tr(e){if(Vo&&!Vo.isDisposedOrDisposing())return Vo.updateRootComponents(e);!async function(e){await Go,await er()&&Vo.updateRootComponents(e)}(e)}const nr=navigator,or=nr.userAgentData&&nr.userAgentData.brands,rr=or&&or.length>0?or.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):window.chrome,ir=nr.userAgentData?.platform??navigator.platform;function sr(e){return 0!==e.debugLevel&&(rr||navigator.userAgent.includes("Firefox"))}let ar,cr,lr,hr,dr=null;const ur={load:function(e,t){return async function(e,t){const{dotnet:n}=await async function(e){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");let t="_framework/dotnet.js";if(e.loadBootResource){const n="dotnetjs",o=e.loadBootResource(n,"dotnet.js",t,"","js-module-dotnet");if("string"==typeof o)t=o;else if(o)throw new Error(`For a ${n} resource, custom loaders must supply a URI string.`)}const n=new URL(t,document.baseURI).toString();return await import(n)}(e),o=function(e,t){const n={maxParallelDownloads:1e6,enableDownloadRetry:!1,applicationEnvironment:e.environment},o={...window.Module||{},onConfigLoaded:async n=>{n.environmentVariables||(n.environmentVariables={}),"sharded"===n.globalizationMode&&(n.environmentVariables.__BLAZOR_SHARDED_ICU="1"),wt._internal.getApplicationEnvironment=()=>n.applicationEnvironment,t?.(n),hr=await async function(e,t){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new zo(!1,void 0,e.initializers.afterStarted,Un.WebAssembly);{const n=[e,t.resources?.extensions??{}],o=new zo(!0,void 0,void 0,Un.WebAssembly),r=Object.keys(t?.resources?.libraryInitializers||{});return await o.importInitializersAsync(r,n),o}}(e,n)},onDownloadResourceProgress:pr,config:n,out:gr,err:mr};return o}(e,t);e.applicationCulture&&n.withApplicationCulture(e.applicationCulture),e.environment&&n.withApplicationEnvironment(e.environment),e.loadBootResource&&n.withResourceLoader(e.loadBootResource),n.withModuleConfig(o),e.configureRuntime&&e.configureRuntime(n),lr=await n.create()}(e,t)},start:function(){return async function(){if(!lr)throw new Error("The runtime must be loaded it gets configured.");const{setModuleImports:t,INTERNAL:n,getConfig:o,invokeLibraryInitializers:r}=lr;cr=n,function(e){const t=ir.match(/^Mac/i)?"Cmd":"Alt";sr(e)&&console.info(`Debugging hotkey: Shift+${t}+D (when application has focus)`),document.addEventListener("keydown",(t=>{t.shiftKey&&(t.metaKey||t.altKey)&&"KeyD"===t.code&&(sr(e)?navigator.userAgent.includes("Firefox")?async function(){const e=await fetch(`_framework/debug?url=${encodeURIComponent(location.href)}&isFirefox=true`);200!==e.status&&console.warn(await e.text())}():rr?function(){const e=document.createElement("a");e.href=`_framework/debug?url=${encodeURIComponent(location.href)}`,e.target="_blank",e.rel="noopener noreferrer",e.click()}():console.error("Currently, only Microsoft Edge (80+), Google Chrome, or Chromium, are supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))}))}(o()),wt.runtime=lr,wt._internal.dotNetCriticalError=mr,t("blazor-internal",{Blazor:{_internal:wt._internal}});const i=await lr.getAssemblyExports("Microsoft.AspNetCore.Components.WebAssembly");return Object.assign(wt._internal,{dotNetExports:{...i.Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime}}),ar=e.attachDispatcher({beginInvokeDotNetFromJS:(e,t,n,o,r)=>{if(yr(),!o&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");const i=o?o.toString():t;wt._internal.dotNetExports.BeginInvokeDotNet(e?e.toString():null,i,n,r)},endInvokeJSFromDotNet:(e,t,n)=>{wt._internal.dotNetExports.EndInvokeJS(n)},sendByteArray:(e,t)=>{wt._internal.dotNetExports.ReceiveByteArrayFromJS(e,t)},invokeDotNetFromJS:(e,t,n,o)=>(yr(),wt._internal.dotNetExports.InvokeDotNet(e||null,t,n??0,o))}),{invokeLibraryInitializers:r}}()},callEntryPoint:async function(){try{await lr.runMain(lr.getConfig().mainAssemblyName,[])}catch(e){console.error(e),Uo()}},getArrayEntryPtr:function(e,t,n){const o=function(e){return e+12}(e)+4+t*n;return o},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return lr.getHeapI16(e+(t||0))},readInt32Field:function(e,t){return lr.getHeapI32(e+(t||0))},readUint64Field:function(e,t){return lr.getHeapU52(e+(t||0))},readObjectField:function(e,t){return lr.getHeapU32(e+(t||0))},readStringField:function(e,t,n){const o=lr.getHeapU32(e+(t||0));if(0===o)return null;if(n){const e=cr.monoObjectAsBoolOrNullUnsafe(o);if("boolean"==typeof e)return e?"":null}return cr.monoStringToStringUnsafe(o)},readStructField:function(e,t){return e+(t||0)},beginHeapLock:function(){return yr(),dr=vr.create(),dr},invokeWhenHeapUnlocked:function(e){dr?dr.enqueuePostReleaseAction(e):e()}};function pr(e,t){const n=e/t*100;document.documentElement.style.setProperty("--blazor-load-percentage",`${n}%`),document.documentElement.style.setProperty("--blazor-load-percentage-text",`"${Math.floor(n)}%"`)}const fr=["DEBUGGING ENABLED"],gr=e=>fr.indexOf(e)<0&&console.log(e),mr=e=>{console.error(e||"(null)"),Uo()};function yr(){if(dr)throw new Error("Assertion failed - heap is currently locked")}class vr{enqueuePostReleaseAction(e){this.postReleaseActions||(this.postReleaseActions=[]),this.postReleaseActions.push(e)}release(){if(dr!==this)throw new Error("Trying to release a lock which isn't current");for(cr.mono_wasm_gc_unlock(),dr=null;this.postReleaseActions?.length;)this.postReleaseActions.shift()(),yr()}static create(){return cr.mono_wasm_gc_lock(),new vr}}class wr{constructor(e){this.batchAddress=e,this.arrayRangeReader=br,this.arrayBuilderSegmentReader=_r,this.diffReader=Sr,this.editReader=Cr,this.frameReader=Er}updatedComponents(){return t.readStructField(this.batchAddress,0)}referenceFrames(){return t.readStructField(this.batchAddress,br.structLength)}disposedComponentIds(){return t.readStructField(this.batchAddress,2*br.structLength)}disposedEventHandlerIds(){return t.readStructField(this.batchAddress,3*br.structLength)}updatedComponentsEntry(e,t){return Ir(e,t,Sr.structLength)}referenceFramesEntry(e,t){return Ir(e,t,Er.structLength)}disposedComponentIdsEntry(e,n){const o=Ir(e,n,4);return t.readInt32Field(o)}disposedEventHandlerIdsEntry(e,n){const o=Ir(e,n,8);return t.readUint64Field(o)}}const br={structLength:8,values:e=>t.readObjectField(e,0),count:e=>t.readInt32Field(e,4)},_r={structLength:12,values:e=>{const n=t.readObjectField(e,0),o=t.getObjectFieldsBaseAddress(n);return t.readObjectField(o,0)},offset:e=>t.readInt32Field(e,4),count:e=>t.readInt32Field(e,8)},Sr={structLength:4+_r.structLength,componentId:e=>t.readInt32Field(e,0),edits:e=>t.readStructField(e,4),editsEntry:(e,t)=>Ir(e,t,Cr.structLength)},Cr={structLength:20,editType:e=>t.readInt32Field(e,0),siblingIndex:e=>t.readInt32Field(e,4),newTreeIndex:e=>t.readInt32Field(e,8),moveToSiblingIndex:e=>t.readInt32Field(e,8),removedAttributeName:e=>t.readStringField(e,16)},Er={structLength:36,frameType:e=>t.readInt16Field(e,4),subtreeLength:e=>t.readInt32Field(e,8),elementReferenceCaptureId:e=>t.readStringField(e,16),componentId:e=>t.readInt32Field(e,12),elementName:e=>t.readStringField(e,16),textContent:e=>t.readStringField(e,16),markupContent:e=>t.readStringField(e,16),attributeName:e=>t.readStringField(e,16),attributeValue:e=>t.readStringField(e,24,!0),attributeEventHandlerId:e=>t.readUint64Field(e,8)};function Ir(e,n,o){return t.getArrayEntryPtr(e,n,o)}class kr{constructor(e){this.componentManager=e}resolveRegisteredElement(e){const t=Number.parseInt(e);if(!Number.isNaN(t))return H(this.componentManager.resolveRootComponent(t))}getParameterValues(e){return this.componentManager.initialComponents[e].parameterValues}getParameterDefinitions(e){return this.componentManager.initialComponents[e].parameterDefinitions}getTypeName(e){return this.componentManager.initialComponents[e].typeName}getAssembly(e){return this.componentManager.initialComponents[e].assembly}getCount(){return this.componentManager.initialComponents.length}}let Tr,Rr,Ar,Dr,xr=!1,Nr=!1,Mr=!0,Pr=!1;const Lr=new Promise((e=>{Dr=e}));let Ur;const Br=new Promise((e=>{Ur=e}));let Or;const $r=new Promise((e=>{Or=e}));function Fr(e){if(Tr)throw new Error("WebAssembly options have already been configured.");!async function(e){const t=await e;Tr=t,Or()}(e)}function Hr(e){if(void 0!==Ar)throw new Error("Blazor WebAssembly has already started.");return Ar=new Promise(Wr.bind(null,e)),Ar}async function Wr(e,n,o){(function(){if(window.parent!==window&&!window.opener&&window.frameElement){const e=window.sessionStorage&&window.sessionStorage["Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings"],t=e&&JSON.parse(e);return t&&t.redirect_uri&&location.href.startsWith(t.redirect_uri)}return!1})()&&await new Promise((()=>{}));const r=jr();!function(e){const t=D;D=(e,n,o)=>{((e,t,n)=>{const o=De(e);o?.eventDelegator.getHandler(t)&&ur.invokeWhenHeapUnlocked(n)})(e,n,(()=>t(e,n,o)))}}(),wt._internal.applyHotReload=(e,t,n,o,r)=>{ar.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDelta",e,t,n,o,r??null)},wt._internal.getApplyUpdateCapabilities=()=>ar.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","GetApplyUpdateCapabilities"),wt._internal.invokeJSJson=zr,wt._internal.endInvokeDotNetFromJS=qr,wt._internal.receiveWebAssemblyDotNetDataStream=Jr,wt._internal.receiveByteArray=Vr;const i=(t=ur,t);wt.platform=i,wt._internal.renderBatch=(e,t)=>{const n=ur.beginHeapLock();try{xe(e,new wr(t))}finally{n.release()}},wt._internal.navigationManager.listenForNavigationEvents(Un.WebAssembly,(async(e,t,n)=>{await ar.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t,n)}),(async(e,t,n,o)=>{const r=await ar.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChangingAsync",t,n,o);wt._internal.navigationManager.endLocationChanging(e,r)}));const s=new kr(e);wt._internal.registeredComponents={getRegisteredComponentsCount:()=>s.getCount(),getAssembly:e=>s.getAssembly(e),getTypeName:e=>s.getTypeName(e),getParameterDefinitions:e=>s.getParameterDefinitions(e)||"",getParameterValues:e=>s.getParameterValues(e)||""},wt._internal.getPersistedState=()=>Tt(document,Et)||"",wt._internal.getInitialComponentsUpdate=()=>Br,wt._internal.updateRootComponents=e=>wt._internal.dotNetExports?.UpdateRootComponentsCore(e),wt._internal.endUpdateRootComponents=t=>e.onAfterUpdateRootComponents?.(t),wt._internal.attachRootComponentToElement=(e,t,n)=>{const o=s.resolveRegisteredElement(e);o?Ae(n,o,t,!1):function(e,t,n){const o="::before";let r=!1;if(e.endsWith("::after"))e=e.slice(0,-7),r=!0;else if(e.endsWith(o))throw new Error(`The '${o}' selector is not supported.`);const i=w(e)||document.querySelector(e);if(!i)throw new Error(`Could not find any element matching selector '${e}'.`);Ae(n,W(i,!0),t,r)}(e,t,n)};try{await r,await i.start()}catch(e){throw new Error(`Failed to start platform. Reason: ${e}`)}i.callEntryPoint(),hr.invokeAfterStartedCallbacks(wt),Nr=!0,n()}function jr(){return Rr??=(async()=>{await $r;const e=Tr??{},t=Tr?.configureRuntime;e.configureRuntime=e=>{t?.(e),Pr&&e.withEnvironmentVariable("__BLAZOR_WEBASSEMBLY_WAIT_FOR_ROOT_COMPONENTS","true")},await ur.load(e,Dr),xr=!0})(),Rr}function zr(e,t,n,o,r){return 0!==r?(ar.beginInvokeJSFromDotNet(r,e,o,n,t),null):ar.invokeJSFromDotNet(e,o,n,t)}function qr(e,t,n){ar.endInvokeDotNetFromJS(e,t,n)}function Jr(e,t,n,o){!function(e,t,n,o,r){let i=vt.get(t);if(!i){const n=new ReadableStream({start(e){vt.set(t,e),i=e}});e.supplyDotNetStream(t,n)}r?(i.error(r),vt.delete(t)):0===o?(i.close(),vt.delete(t)):i.enqueue(n.length===o?n:n.subarray(0,o))}(ar,e,t,n,o)}function Vr(e,t){ar.receiveByteArray(e,t)}function Kr(e,t){t.namespaceURI?e.setAttributeNS(t.namespaceURI,t.name,t.value):e.setAttribute(t.name,t.value)}const Xr="data-permanent";var Gr,Yr;!function(e){e[e.None=0]="None",e[e.Some=1]="Some",e[e.Infinite=2]="Infinite"}(Gr||(Gr={})),function(e){e.Keep="keep",e.Update="update",e.Insert="insert",e.Delete="delete"}(Yr||(Yr={}));class Qr{static create(e,t,n){return 0===t&&n===e.length?e:new Qr(e,t,n)}constructor(e,t,n){this.source=e,this.startIndex=t,this.length=n}item(e){return this.source.item(e+this.startIndex)}forEach(e,t){for(let t=0;t=n&&s>=o&&r(e.item(i),t.item(s))===Gr.None;)i--,s--,a++;return a}(e,t,o,o,n),i=function(e){const t=[];let n=e.length-1,o=e[n]?.length-1;for(;n>0||o>0;){const r=0===n?Yr.Insert:0===o?Yr.Delete:e[n][o];switch(t.unshift(r),r){case Yr.Keep:case Yr.Update:n--,o--;break;case Yr.Insert:o--;break;case Yr.Delete:n--}}return t}(function(e,t,n){const o=[],r=[],i=e.length,s=t.length;if(0===i&&0===s)return[];for(let e=0;e<=i;e++)(o[e]=Array(s+1))[0]=e,r[e]=Array(s+1);const a=o[0];for(let e=1;e<=s;e++)a[e]=e;for(let a=1;a<=i;a++)for(let i=1;i<=s;i++){const s=n(e.item(a-1),t.item(i-1)),c=o[a-1][i]+1,l=o[a][i-1]+1;let h;switch(s){case Gr.None:h=o[a-1][i-1];break;case Gr.Some:h=o[a-1][i-1]+1;break;case Gr.Infinite:h=Number.MAX_VALUE}h{const t=Pe(e);history.pushState(null,"",e),t?Ue(e):bi(e,!0)}))}function vi(e){He()||bi(location.href,!1)}function wi(e){if(He()||e.defaultPrevented)return;const t=e.target;if(t instanceof HTMLFormElement){if(!function(e){const t=e.getAttribute("data-enhance");return"string"==typeof t&&""===t||"true"===t?.toLowerCase()}(t))return;const n=e.submitter?.getAttribute("formmethod")||t.method;if("dialog"===n)return void console.warn('A form cannot be enhanced when its method is "dialog".');const o=e.submitter?.getAttribute("formtarget")||t.target;if(""!==o&&"_self"!==o)return void console.warn('A form cannot be enhanced when its target is different from the default value "_self".');e.preventDefault();const r=new URL(e.submitter?.getAttribute("formaction")||t.action,document.baseURI),i={method:n},s=new FormData(t),a=e.submitter?.getAttribute("name"),c=e.submitter.getAttribute("value");a&&c&&s.append(a,c);const l=new URLSearchParams(s).toString();if("get"===i.method)r.search=l,history.pushState(null,"",r.toString());else{const n=e.submitter?.getAttribute("formenctype")||t.enctype;"multipart/form-data"===n?i.body=s:(i.body=l,i.headers={"content-type":n,accept:di})}bi(r.toString(),!1,i)}}async function bi(e,t,n,o){fi=!0,ui?.abort(),function(e,t){ke?.(e,t)}(e,t),pi.enhancedNavigationStarted(),ui=new AbortController;const r=ui.signal,i=fetch(e,Object.assign({signal:r,mode:"no-cors",headers:{accept:di}},n));let s=null;if(await async function(e,t,n,o){let r;try{if(r=await e,!r.body)return void n(r,"");const t=r.headers.get("ssr-framing");if(!t){const e=await r.text();return void n(r,e)}let o=!0;await r.body.pipeThrough(new TextDecoderStream).pipeThrough(function(e){let t="";return new TransformStream({transform(n,o){if(t+=n,t.indexOf(e,t.length-n.length-e.length)>=0){const n=t.split(e);n.slice(0,-1).forEach((e=>o.enqueue(e))),t=n[n.length-1]}},flush(e){e.enqueue(t)}})}(`\x3c!--${t}--\x3e`)).pipeTo(new WritableStream({write(e){o?(o=!1,n(r,e)):(e=>{const t=document.createRange().createContextualFragment(e);for(;t.firstChild;)document.body.appendChild(t.firstChild)})(e)}}))}catch(e){if("AbortError"===e.name&&t.aborted)return;throw e}}(i,r,((t,r)=>{const i=!n?.method||"get"===n.method,a=t.status>=200&&t.status<300;if("opaque"===t.type){if(i)return void Si(e);throw new Error("Enhanced navigation does not support making a non-GET request to an endpoint that redirects to an external origin. Avoid enabling enhanced navigation for form posts that may perform external redirections.")}if(a&&"allow"!==t.headers.get("blazor-enhanced-nav")){if(i)return void Si(e);throw new Error("Enhanced navigation does not support making a non-GET request to a non-Blazor endpoint. Avoid enabling enhanced navigation for forms that post to a non-Blazor endpoint.")}(t.redirected||o)&&((o?"get"===o:i)?history.replaceState(null,"",t.url):t.url!==location.href&&history.pushState(null,"",t.url),e=t.url);const c=t.headers.get("blazor-enhanced-nav-redirect-location");if(c)return void location.replace(c);t.redirected||i||!a||(Le(t.url,gi)?location.href!==gi&&history.pushState(null,"",gi):s=`Cannot perform enhanced form submission that changes the URL (except via a redirection), because then back/forward would not work. Either remove this form's 'action' attribute, or change its method to 'get', or do not mark it as enhanced.\nOld URL: ${location.href}\nNew URL: ${t.url}`),gi=t.url;const l=t.headers.get("content-type");if(l?.startsWith("text/html")&&r){const e=(new DOMParser).parseFromString(r,"text/html");ei(document,e),pi.documentUpdated()}else l?.startsWith("text/")&&r?_i(r):a||r?i?Si(e):_i(`Error: ${n.method} request to ${e} returned non-HTML content of type ${l||"unspecified"}.`):_i(`Error: ${t.status} ${t.statusText}`)})),!r.aborted){const t=e.indexOf("#");if(t>=0){const n=e.substring(t+1),o=document.getElementById(n);o?.scrollIntoView()}if(fi=!1,pi.enhancedNavigationCompleted(),s)throw new Error(s)}}function _i(e){document.documentElement.textContent=e;const t=document.documentElement.style;t.fontFamily="consolas, monospace",t.whiteSpace="pre-wrap",t.padding="1rem"}function Si(e){history.replaceState(null,"",e+"?"),location.replace(e)}let Ci,Ei=!0;function Ii(e,t){Ci=t,e?.disableDomPreservation&&(Ei=!1),customElements.define("blazor-ssr-end",ki)}class ki extends HTMLElement{connectedCallback(){const e=this.parentNode;e.parentNode?.removeChild(e),e.childNodes.forEach((e=>{if(e instanceof HTMLTemplateElement){const t=e.getAttribute("blazor-component-id");if(t)"true"!==e.getAttribute("enhanced-nav")&&ui||function(e,t){const n=function(e){const t=`bl:${e}`,n=document.createNodeIterator(document,NodeFilter.SHOW_COMMENT);let o=null;for(;(o=n.nextNode())&&o.textContent!==t;);if(!o)return null;const r=`/bl:${e}`;let i=null;for(;(i=n.nextNode())&&i.textContent!==r;);return i?{startMarker:o,endMarker:i}:null}(e);if(n){const{startMarker:e,endMarker:o}=n;if(Ei)ei({startExclusive:e,endExclusive:o},t);else{const n=o.parentNode,r=new Range;for(r.setStart(e,e.textContent.length),r.setEnd(o,0),r.deleteContents();t.childNodes[0];)n.insertBefore(t.childNodes[0],o)}Ci.documentUpdated()}}(t,e.content);else switch(e.getAttribute("type")){case"redirection":const t=Fe(e.content.textContent),n="form-post"===e.getAttribute("from");"true"===e.getAttribute("enhanced")&&Me(t)?bi(t,!1,void 0,n?"post":"get"):n?t!==location.href&&location.assign(t):location.replace(t);break;case"error":_i(e.content.textContent||"Error")}}}))}}class Ti{constructor(e){var t;this._circuitInactivityTimeoutMs=e,this._rootComponentsBySsrComponentId=new Map,this._seenDescriptors=new Set,this._pendingOperationBatches={},this._nextOperationBatchId=1,this._nextSsrComponentId=1,this._didWebAssemblyFailToLoadQuickly=!1,this._isComponentRefreshPending=!1,this.initialComponents=[],t=()=>{this.rootComponentsMayRequireRefresh()},E.push(t)}onAfterRenderBatch(e){e===Un.Server&&this.circuitMayHaveNoRootComponents()}onDocumentUpdated(){this.rootComponentsMayRequireRefresh()}onEnhancedNavigationCompleted(){this.rootComponentsMayRequireRefresh()}registerComponent(e){if(this._seenDescriptors.has(e))return;"webassembly"===e.type?this.startLoadingWebAssemblyIfNotStarted():"auto"===e.type&&this.startLoadingWebAssemblyIfNotStarted(1);const t=this._nextSsrComponentId++;this._seenDescriptors.add(e),this._rootComponentsBySsrComponentId.set(t,{descriptor:e,ssrComponentId:t})}unregisterComponent(e){this._seenDescriptors.delete(e.descriptor),this._rootComponentsBySsrComponentId.delete(e.ssrComponentId),this.circuitMayHaveNoRootComponents()}async startLoadingWebAssemblyIfNotStarted(e){if(void 0!==Rr)return;Pr=!0;const t=jr(),n=await Lr;void 0!==e&&(n.maxParallelDownloads=e),function(e){if(!e.cacheBootResources)return!1;const t=Ri(e);if(!t)return!1;const n=window.localStorage.getItem(t.key);return t.value===n}(n)||this.onWebAssemblyFailedToLoadQuickly(),await t,function(e){const t=Ri(e);t&&window.localStorage.setItem(t.key,t.value)}(n),this.rootComponentsMayRequireRefresh()}onWebAssemblyFailedToLoadQuickly(){this._didWebAssemblyFailToLoadQuickly||(this._didWebAssemblyFailToLoadQuickly=!0,this.rootComponentsMayRequireRefresh())}startCircutIfNotStarted(){return void 0===Go?Qo(this):!Vo||Vo.isDisposedOrDisposing()?er():void 0}async startWebAssemblyIfNotStarted(){this.startLoadingWebAssemblyIfNotStarted(),void 0===Ar&&await Hr(this)}rootComponentsMayRequireRefresh(){this._isComponentRefreshPending||(this._isComponentRefreshPending=!0,setTimeout((()=>{this._isComponentRefreshPending=!1,this.refreshRootComponents(this._rootComponentsBySsrComponentId.values())}),0))}circuitMayHaveNoRootComponents(){if(this.rendererHasExistingOrPendingComponents(Un.Server,"server","auto"))return clearTimeout(this._circuitInactivityTimeoutId),void(this._circuitInactivityTimeoutId=void 0);void 0===this._circuitInactivityTimeoutId&&(this._circuitInactivityTimeoutId=setTimeout((()=>{this.rendererHasExistingOrPendingComponents(Un.Server,"server","auto")||(async function(){await(Vo?.dispose())}(),this._circuitInactivityTimeoutId=void 0)}),this._circuitInactivityTimeoutMs))}rendererHasComponents(e){const t=De(e);return void 0!==t&&t.getRootComponentCount()>0}rendererHasExistingOrPendingComponents(e,...t){if(this.rendererHasComponents(e))return!0;for(const{descriptor:{type:n},assignedRendererId:o}of this._rootComponentsBySsrComponentId.values()){if(o===e)return!0;if(void 0===o&&-1!==t.indexOf(n))return!0}return!1}refreshRootComponents(e){const t=new Map;for(const n of e){const e=this.determinePendingOperation(n);if(!e)continue;const o=n.assignedRendererId;if(!o)throw new Error("Descriptors must be assigned a renderer ID before getting used as root components");let r=t.get(o);r||(r=[],t.set(o,r)),r.push(e)}for(const[e,n]of t){const t={batchId:this._nextOperationBatchId++,operations:n};this._pendingOperationBatches[t.batchId]=t;const o=JSON.stringify(t);e===Un.Server?tr(o):this.updateWebAssemblyRootComponents(o)}this.circuitMayHaveNoRootComponents()}updateWebAssemblyRootComponents(e){Mr?(Ur(e),Mr=!1):function(e){if(!Ar)throw new Error("Blazor WebAssembly has not started.");if(!wt._internal.updateRootComponents)throw new Error("Blazor WebAssembly has not initialized.");Nr?wt._internal.updateRootComponents(e):async function(e){if(await Ar,!wt._internal.updateRootComponents)throw new Error("Blazor WebAssembly has not initialized.");wt._internal.updateRootComponents(e)}(e)}(e)}resolveRendererIdForDescriptor(e){switch("auto"===e.type?this.getAutoRenderMode():e.type){case"server":return this.startCircutIfNotStarted(),Un.Server;case"webassembly":return this.startWebAssemblyIfNotStarted(),Un.WebAssembly;case null:return null}}getAutoRenderMode(){return this.rendererHasExistingOrPendingComponents(Un.WebAssembly,"webassembly")?"webassembly":this.rendererHasExistingOrPendingComponents(Un.Server,"server")?"server":xr?"webassembly":this._didWebAssemblyFailToLoadQuickly?"server":null}determinePendingOperation(e){if(t=e.descriptor,document.contains(t.start)){if(void 0===e.assignedRendererId){if(fi||"loading"===document.readyState)return null;const t=this.resolveRendererIdForDescriptor(e.descriptor);return null===t?null:T(t)?(be(e.descriptor.start,!0),e.assignedRendererId=t,e.uniqueIdAtLastUpdate=e.descriptor.uniqueId,{type:"add",ssrComponentId:e.ssrComponentId,marker:Ut(e.descriptor)}):null}return T(e.assignedRendererId)?e.uniqueIdAtLastUpdate===e.descriptor.uniqueId?null:(e.uniqueIdAtLastUpdate=e.descriptor.uniqueId,{type:"update",ssrComponentId:e.ssrComponentId,marker:Ut(e.descriptor)}):null}return e.hasPendingRemoveOperation?null:void 0===e.assignedRendererId?(this.unregisterComponent(e),null):T(e.assignedRendererId)?(be(e.descriptor.start,!1),e.hasPendingRemoveOperation=!0,{type:"remove",ssrComponentId:e.ssrComponentId}):null;var t}resolveRootComponent(e){const t=this._rootComponentsBySsrComponentId.get(e);if(!t)throw new Error(`Could not resolve a root component with SSR component ID '${e}'.`);return t.descriptor}onAfterUpdateRootComponents(e){const t=this._pendingOperationBatches[e];delete this._pendingOperationBatches[e];for(const e of t.operations)switch(e.type){case"remove":{const t=this._rootComponentsBySsrComponentId.get(e.ssrComponentId);t&&this.unregisterComponent(t);break}}}}function Ri(e){const t=e.resources?.hash,n=e.mainAssemblyName;return t&&n?{key:`blazor-resource-hash:${n}`,value:t}:null}class Ai{constructor(){this._eventListeners=new Map}static create(e){const t=new Ai;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const o={...t,type:e};for(const e of n)e(o)}}let Di=null,xi=location.href,Ni=!1;function Mi(){null!==document.activeElement&&document.activeElement!==document.body||document.querySelector("[autofocus]")||Bi()}function Pi(){Le(xi,location.href)||(Ni=!0),xi=location.href}function Li(){Ni&&Bi()}function Ui(){Ni=!1}function Bi(){const e=Di?.getAttribute("selector");e&&st.focusBySelector(e)}class Oi extends HTMLElement{connectedCallback(){Di=this}disconnectedCallback(){Di===this&&(Di=null)}}let $i,Fi=!1;function Hi(e){if(Fi)throw new Error("Blazor has already started.");Fi=!0,e=e||{},e.logLevel??=bt.Error,wt._internal.hotReloadApplied=()=>{Oe()&&$e(location.href,!0)},$i=new Ti(e?.ssr?.circuitInactivityTimeoutMs??2e3);const t=Ai.create(wt),n={enhancedNavigationStarted:()=>{t.dispatchEvent("enhancednavigationstart",{})},documentUpdated:()=>{$i.onDocumentUpdated(),t.dispatchEvent("enhancedload",{})},enhancedNavigationCompleted(){$i.onEnhancedNavigationCompleted(),t.dispatchEvent("enhancednavigationend",{})}};return Zr=$i,Ii(e?.ssr,n),e?.ssr?.disableDomPreservation||(pi=n,document.addEventListener("click",yi),document.addEventListener("submit",wi),window.addEventListener("popstate",vi),Ie=mi),function(e){customElements.define("blazor-focus-on-navigate",Oi),e.addEventListener("enhancednavigationstart",Pi),e.addEventListener("enhancednavigationend",Li),document.addEventListener("focusin",Ui),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Mi,{once:!0}):Mi()}(t),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Wi.bind(null,e)):Wi(e),Promise.resolve()}function Wi(e){const t=Oo(e?.circuit||{});e.circuit=t;const n=async function(e,t){const n=Tt(document,It,"initializers");if(!n)return new zo(!1,t);const o=JSON.parse(atob(n))??[],r=new zo(!1,t);return await r.importInitializersAsync(o,[e]),r}(e,new _t(t.logLevel));!function(e){if(Ko)throw new Error("Circuit options have already been configured.");qo=async function(e){const t=await e;Ko=Oo(t)}(e)}(ji(n,t)),Fr(ji(n,e?.webAssembly||{})),function(e){const t=si(document);for(const e of t)Zr?.registerComponent(e)}(),$i.onDocumentUpdated(),async function(e){const t=await e;await t.invokeAfterStartedCallbacks(wt)}(n)}async function ji(e,t){return await e,t}wt.start=Hi,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&Hi()}(); +!function(){"use strict";var e;let t;var n,o;!function(e){const t=[],n="__jsObjectId",o="__dotNetObject",r="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,o=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in o))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=o,o=o[t]})),o instanceof Function)return o=o.bind(n),this._cachedFunctions.set(e,o),o;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h=0,d={[h]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let u,p=1;function f(e){t.push(e)}function g(e){if(e&&"object"==typeof e){d[p]=new l(e);const t={[n]:p};return p++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function m(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const o={[s]:t};try{const t=g(e);o[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return o}function y(e,n){c=e;const o=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,o}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new w(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=g,e.createJSStreamReference=m,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(u=e.JSCallResultType||(e.JSCallResultType={}));class w{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,o){const r=y(this,t),i=k(_(e,o)(...r||[]),n);return null==i?null:R(this,i)}beginInvokeJSFromDotNet(e,t,n,o,r){const i=new Promise((e=>{const o=y(this,n);e(_(t,r)(...o||[]))}));e&&i.then((t=>R(this,[e,!0,k(t,o)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,b(t)]))))}endInvokeDotNetFromJS(e,t,n){const o=t?y(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,o)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,o){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const r=R(this,o),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,r);return i?y(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,o){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const r=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[r]={resolve:e,reject:t}}));try{const i=R(this,o);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(r,e,t,n,i)}catch(e){this.completePendingCall(r,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const o=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?o.resolve(n):o.reject(n)}}function b(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function _(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=_,e.disposeJSObjectReferenceById=S;class C{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[o]:this._id}}}e.DotNetObject=C,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(o))return new C(t[o],c);if(t.hasOwnProperty(n)){const e=t[n],o=d[e];if(o)return o.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(r)){const e=t[r],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new E(n)}}return t}));class E{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function k(e,t){switch(t){case u.Default:return e;case u.JSObjectReference:return g(e);case u.JSStreamReference:return m(e);case u.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let T=0;function R(e,t){T=0,c=e;const n=JSON.stringify(t,A);return c=void 0,n}function A(e,t){if(t instanceof C)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(T,t);const e={[r]:T};return T++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(n||(n={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(o||(o={}));class r{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new r(e,t.value)}return null}}const i=new Map,s=new Map,a=[];function c(e){return i.get(e)}function l(e){const t=i.get(e);return t?.browserEventName||e}function h(e,t){e.forEach((e=>i.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),h(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),h(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...u(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),h(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),h(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),h(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>u(e)}),h(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),h(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),h(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...u(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),h(["wheel","mousewheel"],{createEventArgs:e=>{return{...u(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),h(["cancel","close","toggle"],{createEventArgs:()=>({})});const p=["date","datetime-local","month","time","week"],f=new Map;let g,m,y=0;const v={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const o="__bl-dynamic-root:"+(++y).toString();f.set(o,e);const r=await S().invokeMethodAsync("AddRootComponent",t,o),i=new _(r,m[t]);return await i.setParameters(n),i}};function w(e){const t=f.get(e);if(t)return f.delete(e),t}class b{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class _{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new b)}setParameters(e){const t={},n=Object.entries(e||{}),o=n.length;for(const[e,o]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&o?(n.setCallback(o),t[e]=n.getJSObjectReference()):t[e]=o}return S().invokeMethodAsync("SetRootComponentParameters",this._componentId,o,t)}async dispose(){if(null!==this._componentId){await S().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function S(){if(!g)throw new Error("Dynamic root components have not been enabled in this application.");return g}const C=new Map,E=[],I=new Map;function k(t,n,o,r){if(C.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);C.set(t,n),o&&r&&Object.keys(o).length>0&&function(t,n,o){if(g)throw new Error("Dynamic root components have already been enabled.");g=t,m=n;for(const[t,r]of Object.entries(o)){const o=e.findJSFunction(t,0);for(const e of r)o(e,n[e])}}(A(t),o,r),I.get(t)?.[0]?.(),function(e){for(const t of E)t(e)}(t)}function T(e){return C.has(e)}function R(e,t,n){return D(e,t.eventHandlerId,(()=>A(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function A(e){const t=C.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let D=(e,t,n)=>n();const x=B(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),N={submit:!0},M=B(["click","dblclick","mousedown","mousemove","mouseup"]);class P{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++P.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new L(this.onGlobalEvent.bind(this))}setListener(e,t,n,o){const r=this.getEventHandlerInfosForElement(e,!0),i=r.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:o};this.eventInfoStore.add(i),r.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,s.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let o=n.shift(),i=null,s=!1;const a=Object.prototype.hasOwnProperty.call(x,e);let l=!1;for(;o;){const u=o,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(M,d)&&h.disabled))){if(!s){const n=c(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(N,t.type)&&t.preventDefault(),R(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:r.fromEvent(n.renderingComponentId,t)},i)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}o=a||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new U:null}}class L{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(x,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class U{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function B(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const O=Symbol(),$=Symbol(),F=Symbol();function H(e){const{start:t,end:n}=e,o=t[F];if(o){if(o!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const r=t.parentNode;if(!r)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const i=W(r,!0),s=Y(i);t[$]=i,t[F]=e;const a=W(t);if(n){const e=Y(a),o=Array.prototype.indexOf.call(s,a)+1;let r=null;for(;r!==n;){const n=s.splice(o,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[$]=t,e.push(n),r=n}}return a}function W(e,t){if(O in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const o=W(t,!0);o[$]=e,n.push(o)}))}return e[O]=n,e}function j(e){const t=Y(e);for(;t.length;)J(e,0)}function z(e,t){const n=document.createComment("!");return q(n,e,t),n}function q(e,t,n){const o=e;let r=e;if(e instanceof Comment){const t=Y(o);if(t?.length>0){const t=oe(o),n=new Range;n.setStartBefore(e),n.setEndAfter(t),r=n.extractContents()}}const i=V(o);if(i){const e=Y(i),t=Array.prototype.indexOf.call(e,o);e.splice(t,1),delete o[$]}const s=Y(t);if(n0;)J(n,0)}const o=n;o.parentNode.removeChild(o)}function V(e){return e[$]||null}function K(e,t){return Y(e)[t]}function X(e){return e[F]||null}function G(e){const t=te(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function Y(e){return e[O]}function Q(e){const t=Y(V(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function Z(e){return O in e}function ee(e,t){const n=Y(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=oe(e.moveRangeStart)})),t.forEach((t=>{const o=document.createComment("marker");t.moveToBeforeMarker=o;const r=n[t.toSiblingIndex+1];r?r.parentNode.insertBefore(o,r):ne(o,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,o=e.moveRangeStart,r=e.moveRangeEnd;let i=o;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===r)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function te(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function ne(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=Q(t);n?n.parentNode.insertBefore(e,n):ne(e,V(t))}}}function oe(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=Q(e);if(t)return t.previousSibling;{const t=V(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:oe(t)}}function re(e){return`_bl_${e}`}const ie="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,ie)&&"string"==typeof t[ie]?function(e){const t=`[${re(e)}]`;return document.querySelector(t)}(t[ie]):t));const se="_blazorDeferredValue";function ae(e){e instanceof HTMLOptionElement?de(e):se in e&&he(e,e[se])}function ce(e){return"select-multiple"===e.type}function le(e,t){e.value=t||""}function he(e,t){e instanceof HTMLSelectElement?ce(e)?function(e,t){t||=[];for(let n=0;n{He()&&Ne(e,(e=>{Ye(e,!0,!1)}))}))}getRootComponentCount(){return this.rootComponentIds.size}attachRootComponentToLogicalElement(e,t,n){if(we(t))throw new Error(`Root component '${e}' could not be attached because its target element is already associated with a root component`);n&&(t=z(t,Y(t).length)),ve(t,!0),this.attachComponentToElement(e,t),this.rootComponentIds.add(e),fe.add(t)}updateComponent(e,t,n,o){const r=this.childComponentLocations[t];if(!r)throw new Error(`No element is currently associated with component ${t}`);fe.delete(r)&&(j(r),r instanceof Comment&&(r.textContent="!"));const i=te(r)?.getRootNode(),s=i&&i.activeElement;this.applyEdits(e,t,r,0,n,o),s instanceof HTMLElement&&i&&i.activeElement!==s&&s.focus()}disposeComponent(e){if(this.rootComponentIds.delete(e)){const t=this.childComponentLocations[e];ve(t,!1),!0===t[me]?fe.add(t):j(t)}delete this.childComponentLocations[e]}disposeEventHandler(e){this.eventDelegator.removeListener(e)}attachComponentToElement(e,t){this.childComponentLocations[e]=t}applyEdits(e,t,o,r,i,s){let a,c=0,l=r;const h=e.arrayBuilderSegmentReader,d=e.editReader,u=e.frameReader,p=h.values(i),f=h.offset(i),g=f+h.count(i);for(let i=f;i{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ue.content));var s;let a=0;for(;i.firstChild;)q(i.firstChild,r,a++)}applyAttribute(e,t,n,o){const r=e.frameReader,i=r.attributeName(o),s=r.attributeEventHandlerId(o);if(s){const e=Se(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=r.attributeValue(o);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,o,r,i,s){const a=o;for(let a=i;a{nt(t,e)})},enableNavigationInterception:function(e){if(void 0!==Ee&&Ee!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");Ee=e},setHasLocationChangingListeners:function(e,t){const n=Je.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Ke&&e===qe&&(Ke(t),Ke=null)},navigateTo:function(e,t){Ge(e,t,!0)},refresh:function(e){!e&&Oe()?$e(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Be};function Ge(e,t,n=!1){const o=Fe(e);!t.forceLoad&&Me(o)?it()?Ye(o,!1,t.replaceHistoryEntry,t.historyEntryState,n):$e(o,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function Ye(e,t,n,o=void 0,r=!1){if(et(),Pe(e))return Qe(e,n,o),void Ue(e);const i=rt();(r||!i?.hasLocationChangingEventListeners||await tt(e,o,t,i))&&(Re=!0,Qe(e,n,o),await nt(t))}function Qe(e,t,n=void 0){t?history.replaceState({userState:n,_index:ze},"",e):(ze++,history.pushState({userState:n,_index:ze},"",e))}function Ze(e){return new Promise((t=>{const n=Ve;Ve=()=>{Ve=n,t()},history.go(e)}))}function et(){Ke&&(Ke(!1),Ke=null)}function tt(e,t,n,o){return new Promise((r=>{et(),qe++,Ke=r,o.locationChanging(qe,e,t,n)}))}async function nt(e,t){const n=t??location.href;await Promise.all(Array.from(Je,(async([t,o])=>{T(t)&&await o.locationChanged(n,history.state?.userState,e)})))}async function ot(e){Ve&&it()&&await Ve(e),ze=history.state?._index??0}function rt(){const e=We();if(void 0!==e)return Je.get(e)}function it(){return He()||!Oe()}const st={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},at={init:function(e,t,n,o=50){const r=lt(t);(r||document.documentElement).style.overflowAnchor="none";const i=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(o){o.forEach((o=>{if(!o.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const r=i.getBoundingClientRect().height,s=o.rootBounds?.height;o.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",o.intersectionRect.top-o.boundingClientRect.top,r,s):o.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",o.boundingClientRect.bottom-o.intersectionRect.bottom,r,s)}))}),{root:r,rootMargin:`${o}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=ht(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,o)=>{u(e.parentElement)&&(o.disconnect(),e.style.display="table-row",o.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=ht(e),o=t[n];o&&(o.intersectionObserver.disconnect(),o.mutationObserverBefore.disconnect(),o.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},ct=Symbol();function lt(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:lt(e.parentElement):null}function ht(e){const t=e._callDispatcher,n=e._id;return t[ct]??={},{observersByDotNetObjectId:t[ct],id:n}}const dt={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const o=e[n],r=o.previousSibling;r instanceof Comment&&null!==V(r)||(null===t&&(t=o.textContent),o.parentNode?.removeChild(o))}return t}},ut={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,o,r){const i=pt(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,o/s.width),i=Math.min(1,r/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return pt(e,t).blob}};function pt(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const ft=new Set,gt={enableNavigationPrompt:function(e){0===ft.size&&window.addEventListener("beforeunload",mt),ft.add(e)},disableNavigationPrompt:function(e){ft.delete(e),0===ft.size&&window.removeEventListener("beforeunload",mt)}};function mt(e){e.preventDefault(),e.returnValue=!0}async function yt(e,t,n){return e instanceof Blob?await async function(e,t,n){const o=e.slice(t,t+n),r=await o.arrayBuffer();return new Uint8Array(r)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}const vt=new Map,wt={navigateTo:function(e,t,n=!1){Ge(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(i.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=s.get(t.browserEventName);n?n.push(e):s.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}i.set(e,t)},rootComponents:v,runtime:{},_internal:{navigationManager:Xe,domWrapper:st,Virtualize:at,PageTitle:dt,InputFile:ut,NavigationLock:gt,getJSDataStreamChunk:yt,attachWebRendererInterop:k}};var bt;window.Blazor=wt,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(bt||(bt={})),class e{static{this.instance=new e}log(e,t){}};let _t=class{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${bt[e]}: ${t}`;switch(e){case bt.Critical:case bt.Error:console.error(n);break;case bt.Warning:console.warn(n);break;case bt.Information:console.info(n);break;default:console.log(n)}}}};function St(e,t){switch(t){case"webassembly":return Rt(e,"webassembly");case"server":return function(e){return Rt(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(e);case"auto":return Rt(e,"auto")}}const Ct=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/,Et=/^\s*Blazor-WebAssembly-Component-State:(?[a-zA-Z0-9+/=]+)$/,It=/^\s*Blazor-Web-Initializers:(?[a-zA-Z0-9+/=]+)$/;function kt(e){return Tt(e,Ct)}function Tt(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",r=t.exec(o),i=r&&r.groups&&r.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function Dt(e,t){const n=e.currentElement;var o,r,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=At.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:o}=e;if(o){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=At.exec(e.textContent),r=t&&t[1];if(r)return Pt(r,o),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return r=n,i=c,Mt(o=s),{...o,uniqueId:xt++,start:r,end:i};case"server":return function(e,t,n){return Nt(e),{...e,uniqueId:xt++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return Nt(e),Mt(e),{...e,uniqueId:xt++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let xt=0;function Nt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function Mt(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function Pt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const o=n.prerenderId;if(!o)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(o!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${o}'`)}class Lt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function en(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function tn(e,t,n,o,r,i){const s={},[a,c]=rn();s[a]=c,e.log(Kt.Trace,`(${t} transport) sending data. ${Zt(r,i.logMessageContent)}.`);const l=en(r)?"arraybuffer":"text",h=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:l,timeout:i.timeout,withCredentials:i.withCredentials});e.log(Kt.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class nn{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class on{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${Kt[e]}: ${t}`;switch(e){case Kt.Critical:case Kt.Error:this.out.error(n);break;case Kt.Warning:this.out.warn(n);break;case Kt.Information:this.out.info(n);break;default:this.out.log(n)}}}}function rn(){return["X-SignalR-User-Agent",sn(Gt,"","Browser",void 0)]}function sn(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&""!==t?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function an(e){return e.stack?e.stack:e.message?e.message:`${e}`}class cn extends Vt{constructor(e){if(super(),this._logger=e,"undefined"==typeof fetch){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._jar=new(e("tough-cookie").CookieJar),"undefined"==typeof fetch?this._fetchType=e("node-fetch"):this._fetchType=fetch,this._fetchType=e("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("could not find global")}());if("undefined"==typeof AbortController){const e="function"==typeof __webpack_require__?__non_webpack_require__:require;this._abortControllerType=e("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Ft;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new Ft});let o,r=null;if(e.timeout){const o=e.timeout;r=setTimeout((()=>{t.abort(),this._logger.log(Kt.Warning,"Timeout from HTTP request."),n=new $t}),o)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},en(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(Kt.Warning,`Error from HTTP request. ${e}.`),e}finally{r&&clearTimeout(r),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const e=await ln(o,"text");throw new Ot(e||o.statusText,o.status)}const i=ln(o,e.responseType),s=await i;return new Jt(o.status,o.statusText,s)}getCookieString(e){return""}}function ln(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class hn extends Vt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ft):e.method?e.url?new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=void 0===e.withCredentials||e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(en(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const r=e.headers;r&&Object.keys(r).forEach((e=>{o.setRequestHeader(e,r[e])})),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new Ft)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new Jt(o.status,o.statusText,o.response||o.responseText)):n(new Ot(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(Kt.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new Ot(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(Kt.Warning,"Timeout from HTTP request."),n(new $t)},o.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class dn extends Vt{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new cn(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new hn(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ft):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class un{static write(e){return`${e}${un.RecordSeparator}`}static parse(e){if(e[e.length-1]!==un.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(un.RecordSeparator);return t.pop(),t}}un.RecordSeparatorCode=30,un.RecordSeparator=String.fromCharCode(un.RecordSeparatorCode);class pn{writeHandshakeRequest(e){return un.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(en(e)){const o=new Uint8Array(e),r=o.indexOf(un.RecordSeparatorCode);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(o.slice(0,i))),n=o.byteLength>i?o.slice(i).buffer:null}else{const o=e,r=o.indexOf(un.RecordSeparator);if(-1===r)throw new Error("Message is incomplete.");const i=r+1;t=o.substring(0,i),n=o.length>i?o.substring(i):null}const o=un.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}}var fn,gn;!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(fn||(fn={}));class mn{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new nn(this,e)}}class yn{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},o=()=>{};en(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,o=n}))),this._messages.push(new vn(t,this._totalMessageCount,e,o))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:fn.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case fn.Invocation:case fn.StreamItem:case fn.Completion:case fn.StreamInvocation:case fn.CancelInvocation:return!0;case fn.Close:case fn.Sequence:case fn.Ping:case fn.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:fn.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class vn{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(gn||(gn={}));class wn{static create(e,t,n,o,r,i,s){return new wn(e,t,n,o,r,i,s)}constructor(e,t,n,o,r,i,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(Kt.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Yt.isRequired(e,"connection"),Yt.isRequired(t,"logger"),Yt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=r?r:3e4,this.keepAliveIntervalInMilliseconds=null!=i?i:15e3,this._statefulReconnectBufferSize=null!=s?s:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new pn,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=gn.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:fn.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==gn.Disconnected&&this._connectionState!==gn.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==gn.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=gn.Connecting,this._logger.log(Kt.Debug,"Starting HubConnection.");try{await this._startInternal(),Qt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=gn.Connected,this._connectionStarted=!0,this._logger.log(Kt.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=gn.Disconnected,this._logger.log(Kt.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(Kt.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(Kt.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new yn(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(Kt.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===gn.Disconnected)return this._logger.log(Kt.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===gn.Disconnecting)return this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=gn.Disconnecting,this._logger.log(Kt.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(Kt.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===gn.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Ft("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o);let i;const s=new mn;return s.cancelCallback=()=>{const e=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],i.then((()=>this._sendWithProtocol(e)))},this._callbacks[r.invocationId]=(e,t)=>{t?s.error(t):e&&(e.type===fn.Completion?e.error?s.error(new Error(e.error)):s.complete():s.next(e.item))},i=this._sendWithProtocol(r).catch((e=>{s.error(e),delete this._callbacks[r.invocationId]})),this._launchStreams(n,i),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){const[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise(((e,t)=>{this._callbacks[r.invocationId]=(n,o)=>{o?t(o):n&&(n.type===fn.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const o=this._sendWithProtocol(r).catch((e=>{t(e),delete this._callbacks[r.invocationId]}));this._launchStreams(n,o)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const o=n.indexOf(t);-1!==o&&(n.splice(o,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case fn.Invocation:this._invokeClientMethod(e).catch((e=>{this._logger.log(Kt.Error,`Invoke client method threw error: ${an(e)}`)}));break;case fn.StreamItem:case fn.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===fn.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(Kt.Error,`Stream callback threw error: ${an(e)}`)}}break}case fn.Ping:break;case fn.Close:{this._logger.log(Kt.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case fn.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case fn.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(Kt.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(Kt.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(Kt.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(Kt.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===gn.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(Kt.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(Kt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const o=n.slice(),r=!!e.invocationId;let i,s,a;for(const n of o)try{const o=i;i=await n.apply(this,e.arguments),r&&i&&o&&(this._logger.log(Kt.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),s=void 0}catch(e){s=e,this._logger.log(Kt.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):r?(s?a=this._createCompletionMessage(e.invocationId,`${s}`,null):void 0!==i?a=this._createCompletionMessage(e.invocationId,null,i):(this._logger.log(Kt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):i&&this._logger.log(Kt.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(Kt.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Ft("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===gn.Disconnecting?this._completeClose(e):this._connectionState===gn.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===gn.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=gn.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),Qt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Kt.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,o=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(null===r)return this._logger.log(Kt.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=gn.Reconnecting,e?this._logger.log(Kt.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(Kt.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(Kt.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==gn.Reconnecting)return void this._logger.log(Kt.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==r;){if(this._logger.log(Kt.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,r)})),this._reconnectDelayHandle=void 0,this._connectionState!==gn.Reconnecting)return void this._logger.log(Kt.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=gn.Connected,this._logger.log(Kt.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(Kt.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(Kt.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==gn.Reconnecting)return this._logger.log(Kt.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===gn.Disconnecting&&this._completeClose());o=e instanceof Error?e:new Error(e.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(Kt.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(Kt.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const o=t[n];try{o(null,e)}catch(t){this._logger.log(Kt.Error,`Stream 'error' callback called with '${e}' threw error: ${an(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return 0!==o.length?{target:e,arguments:t,streamIds:o,type:fn.Invocation}:{target:e,arguments:t,type:fn.Invocation};{const n=this._invocationId;return this._invocationId++,0!==o.length?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:fn.Invocation}:{target:e,arguments:t,invocationId:n.toString(),type:fn.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,o))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let o=0;o0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Sn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Sn.Authorization]&&delete e.headers[Sn.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var En,In;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(En||(En={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(In||(In={}));let kn=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Tn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new kn,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._url=e,this._logger.log(Kt.Trace,"(LongPolling transport) Connecting."),t===In.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=rn(),r={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===In.Binary&&(i.responseType="arraybuffer");const s=`${e}&_=${Date.now()}`;this._logger.log(Kt.Trace,`(LongPolling transport) polling: ${s}.`);const a=await this._httpClient.get(s,i);200!==a.statusCode?(this._logger.log(Kt.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Ot(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(Kt.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,t);204===o.statusCode?(this._logger.log(Kt.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==o.statusCode?(this._logger.log(Kt.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new Ot(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(Kt.Trace,`(LongPolling transport) data received. ${Zt(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(Kt.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof $t?this._logger.log(Kt.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(Kt.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(Kt.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?tn(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(Kt.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(Kt.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=rn();e[t]=n;const o={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let r;try{await this._httpClient.delete(this._url,o)}catch(e){r=e}r?r instanceof Ot&&(404===r.statusCode?this._logger.log(Kt.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(Kt.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(Kt.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(Kt.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(Kt.Trace,e),this.onclose(this._closeError)}}}class Rn{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(e,t){return Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._logger.log(Kt.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,o)=>{let r,i=!1;if(t===In.Text){if(Qt.isBrowser||Qt.isWebWorker)r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[o,i]=rn();n[o]=i,r=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{r.onmessage=e=>{if(this.onreceive)try{this._logger.log(Kt.Trace,`(SSE transport) data received. ${Zt(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},r.onerror=e=>{i?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},r.onopen=()=>{this._logger.log(Kt.Information,`SSE connected to ${this._url}`),this._eventSource=r,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?tn(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class An{constructor(e,t,n,o,r,i){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){let n;return Yt.isRequired(e,"url"),Yt.isRequired(t,"transferFormat"),Yt.isIn(t,In,"transferFormat"),this._logger.log(Kt.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((o,r)=>{let i;e=e.replace(/^http/,"ws");const s=this._httpClient.getCookieString(e);let a=!1;if(Qt.isReactNative){const t={},[o,r]=rn();t[o]=r,n&&(t[Sn.Authorization]=`Bearer ${n}`),s&&(t[Sn.Cookie]=s),i=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(e)),t===In.Binary&&(i.binaryType="arraybuffer"),i.onopen=t=>{this._logger.log(Kt.Information,`WebSocket connected to ${e}.`),this._webSocket=i,a=!0,o()},i.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(Kt.Information,`(WebSockets transport) ${t}.`)},i.onmessage=e=>{if(this._logger.log(Kt.Trace,`(WebSockets transport) data received. ${Zt(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},i.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(Kt.Trace,`(WebSockets transport) sending data. ${Zt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(Kt.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class Dn{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Yt.isRequired(e,"url"),this._logger=function(e){return void 0===e?new on(Kt.Information):null===e?Xt.instance:void 0!==e.log?e:new on(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new Cn(t.httpClient||new dn(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||In.Binary,Yt.isIn(e,In,"transferFormat"),this._logger.log(Kt.Debug,`Starting connection with transfer format '${In[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(Kt.Error,e),await this._stopPromise,Promise.reject(new Ft(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(Kt.Error,e),Promise.reject(new Ft(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new xn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(Kt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(Kt.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(Kt.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==En.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(En.WebSockets),await this._startTransport(t,e)}else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new Ft("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<100);if(100===o&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof Tn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(Kt.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(Kt.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,o]=rn();t[n]=o;const r=this._resolveNegotiateUrl(e);this._logger.log(Kt.Debug,`Sending negotiation request: ${r}.`);try{const e=await this._httpClient.post(r,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new zt("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof Ot&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(Kt.Error,t),Promise.reject(new zt(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,o){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(Kt.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(r,o),void(this.connectionId=n.connectionId);const i=[],s=n.availableTransports||[];let a=n;for(const n of s){const s=this._resolveTransportOrError(n,t,o,!0===(null==a?void 0:a.useStatefulReconnect));if(s instanceof Error)i.push(`${n.transport} failed:`),i.push(s);else if(this._isITransport(s)){if(this.transport=s,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}r=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(r,o),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(Kt.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,i.push(new jt(`${n.transport} failed: ${e}`,En[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(Kt.Debug,e),Promise.reject(new Ft(e))}}}}return i.length>0?Promise.reject(new qt(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case En.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new An(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case En.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Rn(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case En.LongPolling:return new Tn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{o=!0}o&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){const r=En[e.transport];if(null==r)return this._logger.log(Kt.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function(e,t){return!e||!!(t&e)}(t,r))return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it was disabled by the client.`),new Wt(`'${En[r]}' is disabled by the client.`,r);if(!(e.transferFormats.map((e=>In[e])).indexOf(n)>=0))return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it does not support the requested transfer format '${In[n]}'.`),new Error(`'${En[r]}' does not support ${In[n]}.`);if(r===En.WebSockets&&!this._options.WebSocket||r===En.ServerSentEvents&&!this._options.EventSource)return this._logger.log(Kt.Debug,`Skipping transport '${En[r]}' because it is not supported in your environment.'`),new Ht(`'${En[r]}' is not supported in your environment.`,r);this._logger.log(Kt.Debug,`Selecting transport '${En[r]}'.`);try{return this.features.reconnect=r===En.WebSockets?o:void 0,this._constructTransport(r)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(Kt.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(Kt.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(Kt.Error,`Connection disconnected with error '${e}'.`):this._logger.log(Kt.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(Kt.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(Kt.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(Kt.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!Qt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(Kt.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class xn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new Nn,this._transportResult=new Nn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new Nn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Nn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):xn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let o=0;for(const t of e)n.set(new Uint8Array(t),o),o+=t.byteLength;return n.buffer}}class Nn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class Mn{constructor(){this.name="json",this.version=2,this.transferFormat=In.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=Xt.instance);const n=un.parse(e),o=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case fn.Invocation:this._isInvocationMessage(n);break;case fn.StreamItem:this._isStreamItemMessage(n);break;case fn.Completion:this._isCompletionMessage(n);break;case fn.Ping:case fn.Close:break;case fn.Ack:this._isAckMessage(n);break;case fn.Sequence:this._isSequenceMessage(n);break;default:t.log(Kt.Information,"Unknown message type '"+n.type+"' ignored.");continue}o.push(n)}return o}writeMessage(e){return un.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const Pn={trace:Kt.Trace,debug:Kt.Debug,info:Kt.Information,information:Kt.Information,warn:Kt.Warning,warning:Kt.Warning,error:Kt.Error,critical:Kt.Critical,none:Kt.None};class Ln{configureLogging(e){if(Yt.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=Pn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new on(t)}else this.logger=new on(e);return this}withUrl(e,t){return Yt.isRequired(e,"url"),Yt.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return Yt.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new _n(e):this.reconnectPolicy=e:this.reconnectPolicy=new _n,this}withServerTimeout(e){return Yt.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return Yt.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new Dn(this.url,e);return wn.create(t,this.logger||Xt.instance,this.protocol||new Mn,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var Un;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(Un||(Un={}));var Bn,On,$n,Fn=4294967295;function Hn(e,t,n){var o=Math.floor(n/4294967296),r=n;e.setUint32(t,o),e.setUint32(t+4,r)}function Wn(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var jn=("undefined"==typeof process||"never"!==(null===(Bn=null===process||void 0===process?void 0:process.env)||void 0===Bn?void 0:Bn.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function zn(e){for(var t=e.length,n=0,o=0;o=55296&&r<=56319&&o65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h)}else i.push(a);else i.push(a);i.length>=4096&&(s+=String.fromCharCode.apply(String,i),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,i)),s}var Xn,Gn=jn?new TextDecoder:null,Yn=jn?"undefined"!=typeof process&&"force"!==(null===($n=null===process||void 0===process?void 0:process.env)||void 0===$n?void 0:$n.TEXT_DECODER)?200:0:Fn,Qn=function(e,t){this.type=e,this.data=t},Zn=(Xn=function(e,t){return Xn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Xn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Xn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),eo=function(e){function t(n){var o=e.call(this,n)||this,r=Object.create(t.prototype);return Object.setPrototypeOf(o,r),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:t.name}),o}return Zn(t,e),t}(Error),to={type:-1,encode:function(e){var t,n,o,r;return e instanceof Date?function(e){var t,n=e.sec,o=e.nsec;if(n>=0&&o>=0&&n<=17179869183){if(0===o&&n<=4294967295){var r=new Uint8Array(4);return(t=new DataView(r.buffer)).setUint32(0,n),r}var i=n/4294967296,s=4294967295&n;return r=new Uint8Array(8),(t=new DataView(r.buffer)).setUint32(0,o<<2|3&i),t.setUint32(4,s),r}return r=new Uint8Array(12),(t=new DataView(r.buffer)).setUint32(0,o),Hn(t,4,n),r}((o=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(r=Math.floor(o/1e9)),nsec:o-1e9*r})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:Wn(t,4),nsec:t.getUint32(0)};default:throw new eo("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},no=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(to)}return e.prototype.register=function(e){var t=e.type,n=e.encode,o=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=o;else{var r=1+t;this.builtInEncoders[r]=n,this.builtInDecoders[r]=o}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>Jn){var t=zn(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),Vn(e,this.bytes,this.pos),this.pos+=t}else t=zn(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var o=e.length,r=n,i=0;i=55296&&s<=56319&&i>18&7|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128):(t[r++]=s>>12&15|224,t[r++]=s>>6&63|128)}else t[r++]=s>>6&31|192;t[r++]=63&s|128}else t[r++]=s}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=oo(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var o=0,r=e;o0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var o=0,r=this.caches[n-1];o=this.maxLengthPerKey?n[Math.random()*n.length|0]=o:n.push(o)},e.prototype.decode=function(e,t,n){var o=this.find(e,t,n);if(null!=o)return this.hit++,o;this.miss++;var r=Kn(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,r),r},e}(),ao=function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return ao(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,o,r,i,s,a;return i=this,a=function(){var i,s,a,c,l,h,d,u;return ao(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=co(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof po))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),o={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(r=t.return)?[4,r.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(o)throw o.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat(io(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function o(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,o)}r((a=a.apply(i,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,s=function(){var n,o,r,i,s,a,c,l,h;return ao(this,(function(d){switch(d.label){case 0:n=t,o=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),r=co(e),d.label=2;case 2:return[4,lo(r.next())];case 3:if((i=d.sent()).done)return[3,12];if(s=i.value,t&&0===o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(o=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,lo(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--o?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof po))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),i&&!i.done&&(h=r.return)?[4,lo(h.call(r))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,o||[]),a=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(e){s[e]&&(i[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=s[e](t)).value instanceof lo?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(o=e-128)){this.pushMapState(o),this.complete();continue e}t={}}else if(e<160){if(0!=(o=e-144)){this.pushArrayState(o),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(o=this.readU16())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(221===e){if(0!==(o=this.readU32())){this.pushArrayState(o),this.complete();continue e}t=[]}else if(222===e){if(0!==(o=this.readU16())){this.pushMapState(o),this.complete();continue e}t={}}else if(223===e){if(0!==(o=this.readU32())){this.pushMapState(o),this.complete();continue e}t={}}else if(196===e){var o=this.lookU8();t=this.decodeBinary(o,1)}else if(197===e)o=this.lookU16(),t=this.decodeBinary(o,2);else if(198===e)o=this.lookU32(),t=this.decodeBinary(o,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)o=this.lookU8(),t=this.decodeExtension(o,1);else if(200===e)o=this.lookU16(),t=this.decodeExtension(o,2);else{if(201!==e)throw new eo("Unrecognized type byte: ".concat(io(e)));o=this.lookU32(),t=this.decodeExtension(o,4)}this.complete();for(var r=this.stack;r.length>0;){var i=r[r.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;r.pop(),t=i.array}else{if(1===i.type){if("string"!=(s=typeof t)&&"number"!==s)throw new eo("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new eo("The key __proto__ is not allowed");i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}r.pop(),t=i.map}}return t}var s},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new eo("Unrecognized array type byte: ".concat(io(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new eo("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new eo("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new eo("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthYn?function(e,t,n){var o=e.subarray(t,t+n);return Gn.decode(o)}(this.bytes,r,e):Kn(this.bytes,r,e),this.pos+=t+e,o},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new eo("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw fo;var n=this.pos+t,o=this.bytes.subarray(n,n+e);return this.pos+=t+e,o},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new eo("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),o=this.decodeBinary(e,t+1);return this.extensionCodec.decode(o,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=Wn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class yo{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer}static parse(e){const t=[],n=new Uint8Array(e),o=[0,7,14,21,28];for(let r=0;r7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=r+s+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(r+s,r+s+a):n.subarray(r+s,r+s+a)),r=r+s+a}return t}}const vo=new Uint8Array([145,fn.Ping]);class wo{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=In.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new ro(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new mo(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=Xt.instance);const o=yo.parse(e),r=[];for(const e of o){const n=this._parseMessage(e,t);n&&r.push(n)}return r}writeMessage(e){switch(e.type){case fn.Invocation:return this._writeInvocation(e);case fn.StreamInvocation:return this._writeStreamInvocation(e);case fn.StreamItem:return this._writeStreamItem(e);case fn.Completion:return this._writeCompletion(e);case fn.Ping:return yo.write(vo);case fn.CancelInvocation:return this._writeCancelInvocation(e);case fn.Close:return this._writeClose();case fn.Ack:return this._writeAck(e);case fn.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const o=n[0];switch(o){case fn.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case fn.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case fn.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case fn.Ping:return this._createPingMessage(n);case fn.Close:return this._createCloseMessage(n);case fn.Ack:return this._createAckMessage(n);case fn.Sequence:return this._createSequenceMessage(n);default:return t.log(Kt.Information,"Unknown message type '"+o+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:fn.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:fn.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:fn.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:fn.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:fn.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let o,r;switch(n){case this._errorResult:o=t[4];break;case this._nonVoidResult:r=t[4]}return{error:o,headers:e,invocationId:t[2],result:r,type:fn.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:fn.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:fn.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([fn.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([fn.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),yo.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([fn.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([fn.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),yo.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([fn.StreamItem,e.headers||{},e.invocationId,e.item]);return yo.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([fn.Completion,e.headers||{},e.invocationId,t,e.result])}return yo.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([fn.CancelInvocation,e.headers||{},e.invocationId]);return yo.write(t.slice())}_writeClose(){const e=this._encoder.encode([fn.Close,null]);return yo.write(e.slice())}_writeAck(e){const t=this._encoder.encode([fn.Ack,e.sequenceId]);return yo.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([fn.Sequence,e.sequenceId]);return yo.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const bo="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,_o=bo?bo.decode.bind(bo):function(e){let t=0;const n=e.length,o=[],r=[];for(;t65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r)}}else o.push(n);o.length>1024&&(r.push(String.fromCharCode.apply(null,o)),o.length=0)}return r.push(String.fromCharCode.apply(null,o)),r.join("")},So=Math.pow(2,32),Co=Math.pow(2,21)-1;function Eo(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Io(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function ko(e,t){const n=Io(e,t+4);if(n>Co)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*So+Io(e,t)}class To{constructor(e){this.batchData=e;const t=new xo(e);this.arrayRangeReader=new No(e),this.arrayBuilderSegmentReader=new Mo(e),this.diffReader=new Ro(e),this.editReader=new Ao(e,t),this.frameReader=new Do(e,t)}updatedComponents(){return Eo(this.batchData,this.batchData.length-20)}referenceFrames(){return Eo(this.batchData,this.batchData.length-16)}disposedComponentIds(){return Eo(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return Eo(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return Eo(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return Eo(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return ko(this.batchData,n)}}class Ro{constructor(e){this.batchDataUint8=e}componentId(e){return Eo(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class Ao{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return Eo(this.batchDataUint8,e)}siblingIndex(e){return Eo(this.batchDataUint8,e+4)}newTreeIndex(e){return Eo(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return Eo(this.batchDataUint8,e+8)}removedAttributeName(e){const t=Eo(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class Do{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return Eo(this.batchDataUint8,e)}subtreeLength(e){return Eo(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return Eo(this.batchDataUint8,e+8)}elementName(e){const t=Eo(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=Eo(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=Eo(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return ko(this.batchDataUint8,e+12)}}class xo{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=Eo(e,e.length-4)}readString(e){if(-1===e)return null;{const n=Eo(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){let n=0,o=0;for(let r=0;r<4;r++){const i=e[t+r];if(n|=(127&i)<this.nextBatchId)return this.fatalError?(this.logger.log(bt.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(bt.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(bt.Debug,`Applying batch ${e}.`),xe(Un.Server,new To(t)),await this.completeBatch(n,e)}catch(t){throw this.fatalError=t.toString(),this.logger.log(bt.Error,`There was an error applying batch ${e}.`),n.send("OnRenderCompleted",e,t.toString()),t}}getLastBatchid(){return this.nextBatchId-1}async completeBatch(e,t){try{await e.send("OnRenderCompleted",t,null)}catch{this.logger.log(bt.Warning,`Failed to deliver completion notification for render '${t}'.`)}}}let Lo=!1;function Uo(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),Lo||(Lo=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class Bo{constructor(t,n,o,r){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=o,this._logger=r,this._renderQueue=new Po(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){return this._firstUpdate?(this._firstUpdate=!1,this._connection?.send("UpdateRootComponents",e,this._applicationState)):this._connection?.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==gn.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>Ut(e))));if(this._circuitId=await this._connection.invoke("StartCircuit",Xe.getBaseURI(),Xe.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){const e=new wo;e.name="blazorpack";const t=(new Ln).withUrl("_blazor").withHubProtocol(e);this._options.configureSignalR(t);const n=t.build();n.on("JS.AttachComponent",((e,t)=>Ae(Un.Server,this.resolveElement(t),e,!1))),n.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),n.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),n.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),n.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{n.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),n.on("JS.RenderBatch",(async(e,t)=>{this._logger.log(Kt.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),this._componentManager.onAfterRenderBatch?.(Un.Server)})),n.on("JS.EndUpdateRootComponents",(e=>{this._componentManager.onAfterUpdateRootComponents?.(e)})),n.on("JS.EndLocationChanging",wt._internal.navigationManager.endLocationChanging),n.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=C.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return C.delete(e),t}(Un.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),n.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),Uo()}));try{await n.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;Uo(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===En.WebSockets))?this._logger.log(Kt.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===En.WebSockets))?this._logger.log(Kt.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===En.LongPolling))&&this._logger.log(Kt.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return n.connection?.features?.inherentKeepAlive&&this._logger.log(Kt.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),n}async disconnect(){await(this._connection?.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===gn.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(k(Un.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,o,r){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,o||0,r)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,o){return this._connection.send("OnLocationChanging",e,t,n,o)}sendJsDataStream(e,t,n){return function(e,t,n,o){setTimeout((async()=>{let r=5,i=(new Date).valueOf();try{const s=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),o=t-i;i=t,r=Math.max(1,Math.round(500/Math.max(1,o)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=w(e);if(t)return W(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return H(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(Kt.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,this._connection?.stop();const e=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:e});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}function Oo(e){const t={...$o,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...$o.reconnectionOptions,...e.reconnectionOptions}),t}const $o={configureSignalR:e=>{},logLevel:bt.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:30,retryIntervalMilliseconds:function(e,t){return t&&e>=t?null:e<10?0:e<20?5e3:3e4},dialogId:"components-reconnect-modal"}};class Fo{static{this.ReconnectOverlayClassName="components-reconnect-overlay"}static{this.ReconnectDialogClassName="components-reconnect-dialog"}static{this.ReconnectVisibleClassName="components-reconnect-visible"}static{this.RejoiningAnimationClassName="components-rejoining-animation"}static{this.AnimationRippleCount=2}constructor(e,t,n){this.document=t,this.logger=n,this.style=this.document.createElement("style"),this.style.innerHTML=Fo.Css,this.overlay=this.document.createElement("div"),this.overlay.className=Fo.ReconnectOverlayClassName,this.host=this.document.createElement("div"),this.host.id=e;const o=this.host.attachShadow({mode:"open"});this.dialog=t.createElement("div"),this.dialog.className=Fo.ReconnectDialogClassName,o.appendChild(this.style),o.appendChild(this.overlay),this.rejoiningAnimation=t.createElement("div"),this.rejoiningAnimation.className=Fo.RejoiningAnimationClassName;for(let e=0;e{"visible"===this.document.visibilityState&&this.retry()}}show(){this.document.contains(this.host)||this.document.body.appendChild(this.host),this.reloadButton.style.display="none",this.rejoiningAnimation.style.display="block",this.status.innerHTML="Rejoining the server...",this.host.style.display="block",this.overlay.classList.add(Fo.ReconnectVisibleClassName)}update(e,t){if(1===e||0===t)this.status.innerHTML="Rejoining the server...";else{const e=1===t?"second":"seconds";this.status.innerHTML=`Rejoin failed... trying again in ${t} ${e}`}}hide(){this.host.style.display="none",this.overlay.classList.remove(Fo.ReconnectVisibleClassName)}failed(){this.reloadButton.style.display="block",this.rejoiningAnimation.style.display="none",this.status.innerHTML="Failed to rejoin.
Please retry or reload the page.",this.document.addEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible)}rejected(){location.reload()}async retry(){this.document.removeEventListener("visibilitychange",this.retryWhenDocumentBecomesVisible),this.show();try{await wt.reconnect()||this.rejected()}catch(e){this.logger.log(bt.Error,e),this.failed()}}static{this.Css=`\n .${this.ReconnectOverlayClassName} {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n display: none;\n overflow: hidden;\n animation: components-reconnect-fade-in;\n }\n\n .${this.ReconnectOverlayClassName}.${this.ReconnectVisibleClassName} {\n display: block;\n }\n\n .${this.ReconnectOverlayClassName}::before {\n content: '';\n background-color: rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: components-reconnect-fadeInOpacity 0.5s ease-in-out;\n opacity: 1;\n }\n\n .${this.ReconnectOverlayClassName} p {\n margin: 0;\n text-align: center;\n }\n\n .${this.ReconnectOverlayClassName} button {\n border: 0;\n background-color: #6b9ed2;\n color: white;\n padding: 4px 24px;\n border-radius: 4px;\n }\n\n .${this.ReconnectOverlayClassName} button:hover {\n background-color: #3b6ea2;\n }\n\n .${this.ReconnectOverlayClassName} button:active {\n background-color: #6b9ed2;\n }\n\n .${this.ReconnectDialogClassName} {\n position: relative;\n background-color: white;\n width: 20rem;\n margin: 20vh auto;\n padding: 2rem;\n border-radius: 0.5rem;\n box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n opacity: 0;\n animation: components-reconnect-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-fadeInOpacity 0.5s ease-out 0.3s;\n animation-fill-mode: forwards;\n z-index: 10001;\n }\n\n .${this.RejoiningAnimationClassName} {\n display: block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n\n .${this.RejoiningAnimationClassName} div {\n position: absolute;\n border: 3px solid #0087ff;\n opacity: 1;\n border-radius: 50%;\n animation: ${this.RejoiningAnimationClassName} 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n }\n\n .${this.RejoiningAnimationClassName} div:nth-child(2) {\n animation-delay: -0.5s;\n }\n\n @keyframes ${this.RejoiningAnimationClassName} {\n 0% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 4.9% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 0;\n }\n\n 5% {\n top: 40px;\n left: 40px;\n width: 0;\n height: 0;\n opacity: 1;\n }\n\n 100% {\n top: 0px;\n left: 0px;\n width: 80px;\n height: 80px;\n opacity: 0;\n }\n }\n\n @keyframes components-reconnect-fadeInOpacity {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes components-reconnect-slideUp {\n 0% {\n transform: translateY(30px) scale(0.95);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n `}}class Ho{static{this.ShowClassName="components-reconnect-show"}static{this.HideClassName="components-reconnect-hide"}static{this.FailedClassName="components-reconnect-failed"}static{this.RejectedClassName="components-reconnect-rejected"}static{this.MaxRetriesId="components-reconnect-max-retries"}static{this.CurrentAttemptId="components-reconnect-current-attempt"}static{this.SecondsToNextAttemptId="components-seconds-to-next-attempt"}constructor(e,t,n){if(this.dialog=e,this.document=t,this.document=t,void 0!==n){const e=this.document.getElementById(Ho.MaxRetriesId);e&&(e.innerText=n.toString())}}show(){this.removeClasses(),this.dialog.classList.add(Ho.ShowClassName)}update(e,t){const n=this.document.getElementById(Ho.CurrentAttemptId);n&&(n.innerText=e.toString());const o=this.document.getElementById(Ho.SecondsToNextAttemptId);o&&(o.innerText=t.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Ho.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Ho.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Ho.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Ho.ShowClassName,Ho.HideClassName,Ho.FailedClassName,Ho.RejectedClassName)}}class Wo{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||wt.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Ho(t,document,e.maxRetries):new Fo(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new jo(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class jo{static{this.MaximumFirstRetryInterval=3e3}constructor(e,t,n,o){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=o,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;void 0===e.maxRetries||tjo.MaximumFirstRetryInterval?jo.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.runTimer(n,1e3,(e=>{this.reconnectDisplay.update(t+1,Math.round(e/1e3))})),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(bt.Error,e)}}this.reconnectDisplay.failed()}async runTimer(e,t,n){if(e<=0)return void n(0);let o,r,i=Date.now();n(e);const s=()=>{if(this.isDisposed)return void r();const a=Date.now(),c=a-i;i=a;const l=Math.max(1,Math.floor(c/t)),h=t*l;if((e-=h){"visible"===document.visibilityState&&(clearTimeout(o),n(0),r())};o=setTimeout(s,t),document.addEventListener("visibilitychange",a),await new Promise((e=>r=e)),document.removeEventListener("visibilitychange",a)}}class zo{constructor(e=!0,t,n,o=0){this.singleRuntime=e,this.logger=t,this.webRendererId=o,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const o=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),r=await import(o);if(void 0!==r){if(e.singleRuntime){const{beforeStart:n,afterStarted:o,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=r;let h=n;e.webRendererId===Un.Server&&c&&(h=c),e.webRendererId===Un.WebAssembly&&s&&(h=s);let d=o;return e.webRendererId===Un.Server&&l&&(d=l),e.webRendererId===Un.WebAssembly&&a&&(d=a),i(e,h,d,t)}return function(e,t,n){const r=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:h,afterWebAssemblyStarted:d,beforeServerStart:u,afterServerStarted:p}=t,f=!(c||l||h||d||u||p||!s&&!a),g=f&&r.enableClassicInitializers;if(f&&!r.enableClassicInitializers)e.logger?.log(bt.Warning,`Initializer '${o}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(g)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(r),h&&r.webAssembly.initializers.beforeStart.push(h),d&&r.webAssembly.initializers.afterStarted.push(d),u&&r.circuit.initializers.beforeStart.push(u),p&&r.circuit.initializers.afterStarted.push(p),l&&e.afterStartedCallbacks.push(l),c)return c(r)}(e,r,t)}function i(e,t,n,o){if(n&&e.afterStartedCallbacks.push(n),t)return t(...o)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,I.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let qo,Jo,Vo,Ko,Xo,Go,Yo;function Qo(e){if(void 0!==Go)throw new Error("Blazor Server has already started.");return Go=new Promise(Zo.bind(null,e)),Go}async function Zo(e,t,n){await qo;const o=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new zo(!1,void 0,e.initializers.afterStarted,Un.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),o=new zo(!0,void 0,void 0,Un.Server);return await o.importInitializersAsync(n,[e]),o}(Ko);if(Jo=kt(document)||"",Xo=new _t(Ko.logLevel),Vo=new Bo(e,Jo,Ko,Xo),Xo.log(bt.Information,"Starting up Blazor server-side application."),wt.reconnect=async()=>!(Vo.didRenderingFail()||!await Vo.reconnect()&&(Xo.log(bt.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),wt.defaultReconnectionHandler=new Wo(Xo),Ko.reconnectionHandler=Ko.reconnectionHandler||wt.defaultReconnectionHandler,wt._internal.navigationManager.listenForNavigationEvents(Un.Server,((e,t,n)=>Vo.sendLocationChanged(e,t,n)),((e,t,n,o)=>Vo.sendLocationChanging(e,t,n,o))),wt._internal.forceCloseConnection=()=>Vo.disconnect(),wt._internal.sendJSDataStream=(e,t,n)=>Vo.sendJsDataStream(e,t,n),!await Vo.start())return Xo.log(bt.Error,"Failed to start the circuit."),void t();const r=()=>{Vo.sendDisconnectBeacon()};wt.disconnect=r,window.addEventListener("unload",r,{capture:!1,once:!0}),Xo.log(bt.Information,"Blazor server-side application started."),o.invokeAfterStartedCallbacks(wt),t()}async function er(){if(!Go)throw new Error("Cannot start the circuit until Blazor Server has started.");return!(!Vo||Vo.isDisposedOrDisposing())||(Yo?await Yo:(await Go,(!Vo||!Vo.didRenderingFail())&&(Vo&&Vo.isDisposedOrDisposing()&&(Jo=kt(document)||"",Vo=new Bo(Vo.getRootComponentManager(),Jo,Ko,Xo)),Yo=Vo.start(),async function(e){await e,Yo===e&&(Yo=void 0)}(Yo),Yo)))}function tr(e){if(Vo&&!Vo.isDisposedOrDisposing())return Vo.updateRootComponents(e);!async function(e){await Go,await er()&&Vo.updateRootComponents(e)}(e)}const nr=navigator,or=nr.userAgentData&&nr.userAgentData.brands,rr=or&&or.length>0?or.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):window.chrome,ir=nr.userAgentData?.platform??navigator.platform;function sr(e){return 0!==e.debugLevel&&(rr||navigator.userAgent.includes("Firefox"))}let ar,cr,lr,hr,dr=null;const ur={load:function(e,t){return async function(e,t){const{dotnet:n}=await async function(e){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");let t="_framework/dotnet.js";if(e.loadBootResource){const n="dotnetjs",o=e.loadBootResource(n,"dotnet.js",t,"","js-module-dotnet");if("string"==typeof o)t=o;else if(o)throw new Error(`For a ${n} resource, custom loaders must supply a URI string.`)}const n=new URL(t,document.baseURI).toString();return await import(n)}(e),o=function(e,t){const n={maxParallelDownloads:1e6,enableDownloadRetry:!1,applicationEnvironment:e.environment},o={...window.Module||{},onConfigLoaded:async n=>{n.environmentVariables||(n.environmentVariables={}),"sharded"===n.globalizationMode&&(n.environmentVariables.__BLAZOR_SHARDED_ICU="1"),wt._internal.getApplicationEnvironment=()=>n.applicationEnvironment,t?.(n),hr=await async function(e,t){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new zo(!1,void 0,e.initializers.afterStarted,Un.WebAssembly);{const n=[e,t.resources?.extensions??{}],o=new zo(!0,void 0,void 0,Un.WebAssembly),r=Object.keys(t?.resources?.libraryInitializers||{});return await o.importInitializersAsync(r,n),o}}(e,n)},onDownloadResourceProgress:pr,config:n,out:gr,err:mr};return o}(e,t);e.applicationCulture&&n.withApplicationCulture(e.applicationCulture),e.environment&&n.withApplicationEnvironment(e.environment),e.loadBootResource&&n.withResourceLoader(e.loadBootResource),n.withModuleConfig(o),e.configureRuntime&&e.configureRuntime(n),lr=await n.create()}(e,t)},start:function(){return async function(){if(!lr)throw new Error("The runtime must be loaded it gets configured.");const{setModuleImports:t,INTERNAL:n,getConfig:o,invokeLibraryInitializers:r}=lr;cr=n,function(e){const t=ir.match(/^Mac/i)?"Cmd":"Alt";sr(e)&&console.info(`Debugging hotkey: Shift+${t}+D (when application has focus)`),document.addEventListener("keydown",(t=>{t.shiftKey&&(t.metaKey||t.altKey)&&"KeyD"===t.code&&(sr(e)?navigator.userAgent.includes("Firefox")?async function(){const e=await fetch(`_framework/debug?url=${encodeURIComponent(location.href)}&isFirefox=true`);200!==e.status&&console.warn(await e.text())}():rr?function(){const e=document.createElement("a");e.href=`_framework/debug?url=${encodeURIComponent(location.href)}`,e.target="_blank",e.rel="noopener noreferrer",e.click()}():console.error("Currently, only Microsoft Edge (80+), Google Chrome, or Chromium, are supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))}))}(o()),wt.runtime=lr,wt._internal.dotNetCriticalError=mr,t("blazor-internal",{Blazor:{_internal:wt._internal}});const i=await lr.getAssemblyExports("Microsoft.AspNetCore.Components.WebAssembly");return Object.assign(wt._internal,{dotNetExports:{...i.Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime}}),ar=e.attachDispatcher({beginInvokeDotNetFromJS:(e,t,n,o,r)=>{if(yr(),!o&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");const i=o?o.toString():t;wt._internal.dotNetExports.BeginInvokeDotNet(e?e.toString():null,i,n,r)},endInvokeJSFromDotNet:(e,t,n)=>{wt._internal.dotNetExports.EndInvokeJS(n)},sendByteArray:(e,t)=>{wt._internal.dotNetExports.ReceiveByteArrayFromJS(e,t)},invokeDotNetFromJS:(e,t,n,o)=>(yr(),wt._internal.dotNetExports.InvokeDotNet(e||null,t,n??0,o))}),{invokeLibraryInitializers:r}}()},callEntryPoint:async function(){try{await lr.runMain(lr.getConfig().mainAssemblyName,[])}catch(e){console.error(e),Uo()}},getArrayEntryPtr:function(e,t,n){const o=function(e){return e+12}(e)+4+t*n;return o},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return lr.getHeapI16(e+(t||0))},readInt32Field:function(e,t){return lr.getHeapI32(e+(t||0))},readUint64Field:function(e,t){return lr.getHeapU52(e+(t||0))},readObjectField:function(e,t){return lr.getHeapU32(e+(t||0))},readStringField:function(e,t,n){const o=lr.getHeapU32(e+(t||0));if(0===o)return null;if(n){const e=cr.monoObjectAsBoolOrNullUnsafe(o);if("boolean"==typeof e)return e?"":null}return cr.monoStringToStringUnsafe(o)},readStructField:function(e,t){return e+(t||0)},beginHeapLock:function(){return yr(),dr=vr.create(),dr},invokeWhenHeapUnlocked:function(e){dr?dr.enqueuePostReleaseAction(e):e()}};function pr(e,t){const n=e/t*100;document.documentElement.style.setProperty("--blazor-load-percentage",`${n}%`),document.documentElement.style.setProperty("--blazor-load-percentage-text",`"${Math.floor(n)}%"`)}const fr=["DEBUGGING ENABLED"],gr=e=>fr.indexOf(e)<0&&console.log(e),mr=e=>{console.error(e||"(null)"),Uo()};function yr(){if(dr)throw new Error("Assertion failed - heap is currently locked")}class vr{enqueuePostReleaseAction(e){this.postReleaseActions||(this.postReleaseActions=[]),this.postReleaseActions.push(e)}release(){if(dr!==this)throw new Error("Trying to release a lock which isn't current");for(cr.mono_wasm_gc_unlock(),dr=null;this.postReleaseActions?.length;)this.postReleaseActions.shift()(),yr()}static create(){return cr.mono_wasm_gc_lock(),new vr}}class wr{constructor(e){this.batchAddress=e,this.arrayRangeReader=br,this.arrayBuilderSegmentReader=_r,this.diffReader=Sr,this.editReader=Cr,this.frameReader=Er}updatedComponents(){return t.readStructField(this.batchAddress,0)}referenceFrames(){return t.readStructField(this.batchAddress,br.structLength)}disposedComponentIds(){return t.readStructField(this.batchAddress,2*br.structLength)}disposedEventHandlerIds(){return t.readStructField(this.batchAddress,3*br.structLength)}updatedComponentsEntry(e,t){return Ir(e,t,Sr.structLength)}referenceFramesEntry(e,t){return Ir(e,t,Er.structLength)}disposedComponentIdsEntry(e,n){const o=Ir(e,n,4);return t.readInt32Field(o)}disposedEventHandlerIdsEntry(e,n){const o=Ir(e,n,8);return t.readUint64Field(o)}}const br={structLength:8,values:e=>t.readObjectField(e,0),count:e=>t.readInt32Field(e,4)},_r={structLength:12,values:e=>{const n=t.readObjectField(e,0),o=t.getObjectFieldsBaseAddress(n);return t.readObjectField(o,0)},offset:e=>t.readInt32Field(e,4),count:e=>t.readInt32Field(e,8)},Sr={structLength:4+_r.structLength,componentId:e=>t.readInt32Field(e,0),edits:e=>t.readStructField(e,4),editsEntry:(e,t)=>Ir(e,t,Cr.structLength)},Cr={structLength:20,editType:e=>t.readInt32Field(e,0),siblingIndex:e=>t.readInt32Field(e,4),newTreeIndex:e=>t.readInt32Field(e,8),moveToSiblingIndex:e=>t.readInt32Field(e,8),removedAttributeName:e=>t.readStringField(e,16)},Er={structLength:36,frameType:e=>t.readInt16Field(e,4),subtreeLength:e=>t.readInt32Field(e,8),elementReferenceCaptureId:e=>t.readStringField(e,16),componentId:e=>t.readInt32Field(e,12),elementName:e=>t.readStringField(e,16),textContent:e=>t.readStringField(e,16),markupContent:e=>t.readStringField(e,16),attributeName:e=>t.readStringField(e,16),attributeValue:e=>t.readStringField(e,24,!0),attributeEventHandlerId:e=>t.readUint64Field(e,8)};function Ir(e,n,o){return t.getArrayEntryPtr(e,n,o)}class kr{constructor(e){this.componentManager=e}resolveRegisteredElement(e){const t=Number.parseInt(e);if(!Number.isNaN(t))return H(this.componentManager.resolveRootComponent(t))}getParameterValues(e){return this.componentManager.initialComponents[e].parameterValues}getParameterDefinitions(e){return this.componentManager.initialComponents[e].parameterDefinitions}getTypeName(e){return this.componentManager.initialComponents[e].typeName}getAssembly(e){return this.componentManager.initialComponents[e].assembly}getCount(){return this.componentManager.initialComponents.length}}let Tr,Rr,Ar,Dr,xr=!1,Nr=!1,Mr=!0,Pr=!1;const Lr=new Promise((e=>{Dr=e}));let Ur;const Br=new Promise((e=>{Ur=e}));let Or;const $r=new Promise((e=>{Or=e}));function Fr(e){if(Tr)throw new Error("WebAssembly options have already been configured.");!async function(e){const t=await e;Tr=t,Or()}(e)}function Hr(e){if(void 0!==Ar)throw new Error("Blazor WebAssembly has already started.");return Ar=new Promise(Wr.bind(null,e)),Ar}async function Wr(e,n,o){(function(){if(window.parent!==window&&!window.opener&&window.frameElement){const e=window.sessionStorage&&window.sessionStorage["Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings"],t=e&&JSON.parse(e);return t&&t.redirect_uri&&location.href.startsWith(t.redirect_uri)}return!1})()&&await new Promise((()=>{}));const r=jr();!function(e){const t=D;D=(e,n,o)=>{((e,t,n)=>{const o=De(e);o?.eventDelegator.getHandler(t)&&ur.invokeWhenHeapUnlocked(n)})(e,n,(()=>t(e,n,o)))}}(),wt._internal.applyHotReload=(e,t,n,o,r)=>{ar.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDelta",e,t,n,o,r??null)},wt._internal.applyHotReloadDeltas=(e,t)=>ar.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDeltas",e,t),wt._internal.getApplyUpdateCapabilities=()=>ar.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","GetApplyUpdateCapabilities"),wt._internal.invokeJSJson=zr,wt._internal.endInvokeDotNetFromJS=qr,wt._internal.receiveWebAssemblyDotNetDataStream=Jr,wt._internal.receiveByteArray=Vr;const i=(t=ur,t);wt.platform=i,wt._internal.renderBatch=(e,t)=>{const n=ur.beginHeapLock();try{xe(e,new wr(t))}finally{n.release()}},wt._internal.navigationManager.listenForNavigationEvents(Un.WebAssembly,(async(e,t,n)=>{await ar.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t,n)}),(async(e,t,n,o)=>{const r=await ar.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChangingAsync",t,n,o);wt._internal.navigationManager.endLocationChanging(e,r)}));const s=new kr(e);wt._internal.registeredComponents={getRegisteredComponentsCount:()=>s.getCount(),getAssembly:e=>s.getAssembly(e),getTypeName:e=>s.getTypeName(e),getParameterDefinitions:e=>s.getParameterDefinitions(e)||"",getParameterValues:e=>s.getParameterValues(e)||""},wt._internal.getPersistedState=()=>Tt(document,Et)||"",wt._internal.getInitialComponentsUpdate=()=>Br,wt._internal.updateRootComponents=e=>wt._internal.dotNetExports?.UpdateRootComponentsCore(e),wt._internal.endUpdateRootComponents=t=>e.onAfterUpdateRootComponents?.(t),wt._internal.attachRootComponentToElement=(e,t,n)=>{const o=s.resolveRegisteredElement(e);o?Ae(n,o,t,!1):function(e,t,n){const o="::before";let r=!1;if(e.endsWith("::after"))e=e.slice(0,-7),r=!0;else if(e.endsWith(o))throw new Error(`The '${o}' selector is not supported.`);const i=w(e)||document.querySelector(e);if(!i)throw new Error(`Could not find any element matching selector '${e}'.`);Ae(n,W(i,!0),t,r)}(e,t,n)};try{await r,await i.start()}catch(e){throw new Error(`Failed to start platform. Reason: ${e}`)}i.callEntryPoint(),hr.invokeAfterStartedCallbacks(wt),Nr=!0,n()}function jr(){return Rr??=(async()=>{await $r;const e=Tr??{},t=Tr?.configureRuntime;e.configureRuntime=e=>{t?.(e),Pr&&e.withEnvironmentVariable("__BLAZOR_WEBASSEMBLY_WAIT_FOR_ROOT_COMPONENTS","true")},await ur.load(e,Dr),xr=!0})(),Rr}function zr(e,t,n,o,r){return 0!==r?(ar.beginInvokeJSFromDotNet(r,e,o,n,t),null):ar.invokeJSFromDotNet(e,o,n,t)}function qr(e,t,n){ar.endInvokeDotNetFromJS(e,t,n)}function Jr(e,t,n,o){!function(e,t,n,o,r){let i=vt.get(t);if(!i){const n=new ReadableStream({start(e){vt.set(t,e),i=e}});e.supplyDotNetStream(t,n)}r?(i.error(r),vt.delete(t)):0===o?(i.close(),vt.delete(t)):i.enqueue(n.length===o?n:n.subarray(0,o))}(ar,e,t,n,o)}function Vr(e,t){ar.receiveByteArray(e,t)}function Kr(e,t){t.namespaceURI?e.setAttributeNS(t.namespaceURI,t.name,t.value):e.setAttribute(t.name,t.value)}const Xr="data-permanent";var Gr,Yr;!function(e){e[e.None=0]="None",e[e.Some=1]="Some",e[e.Infinite=2]="Infinite"}(Gr||(Gr={})),function(e){e.Keep="keep",e.Update="update",e.Insert="insert",e.Delete="delete"}(Yr||(Yr={}));class Qr{static create(e,t,n){return 0===t&&n===e.length?e:new Qr(e,t,n)}constructor(e,t,n){this.source=e,this.startIndex=t,this.length=n}item(e){return this.source.item(e+this.startIndex)}forEach(e,t){for(let t=0;t=n&&s>=o&&r(e.item(i),t.item(s))===Gr.None;)i--,s--,a++;return a}(e,t,o,o,n),i=function(e){const t=[];let n=e.length-1,o=e[n]?.length-1;for(;n>0||o>0;){const r=0===n?Yr.Insert:0===o?Yr.Delete:e[n][o];switch(t.unshift(r),r){case Yr.Keep:case Yr.Update:n--,o--;break;case Yr.Insert:o--;break;case Yr.Delete:n--}}return t}(function(e,t,n){const o=[],r=[],i=e.length,s=t.length;if(0===i&&0===s)return[];for(let e=0;e<=i;e++)(o[e]=Array(s+1))[0]=e,r[e]=Array(s+1);const a=o[0];for(let e=1;e<=s;e++)a[e]=e;for(let a=1;a<=i;a++)for(let i=1;i<=s;i++){const s=n(e.item(a-1),t.item(i-1)),c=o[a-1][i]+1,l=o[a][i-1]+1;let h;switch(s){case Gr.None:h=o[a-1][i-1];break;case Gr.Some:h=o[a-1][i-1]+1;break;case Gr.Infinite:h=Number.MAX_VALUE}h{const t=Pe(e);history.pushState(null,"",e),t?Ue(e):bi(e,!0)}))}function vi(e){He()||bi(location.href,!1)}function wi(e){if(He()||e.defaultPrevented)return;const t=e.target;if(t instanceof HTMLFormElement){if(!function(e){const t=e.getAttribute("data-enhance");return"string"==typeof t&&""===t||"true"===t?.toLowerCase()}(t))return;const n=e.submitter?.getAttribute("formmethod")||t.method;if("dialog"===n)return void console.warn('A form cannot be enhanced when its method is "dialog".');const o=e.submitter?.getAttribute("formtarget")||t.target;if(""!==o&&"_self"!==o)return void console.warn('A form cannot be enhanced when its target is different from the default value "_self".');e.preventDefault();const r=new URL(e.submitter?.getAttribute("formaction")||t.action,document.baseURI),i={method:n},s=new FormData(t),a=e.submitter?.getAttribute("name"),c=e.submitter.getAttribute("value");a&&c&&s.append(a,c);const l=new URLSearchParams(s).toString();if("get"===i.method)r.search=l,history.pushState(null,"",r.toString());else{const n=e.submitter?.getAttribute("formenctype")||t.enctype;"multipart/form-data"===n?i.body=s:(i.body=l,i.headers={"content-type":n,accept:di})}bi(r.toString(),!1,i)}}async function bi(e,t,n,o){fi=!0,ui?.abort(),function(e,t){ke?.(e,t)}(e,t),pi.enhancedNavigationStarted(),ui=new AbortController;const r=ui.signal,i=fetch(e,Object.assign({signal:r,mode:"no-cors",headers:{accept:di}},n));let s=null;if(await async function(e,t,n,o){let r;try{if(r=await e,!r.body)return void n(r,"");const t=r.headers.get("ssr-framing");if(!t){const e=await r.text();return void n(r,e)}let o=!0;await r.body.pipeThrough(new TextDecoderStream).pipeThrough(function(e){let t="";return new TransformStream({transform(n,o){if(t+=n,t.indexOf(e,t.length-n.length-e.length)>=0){const n=t.split(e);n.slice(0,-1).forEach((e=>o.enqueue(e))),t=n[n.length-1]}},flush(e){e.enqueue(t)}})}(`\x3c!--${t}--\x3e`)).pipeTo(new WritableStream({write(e){o?(o=!1,n(r,e)):(e=>{const t=document.createRange().createContextualFragment(e);for(;t.firstChild;)document.body.appendChild(t.firstChild)})(e)}}))}catch(e){if("AbortError"===e.name&&t.aborted)return;throw e}}(i,r,((t,r)=>{const i=!n?.method||"get"===n.method,a=t.status>=200&&t.status<300;if("opaque"===t.type){if(i)return void Si(e);throw new Error("Enhanced navigation does not support making a non-GET request to an endpoint that redirects to an external origin. Avoid enabling enhanced navigation for form posts that may perform external redirections.")}if(a&&"allow"!==t.headers.get("blazor-enhanced-nav")){if(i)return void Si(e);throw new Error("Enhanced navigation does not support making a non-GET request to a non-Blazor endpoint. Avoid enabling enhanced navigation for forms that post to a non-Blazor endpoint.")}(t.redirected||o)&&((o?"get"===o:i)?history.replaceState(null,"",t.url):t.url!==location.href&&history.pushState(null,"",t.url),e=t.url);const c=t.headers.get("blazor-enhanced-nav-redirect-location");if(c)return void location.replace(c);t.redirected||i||!a||(Le(t.url,gi)?location.href!==gi&&history.pushState(null,"",gi):s=`Cannot perform enhanced form submission that changes the URL (except via a redirection), because then back/forward would not work. Either remove this form's 'action' attribute, or change its method to 'get', or do not mark it as enhanced.\nOld URL: ${location.href}\nNew URL: ${t.url}`),gi=t.url;const l=t.headers.get("content-type");if(l?.startsWith("text/html")&&r){const e=(new DOMParser).parseFromString(r,"text/html");ei(document,e),pi.documentUpdated()}else l?.startsWith("text/")&&r?_i(r):a||r?i?Si(e):_i(`Error: ${n.method} request to ${e} returned non-HTML content of type ${l||"unspecified"}.`):_i(`Error: ${t.status} ${t.statusText}`)})),!r.aborted){const t=e.indexOf("#");if(t>=0){const n=e.substring(t+1),o=document.getElementById(n);o?.scrollIntoView()}if(fi=!1,pi.enhancedNavigationCompleted(),s)throw new Error(s)}}function _i(e){document.documentElement.textContent=e;const t=document.documentElement.style;t.fontFamily="consolas, monospace",t.whiteSpace="pre-wrap",t.padding="1rem"}function Si(e){history.replaceState(null,"",e+"?"),location.replace(e)}let Ci,Ei=!0;function Ii(e,t){Ci=t,e?.disableDomPreservation&&(Ei=!1),customElements.define("blazor-ssr-end",ki)}class ki extends HTMLElement{connectedCallback(){const e=this.parentNode;e.parentNode?.removeChild(e),e.childNodes.forEach((e=>{if(e instanceof HTMLTemplateElement){const t=e.getAttribute("blazor-component-id");if(t)"true"!==e.getAttribute("enhanced-nav")&&ui||function(e,t){const n=function(e){const t=`bl:${e}`,n=document.createNodeIterator(document,NodeFilter.SHOW_COMMENT);let o=null;for(;(o=n.nextNode())&&o.textContent!==t;);if(!o)return null;const r=`/bl:${e}`;let i=null;for(;(i=n.nextNode())&&i.textContent!==r;);return i?{startMarker:o,endMarker:i}:null}(e);if(n){const{startMarker:e,endMarker:o}=n;if(Ei)ei({startExclusive:e,endExclusive:o},t);else{const n=o.parentNode,r=new Range;for(r.setStart(e,e.textContent.length),r.setEnd(o,0),r.deleteContents();t.childNodes[0];)n.insertBefore(t.childNodes[0],o)}Ci.documentUpdated()}}(t,e.content);else switch(e.getAttribute("type")){case"redirection":const t=Fe(e.content.textContent),n="form-post"===e.getAttribute("from");"true"===e.getAttribute("enhanced")&&Me(t)?bi(t,!1,void 0,n?"post":"get"):n?t!==location.href&&location.assign(t):location.replace(t);break;case"error":_i(e.content.textContent||"Error")}}}))}}class Ti{constructor(e){var t;this._circuitInactivityTimeoutMs=e,this._rootComponentsBySsrComponentId=new Map,this._seenDescriptors=new Set,this._pendingOperationBatches={},this._nextOperationBatchId=1,this._nextSsrComponentId=1,this._didWebAssemblyFailToLoadQuickly=!1,this._isComponentRefreshPending=!1,this.initialComponents=[],t=()=>{this.rootComponentsMayRequireRefresh()},E.push(t)}onAfterRenderBatch(e){e===Un.Server&&this.circuitMayHaveNoRootComponents()}onDocumentUpdated(){this.rootComponentsMayRequireRefresh()}onEnhancedNavigationCompleted(){this.rootComponentsMayRequireRefresh()}registerComponent(e){if(this._seenDescriptors.has(e))return;"webassembly"===e.type?this.startLoadingWebAssemblyIfNotStarted():"auto"===e.type&&this.startLoadingWebAssemblyIfNotStarted(1);const t=this._nextSsrComponentId++;this._seenDescriptors.add(e),this._rootComponentsBySsrComponentId.set(t,{descriptor:e,ssrComponentId:t})}unregisterComponent(e){this._seenDescriptors.delete(e.descriptor),this._rootComponentsBySsrComponentId.delete(e.ssrComponentId),this.circuitMayHaveNoRootComponents()}async startLoadingWebAssemblyIfNotStarted(e){if(void 0!==Rr)return;Pr=!0;const t=jr(),n=await Lr;void 0!==e&&(n.maxParallelDownloads=e),function(e){if(!e.cacheBootResources)return!1;const t=Ri(e);if(!t)return!1;const n=window.localStorage.getItem(t.key);return t.value===n}(n)||this.onWebAssemblyFailedToLoadQuickly(),await t,function(e){const t=Ri(e);t&&window.localStorage.setItem(t.key,t.value)}(n),this.rootComponentsMayRequireRefresh()}onWebAssemblyFailedToLoadQuickly(){this._didWebAssemblyFailToLoadQuickly||(this._didWebAssemblyFailToLoadQuickly=!0,this.rootComponentsMayRequireRefresh())}startCircutIfNotStarted(){return void 0===Go?Qo(this):!Vo||Vo.isDisposedOrDisposing()?er():void 0}async startWebAssemblyIfNotStarted(){this.startLoadingWebAssemblyIfNotStarted(),void 0===Ar&&await Hr(this)}rootComponentsMayRequireRefresh(){this._isComponentRefreshPending||(this._isComponentRefreshPending=!0,setTimeout((()=>{this._isComponentRefreshPending=!1,this.refreshRootComponents(this._rootComponentsBySsrComponentId.values())}),0))}circuitMayHaveNoRootComponents(){if(this.rendererHasExistingOrPendingComponents(Un.Server,"server","auto"))return clearTimeout(this._circuitInactivityTimeoutId),void(this._circuitInactivityTimeoutId=void 0);void 0===this._circuitInactivityTimeoutId&&(this._circuitInactivityTimeoutId=setTimeout((()=>{this.rendererHasExistingOrPendingComponents(Un.Server,"server","auto")||(async function(){await(Vo?.dispose())}(),this._circuitInactivityTimeoutId=void 0)}),this._circuitInactivityTimeoutMs))}rendererHasComponents(e){const t=De(e);return void 0!==t&&t.getRootComponentCount()>0}rendererHasExistingOrPendingComponents(e,...t){if(this.rendererHasComponents(e))return!0;for(const{descriptor:{type:n},assignedRendererId:o}of this._rootComponentsBySsrComponentId.values()){if(o===e)return!0;if(void 0===o&&-1!==t.indexOf(n))return!0}return!1}refreshRootComponents(e){const t=new Map;for(const n of e){const e=this.determinePendingOperation(n);if(!e)continue;const o=n.assignedRendererId;if(!o)throw new Error("Descriptors must be assigned a renderer ID before getting used as root components");let r=t.get(o);r||(r=[],t.set(o,r)),r.push(e)}for(const[e,n]of t){const t={batchId:this._nextOperationBatchId++,operations:n};this._pendingOperationBatches[t.batchId]=t;const o=JSON.stringify(t);e===Un.Server?tr(o):this.updateWebAssemblyRootComponents(o)}this.circuitMayHaveNoRootComponents()}updateWebAssemblyRootComponents(e){Mr?(Ur(e),Mr=!1):function(e){if(!Ar)throw new Error("Blazor WebAssembly has not started.");if(!wt._internal.updateRootComponents)throw new Error("Blazor WebAssembly has not initialized.");Nr?wt._internal.updateRootComponents(e):async function(e){if(await Ar,!wt._internal.updateRootComponents)throw new Error("Blazor WebAssembly has not initialized.");wt._internal.updateRootComponents(e)}(e)}(e)}resolveRendererIdForDescriptor(e){switch("auto"===e.type?this.getAutoRenderMode():e.type){case"server":return this.startCircutIfNotStarted(),Un.Server;case"webassembly":return this.startWebAssemblyIfNotStarted(),Un.WebAssembly;case null:return null}}getAutoRenderMode(){return this.rendererHasExistingOrPendingComponents(Un.WebAssembly,"webassembly")?"webassembly":this.rendererHasExistingOrPendingComponents(Un.Server,"server")?"server":xr?"webassembly":this._didWebAssemblyFailToLoadQuickly?"server":null}determinePendingOperation(e){if(t=e.descriptor,document.contains(t.start)){if(void 0===e.assignedRendererId){if(fi||"loading"===document.readyState)return null;const t=this.resolveRendererIdForDescriptor(e.descriptor);return null===t?null:T(t)?(be(e.descriptor.start,!0),e.assignedRendererId=t,e.uniqueIdAtLastUpdate=e.descriptor.uniqueId,{type:"add",ssrComponentId:e.ssrComponentId,marker:Ut(e.descriptor)}):null}return T(e.assignedRendererId)?e.uniqueIdAtLastUpdate===e.descriptor.uniqueId?null:(e.uniqueIdAtLastUpdate=e.descriptor.uniqueId,{type:"update",ssrComponentId:e.ssrComponentId,marker:Ut(e.descriptor)}):null}return e.hasPendingRemoveOperation?null:void 0===e.assignedRendererId?(this.unregisterComponent(e),null):T(e.assignedRendererId)?(be(e.descriptor.start,!1),e.hasPendingRemoveOperation=!0,{type:"remove",ssrComponentId:e.ssrComponentId}):null;var t}resolveRootComponent(e){const t=this._rootComponentsBySsrComponentId.get(e);if(!t)throw new Error(`Could not resolve a root component with SSR component ID '${e}'.`);return t.descriptor}onAfterUpdateRootComponents(e){const t=this._pendingOperationBatches[e];delete this._pendingOperationBatches[e];for(const e of t.operations)switch(e.type){case"remove":{const t=this._rootComponentsBySsrComponentId.get(e.ssrComponentId);t&&this.unregisterComponent(t);break}}}}function Ri(e){const t=e.resources?.hash,n=e.mainAssemblyName;return t&&n?{key:`blazor-resource-hash:${n}`,value:t}:null}class Ai{constructor(){this._eventListeners=new Map}static create(e){const t=new Ai;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const o={...t,type:e};for(const e of n)e(o)}}let Di=null,xi=location.href,Ni=!1;function Mi(){null!==document.activeElement&&document.activeElement!==document.body||document.querySelector("[autofocus]")||Bi()}function Pi(){Le(xi,location.href)||(Ni=!0),xi=location.href}function Li(){Ni&&Bi()}function Ui(){Ni=!1}function Bi(){const e=Di?.getAttribute("selector");e&&st.focusBySelector(e)}class Oi extends HTMLElement{connectedCallback(){Di=this}disconnectedCallback(){Di===this&&(Di=null)}}let $i,Fi=!1;function Hi(e){if(Fi)throw new Error("Blazor has already started.");Fi=!0,e=e||{},e.logLevel??=bt.Error,wt._internal.hotReloadApplied=()=>{Oe()&&$e(location.href,!0)},$i=new Ti(e?.ssr?.circuitInactivityTimeoutMs??2e3);const t=Ai.create(wt),n={enhancedNavigationStarted:()=>{t.dispatchEvent("enhancednavigationstart",{})},documentUpdated:()=>{$i.onDocumentUpdated(),t.dispatchEvent("enhancedload",{})},enhancedNavigationCompleted(){$i.onEnhancedNavigationCompleted(),t.dispatchEvent("enhancednavigationend",{})}};return Zr=$i,Ii(e?.ssr,n),e?.ssr?.disableDomPreservation||(pi=n,document.addEventListener("click",yi),document.addEventListener("submit",wi),window.addEventListener("popstate",vi),Ie=mi),function(e){customElements.define("blazor-focus-on-navigate",Oi),e.addEventListener("enhancednavigationstart",Pi),e.addEventListener("enhancednavigationend",Li),document.addEventListener("focusin",Ui),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Mi,{once:!0}):Mi()}(t),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Wi.bind(null,e)):Wi(e),Promise.resolve()}function Wi(e){const t=Oo(e?.circuit||{});e.circuit=t;const n=async function(e,t){const n=Tt(document,It,"initializers");if(!n)return new zo(!1,t);const o=JSON.parse(atob(n))??[],r=new zo(!1,t);return await r.importInitializersAsync(o,[e]),r}(e,new _t(t.logLevel));!function(e){if(Ko)throw new Error("Circuit options have already been configured.");qo=async function(e){const t=await e;Ko=Oo(t)}(e)}(ji(n,t)),Fr(ji(n,e?.webAssembly||{})),function(e){const t=si(document);for(const e of t)Zr?.registerComponent(e)}(),$i.onDocumentUpdated(),async function(e){const t=await e;await t.invokeAfterStartedCallbacks(wt)}(n)}async function ji(e,t){return await e,t}wt.start=Hi,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&Hi()}(); diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index 931d70db651b..d901f1824c18 100644 --- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -1 +1 @@ -!function(){"use strict";var e;let t;var n,r;!function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const u=0,d={[u]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let f,m=1;function h(e){t.push(e)}function p(e){if(e&&"object"==typeof e){d[m]=new l(e);const t={[n]:m};return m++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function g(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[s]:t};try{const t=p(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function b(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function y(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new v(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=h,e.invokeMethod=function(e,t,...n){return y().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return y().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=p,e.createJSStreamReference=g,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(f=e.JSCallResultType||(e.JSCallResultType={}));class v{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=b(this,t),i=N(E(e,r)(...o||[]),n);return null==i?null:k(this,i)}beginInvokeJSFromDotNet(e,t,n,r,o){const i=new Promise((e=>{const r=b(this,n);e(E(t,o)(...r||[]))}));e&&i.then((t=>k(this,[e,!0,N(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,w(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?b(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=k(this,r),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return i?b(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const i=k(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,i)}catch(e){this.completePendingCall(o,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function w(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function E(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=E,e.disposeJSObjectReferenceById=S;class C{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=C,h((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new C(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=d[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new A(n)}}return t}));class A{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function N(e,t){switch(t){case f.Default:return e;case f.JSObjectReference:return p(e);case f.JSStreamReference:return g(e);case f.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let R=0;function k(e,t){R=0,c=e;const n=JSON.stringify(t,D);return c=void 0,n}function D(e,t){if(t instanceof C)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(R,t);const e={[o]:R};return R++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(n||(n={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(r||(r={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const i=new Map,s=new Map,a=[];function c(e){return i.get(e)}function l(e){const t=i.get(e);return t?.browserEventName||e}function u(e,t){e.forEach((e=>i.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),u(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),u(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...f(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),u(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),u(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),u(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>f(e)}),u(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),u(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),u(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...f(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),u(["wheel","mousewheel"],{createEventArgs:e=>{return{...f(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),u(["cancel","close","toggle"],{createEventArgs:()=>({})});const m=["date","datetime-local","month","time","week"],h=new Map;let p,g,b=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++b).toString();h.set(r,e);const o=await E().invokeMethodAsync("AddRootComponent",t,r),i=new w(o,g[t]);return await i.setParameters(n),i}};class v{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new v)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return E().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await E().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function E(){if(!p)throw new Error("Dynamic root components have not been enabled in this application.");return p}const S=new Map,C=[],A=new Map;function I(e,t,n){return R(e,t.eventHandlerId,(()=>N(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function N(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let R=(e,t,n)=>n();const k=O(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),D={submit:!0},_=O(["click","dblclick","mousedown","mousemove","mouseup"]);class T{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++T.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new F(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),i=o.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,s.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),i=null,s=!1;const a=Object.prototype.hasOwnProperty.call(k,e);let l=!1;for(;r;){const f=r,m=this.getEventHandlerInfosForElement(f,!1);if(m){const n=m.getHandler(e);if(n&&(u=f,d=t.type,!((u instanceof HTMLButtonElement||u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(_,d)&&u.disabled))){if(!s){const n=c(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(D,t.type)&&t.preventDefault(),I(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},i)}m.stopPropagation(e)&&(l=!0),m.preventDefault(e)&&t.preventDefault()}r=a||l?void 0:n.shift()}var u,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new L:null}}class F{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(k,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class L{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function O(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const M=Symbol(),x=Symbol(),P=Symbol();function B(e,t){if(M in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=B(t,!0);r[x]=e,n.push(r)}))}return e[M]=n,e}function H(e){const t=K(e);for(;t.length;)z(e,0)}function j(e,t){const n=document.createComment("!");return J(n,e,t),n}function J(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=K(r);if(t?.length>0){const t=G(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const i=$(r);if(i){const e=K(i),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[x]}const s=K(t);if(n0;)z(n,0)}const r=n;r.parentNode.removeChild(r)}function $(e){return e[x]||null}function W(e,t){return K(e)[t]}function U(e){const t=Y(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function K(e){return e[M]}function V(e){const t=K($(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function X(e,t){const n=K(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):q(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let i=r;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function Y(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function q(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):q(e,$(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=$(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function Z(e){return`_bl_${e}`}const Q="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Q)&&"string"==typeof t[Q]?function(e){const t=`[${Z(e)}]`;return document.querySelector(t)}(t[Q]):t));const ee="_blazorDeferredValue";function te(e){return"select-multiple"===e.type}function ne(e,t){e.value=t||""}function re(e,t){e instanceof HTMLSelectElement?te(e)?function(e,t){t||=[];for(let n=0;n{Ne()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var s;let a=0;for(;i.firstChild;)J(i.firstChild,o,a++)}applyAttribute(e,t,n,r){const o=e.frameReader,i=o.attributeName(r),s=o.attributeEventHandlerId(r);if(s){const e=me(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,r,o,i,s){const a=r;for(let a=i;a{Je(t,e)})},enableNavigationInterception:function(e){if(void 0!==pe&&pe!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");pe=e},setHasLocationChangingListeners:function(e,t){const n=Te.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Le&&e===_e&&(Le(t),Le=null)},navigateTo:function(e,t){Me(e,t,!0)},refresh:function(e){!e&&Ce()?Ae(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Se};function Me(e,t,n=!1){const r=Ie(e);!t.forceLoad&&Ee(r)?We()?xe(r,!1,t.replaceHistoryEntry,t.historyEntryState,n):Ae(r,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function xe(e,t,n,r=void 0,o=!1){if(He(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Pe(e,n,r),void function(e){const t=e.indexOf("#");t!==e.length-1&&Se(e.substring(t+1))}(e);const i=$e();(o||!i?.hasLocationChangingEventListeners||await je(e,r,t,i))&&(ve=!0,Pe(e,n,r),await Je(t))}function Pe(e,t,n=void 0){t?history.replaceState({userState:n,_index:De},"",e):(De++,history.pushState({userState:n,_index:De},"",e))}function Be(e){return new Promise((t=>{const n=Fe;Fe=()=>{Fe=n,t()},history.go(e)}))}function He(){Le&&(Le(!1),Le=null)}function je(e,t,n,r){return new Promise((o=>{He(),_e++,Le=o,r.locationChanging(_e,e,t,n)}))}async function Je(e,t){const n=t??location.href;await Promise.all(Array.from(Te,(async([t,r])=>{var o;o=t,S.has(o)&&await r.locationChanged(n,history.state?.userState,e)})))}async function ze(e){Fe&&We()&&await Fe(e),De=history.state?._index??0}function $e(){const e=Re();if(void 0!==e)return Te.get(e)}function We(){return Ne()||!Ce()}const Ue={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},Ke={init:function(e,t,n,r=50){const o=Xe(t);(o||document.documentElement).style.overflowAnchor="none";const i=document.createRange();f(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(r){r.forEach((r=>{if(!r.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const o=i.getBoundingClientRect().height,s=r.rootBounds?.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,o,s):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,o,s)}))}),{root:o,rootMargin:`${r}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:u}=Ye(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{f(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function f(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[u]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ye(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Ve=Symbol();function Xe(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Xe(e.parentElement):null}function Ye(e){const t=e._callDispatcher,n=e._id;return t[Ve]??={},{observersByDotNetObjectId:t[Ve],id:n}}const qe={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.previousSibling;o instanceof Comment&&null!==$(o)||(null===t&&(t=r.textContent),r.parentNode?.removeChild(r))}return t}},Ge={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const i=Ze(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,r/s.width),i=Math.min(1,o/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ze(e,t).blob}};function Ze(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Qe=new Set,et={enableNavigationPrompt:function(e){0===Qe.size&&window.addEventListener("beforeunload",tt),Qe.add(e)},disableNavigationPrompt:function(e){Qe.delete(e),0===Qe.size&&window.removeEventListener("beforeunload",tt)}};function tt(e){e.preventDefault(),e.returnValue=!0}const nt=new Map,rt={navigateTo:function(e,t,n=!1){Me(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(i.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=s.get(t.browserEventName);n?n.push(e):s.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}i.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Oe,domWrapper:Ue,Virtualize:Ke,PageTitle:qe,InputFile:Ge,NavigationLock:et,getJSDataStreamChunk:async function(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)},attachWebRendererInterop:function(t,n,r,o){if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(p)throw new Error("Dynamic root components have already been enabled.");p=t,g=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(N(t),r,o),A.get(t)?.[0]?.(),function(e){for(const t of C)t(e)}(t)}}};window.Blazor=rt;const ot=navigator,it=ot.userAgentData&&ot.userAgentData.brands,st=it&&it.length>0?it.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):window.chrome,at=ot.userAgentData?.platform??navigator.platform;function ct(e){return 0!==e.debugLevel&&(st||navigator.userAgent.includes("Firefox"))}let lt=!1;function ut(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),lt||(lt=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}var dt,ft;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(dt||(dt={})),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(ft||(ft={}));class mt{constructor(e=!0,t,n,r=0){this.singleRuntime=e,this.logger=t,this.webRendererId=r,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=o;let u=n;e.webRendererId===dt.Server&&c&&(u=c),e.webRendererId===dt.WebAssembly&&s&&(u=s);let d=r;return e.webRendererId===dt.Server&&l&&(d=l),e.webRendererId===dt.WebAssembly&&a&&(d=a),i(e,u,d,t)}return function(e,t,n){const o=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:u,afterWebAssemblyStarted:d,beforeServerStart:f,afterServerStarted:m}=t,h=!(c||l||u||d||f||m||!s&&!a),p=h&&o.enableClassicInitializers;if(h&&!o.enableClassicInitializers)e.logger?.log(ft.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(p)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(o),u&&o.webAssembly.initializers.beforeStart.push(u),d&&o.webAssembly.initializers.afterStarted.push(d),f&&o.circuit.initializers.beforeStart.push(f),m&&o.circuit.initializers.afterStarted.push(m),l&&e.afterStartedCallbacks.push(l),c)return c(o)}(e,o,t)}function i(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,A.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let ht,pt,gt,bt,yt=null;const vt={load:function(e,t){return async function(e,t){const{dotnet:n}=await async function(e){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");let t="_framework/dotnet.js";if(e.loadBootResource){const n="dotnetjs",r=e.loadBootResource(n,"dotnet.js",t,"","js-module-dotnet");if("string"==typeof r)t=r;else if(r)throw new Error(`For a ${n} resource, custom loaders must supply a URI string.`)}const n=new URL(t,document.baseURI).toString();return await import(n)}(e),r=function(e,t){const n={maxParallelDownloads:1e6,enableDownloadRetry:!1,applicationEnvironment:e.environment},r={...window.Module||{},onConfigLoaded:async n=>{n.environmentVariables||(n.environmentVariables={}),"sharded"===n.globalizationMode&&(n.environmentVariables.__BLAZOR_SHARDED_ICU="1"),rt._internal.getApplicationEnvironment=()=>n.applicationEnvironment,t?.(n),bt=await async function(e,t){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new mt(!1,void 0,e.initializers.afterStarted,dt.WebAssembly);{const n=[e,t.resources?.extensions??{}],r=new mt(!0,void 0,void 0,dt.WebAssembly),o=Object.keys(t?.resources?.libraryInitializers||{});return await r.importInitializersAsync(o,n),r}}(e,n)},onDownloadResourceProgress:wt,config:n,out:St,err:Ct};return r}(e,t);e.applicationCulture&&n.withApplicationCulture(e.applicationCulture),e.environment&&n.withApplicationEnvironment(e.environment),e.loadBootResource&&n.withResourceLoader(e.loadBootResource),n.withModuleConfig(r),e.configureRuntime&&e.configureRuntime(n),gt=await n.create()}(e,t)},start:function(){return async function(){if(!gt)throw new Error("The runtime must be loaded it gets configured.");const{setModuleImports:t,INTERNAL:n,getConfig:r,invokeLibraryInitializers:o}=gt;pt=n,function(e){const t=at.match(/^Mac/i)?"Cmd":"Alt";ct(e)&&console.info(`Debugging hotkey: Shift+${t}+D (when application has focus)`),document.addEventListener("keydown",(t=>{t.shiftKey&&(t.metaKey||t.altKey)&&"KeyD"===t.code&&(ct(e)?navigator.userAgent.includes("Firefox")?async function(){const e=await fetch(`_framework/debug?url=${encodeURIComponent(location.href)}&isFirefox=true`);200!==e.status&&console.warn(await e.text())}():st?function(){const e=document.createElement("a");e.href=`_framework/debug?url=${encodeURIComponent(location.href)}`,e.target="_blank",e.rel="noopener noreferrer",e.click()}():console.error("Currently, only Microsoft Edge (80+), Google Chrome, or Chromium, are supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))}))}(r()),rt.runtime=gt,rt._internal.dotNetCriticalError=Ct,t("blazor-internal",{Blazor:{_internal:rt._internal}});const i=await gt.getAssemblyExports("Microsoft.AspNetCore.Components.WebAssembly");return Object.assign(rt._internal,{dotNetExports:{...i.Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime}}),ht=e.attachDispatcher({beginInvokeDotNetFromJS:(e,t,n,r,o)=>{if(At(),!r&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");const i=r?r.toString():t;rt._internal.dotNetExports.BeginInvokeDotNet(e?e.toString():null,i,n,o)},endInvokeJSFromDotNet:(e,t,n)=>{rt._internal.dotNetExports.EndInvokeJS(n)},sendByteArray:(e,t)=>{rt._internal.dotNetExports.ReceiveByteArrayFromJS(e,t)},invokeDotNetFromJS:(e,t,n,r)=>(At(),rt._internal.dotNetExports.InvokeDotNet(e||null,t,n??0,r))}),{invokeLibraryInitializers:o}}()},callEntryPoint:async function(){try{await gt.runMain(gt.getConfig().mainAssemblyName,[])}catch(e){console.error(e),ut()}},getArrayEntryPtr:function(e,t,n){const r=function(e){return e+12}(e)+4+t*n;return r},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return gt.getHeapI16(e+(t||0))},readInt32Field:function(e,t){return gt.getHeapI32(e+(t||0))},readUint64Field:function(e,t){return gt.getHeapU52(e+(t||0))},readObjectField:function(e,t){return gt.getHeapU32(e+(t||0))},readStringField:function(e,t,n){const r=gt.getHeapU32(e+(t||0));if(0===r)return null;if(n){const e=pt.monoObjectAsBoolOrNullUnsafe(r);if("boolean"==typeof e)return e?"":null}return pt.monoStringToStringUnsafe(r)},readStructField:function(e,t){return e+(t||0)},beginHeapLock:function(){return At(),yt=It.create(),yt},invokeWhenHeapUnlocked:function(e){yt?yt.enqueuePostReleaseAction(e):e()}};function wt(e,t){const n=e/t*100;document.documentElement.style.setProperty("--blazor-load-percentage",`${n}%`),document.documentElement.style.setProperty("--blazor-load-percentage-text",`"${Math.floor(n)}%"`)}const Et=["DEBUGGING ENABLED"],St=e=>Et.indexOf(e)<0&&console.log(e),Ct=e=>{console.error(e||"(null)"),ut()};function At(){if(yt)throw new Error("Assertion failed - heap is currently locked")}class It{enqueuePostReleaseAction(e){this.postReleaseActions||(this.postReleaseActions=[]),this.postReleaseActions.push(e)}release(){if(yt!==this)throw new Error("Trying to release a lock which isn't current");for(pt.mono_wasm_gc_unlock(),yt=null;this.postReleaseActions?.length;)this.postReleaseActions.shift()(),At()}static create(){return pt.mono_wasm_gc_lock(),new It}}class Nt{constructor(e){this.batchAddress=e,this.arrayRangeReader=Rt,this.arrayBuilderSegmentReader=kt,this.diffReader=Dt,this.editReader=_t,this.frameReader=Tt}updatedComponents(){return t.readStructField(this.batchAddress,0)}referenceFrames(){return t.readStructField(this.batchAddress,Rt.structLength)}disposedComponentIds(){return t.readStructField(this.batchAddress,2*Rt.structLength)}disposedEventHandlerIds(){return t.readStructField(this.batchAddress,3*Rt.structLength)}updatedComponentsEntry(e,t){return Ft(e,t,Dt.structLength)}referenceFramesEntry(e,t){return Ft(e,t,Tt.structLength)}disposedComponentIdsEntry(e,n){const r=Ft(e,n,4);return t.readInt32Field(r)}disposedEventHandlerIdsEntry(e,n){const r=Ft(e,n,8);return t.readUint64Field(r)}}const Rt={structLength:8,values:e=>t.readObjectField(e,0),count:e=>t.readInt32Field(e,4)},kt={structLength:12,values:e=>{const n=t.readObjectField(e,0),r=t.getObjectFieldsBaseAddress(n);return t.readObjectField(r,0)},offset:e=>t.readInt32Field(e,4),count:e=>t.readInt32Field(e,8)},Dt={structLength:4+kt.structLength,componentId:e=>t.readInt32Field(e,0),edits:e=>t.readStructField(e,4),editsEntry:(e,t)=>Ft(e,t,_t.structLength)},_t={structLength:20,editType:e=>t.readInt32Field(e,0),siblingIndex:e=>t.readInt32Field(e,4),newTreeIndex:e=>t.readInt32Field(e,8),moveToSiblingIndex:e=>t.readInt32Field(e,8),removedAttributeName:e=>t.readStringField(e,16)},Tt={structLength:36,frameType:e=>t.readInt16Field(e,4),subtreeLength:e=>t.readInt32Field(e,8),elementReferenceCaptureId:e=>t.readStringField(e,16),componentId:e=>t.readInt32Field(e,12),elementName:e=>t.readStringField(e,16),textContent:e=>t.readStringField(e,16),markupContent:e=>t.readStringField(e,16),attributeName:e=>t.readStringField(e,16),attributeValue:e=>t.readStringField(e,24,!0),attributeEventHandlerId:e=>t.readUint64Field(e,8)};function Ft(e,n,r){return t.getArrayEntryPtr(e,n,r)}const Lt=/^\s*Blazor-WebAssembly-Component-State:(?[a-zA-Z0-9+/=]+)$/;function Ot(e){return Mt(e,Lt)}function Mt(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const r=e.textContent||"",o=t.exec(r),i=o&&o.groups&&o.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const r=e.childNodes;for(let e=0;e.*)$/);function Bt(e,t){const n=e.currentElement;var r,o,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=Pt.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:r}=e;if(r){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=Pt.exec(e.textContent),o=t&&t[1];if(o)return Kt(o,r),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return o=n,i=c,Ut(r=s),{...r,uniqueId:$t++,start:o,end:i};case"server":return function(e,t,n){return Wt(e),{...e,uniqueId:$t++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return Wt(e),Ut(e),{...e,uniqueId:$t++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let Ht,jt,Jt,zt,$t=0;function Wt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function Ut(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function Kt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const r=n.prerenderId;if(!r)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(r!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${r}'`)}class Vt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{zt=e}));const Yt=new Promise((e=>{}));let qt;const Gt=new Promise((e=>{qt=e}));function Zt(e){if(Ht)throw new Error("WebAssembly options have already been configured.");!async function(e){const t=await e;Ht=t,qt()}(e)}function Qt(e){if(void 0!==Jt)throw new Error("Blazor WebAssembly has already started.");return Jt=new Promise(en.bind(null,e)),Jt}async function en(e,n,r){(function(){if(window.parent!==window&&!window.opener&&window.frameElement){const e=window.sessionStorage&&window.sessionStorage["Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings"],t=e&&JSON.parse(e);return t&&t.redirect_uri&&location.href.startsWith(t.redirect_uri)}return!1})()&&await new Promise((()=>{}));const o=tn();!function(e){const t=R;R=(e,n,r)=>{((e,t,n)=>{const r=function(e){return he[e]}(e);r?.eventDelegator.getHandler(t)&&vt.invokeWhenHeapUnlocked(n)})(e,n,(()=>t(e,n,r)))}}(),rt._internal.applyHotReload=(e,t,n,r,o)=>{ht.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDelta",e,t,n,r,o??null)},rt._internal.getApplyUpdateCapabilities=()=>ht.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","GetApplyUpdateCapabilities"),rt._internal.invokeJSJson=nn,rt._internal.endInvokeDotNetFromJS=rn,rt._internal.receiveWebAssemblyDotNetDataStream=on,rt._internal.receiveByteArray=sn;const i=(t=vt,t);rt.platform=i,rt._internal.renderBatch=(e,t)=>{const n=vt.beginHeapLock();try{!function(e,t){const n=he[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),i=r.values(o),s=r.count(o),a=t.referenceFrames(),c=r.values(a),l=t.diffReader;for(let e=0;e{await ht.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t,n)}),(async(e,t,n,r)=>{const o=await ht.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChangingAsync",t,n,r);rt._internal.navigationManager.endLocationChanging(e,o)}));const s=new Xt(e);rt._internal.registeredComponents={getRegisteredComponentsCount:()=>s.getCount(),getAssembly:e=>s.getAssembly(e),getTypeName:e=>s.getTypeName(e),getParameterDefinitions:e=>s.getParameterDefinitions(e)||"",getParameterValues:e=>s.getParameterValues(e)||""},rt._internal.getPersistedState=()=>Ot(document)||"",rt._internal.getInitialComponentsUpdate=()=>Yt,rt._internal.updateRootComponents=e=>rt._internal.dotNetExports?.UpdateRootComponentsCore(e),rt._internal.endUpdateRootComponents=t=>e.onAfterUpdateRootComponents?.(t),rt._internal.attachRootComponentToElement=(e,t,n)=>{const r=s.resolveRegisteredElement(e);r?we(n,r,t,!1):function(e,t,n){const r="::before";let o=!1;if(e.endsWith("::after"))e=e.slice(0,-7),o=!0;else if(e.endsWith(r))throw new Error(`The '${r}' selector is not supported.`);const i=function(e){const t=h.get(e);if(t)return h.delete(e),t}(e)||document.querySelector(e);if(!i)throw new Error(`Could not find any element matching selector '${e}'.`);we(n,B(i,!0),t,o)}(e,t,n)};try{await o,await i.start()}catch(e){throw new Error(`Failed to start platform. Reason: ${e}`)}i.callEntryPoint(),bt.invokeAfterStartedCallbacks(rt),n()}function tn(){return jt??=(async()=>{await Gt;const e=Ht??{},t=Ht?.configureRuntime;e.configureRuntime=e=>{t?.(e)},await vt.load(e,zt)})(),jt}function nn(e,t,n,r,o){return 0!==o?(ht.beginInvokeJSFromDotNet(o,e,r,n,t),null):ht.invokeJSFromDotNet(e,r,n,t)}function rn(e,t,n){ht.endInvokeDotNetFromJS(e,t,n)}function on(e,t,n,r){!function(e,t,n,r,o){let i=nt.get(t);if(!i){const n=new ReadableStream({start(e){nt.set(t,e),i=e}});e.supplyDotNetStream(t,n)}o?(i.error(o),nt.delete(t)):0===r?(i.close(),nt.delete(t)):i.enqueue(n.length===r?n:n.subarray(0,r))}(ht,e,t,n,r)}function sn(e,t){ht.receiveByteArray(e,t)}class an{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class cn{constructor(){this._eventListeners=new Map}static create(e){const t=new cn;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const r={...t,type:e};for(const e of n)e(r)}}let ln=!1;async function un(e){if(ln)throw new Error("Blazor has already started.");ln=!0,Zt(Promise.resolve(e||{})),cn.create(rt);const t=xt(document,"webassembly"),n=new an(t);await Qt(n)}rt.start=un,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&un().catch(Ct)}(); +!function(){"use strict";var e;let t;var n,r;!function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const u=0,d={[u]:new l(window)};d[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let f,m=1;function h(e){t.push(e)}function p(e){if(e&&"object"==typeof e){d[m]=new l(e);const t={[n]:m};return m++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function g(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[s]:t};try{const t=p(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function b(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function y(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new v(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=h,e.invokeMethod=function(e,t,...n){return y().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return y().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=p,e.createJSStreamReference=g,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&S(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(f=e.JSCallResultType||(e.JSCallResultType={}));class v{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=b(this,t),i=N(E(e,r)(...o||[]),n);return null==i?null:k(this,i)}beginInvokeJSFromDotNet(e,t,n,r,o){const i=new Promise((e=>{const r=b(this,n);e(E(t,o)(...r||[]))}));e&&i.then((t=>k(this,[e,!0,N(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,w(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?b(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=k(this,r),i=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return i?b(this,i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,i=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const i=k(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,i)}catch(e){this.completePendingCall(o,!1,e)}return i}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new I;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new I;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function w(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function E(e,t){const n=d[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function S(e){delete d[e]}e.findJSFunction=E,e.disposeJSObjectReferenceById=S;class C{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=C,h((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new C(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=d[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(i)){const e=t[i],n=c.getDotNetStreamPromise(e);return new A(n)}}return t}));class A{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class I{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function N(e,t){switch(t){case f.Default:return e;case f.JSObjectReference:return p(e);case f.JSStreamReference:return g(e);case f.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let R=0;function k(e,t){R=0,c=e;const n=JSON.stringify(t,D);return c=void 0,n}function D(e,t){if(t instanceof C)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(R,t);const e={[o]:R};return R++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(n||(n={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(r||(r={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const i=new Map,s=new Map,a=[];function c(e){return i.get(e)}function l(e){const t=i.get(e);return t?.browserEventName||e}function u(e,t){e.forEach((e=>i.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),u(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),u(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...f(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),u(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),u(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type,isComposing:t.isComposing};var t}}),u(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>f(e)}),u(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),u(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),u(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...f(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),u(["wheel","mousewheel"],{createEventArgs:e=>{return{...f(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),u(["cancel","close","toggle"],{createEventArgs:()=>({})});const m=["date","datetime-local","month","time","week"],h=new Map;let p,g,b=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++b).toString();h.set(r,e);const o=await E().invokeMethodAsync("AddRootComponent",t,r),i=new w(o,g[t]);return await i.setParameters(n),i}};class v{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new v)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return E().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await E().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function E(){if(!p)throw new Error("Dynamic root components have not been enabled in this application.");return p}const S=new Map,C=[],A=new Map;function I(e,t,n){return R(e,t.eventHandlerId,(()=>N(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function N(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let R=(e,t,n)=>n();const k=O(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),D={submit:!0},_=O(["click","dblclick","mousedown","mousemove","mouseup"]);class T{static{this.nextEventDelegatorId=0}constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++T.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new F(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),i=o.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{const i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,s.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),i=null,s=!1;const a=Object.prototype.hasOwnProperty.call(k,e);let l=!1;for(;r;){const f=r,m=this.getEventHandlerInfosForElement(f,!1);if(m){const n=m.getHandler(e);if(n&&(u=f,d=t.type,!((u instanceof HTMLButtonElement||u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(_,d)&&u.disabled))){if(!s){const n=c(e);i=n?.createEventArgs?n.createEventArgs(t):{},s=!0}Object.prototype.hasOwnProperty.call(D,t.type)&&t.preventDefault(),I(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},i)}m.stopPropagation(e)&&(l=!0),m.preventDefault(e)&&t.preventDefault()}r=a||l?void 0:n.shift()}var u,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new L:null}}class F{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(k,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class L{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function O(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const M=Symbol(),x=Symbol(),P=Symbol();function B(e,t){if(M in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=B(t,!0);r[x]=e,n.push(r)}))}return e[M]=n,e}function H(e){const t=K(e);for(;t.length;)z(e,0)}function j(e,t){const n=document.createComment("!");return J(n,e,t),n}function J(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=K(r);if(t?.length>0){const t=G(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const i=W(r);if(i){const e=K(i),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[x]}const s=K(t);if(n0;)z(n,0)}const r=n;r.parentNode.removeChild(r)}function W(e){return e[x]||null}function $(e,t){return K(e)[t]}function U(e){const t=Y(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function K(e){return e[M]}function V(e){const t=K(W(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function X(e,t){const n=K(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):q(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let i=r;for(;i;){const e=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function Y(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function q(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):q(e,W(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=W(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function Z(e){return`_bl_${e}`}const Q="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Q)&&"string"==typeof t[Q]?function(e){const t=`[${Z(e)}]`;return document.querySelector(t)}(t[Q]):t));const ee="_blazorDeferredValue";function te(e){return"select-multiple"===e.type}function ne(e,t){e.value=t||""}function re(e,t){e instanceof HTMLSelectElement?te(e)?function(e,t){t||=[];for(let n=0;n{Ne()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var s;let a=0;for(;i.firstChild;)J(i.firstChild,o,a++)}applyAttribute(e,t,n,r){const o=e.frameReader,i=o.attributeName(r),s=o.attributeEventHandlerId(r);if(s){const e=me(i);return void this.eventDelegator.setListener(n,e,s,t)}const a=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,i,a)}insertFrameRange(e,t,n,r,o,i,s){const a=r;for(let a=i;a{Je(t,e)})},enableNavigationInterception:function(e){if(void 0!==pe&&pe!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");pe=e},setHasLocationChangingListeners:function(e,t){const n=Te.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Le&&e===_e&&(Le(t),Le=null)},navigateTo:function(e,t){Me(e,t,!0)},refresh:function(e){!e&&Ce()?Ae(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Se};function Me(e,t,n=!1){const r=Ie(e);!t.forceLoad&&Ee(r)?$e()?xe(r,!1,t.replaceHistoryEntry,t.historyEntryState,n):Ae(r,t.replaceHistoryEntry):function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry)}async function xe(e,t,n,r=void 0,o=!1){if(He(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Pe(e,n,r),void function(e){const t=e.indexOf("#");t!==e.length-1&&Se(e.substring(t+1))}(e);const i=We();(o||!i?.hasLocationChangingEventListeners||await je(e,r,t,i))&&(ve=!0,Pe(e,n,r),await Je(t))}function Pe(e,t,n=void 0){t?history.replaceState({userState:n,_index:De},"",e):(De++,history.pushState({userState:n,_index:De},"",e))}function Be(e){return new Promise((t=>{const n=Fe;Fe=()=>{Fe=n,t()},history.go(e)}))}function He(){Le&&(Le(!1),Le=null)}function je(e,t,n,r){return new Promise((o=>{He(),_e++,Le=o,r.locationChanging(_e,e,t,n)}))}async function Je(e,t){const n=t??location.href;await Promise.all(Array.from(Te,(async([t,r])=>{var o;o=t,S.has(o)&&await r.locationChanged(n,history.state?.userState,e)})))}async function ze(e){Fe&&$e()&&await Fe(e),De=history.state?._index??0}function We(){const e=Re();if(void 0!==e)return Te.get(e)}function $e(){return Ne()||!Ce()}const Ue={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e){const t=document.querySelector(e);t&&(t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0}))}},Ke={init:function(e,t,n,r=50){const o=Xe(t);(o||document.documentElement).style.overflowAnchor="none";const i=document.createRange();f(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const s=new IntersectionObserver((function(r){r.forEach((r=>{if(!r.isIntersecting)return;i.setStartAfter(t),i.setEndBefore(n);const o=i.getBoundingClientRect().height,s=r.rootBounds?.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,o,s):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,o,s)}))}),{root:o,rootMargin:`${r}px`});s.observe(t),s.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:u}=Ye(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{f(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),s.unobserve(e),s.observe(e)}));return n.observe(e,t),n}function f(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[u]={intersectionObserver:s,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ye(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Ve=Symbol();function Xe(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Xe(e.parentElement):null}function Ye(e){const t=e._callDispatcher,n=e._id;return t[Ve]??={},{observersByDotNetObjectId:t[Ve],id:n}}const qe={getAndRemoveExistingTitle:function(){const e=document.head?document.head.getElementsByTagName("title"):[];if(0===e.length)return null;let t=null;for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.previousSibling;o instanceof Comment&&null!==W(o)||(null===t&&(t=r.textContent),r.parentNode?.removeChild(r))}return t}},Ge={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const i=Ze(e,t),s=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(i.blob)})),a=await new Promise((function(e){const t=Math.min(1,r/s.width),i=Math.min(1,o/s.height),a=Math.min(t,i),c=document.createElement("canvas");c.width=Math.round(s.width*a),c.height=Math.round(s.height*a),c.getContext("2d")?.drawImage(s,0,0,c.width,c.height),c.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:i.lastModified,name:i.name,size:a?.size||0,contentType:n,blob:a||i.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ze(e,t).blob}};function Ze(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Qe=new Set,et={enableNavigationPrompt:function(e){0===Qe.size&&window.addEventListener("beforeunload",tt),Qe.add(e)},disableNavigationPrompt:function(e){Qe.delete(e),0===Qe.size&&window.removeEventListener("beforeunload",tt)}};function tt(e){e.preventDefault(),e.returnValue=!0}const nt=new Map,rt={navigateTo:function(e,t,n=!1){Me(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(i.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=s.get(t.browserEventName);n?n.push(e):s.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}i.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Oe,domWrapper:Ue,Virtualize:Ke,PageTitle:qe,InputFile:Ge,NavigationLock:et,getJSDataStreamChunk:async function(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)},attachWebRendererInterop:function(t,n,r,o){if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(p)throw new Error("Dynamic root components have already been enabled.");p=t,g=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(N(t),r,o),A.get(t)?.[0]?.(),function(e){for(const t of C)t(e)}(t)}}};window.Blazor=rt;const ot=navigator,it=ot.userAgentData&&ot.userAgentData.brands,st=it&&it.length>0?it.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):window.chrome,at=ot.userAgentData?.platform??navigator.platform;function ct(e){return 0!==e.debugLevel&&(st||navigator.userAgent.includes("Firefox"))}let lt=!1;function ut(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),lt||(lt=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}var dt,ft;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(dt||(dt={})),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(ft||(ft={}));class mt{constructor(e=!0,t,n,r=0){this.singleRuntime=e,this.logger=t,this.webRendererId=r,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:s,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=o;let u=n;e.webRendererId===dt.Server&&c&&(u=c),e.webRendererId===dt.WebAssembly&&s&&(u=s);let d=r;return e.webRendererId===dt.Server&&l&&(d=l),e.webRendererId===dt.WebAssembly&&a&&(d=a),i(e,u,d,t)}return function(e,t,n){const o=n[0],{beforeStart:s,afterStarted:a,beforeWebStart:c,afterWebStarted:l,beforeWebAssemblyStart:u,afterWebAssemblyStarted:d,beforeServerStart:f,afterServerStarted:m}=t,h=!(c||l||u||d||f||m||!s&&!a),p=h&&o.enableClassicInitializers;if(h&&!o.enableClassicInitializers)e.logger?.log(ft.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead.`);else if(p)return i(e,s,a,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(o),u&&o.webAssembly.initializers.beforeStart.push(u),d&&o.webAssembly.initializers.afterStarted.push(d),f&&o.circuit.initializers.beforeStart.push(f),m&&o.circuit.initializers.afterStarted.push(m),l&&e.afterStartedCallbacks.push(l),c)return c(o)}(e,o,t)}function i(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,A.get(n)?.[1]);var n;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let ht,pt,gt,bt,yt=null;const vt={load:function(e,t){return async function(e,t){const{dotnet:n}=await async function(e){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");let t="_framework/dotnet.js";if(e.loadBootResource){const n="dotnetjs",r=e.loadBootResource(n,"dotnet.js",t,"","js-module-dotnet");if("string"==typeof r)t=r;else if(r)throw new Error(`For a ${n} resource, custom loaders must supply a URI string.`)}const n=new URL(t,document.baseURI).toString();return await import(n)}(e),r=function(e,t){const n={maxParallelDownloads:1e6,enableDownloadRetry:!1,applicationEnvironment:e.environment},r={...window.Module||{},onConfigLoaded:async n=>{n.environmentVariables||(n.environmentVariables={}),"sharded"===n.globalizationMode&&(n.environmentVariables.__BLAZOR_SHARDED_ICU="1"),rt._internal.getApplicationEnvironment=()=>n.applicationEnvironment,t?.(n),bt=await async function(e,t){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new mt(!1,void 0,e.initializers.afterStarted,dt.WebAssembly);{const n=[e,t.resources?.extensions??{}],r=new mt(!0,void 0,void 0,dt.WebAssembly),o=Object.keys(t?.resources?.libraryInitializers||{});return await r.importInitializersAsync(o,n),r}}(e,n)},onDownloadResourceProgress:wt,config:n,out:St,err:Ct};return r}(e,t);e.applicationCulture&&n.withApplicationCulture(e.applicationCulture),e.environment&&n.withApplicationEnvironment(e.environment),e.loadBootResource&&n.withResourceLoader(e.loadBootResource),n.withModuleConfig(r),e.configureRuntime&&e.configureRuntime(n),gt=await n.create()}(e,t)},start:function(){return async function(){if(!gt)throw new Error("The runtime must be loaded it gets configured.");const{setModuleImports:t,INTERNAL:n,getConfig:r,invokeLibraryInitializers:o}=gt;pt=n,function(e){const t=at.match(/^Mac/i)?"Cmd":"Alt";ct(e)&&console.info(`Debugging hotkey: Shift+${t}+D (when application has focus)`),document.addEventListener("keydown",(t=>{t.shiftKey&&(t.metaKey||t.altKey)&&"KeyD"===t.code&&(ct(e)?navigator.userAgent.includes("Firefox")?async function(){const e=await fetch(`_framework/debug?url=${encodeURIComponent(location.href)}&isFirefox=true`);200!==e.status&&console.warn(await e.text())}():st?function(){const e=document.createElement("a");e.href=`_framework/debug?url=${encodeURIComponent(location.href)}`,e.target="_blank",e.rel="noopener noreferrer",e.click()}():console.error("Currently, only Microsoft Edge (80+), Google Chrome, or Chromium, are supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))}))}(r()),rt.runtime=gt,rt._internal.dotNetCriticalError=Ct,t("blazor-internal",{Blazor:{_internal:rt._internal}});const i=await gt.getAssemblyExports("Microsoft.AspNetCore.Components.WebAssembly");return Object.assign(rt._internal,{dotNetExports:{...i.Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime}}),ht=e.attachDispatcher({beginInvokeDotNetFromJS:(e,t,n,r,o)=>{if(At(),!r&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");const i=r?r.toString():t;rt._internal.dotNetExports.BeginInvokeDotNet(e?e.toString():null,i,n,o)},endInvokeJSFromDotNet:(e,t,n)=>{rt._internal.dotNetExports.EndInvokeJS(n)},sendByteArray:(e,t)=>{rt._internal.dotNetExports.ReceiveByteArrayFromJS(e,t)},invokeDotNetFromJS:(e,t,n,r)=>(At(),rt._internal.dotNetExports.InvokeDotNet(e||null,t,n??0,r))}),{invokeLibraryInitializers:o}}()},callEntryPoint:async function(){try{await gt.runMain(gt.getConfig().mainAssemblyName,[])}catch(e){console.error(e),ut()}},getArrayEntryPtr:function(e,t,n){const r=function(e){return e+12}(e)+4+t*n;return r},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return gt.getHeapI16(e+(t||0))},readInt32Field:function(e,t){return gt.getHeapI32(e+(t||0))},readUint64Field:function(e,t){return gt.getHeapU52(e+(t||0))},readObjectField:function(e,t){return gt.getHeapU32(e+(t||0))},readStringField:function(e,t,n){const r=gt.getHeapU32(e+(t||0));if(0===r)return null;if(n){const e=pt.monoObjectAsBoolOrNullUnsafe(r);if("boolean"==typeof e)return e?"":null}return pt.monoStringToStringUnsafe(r)},readStructField:function(e,t){return e+(t||0)},beginHeapLock:function(){return At(),yt=It.create(),yt},invokeWhenHeapUnlocked:function(e){yt?yt.enqueuePostReleaseAction(e):e()}};function wt(e,t){const n=e/t*100;document.documentElement.style.setProperty("--blazor-load-percentage",`${n}%`),document.documentElement.style.setProperty("--blazor-load-percentage-text",`"${Math.floor(n)}%"`)}const Et=["DEBUGGING ENABLED"],St=e=>Et.indexOf(e)<0&&console.log(e),Ct=e=>{console.error(e||"(null)"),ut()};function At(){if(yt)throw new Error("Assertion failed - heap is currently locked")}class It{enqueuePostReleaseAction(e){this.postReleaseActions||(this.postReleaseActions=[]),this.postReleaseActions.push(e)}release(){if(yt!==this)throw new Error("Trying to release a lock which isn't current");for(pt.mono_wasm_gc_unlock(),yt=null;this.postReleaseActions?.length;)this.postReleaseActions.shift()(),At()}static create(){return pt.mono_wasm_gc_lock(),new It}}class Nt{constructor(e){this.batchAddress=e,this.arrayRangeReader=Rt,this.arrayBuilderSegmentReader=kt,this.diffReader=Dt,this.editReader=_t,this.frameReader=Tt}updatedComponents(){return t.readStructField(this.batchAddress,0)}referenceFrames(){return t.readStructField(this.batchAddress,Rt.structLength)}disposedComponentIds(){return t.readStructField(this.batchAddress,2*Rt.structLength)}disposedEventHandlerIds(){return t.readStructField(this.batchAddress,3*Rt.structLength)}updatedComponentsEntry(e,t){return Ft(e,t,Dt.structLength)}referenceFramesEntry(e,t){return Ft(e,t,Tt.structLength)}disposedComponentIdsEntry(e,n){const r=Ft(e,n,4);return t.readInt32Field(r)}disposedEventHandlerIdsEntry(e,n){const r=Ft(e,n,8);return t.readUint64Field(r)}}const Rt={structLength:8,values:e=>t.readObjectField(e,0),count:e=>t.readInt32Field(e,4)},kt={structLength:12,values:e=>{const n=t.readObjectField(e,0),r=t.getObjectFieldsBaseAddress(n);return t.readObjectField(r,0)},offset:e=>t.readInt32Field(e,4),count:e=>t.readInt32Field(e,8)},Dt={structLength:4+kt.structLength,componentId:e=>t.readInt32Field(e,0),edits:e=>t.readStructField(e,4),editsEntry:(e,t)=>Ft(e,t,_t.structLength)},_t={structLength:20,editType:e=>t.readInt32Field(e,0),siblingIndex:e=>t.readInt32Field(e,4),newTreeIndex:e=>t.readInt32Field(e,8),moveToSiblingIndex:e=>t.readInt32Field(e,8),removedAttributeName:e=>t.readStringField(e,16)},Tt={structLength:36,frameType:e=>t.readInt16Field(e,4),subtreeLength:e=>t.readInt32Field(e,8),elementReferenceCaptureId:e=>t.readStringField(e,16),componentId:e=>t.readInt32Field(e,12),elementName:e=>t.readStringField(e,16),textContent:e=>t.readStringField(e,16),markupContent:e=>t.readStringField(e,16),attributeName:e=>t.readStringField(e,16),attributeValue:e=>t.readStringField(e,24,!0),attributeEventHandlerId:e=>t.readUint64Field(e,8)};function Ft(e,n,r){return t.getArrayEntryPtr(e,n,r)}const Lt=/^\s*Blazor-WebAssembly-Component-State:(?[a-zA-Z0-9+/=]+)$/;function Ot(e){return Mt(e,Lt)}function Mt(e,t,n="state"){if(e.nodeType===Node.COMMENT_NODE){const r=e.textContent||"",o=t.exec(r),i=o&&o.groups&&o.groups[n];return i&&e.parentNode?.removeChild(e),i}if(!e.hasChildNodes())return;const r=e.childNodes;for(let e=0;e.*)$/);function Bt(e,t){const n=e.currentElement;var r,o,i;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const s=Pt.exec(n.textContent),a=s&&s.groups&&s.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const s=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:r}=e;if(r){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=Pt.exec(e.textContent),o=t&&t[1];if(o)return Kt(o,r),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(s,n,e);if(t!==s.type)return;switch(s.type){case"webassembly":return o=n,i=c,Ut(r=s),{...r,uniqueId:Wt++,start:o,end:i};case"server":return function(e,t,n){return $t(e),{...e,uniqueId:Wt++,start:t,end:n}}(s,n,c);case"auto":return function(e,t,n){return $t(e),Ut(e),{...e,uniqueId:Wt++,start:t,end:n}}(s,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let Ht,jt,Jt,zt,Wt=0;function $t(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function Ut(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function Kt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const r=n.prerenderId;if(!r)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(r!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${r}'`)}class Vt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{zt=e}));const Yt=new Promise((e=>{}));let qt;const Gt=new Promise((e=>{qt=e}));function Zt(e){if(Ht)throw new Error("WebAssembly options have already been configured.");!async function(e){const t=await e;Ht=t,qt()}(e)}function Qt(e){if(void 0!==Jt)throw new Error("Blazor WebAssembly has already started.");return Jt=new Promise(en.bind(null,e)),Jt}async function en(e,n,r){(function(){if(window.parent!==window&&!window.opener&&window.frameElement){const e=window.sessionStorage&&window.sessionStorage["Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings"],t=e&&JSON.parse(e);return t&&t.redirect_uri&&location.href.startsWith(t.redirect_uri)}return!1})()&&await new Promise((()=>{}));const o=tn();!function(e){const t=R;R=(e,n,r)=>{((e,t,n)=>{const r=function(e){return he[e]}(e);r?.eventDelegator.getHandler(t)&&vt.invokeWhenHeapUnlocked(n)})(e,n,(()=>t(e,n,r)))}}(),rt._internal.applyHotReload=(e,t,n,r,o)=>{ht.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDelta",e,t,n,r,o??null)},rt._internal.applyHotReloadDeltas=(e,t)=>ht.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","ApplyHotReloadDeltas",e,t),rt._internal.getApplyUpdateCapabilities=()=>ht.invokeDotNetStaticMethod("Microsoft.AspNetCore.Components.WebAssembly","GetApplyUpdateCapabilities"),rt._internal.invokeJSJson=nn,rt._internal.endInvokeDotNetFromJS=rn,rt._internal.receiveWebAssemblyDotNetDataStream=on,rt._internal.receiveByteArray=sn;const i=(t=vt,t);rt.platform=i,rt._internal.renderBatch=(e,t)=>{const n=vt.beginHeapLock();try{!function(e,t){const n=he[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),i=r.values(o),s=r.count(o),a=t.referenceFrames(),c=r.values(a),l=t.diffReader;for(let e=0;e{await ht.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t,n)}),(async(e,t,n,r)=>{const o=await ht.invokeDotNetStaticMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChangingAsync",t,n,r);rt._internal.navigationManager.endLocationChanging(e,o)}));const s=new Xt(e);rt._internal.registeredComponents={getRegisteredComponentsCount:()=>s.getCount(),getAssembly:e=>s.getAssembly(e),getTypeName:e=>s.getTypeName(e),getParameterDefinitions:e=>s.getParameterDefinitions(e)||"",getParameterValues:e=>s.getParameterValues(e)||""},rt._internal.getPersistedState=()=>Ot(document)||"",rt._internal.getInitialComponentsUpdate=()=>Yt,rt._internal.updateRootComponents=e=>rt._internal.dotNetExports?.UpdateRootComponentsCore(e),rt._internal.endUpdateRootComponents=t=>e.onAfterUpdateRootComponents?.(t),rt._internal.attachRootComponentToElement=(e,t,n)=>{const r=s.resolveRegisteredElement(e);r?we(n,r,t,!1):function(e,t,n){const r="::before";let o=!1;if(e.endsWith("::after"))e=e.slice(0,-7),o=!0;else if(e.endsWith(r))throw new Error(`The '${r}' selector is not supported.`);const i=function(e){const t=h.get(e);if(t)return h.delete(e),t}(e)||document.querySelector(e);if(!i)throw new Error(`Could not find any element matching selector '${e}'.`);we(n,B(i,!0),t,o)}(e,t,n)};try{await o,await i.start()}catch(e){throw new Error(`Failed to start platform. Reason: ${e}`)}i.callEntryPoint(),bt.invokeAfterStartedCallbacks(rt),n()}function tn(){return jt??=(async()=>{await Gt;const e=Ht??{},t=Ht?.configureRuntime;e.configureRuntime=e=>{t?.(e)},await vt.load(e,zt)})(),jt}function nn(e,t,n,r,o){return 0!==o?(ht.beginInvokeJSFromDotNet(o,e,r,n,t),null):ht.invokeJSFromDotNet(e,r,n,t)}function rn(e,t,n){ht.endInvokeDotNetFromJS(e,t,n)}function on(e,t,n,r){!function(e,t,n,r,o){let i=nt.get(t);if(!i){const n=new ReadableStream({start(e){nt.set(t,e),i=e}});e.supplyDotNetStream(t,n)}o?(i.error(o),nt.delete(t)):0===r?(i.close(),nt.delete(t)):i.enqueue(n.length===r?n:n.subarray(0,r))}(ht,e,t,n,r)}function sn(e,t){ht.receiveByteArray(e,t)}class an{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class cn{constructor(){this._eventListeners=new Map}static create(e){const t=new cn;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){this._eventListeners.get(e)?.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const r={...t,type:e};for(const e of n)e(r)}}let ln=!1;async function un(e){if(ln)throw new Error("Blazor has already started.");ln=!0,Zt(Promise.resolve(e||{})),cn.create(rt);const t=xt(document,"webassembly"),n=new an(t);await Qt(n)}rt.start=un,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&un().catch(Ct)}(); diff --git a/src/Components/Web.JS/package.json b/src/Components/Web.JS/package.json index 3a0208f0701e..1ecbff22adba 100644 --- a/src/Components/Web.JS/package.json +++ b/src/Components/Web.JS/package.json @@ -1,5 +1,5 @@ { - "name": "microsoft.aspnetcore.components.web.js", + "name": "@microsoft/microsoft.aspnetcore.components.web.js", "private": true, "version": "0.0.1", "description": "", @@ -24,13 +24,13 @@ "@babel/preset-env": "^7.23.6", "@babel/preset-typescript": "^7.23.3", "@microsoft/dotnet-js-interop": "*", + "@microsoft/dotnet-runtime": "*", "@microsoft/signalr": "*", "@microsoft/signalr-protocol-msgpack": "*", "@types/jsdom": "^16.2.14", "@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/parser": "^5.26.0", "babel-jest": "^29.7.0", - "dotnet-runtime": "*", "eslint": "^8.16.0", "eslint-plugin-header": "^3.1.1", "jest": "^29.7.0", diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts b/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts index 3f3b27ee74de..b31a1c4b356f 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts @@ -14,7 +14,7 @@ import { addDispatchEventMiddleware } from './Rendering/WebRendererInteropMethod import { WebAssemblyComponentDescriptor, discoverWebAssemblyPersistedState } from './Services/ComponentDescriptorDiscovery'; import { receiveDotNetDataStream } from './StreamingInterop'; import { WebAssemblyComponentAttacher } from './Platform/WebAssemblyComponentAttacher'; -import { MonoConfig } from 'dotnet-runtime'; +import { MonoConfig } from '@microsoft/dotnet-runtime'; import { RootComponentManager } from './Services/RootComponentManager'; import { WebRendererId } from './Rendering/WebRendererId'; @@ -97,10 +97,15 @@ async function startCore(components: RootComponentManager { dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'ApplyHotReloadDelta', id, metadataDelta, ilDelta, pdbDelta, updatedTypes ?? null); }; + Blazor._internal.applyHotReloadDeltas = (deltas: { moduleId: string, metadataDelta: string, ilDelta: string, pdbDelta: string, updatedTypes: number[] }[], loggingLevel: number) => { + return dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'ApplyHotReloadDeltas', deltas, loggingLevel); + }; + Blazor._internal.getApplyUpdateCapabilities = () => dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'GetApplyUpdateCapabilities'); // Configure JS interop diff --git a/src/Components/Web.JS/src/GlobalExports.ts b/src/Components/Web.JS/src/GlobalExports.ts index c3194481528b..71d9b052c177 100644 --- a/src/Components/Web.JS/src/GlobalExports.ts +++ b/src/Components/Web.JS/src/GlobalExports.ts @@ -17,7 +17,7 @@ import { getNextChunk } from './StreamingInterop'; import { RootComponentsFunctions } from './Rendering/JSRootComponents'; import { attachWebRendererInterop } from './Rendering/WebRendererInteropMethods'; import { WebStartOptions } from './Platform/WebStartOptions'; -import { RuntimeAPI } from 'dotnet-runtime'; +import { RuntimeAPI } from '@microsoft/dotnet-runtime'; import { JSEventRegistry } from './Services/JSEventRegistry'; // TODO: It's kind of hard to tell which .NET platform(s) some of these APIs are relevant to. @@ -89,7 +89,11 @@ export interface IBlazor { } // APIs invoked by hot reload + + // obsolete: applyHotReload?: (id: string, metadataDelta: string, ilDelta: string, pdbDelta: string | undefined, updatedTypes?: number[]) => void; + + applyHotReloadDeltas?: (deltas: { moduleId: string, metadataDelta: string, ilDelta: string, pdbDelta: string, updatedTypes: number[] }[], loggingLevel: number) => {message: string, severity: number}[]; getApplyUpdateCapabilities?: () => string; hotReloadApplied?: () => void; } diff --git a/src/Components/Web.JS/src/JSInitializers/JSInitializers.WebAssembly.ts b/src/Components/Web.JS/src/JSInitializers/JSInitializers.WebAssembly.ts index 81d8a0d80490..4c6e202f01a2 100644 --- a/src/Components/Web.JS/src/JSInitializers/JSInitializers.WebAssembly.ts +++ b/src/Components/Web.JS/src/JSInitializers/JSInitializers.WebAssembly.ts @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -import { MonoConfig } from 'dotnet-runtime'; +import { MonoConfig } from '@microsoft/dotnet-runtime'; import { WebAssemblyStartOptions } from '../Platform/WebAssemblyStartOptions'; import { WebRendererId } from '../Rendering/WebRendererId'; import { JSInitializer } from './JSInitializers'; diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts b/src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts index 8272eb9aa44e..0ae89acaa9ca 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -import { MonoConfig } from 'dotnet-runtime'; +import { MonoConfig } from '@microsoft/dotnet-runtime'; const navigatorUA = navigator as MonoNavigatorUserAgent; const brands = navigatorUA.userAgentData && navigatorUA.userAgentData.brands; diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 8b31c404b74b..9eff6375548c 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -10,7 +10,7 @@ import { showErrorNotification } from '../../BootErrors'; import { Platform, System_Array, Pointer, System_Object, System_String, HeapLock, PlatformApi } from '../Platform'; import { WebAssemblyBootResourceType, WebAssemblyStartOptions } from '../WebAssemblyStartOptions'; import { Blazor } from '../../GlobalExports'; -import { DotnetModuleConfig, MonoConfig, ModuleAPI, RuntimeAPI, GlobalizationMode } from 'dotnet-runtime'; +import { DotnetModuleConfig, MonoConfig, ModuleAPI, RuntimeAPI, GlobalizationMode } from '@microsoft/dotnet-runtime'; import { fetchAndInvokeInitializers } from '../../JSInitializers/JSInitializers.WebAssembly'; import { JSInitializer } from '../../JSInitializers/JSInitializers'; diff --git a/src/Components/Web.JS/src/Platform/Platform.ts b/src/Components/Web.JS/src/Platform/Platform.ts index 728bd330b33d..8587e9204039 100644 --- a/src/Components/Web.JS/src/Platform/Platform.ts +++ b/src/Components/Web.JS/src/Platform/Platform.ts @@ -3,9 +3,9 @@ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { MonoObject, MonoString, MonoArray } from 'dotnet-runtime/dotnet-legacy'; +import { MonoObject, MonoString, MonoArray } from '@microsoft/dotnet-runtime/dotnet-legacy'; import { WebAssemblyStartOptions } from './WebAssemblyStartOptions'; -import { MonoConfig } from 'dotnet-runtime'; +import { MonoConfig } from '@microsoft/dotnet-runtime'; export interface Platform { load(options: Partial, onConfigLoaded?: (loadedConfig: MonoConfig) => void): Promise; diff --git a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts index 6eec9e2b9a1e..bb01684cf545 100644 --- a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts +++ b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -import { DotnetHostBuilder, AssetBehaviors } from 'dotnet-runtime'; +import { DotnetHostBuilder, AssetBehaviors } from '@microsoft/dotnet-runtime'; import { IBlazor } from '../GlobalExports'; export interface WebAssemblyStartOptions { diff --git a/src/Components/Web.JS/src/Services/WebRootComponentManager.ts b/src/Components/Web.JS/src/Services/WebRootComponentManager.ts index b1e3e3de814d..0ee177244139 100644 --- a/src/Components/Web.JS/src/Services/WebRootComponentManager.ts +++ b/src/Components/Web.JS/src/Services/WebRootComponentManager.ts @@ -7,7 +7,7 @@ import { WebRendererId } from '../Rendering/WebRendererId'; import { DescriptorHandler } from '../Rendering/DomMerging/DomSync'; import { disposeCircuit, hasStartedServer, isCircuitAvailable, startCircuit, startServer, updateServerRootComponents } from '../Boot.Server.Common'; import { hasLoadedWebAssemblyPlatform, hasStartedLoadingWebAssemblyPlatform, hasStartedWebAssembly, isFirstUpdate, loadWebAssemblyPlatformIfNotStarted, resolveInitialUpdate, setWaitForRootComponents, startWebAssembly, updateWebAssemblyRootComponents, waitForBootConfigLoaded } from '../Boot.WebAssembly.Common'; -import { MonoConfig } from 'dotnet-runtime'; +import { MonoConfig } from '@microsoft/dotnet-runtime'; import { RootComponentManager } from './RootComponentManager'; import { getRendererer } from '../Rendering/Renderer'; import { isPageLoading } from './NavigationEnhancement'; diff --git a/src/Components/Web/src/PublicAPI.Shipped.txt b/src/Components/Web/src/PublicAPI.Shipped.txt index c137dbac5717..ac01a1916c34 100644 --- a/src/Components/Web/src/PublicAPI.Shipped.txt +++ b/src/Components/Web/src/PublicAPI.Shipped.txt @@ -342,6 +342,8 @@ Microsoft.AspNetCore.Components.Web.InteractiveWebAssemblyRenderMode Microsoft.AspNetCore.Components.Web.InteractiveWebAssemblyRenderMode.InteractiveWebAssemblyRenderMode() -> void Microsoft.AspNetCore.Components.Web.InteractiveWebAssemblyRenderMode.InteractiveWebAssemblyRenderMode(bool prerender) -> void Microsoft.AspNetCore.Components.Web.InteractiveWebAssemblyRenderMode.Prerender.get -> bool +Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime +Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS(string! identifier, string? argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> string! Microsoft.AspNetCore.Components.Web.JSComponentConfigurationExtensions Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentConfigurationStore() -> void @@ -352,6 +354,8 @@ Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.Code.get -> string! Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.Code.set -> void Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.CtrlKey.get -> bool Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.CtrlKey.set -> void +Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.get -> bool +Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.set -> void Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.Key.get -> string! Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.Key.set -> void Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.KeyboardEventArgs() -> void @@ -503,6 +507,8 @@ Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemSize.ge Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemSize.set -> void Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemsProvider.get -> Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderDelegate? Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemsProvider.set -> void +Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount.get -> int +Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount.set -> void Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.OverscanCount.get -> int Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.OverscanCount.set -> void Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.Placeholder.get -> Microsoft.AspNetCore.Components.RenderFragment? @@ -558,8 +564,10 @@ override Microsoft.AspNetCore.Components.Forms.ValidationSummary.BuildRenderTree override Microsoft.AspNetCore.Components.Forms.ValidationSummary.OnParametersSet() -> void override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.Dispatcher.get -> Microsoft.AspNetCore.Components.Dispatcher! override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.HandleException(System.Exception! exception) -> void +override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.UpdateDisplayAsync(in Microsoft.AspNetCore.Components.RenderTree.RenderBatch renderBatch) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Components.RenderTree.WebRenderer.Dispose(bool disposing) -> void +override Microsoft.AspNetCore.Components.Routing.FocusOnNavigate.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void override Microsoft.AspNetCore.Components.Routing.FocusOnNavigate.OnAfterRenderAsync(bool firstRender) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Components.Routing.FocusOnNavigate.OnParametersSet() -> void override Microsoft.AspNetCore.Components.Routing.NavLink.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void diff --git a/src/Components/Web/src/PublicAPI.Unshipped.txt b/src/Components/Web/src/PublicAPI.Unshipped.txt index 551aa355b90b..7dc5c58110bf 100644 --- a/src/Components/Web/src/PublicAPI.Unshipped.txt +++ b/src/Components/Web/src/PublicAPI.Unshipped.txt @@ -1,9 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime -Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS(string! identifier, string? argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> string! -Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.get -> bool -Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.set -> void -Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount.get -> int -Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount.set -> void -override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! -override Microsoft.AspNetCore.Components.Routing.FocusOnNavigate.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void diff --git a/src/Components/WebAssembly/Authentication.Msal/src/Interop/package.json b/src/Components/WebAssembly/Authentication.Msal/src/Interop/package.json index 615dbb4a39a5..9d8c0d3c75af 100644 --- a/src/Components/WebAssembly/Authentication.Msal/src/Interop/package.json +++ b/src/Components/WebAssembly/Authentication.Msal/src/Interop/package.json @@ -1,5 +1,5 @@ { - "name": "microsoft.msal.components.webassembly", + "name": "@microsoft/microsoft.msal.components.webassembly", "private": true, "scripts": { "clean": "rimraf ./dist/Debug ./dist/Release", diff --git a/src/Components/WebAssembly/DevServer/src/Server/Startup.cs b/src/Components/WebAssembly/DevServer/src/Server/Startup.cs index 046031a29f79..a9870bf688fb 100644 --- a/src/Components/WebAssembly/DevServer/src/Server/Startup.cs +++ b/src/Components/WebAssembly/DevServer/src/Server/Startup.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Components.WebAssembly.DevServer.Server; @@ -69,6 +70,14 @@ public static void Configure(IApplicationBuilder app, IConfiguration configurati { OnPrepareResponse = fileContext => { + // Avoid caching index.html during development. + // When hot reload is enabled, a middleware injects a hot reload script into the response HTML. + // We don't want the browser to bypass this injection by using a cached response that doesn't + // contain the injected script. In the future, if script injection is removed in favor of a + // different mechanism, we can delete this comment and the line below it. + // See also: https://github.com/dotnet/aspnetcore/issues/45213 + fileContext.Context.Response.Headers[HeaderNames.CacheControl] = "no-store"; + if (applyCopHeaders) { // Browser multi-threaded runtime requires cross-origin policy headers to enable SharedArrayBuffer. diff --git a/src/Components/WebAssembly/JSInterop/src/PublicAPI.Shipped.txt b/src/Components/WebAssembly/JSInterop/src/PublicAPI.Shipped.txt index 00d726a42be1..7a868e7c891d 100644 --- a/src/Components/WebAssembly/JSInterop/src/PublicAPI.Shipped.txt +++ b/src/Components/WebAssembly/JSInterop/src/PublicAPI.Shipped.txt @@ -1,15 +1,7 @@ #nullable enable -~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1) -> TResult -~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0) -> TResult -~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier) -> TResult ~override Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.BeginInvokeJS(long asyncHandle, string identifier, string argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> void ~override Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeJS(string identifier, string argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> string Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime -Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier) -> TResult Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.WebAssemblyJSRuntime() -> void override Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.BeginInvokeJS(long asyncHandle, string! identifier, string? argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> void override Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo callInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult dispatchResult) -> void diff --git a/src/Components/WebAssembly/JSInterop/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/JSInterop/src/PublicAPI.Unshipped.txt index 9f03b1a9685f..7dc5c58110bf 100644 --- a/src/Components/WebAssembly/JSInterop/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/JSInterop/src/PublicAPI.Unshipped.txt @@ -1,9 +1 @@ #nullable enable -*REMOVED*~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -*REMOVED*~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1) -> TResult -*REMOVED*~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier, T0 arg0) -> TResult -*REMOVED*~Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string identifier) -> TResult -*REMOVED*Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -*REMOVED*Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -*REMOVED*Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -*REMOVED*Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled(string! identifier) -> TResult diff --git a/src/Components/WebAssembly/Server/src/PublicAPI.Shipped.txt b/src/Components/WebAssembly/Server/src/PublicAPI.Shipped.txt index 853b023e8399..63591709c1d6 100644 --- a/src/Components/WebAssembly/Server/src/PublicAPI.Shipped.txt +++ b/src/Components/WebAssembly/Server/src/PublicAPI.Shipped.txt @@ -7,6 +7,12 @@ Microsoft.AspNetCore.Builder.ComponentsWebAssemblyApplicationBuilderExtensions Microsoft.AspNetCore.Builder.WebAssemblyNetDebugProxyAppBuilderExtensions Microsoft.AspNetCore.Builder.WebAssemblyRazorComponentsEndpointConventionBuilderExtensions +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.AuthenticationStateSerializationOptions() -> void +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializationCallback.get -> System.Func>! +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializationCallback.set -> void +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializeAllClaims.get -> bool +Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializeAllClaims.set -> void Microsoft.AspNetCore.Components.WebAssembly.Server.TargetPickerUi Microsoft.AspNetCore.Components.WebAssembly.Server.TargetPickerUi.Display(Microsoft.AspNetCore.Http.HttpContext! context) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Components.WebAssembly.Server.TargetPickerUi.DisplayFirefox(Microsoft.AspNetCore.Http.HttpContext! context) -> System.Threading.Tasks.Task! @@ -14,10 +20,13 @@ Microsoft.AspNetCore.Components.WebAssembly.Server.TargetPickerUi.TargetPickerUi Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.PathPrefix.get -> Microsoft.AspNetCore.Http.PathString Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.PathPrefix.set -> void +Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.StaticAssetsManifestPath.get -> string? +Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.StaticAssetsManifestPath.set -> void Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.WebAssemblyComponentsEndpointOptions() -> void Microsoft.Extensions.DependencyInjection.WebAssemblyRazorComponentsBuilderExtensions static Microsoft.AspNetCore.Builder.ComponentsWebAssemblyApplicationBuilderExtensions.UseBlazorFrameworkFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder! applicationBuilder) -> Microsoft.AspNetCore.Builder.IApplicationBuilder! static Microsoft.AspNetCore.Builder.ComponentsWebAssemblyApplicationBuilderExtensions.UseBlazorFrameworkFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder! builder, Microsoft.AspNetCore.Http.PathString pathPrefix) -> Microsoft.AspNetCore.Builder.IApplicationBuilder! static Microsoft.AspNetCore.Builder.WebAssemblyNetDebugProxyAppBuilderExtensions.UseWebAssemblyDebugging(this Microsoft.AspNetCore.Builder.IApplicationBuilder! app) -> void static Microsoft.AspNetCore.Builder.WebAssemblyRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveWebAssemblyRenderMode(this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! builder, System.Action? callback = null) -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder! +static Microsoft.Extensions.DependencyInjection.WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization(this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! static Microsoft.Extensions.DependencyInjection.WebAssemblyRazorComponentsBuilderExtensions.AddInteractiveWebAssemblyComponents(this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! diff --git a/src/Components/WebAssembly/Server/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/Server/src/PublicAPI.Unshipped.txt index 9b1af1ef2d1e..7dc5c58110bf 100644 --- a/src/Components/WebAssembly/Server/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/Server/src/PublicAPI.Unshipped.txt @@ -1,10 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.AuthenticationStateSerializationOptions() -> void -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializationCallback.get -> System.Func>! -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializationCallback.set -> void -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializeAllClaims.get -> bool -Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializeAllClaims.set -> void -Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.StaticAssetsManifestPath.get -> string? -Microsoft.AspNetCore.Components.WebAssembly.Server.WebAssemblyComponentsEndpointOptions.StaticAssetsManifestPath.set -> void -static Microsoft.Extensions.DependencyInjection.WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization(this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder! diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/package.json b/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/package.json index 9e65eac7567f..dcef7f8ce791 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/package.json +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/package.json @@ -1,5 +1,5 @@ { - "name": "components.authentication", + "name": "@microsoft/components.authentication", "private": true, "scripts": { "clean": "rimraf ./dist/Debug ./dist/Release", diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Shipped.txt b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Shipped.txt index 3ce1e11f08d3..30d69b11b605 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Shipped.txt +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Shipped.txt @@ -44,6 +44,10 @@ Microsoft.AspNetCore.Components.WebAssembly.Authentication.ApiAuthorizationProvi Microsoft.AspNetCore.Components.WebAssembly.Authentication.ApiAuthorizationProviderOptions.ApiAuthorizationProviderOptions() -> void Microsoft.AspNetCore.Components.WebAssembly.Authentication.ApiAuthorizationProviderOptions.ConfigurationEndpoint.get -> string? Microsoft.AspNetCore.Components.WebAssembly.Authentication.ApiAuthorizationProviderOptions.ConfigurationEndpoint.set -> void +Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions +Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.AuthenticationStateDeserializationOptions() -> void +Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.DeserializationCallback.get -> System.Func!>! +Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.DeserializationCallback.set -> void Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler.AuthorizationMessageHandler(Microsoft.AspNetCore.Components.WebAssembly.Authentication.IAccessTokenProvider! provider, Microsoft.AspNetCore.Components.NavigationManager! navigation) -> void Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler.ConfigureHandler(System.Collections.Generic.IEnumerable! authorizedUrls, System.Collections.Generic.IEnumerable? scopes = null, string? returnUrl = null) -> Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler! @@ -228,6 +232,7 @@ static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationService static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! +static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddOidcAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddOidcAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddOidcAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder! diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt index e6de697cb73c..7dc5c58110bf 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt @@ -1,6 +1 @@ #nullable enable -Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions -Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.AuthenticationStateDeserializationOptions() -> void -Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.DeserializationCallback.get -> System.Func!>! -Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions.DeserializationCallback.set -> void -static Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action? configure = null) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentMessageSeverity.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentMessageSeverity.cs new file mode 100644 index 000000000000..3ab84cecde97 --- /dev/null +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentMessageSeverity.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.DotNet.HotReload; + +internal enum AgentMessageSeverity : byte +{ + Verbose = 0, + Warning = 1, + Error = 2, +} diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentReporter.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentReporter.cs new file mode 100644 index 000000000000..0950dac4e387 --- /dev/null +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/AgentReporter.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; + +namespace Microsoft.DotNet.HotReload; + +internal sealed class AgentReporter +{ + private readonly List<(string message, AgentMessageSeverity severity)> _log = []; + + public void Report(string message, AgentMessageSeverity severity) + { + _log.Add((message, severity)); + } + + public IReadOnlyCollection<(string message, AgentMessageSeverity severity)> GetAndClearLogEntries(ResponseLoggingLevel level) + { + lock (_log) + { + var filteredLog = (level != ResponseLoggingLevel.Verbose) + ? _log.Where(static entry => entry.severity != AgentMessageSeverity.Verbose) + : _log; + + var log = filteredLog.ToArray(); + _log.Clear(); + return log; + } + } +} diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/HotReloadAgent.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/HotReloadAgent.cs index 76606a3264e7..b2c50556be7b 100644 --- a/src/Components/WebAssembly/WebAssembly/src/HotReload/HotReloadAgent.cs +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/HotReloadAgent.cs @@ -1,230 +1,142 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// Based on the implementation in https://raw.githubusercontent.com/dotnet/sdk/aad0424c0bfaa60c8bd136a92fd131e53d14561a/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs - using System.Collections.Concurrent; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Reflection.Metadata; +using System.Reflection.Metadata.Ecma335; -namespace Microsoft.Extensions.HotReload; +namespace Microsoft.DotNet.HotReload; +#if NET +[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] +#endif internal sealed class HotReloadAgent : IDisposable { - /// Flags for hot reload handler Types like MVC's HotReloadService. - private const DynamicallyAccessedMemberTypes HotReloadHandlerLinkerFlags = DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods; + private const string MetadataUpdaterTypeName = "System.Reflection.Metadata.MetadataUpdater"; + private const string ApplyUpdateMethodName = "ApplyUpdate"; + private const string GetCapabilitiesMethodName = "GetCapabilities"; + + private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan metadataDelta, ReadOnlySpan ilDelta, ReadOnlySpan pdbDelta); - private readonly Action _log; - private readonly AssemblyLoadEventHandler _assemblyLoad; private readonly ConcurrentDictionary> _deltas = new(); private readonly ConcurrentDictionary _appliedAssemblies = new(); - private volatile UpdateHandlerActions? _handlerActions; + private readonly ApplyUpdateDelegate _applyUpdate; + private readonly MetadataUpdateHandlerInvoker _metadataUpdateHandlerInvoker; + + public AgentReporter Reporter { get; } + public string Capabilities { get; } - public HotReloadAgent(Action log) + private HotReloadAgent(AgentReporter reporter, ApplyUpdateDelegate applyUpdate, string capabilities) { - _log = log; - _assemblyLoad = OnAssemblyLoad; - AppDomain.CurrentDomain.AssemblyLoad += _assemblyLoad; + Reporter = reporter; + _metadataUpdateHandlerInvoker = new(reporter); + _applyUpdate = applyUpdate; + Capabilities = capabilities; + + AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; } - private void OnAssemblyLoad(object? _, AssemblyLoadEventArgs eventArgs) + public static bool TryCreate(AgentReporter reporter, [NotNullWhen(true)] out HotReloadAgent? agent) { - _handlerActions = null; - var loadedAssembly = eventArgs.LoadedAssembly; - var moduleId = TryGetModuleId(loadedAssembly); - if (moduleId is null) - { - return; - } - - if (_deltas.TryGetValue(moduleId.Value, out var updateDeltas) && _appliedAssemblies.TryAdd(loadedAssembly, loadedAssembly)) + GetUpdaterMethodsAndCapabilities(reporter, out var applyUpdate, out var capabilities); + if (applyUpdate != null && !string.IsNullOrEmpty(capabilities)) { - // A delta for this specific Module exists and we haven't called ApplyUpdate on this instance of Assembly as yet. - ApplyDeltas(loadedAssembly, updateDeltas); + agent = new HotReloadAgent(reporter, applyUpdate, capabilities); + return true; } - } - internal sealed class UpdateHandlerActions - { - public List> ClearCache { get; } = new(); - public List> UpdateApplication { get; } = new(); + agent = null; + return false; } - [UnconditionalSuppressMessage("Trimmer", "IL2072", - Justification = "The handlerType passed to GetHandlerActions is preserved by MetadataUpdateHandlerAttribute with DynamicallyAccessedMemberTypes.All.")] - private UpdateHandlerActions GetMetadataUpdateHandlerActions() + public void Dispose() { - // We need to execute MetadataUpdateHandlers in a well-defined order. For v1, the strategy that is used is to topologically - // sort assemblies so that handlers in a dependency are executed before the dependent (e.g. the reflection cache action - // in System.Private.CoreLib is executed before System.Text.Json clears it's own cache.) - // This would ensure that caches and updates more lower in the application stack are up to date - // before ones higher in the stack are recomputed. - var sortedAssemblies = TopologicalSort(AppDomain.CurrentDomain.GetAssemblies()); - var handlerActions = new UpdateHandlerActions(); - foreach (var assembly in sortedAssemblies) - { - foreach (var attr in assembly.GetCustomAttributesData()) - { - // Look up the attribute by name rather than by type. This would allow netstandard targeting libraries to - // define their own copy without having to cross-compile. - if (attr.AttributeType.FullName != "System.Reflection.Metadata.MetadataUpdateHandlerAttribute") - { - continue; - } - - IList ctorArgs = attr.ConstructorArguments; - if (ctorArgs.Count != 1 || - ctorArgs[0].Value is not Type handlerType) - { - _log($"'{attr}' found with invalid arguments."); - continue; - } - - GetHandlerActions(handlerActions, handlerType); - } - } - - return handlerActions; + AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; } - internal void GetHandlerActions( - UpdateHandlerActions handlerActions, - [DynamicallyAccessedMembers(HotReloadHandlerLinkerFlags)] Type handlerType) + private static void GetUpdaterMethodsAndCapabilities(AgentReporter reporter, out ApplyUpdateDelegate? applyUpdate, out string? capabilities) { - bool methodFound = false; + applyUpdate = null; + capabilities = null; - if (GetUpdateMethod(handlerType, "ClearCache") is MethodInfo clearCache) + var metadataUpdater = Type.GetType(MetadataUpdaterTypeName + ", System.Runtime.Loader", throwOnError: false); + if (metadataUpdater == null) { - handlerActions.ClearCache.Add(CreateAction(clearCache)); - methodFound = true; + reporter.Report($"Type not found: {MetadataUpdaterTypeName}", AgentMessageSeverity.Error); + return; } - if (GetUpdateMethod(handlerType, "UpdateApplication") is MethodInfo updateApplication) + var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan), typeof(ReadOnlySpan), typeof(ReadOnlySpan)], modifiers: null); + if (applyUpdateMethod == null) { - handlerActions.UpdateApplication.Add(CreateAction(updateApplication)); - methodFound = true; + reporter.Report($"{MetadataUpdaterTypeName}.{ApplyUpdateMethodName} not found.", AgentMessageSeverity.Error); + return; } - if (!methodFound) + applyUpdate = (ApplyUpdateDelegate)applyUpdateMethod.CreateDelegate(typeof(ApplyUpdateDelegate)); + + var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null); + if (getCapabilities == null) { - _log($"No invokable methods found on metadata handler type '{handlerType}'. " + - $"Allowed methods are ClearCache, UpdateApplication"); + reporter.Report($"{MetadataUpdaterTypeName}.{GetCapabilitiesMethodName} not found.", AgentMessageSeverity.Error); + return; } - Action CreateAction(MethodInfo update) + try { - Action action = update.CreateDelegate>(); - return types => - { - try - { - action(types); - } - catch (Exception ex) - { - _log($"Exception from '{action}': {ex}"); - } - }; + capabilities = getCapabilities.Invoke(obj: null, parameters: null) as string; } - - MethodInfo? GetUpdateMethod([DynamicallyAccessedMembers(HotReloadHandlerLinkerFlags)] Type handlerType, string name) + catch (Exception e) { - if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, new[] { typeof(Type[]) }) is MethodInfo updateMethod && - updateMethod.ReturnType == typeof(void)) - { - return updateMethod; - } - - foreach (MethodInfo method in handlerType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) - { - if (method.Name == name) - { - _log($"Type '{handlerType}' has method '{method}' that does not match the required signature."); - break; - } - } - - return null; + reporter.Report($"Error retrieving capabilities: {e.Message}", AgentMessageSeverity.Error); } } - internal static List TopologicalSort(Assembly[] assemblies) + private void OnAssemblyLoad(object? _, AssemblyLoadEventArgs eventArgs) { - var sortedAssemblies = new List(assemblies.Length); + _metadataUpdateHandlerInvoker.Clear(); - var visited = new HashSet(StringComparer.Ordinal); - - foreach (var assembly in assemblies) + var loadedAssembly = eventArgs.LoadedAssembly; + var moduleId = TryGetModuleId(loadedAssembly); + if (moduleId is null) { - Visit(assemblies, assembly, sortedAssemblies, visited); + return; } - [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] - static void Visit(Assembly[] assemblies, Assembly assembly, List sortedAssemblies, HashSet visited) + if (_deltas.TryGetValue(moduleId.Value, out var updateDeltas) && _appliedAssemblies.TryAdd(loadedAssembly, loadedAssembly)) { - var assemblyIdentifier = assembly.GetName().Name!; - if (!visited.Add(assemblyIdentifier)) - { - return; - } - - foreach (var dependencyName in assembly.GetReferencedAssemblies()) - { - var dependency = Array.Find(assemblies, a => a.GetName().Name == dependencyName.Name); - if (dependency is not null) - { - Visit(assemblies, dependency, sortedAssemblies, visited); - } - } - - sortedAssemblies.Add(assembly); + // A delta for this specific Module exists and we haven't called ApplyUpdate on this instance of Assembly as yet. + ApplyDeltas(loadedAssembly, updateDeltas); } - - return sortedAssemblies; } - public void ApplyDeltas(IReadOnlyList deltas) + public void ApplyDeltas(IEnumerable deltas) { - for (var i = 0; i < deltas.Count; i++) + foreach (var delta in deltas) { - var item = deltas[i]; + Reporter.Report($"Applying delta to module {delta.ModuleId}.", AgentMessageSeverity.Verbose); + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { - if (TryGetModuleId(assembly) is Guid moduleId && moduleId == item.ModuleId) + if (TryGetModuleId(assembly) is Guid moduleId && moduleId == delta.ModuleId) { - MetadataUpdater.ApplyUpdate(assembly, item.MetadataDelta, item.ILDelta, item.PdbBytes ?? ReadOnlySpan.Empty); + _applyUpdate(assembly, delta.MetadataDelta, delta.ILDelta, delta.PdbDelta); } } // Additionally stash the deltas away so it may be applied to assemblies loaded later. - var cachedDeltas = _deltas.GetOrAdd(item.ModuleId, static _ => new()); - cachedDeltas.Add(item); + var cachedDeltas = _deltas.GetOrAdd(delta.ModuleId, static _ => new()); + cachedDeltas.Add(delta); } - try - { - // Defer discovering metadata updata handlers until after hot reload deltas have been applied. - // This should give enough opportunity for AppDomain.GetAssemblies() to be sufficiently populated. - _handlerActions ??= GetMetadataUpdateHandlerActions(); - var handlerActions = _handlerActions; - - Type[]? updatedTypes = GetMetadataUpdateTypes(deltas); - - handlerActions.ClearCache.ForEach(a => a(updatedTypes)); - handlerActions.UpdateApplication.ForEach(a => a(updatedTypes)); - - _log("Deltas applied."); - } - catch (Exception ex) - { - _log(ex.ToString()); - } + _metadataUpdateHandlerInvoker.Invoke(GetMetadataUpdateTypes(deltas)); } - [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] - private static Type[] GetMetadataUpdateTypes(IReadOnlyList deltas) + private Type[] GetMetadataUpdateTypes(IEnumerable deltas) { List? types = null; @@ -236,44 +148,45 @@ private static Type[] GetMetadataUpdateTypes(IReadOnlyList deltas) continue; } - var assemblyTypes = assembly.GetTypes(); - - foreach (var updatedType in delta.UpdatedTypes ?? Array.Empty()) + foreach (var updatedType in delta.UpdatedTypes) { - var type = assemblyTypes.FirstOrDefault(t => t.MetadataToken == updatedType); - if (type != null) + // Must be a TypeDef. + Debug.Assert(MetadataTokens.EntityHandle(updatedType) is { Kind: HandleKind.TypeDefinition, IsNil: false }); + + // The type has to be in the manifest module since Hot Reload does not support multi-module assemblies: + try { + var type = assembly.ManifestModule.ResolveType(updatedType); types ??= new(); types.Add(type); } + catch (Exception e) + { + Reporter.Report($"Failed to load type 0x{updatedType:X8}: {e.Message}", AgentMessageSeverity.Warning); + } } } return types?.ToArray() ?? Type.EmptyTypes; } - public void ApplyDeltas(Assembly assembly, IReadOnlyList deltas) + private void ApplyDeltas(Assembly assembly, IReadOnlyList deltas) { try { foreach (var item in deltas) { - MetadataUpdater.ApplyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); + _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, item.PdbDelta); } - _log("Deltas applied."); + Reporter.Report("Deltas applied.", AgentMessageSeverity.Verbose); } catch (Exception ex) { - _log(ex.ToString()); + Reporter.Report(ex.ToString(), AgentMessageSeverity.Warning); } } - public void Dispose() - { - AppDomain.CurrentDomain.AssemblyLoad -= _assemblyLoad; - } - private static Guid? TryGetModuleId(Assembly loadedAssembly) { try diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/MetadataUpdateHandlerInvoker.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/MetadataUpdateHandlerInvoker.cs new file mode 100644 index 000000000000..fab00eb691cd --- /dev/null +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/MetadataUpdateHandlerInvoker.cs @@ -0,0 +1,244 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; +using System.Reflection; + +namespace Microsoft.DotNet.HotReload; + +/// +/// Finds and invokes metadata update handlers. +/// +#if NET +[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] +[UnconditionalSuppressMessage("Trimming", "IL2070", Justification = "Hot reload is only expected to work when trimming is disabled.")] +#endif +internal sealed class MetadataUpdateHandlerInvoker(AgentReporter reporter) +{ + internal sealed class RegisteredActions(IReadOnlyList> clearCache, IReadOnlyList> updateApplication) + { + public void Invoke(Type[] updatedTypes) + { + foreach (var action in clearCache) + { + action(updatedTypes); + } + + foreach (var action in updateApplication) + { + action(updatedTypes); + } + } + + /// + /// For testing. + /// + internal IEnumerable> ClearCache => clearCache; + + /// + /// For testing. + /// + internal IEnumerable> UpdateApplication => updateApplication; + } + + private const string ClearCacheHandlerName = "ClearCache"; + private const string UpdateApplicationHandlerName = "UpdateApplication"; + + private RegisteredActions? _actions; + + /// + /// Call when a new assembly is loaded. + /// + internal void Clear() + => Interlocked.Exchange(ref _actions, null); + + /// + /// Invokes all registerd handlers. + /// + internal void Invoke(Type[] updatedTypes) + { + try + { + // Defer discovering metadata updata handlers until after hot reload deltas have been applied. + // This should give enough opportunity for AppDomain.GetAssemblies() to be sufficiently populated. + var actions = _actions; + if (actions == null) + { + Interlocked.CompareExchange(ref _actions, GetMetadataUpdateHandlerActions(), null); + actions = _actions; + } + + reporter.Report($"Invoking metadata update handlers. {updatedTypes.Length} type(s) updated.", AgentMessageSeverity.Verbose); + + actions.Invoke(updatedTypes); + + reporter.Report("Deltas applied.", AgentMessageSeverity.Verbose); + } + catch (Exception e) + { + reporter.Report(e.ToString(), AgentMessageSeverity.Warning); + } + } + + private IEnumerable GetHandlerTypes() + { + // We need to execute MetadataUpdateHandlers in a well-defined order. For v1, the strategy that is used is to topologically + // sort assemblies so that handlers in a dependency are executed before the dependent (e.g. the reflection cache action + // in System.Private.CoreLib is executed before System.Text.Json clears its own cache.) + // This would ensure that caches and updates more lower in the application stack are up to date + // before ones higher in the stack are recomputed. + var sortedAssemblies = TopologicalSort(AppDomain.CurrentDomain.GetAssemblies()); + + foreach (var assembly in sortedAssemblies) + { + foreach (var attr in TryGetCustomAttributesData(assembly)) + { + // Look up the attribute by name rather than by type. This would allow netstandard targeting libraries to + // define their own copy without having to cross-compile. + if (attr.AttributeType.FullName != "System.Reflection.Metadata.MetadataUpdateHandlerAttribute") + { + continue; + } + + IList ctorArgs = attr.ConstructorArguments; + if (ctorArgs.Count != 1 || + ctorArgs[0].Value is not Type handlerType) + { + reporter.Report($"'{attr}' found with invalid arguments.", AgentMessageSeverity.Warning); + continue; + } + + yield return handlerType; + } + } + } + + public RegisteredActions GetMetadataUpdateHandlerActions() + => GetMetadataUpdateHandlerActions(GetHandlerTypes()); + + /// + /// Internal for testing. + /// + internal RegisteredActions GetMetadataUpdateHandlerActions(IEnumerable handlerTypes) + { + var clearCacheActions = new List>(); + var updateApplicationActions = new List>(); + + foreach (var handlerType in handlerTypes) + { + bool methodFound = false; + + if (GetUpdateMethod(handlerType, ClearCacheHandlerName) is MethodInfo clearCache) + { + clearCacheActions.Add(CreateAction(clearCache)); + methodFound = true; + } + + if (GetUpdateMethod(handlerType, UpdateApplicationHandlerName) is MethodInfo updateApplication) + { + updateApplicationActions.Add(CreateAction(updateApplication)); + methodFound = true; + } + + if (!methodFound) + { + reporter.Report( + $"Expected to find a static method '{ClearCacheHandlerName}' or '{UpdateApplicationHandlerName}' on type '{handlerType.AssemblyQualifiedName}' but neither exists.", + AgentMessageSeverity.Warning); + } + } + + return new RegisteredActions(clearCacheActions, updateApplicationActions); + + Action CreateAction(MethodInfo update) + { + var action = (Action)update.CreateDelegate(typeof(Action)); + return types => + { + try + { + action(types); + } + catch (Exception ex) + { + reporter.Report($"Exception from '{action}': {ex}", AgentMessageSeverity.Warning); + } + }; + } + + MethodInfo? GetUpdateMethod(Type handlerType, string name) + { + if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, binder: null, [typeof(Type[])], modifiers: null) is MethodInfo updateMethod && + updateMethod.ReturnType == typeof(void)) + { + return updateMethod; + } + + foreach (MethodInfo method in handlerType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) + { + if (method.Name == name) + { + reporter.Report($"Type '{handlerType}' has method '{method}' that does not match the required signature.", AgentMessageSeverity.Warning); + break; + } + } + + return null; + } + } + + private IList TryGetCustomAttributesData(Assembly assembly) + { + try + { + return assembly.GetCustomAttributesData(); + } + catch (Exception e) + { + // In cross-platform scenarios, such as debugging in VS through WSL, Roslyn + // runs on Windows, and the agent runs on Linux. Assemblies accessible to Windows + // may not be available or loaded on linux (such as WPF's assemblies). + // In such case, we can ignore the assemblies and continue enumerating handlers for + // the rest of the assemblies of current domain. + reporter.Report($"'{assembly.FullName}' is not loaded ({e.Message})", AgentMessageSeverity.Verbose); + return []; + } + } + + /// + /// Internal for testing. + /// + internal static List TopologicalSort(Assembly[] assemblies) + { + var sortedAssemblies = new List(assemblies.Length); + + var visited = new HashSet(StringComparer.Ordinal); + + foreach (var assembly in assemblies) + { + Visit(assemblies, assembly, sortedAssemblies, visited); + } + + static void Visit(Assembly[] assemblies, Assembly assembly, List sortedAssemblies, HashSet visited) + { + var assemblyIdentifier = assembly.GetName().Name!; + if (!visited.Add(assemblyIdentifier)) + { + return; + } + + foreach (var dependencyName in assembly.GetReferencedAssemblies()) + { + var dependency = Array.Find(assemblies, a => a.GetName().Name == dependencyName.Name); + if (dependency is not null) + { + Visit(assemblies, dependency, sortedAssemblies, visited); + } + } + + sortedAssemblies.Add(assembly); + } + + return sortedAssemblies; + } +} diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/ResponseLoggingLevel.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/ResponseLoggingLevel.cs new file mode 100644 index 000000000000..dd05c372bf2e --- /dev/null +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/ResponseLoggingLevel.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.DotNet.HotReload; + +internal enum ResponseLoggingLevel : byte +{ + WarningsAndErrors = 0, + Verbose = 1, +} diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/UpdateDelta.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/UpdateDelta.cs index 6b8ee89cf58f..d02b1c4d46bf 100644 --- a/src/Components/WebAssembly/WebAssembly/src/HotReload/UpdateDelta.cs +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/UpdateDelta.cs @@ -1,17 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.HotReload; +namespace Microsoft.DotNet.HotReload; -internal sealed class UpdateDelta +internal readonly struct UpdateDelta(Guid moduleId, byte[] metadataDelta, byte[] ilDelta, byte[] pdbDelta, int[] updatedTypes) { - public Guid ModuleId { get; set; } - - public byte[] MetadataDelta { get; set; } = default!; - - public byte[] ILDelta { get; set; } = default!; - - public byte[]? PdbBytes { get; set; } - - public int[]? UpdatedTypes { get; set; } + public Guid ModuleId { get; } = moduleId; + public byte[] MetadataDelta { get; } = metadataDelta; + public byte[] ILDelta { get; } = ilDelta; + public byte[] PdbDelta { get; } = pdbDelta; + public int[] UpdatedTypes { get; } = updatedTypes; } diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs index 8d3bcbd52e87..fc8eafc861f1 100644 --- a/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs @@ -2,13 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices.JavaScript; -using Microsoft.Extensions.HotReload; +using System.Linq; +using System.Net.Http; +using System.Text.Json; +using Microsoft.AspNetCore.Components.WebAssembly.Services; +using Microsoft.DotNet.HotReload; using Microsoft.JSInterop; +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + namespace Microsoft.AspNetCore.Components.WebAssembly.HotReload; /// @@ -16,49 +20,143 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.HotReload; /// code. /// [EditorBrowsable(EditorBrowsableState.Never)] +[UnconditionalSuppressMessage( + "Trimming", + "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", + Justification = "Hot Reload does not support trimming")] public static partial class WebAssemblyHotReload { - private const string BlazorHotReloadModuleName = "blazor-hotreload"; + /// + /// For framework use only. + /// + public readonly struct LogEntry + { + public string Message { get; init; } + public int Severity { get; init; } + } + + /// + /// For framework use only. + /// + internal sealed class Update + { + public int Id { get; set; } + public Delta[] Deltas { get; set; } = default!; + } - private static HotReloadAgent? _hotReloadAgent; - private static readonly UpdateDelta[] _updateDeltas = new[] + /// + /// For framework use only. + /// + public readonly struct Delta { - new UpdateDelta(), - }; + public string ModuleId { get; init; } + public byte[] MetadataDelta { get; init; } + public byte[] ILDelta { get; init; } + public byte[] PdbDelta { get; init; } + public int[] UpdatedTypes { get; init; } + } + + private static readonly AgentReporter s_reporter = new(); + private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web); + + private static bool s_initialized; + private static HotReloadAgent? s_hotReloadAgent; internal static async Task InitializeAsync() { if (Environment.GetEnvironmentVariable("__ASPNETCORE_BROWSER_TOOLS") == "true" && OperatingSystem.IsBrowser()) { - // Attempt to read previously applied hot reload deltas if the ASP.NET Core browser tools are available (indicated by the presence of the Environment variable). - // The agent is injected in to the hosted app and can serve this script that can provide results from local-storage. - // See https://github.com/dotnet/aspnetcore/issues/37357#issuecomment-941237000 - await JSHost.ImportAsync(BlazorHotReloadModuleName, "/_framework/blazor-hotreload.js"); - await ReceiveHotReloadAsync(); + s_initialized = true; + + if (!HotReloadAgent.TryCreate(s_reporter, out var agent)) + { + return; + } + + var existingAgent = Interlocked.CompareExchange(ref s_hotReloadAgent, agent, null); + if (existingAgent != null) + { + throw new InvalidOperationException("Hot Reload agent already initialized"); + } + + await ApplyPreviousDeltasAsync(agent); + } + } + + private static async ValueTask ApplyPreviousDeltasAsync(HotReloadAgent agent) + { + string errorMessage; + + using var client = new HttpClient() + { + BaseAddress = new Uri(WebAssemblyNavigationManager.Instance.BaseUri, UriKind.Absolute) + }; + + try + { + var response = await client.GetAsync("/_framework/blazor-hotreload"); + if (response.IsSuccessStatusCode) + { + var deltasJson = await response.Content.ReadAsStringAsync(); + var updates = deltasJson != "" ? JsonSerializer.Deserialize(deltasJson, s_jsonSerializerOptions) : null; + if (updates == null) + { + s_reporter.Report($"No previous updates to apply.", AgentMessageSeverity.Verbose); + return; + } + + var i = 1; + foreach (var update in updates) + { + s_reporter.Report($"Reapplying update {i}/{updates.Length}.", AgentMessageSeverity.Verbose); + + agent.ApplyDeltas( + update.Deltas.Select(d => new UpdateDelta(Guid.Parse(d.ModuleId, CultureInfo.InvariantCulture), d.MetadataDelta, d.ILDelta, d.PdbDelta, d.UpdatedTypes))); + + i++; + } + + return; + } + + errorMessage = $"HTTP GET '/_framework/blazor-hotreload' returned {response.StatusCode}"; + } + catch (Exception e) + { + errorMessage = e.ToString(); } + + s_reporter.Report($"Failed to retrieve and apply previous deltas from the server: ${errorMessage}", AgentMessageSeverity.Error); } + private static HotReloadAgent? GetAgent() + => s_hotReloadAgent ?? (s_initialized ? throw new InvalidOperationException("Hot Reload agent not initialized") : null); + /// /// For framework use only. /// + [Obsolete("Use ApplyHotReloadDeltas instead")] [JSInvokable(nameof(ApplyHotReloadDelta))] public static void ApplyHotReloadDelta(string moduleIdString, byte[] metadataDelta, byte[] ilDelta, byte[] pdbBytes, int[]? updatedTypes) { - // Analyzer has a bug where it doesn't handle ConditionalAttribute: https://github.com/dotnet/roslyn/issues/63464 -#pragma warning disable IDE0200 // Remove unnecessary lambda expression - Interlocked.CompareExchange(ref _hotReloadAgent, new HotReloadAgent(m => Debug.WriteLine(m)), null); -#pragma warning restore IDE0200 // Remove unnecessary lambda expression + GetAgent()?.ApplyDeltas( + [new UpdateDelta(Guid.Parse(moduleIdString, CultureInfo.InvariantCulture), metadataDelta, ilDelta, pdbBytes, updatedTypes ?? [])]); + } - var moduleId = Guid.Parse(moduleIdString, CultureInfo.InvariantCulture); + /// + /// For framework use only. + /// + [JSInvokable(nameof(ApplyHotReloadDeltas))] + public static LogEntry[] ApplyHotReloadDeltas(Delta[] deltas, int loggingLevel) + { + var agent = GetAgent(); - _updateDeltas[0].ModuleId = moduleId; - _updateDeltas[0].MetadataDelta = metadataDelta; - _updateDeltas[0].ILDelta = ilDelta; - _updateDeltas[0].PdbBytes = pdbBytes; - _updateDeltas[0].UpdatedTypes = updatedTypes; + agent?.ApplyDeltas( + deltas.Select(d => new UpdateDelta(Guid.Parse(d.ModuleId, CultureInfo.InvariantCulture), d.MetadataDelta, d.ILDelta, d.PdbDelta, d.UpdatedTypes))); - _hotReloadAgent.ApplyDeltas(_updateDeltas); + return s_reporter.GetAndClearLogEntries((ResponseLoggingLevel)loggingLevel) + .Select(log => new LogEntry() { Message = log.message, Severity = (int)log.severity }).ToArray(); } /// @@ -66,15 +164,5 @@ public static void ApplyHotReloadDelta(string moduleIdString, byte[] metadataDel /// [JSInvokable(nameof(GetApplyUpdateCapabilities))] public static string GetApplyUpdateCapabilities() - { - var method = typeof(System.Reflection.Metadata.MetadataUpdater).GetMethod("GetCapabilities", BindingFlags.NonPublic | BindingFlags.Static, Type.EmptyTypes); - if (method is null) - { - return string.Empty; - } - return (string)method.Invoke(obj: null, parameters: null)!; - } - - [JSImport("receiveHotReloadAsync", BlazorHotReloadModuleName)] - private static partial Task ReceiveHotReloadAsync(); + => GetAgent()?.Capabilities ?? ""; } diff --git a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Shipped.txt b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Shipped.txt index 089a8b288779..9ce568a05d87 100644 --- a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Shipped.txt +++ b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Shipped.txt @@ -81,6 +81,24 @@ Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration.WebAssemblyHostConfiguration() -> void Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.Delta() -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.ILDelta.get -> byte[]! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.ILDelta.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.MetadataDelta.get -> byte[]! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.MetadataDelta.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.ModuleId.get -> string! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.ModuleId.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.PdbDelta.get -> byte[]! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.PdbDelta.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.UpdatedTypes.get -> int[]! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta.UpdatedTypes.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry.LogEntry() -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry.Message.get -> string! +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry.Message.init -> void +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry.Severity.get -> int +Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry.Severity.init -> void Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache.Default = 0 -> Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache.ForceCache = 4 -> Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache @@ -107,13 +125,15 @@ static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnviro static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions.IsEnvironment(this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment! hostingEnvironment, string! environmentName) -> bool static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions.IsProduction(this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment! hostingEnvironment) -> bool static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions.IsStaging(this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment! hostingEnvironment) -> bool -static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes) -> void +static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes, int[]? updatedTypes) -> void +static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDeltas(Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.Delta[]! deltas, int loggingLevel) -> Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.LogEntry[]! static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.GetApplyUpdateCapabilities() -> string! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestCache(this System.Net.Http.HttpRequestMessage! requestMessage, Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCache requestCache) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestCredentials(this System.Net.Http.HttpRequestMessage! requestMessage, Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestCredentials requestCredentials) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestIntegrity(this System.Net.Http.HttpRequestMessage! requestMessage, string! integrity) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestMode(this System.Net.Http.HttpRequestMessage! requestMessage, Microsoft.AspNetCore.Components.WebAssembly.Http.BrowserRequestMode requestMode) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestOption(this System.Net.Http.HttpRequestMessage! requestMessage, string! name, object! value) -> System.Net.Http.HttpRequestMessage! +static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserResponseStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage! static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string! uri, bool isInterceptedLink) -> void static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string! uri, string? state, bool isInterceptedLink) -> void diff --git a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt index adb79668cc5b..7dc5c58110bf 100644 --- a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt @@ -1,4 +1 @@ #nullable enable -*REMOVED*static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes) -> void -static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes, int[]? updatedTypes) -> void -static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage! diff --git a/src/Components/WebAssembly/WebAssembly/test/WebAssemblyHotReloadTest.cs b/src/Components/WebAssembly/WebAssembly/test/WebAssemblyHotReloadTest.cs deleted file mode 100644 index 525cb3c7ac0e..000000000000 --- a/src/Components/WebAssembly/WebAssembly/test/WebAssemblyHotReloadTest.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.AspNetCore.Components.RenderTree; -using Microsoft.Extensions.HotReload; - -namespace Microsoft.AspNetCore.Components.WebAssembly.HotReload; - -public class WebAssemblyHotReloadTest -{ - [Fact] - public void WebAssemblyHotReload_DiscoversMetadataHandlers_FromHot() - { - // Arrange - var hotReloadManager = typeof(Renderer).Assembly.GetType("Microsoft.AspNetCore.Components.HotReload.HotReloadManager"); - Assert.NotNull(hotReloadManager); - - var handlerActions = new HotReloadAgent.UpdateHandlerActions(); - var logs = new List(); - var hotReloadAgent = new HotReloadAgent(logs.Add); - - // Act - hotReloadAgent.GetHandlerActions(handlerActions, hotReloadManager); - - // Assert - Assert.Empty(handlerActions.ClearCache); - Assert.Single(handlerActions.UpdateApplication); - } -} diff --git a/src/Components/dotnet-runtime-js/package.json b/src/Components/dotnet-runtime-js/package.json index 6171c56b2ced..1f9fd0b83dc1 100644 --- a/src/Components/dotnet-runtime-js/package.json +++ b/src/Components/dotnet-runtime-js/package.json @@ -1,5 +1,5 @@ { - "name": "dotnet-runtime", + "name": "@microsoft/dotnet-runtime", "private": true, "description": ".NET is a developer platform with tools and libraries for building any type of app, including web, mobile, desktop, games, IoT, cloud, and microservices.", "repository": { diff --git a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs index 94b6b80f53a1..0ba10d655cdf 100644 --- a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs +++ b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.InternalTesting; using TestServer; using Xunit.Abstractions; using Components.TestServer.RazorComponents; @@ -519,6 +520,7 @@ public void NavigationManagerUriGetsUpdatedOnEnhancedNavigation_OnlyServerOrWebA [Theory] [InlineData("server")] [InlineData("wasm")] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/61143")] public void NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWebAssembly(string runtimeThatInvokedNavigation) { Navigate($"{ServerPathBase}/nav"); diff --git a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs index 4b35b0c5eed0..53fd2addd404 100644 --- a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs +++ b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs @@ -1287,7 +1287,7 @@ public void CanBindToFormWithFiles() } [Theory] - [InlineData(true)] + // [InlineData(true)] QuarantinedTest: https://github.com/dotnet/aspnetcore/issues/61882 [InlineData(false)] public void CanUseFormWithMethodGet(bool suppressEnhancedNavigation) { @@ -1340,6 +1340,7 @@ void AssertUiState(string expectedStringValue, bool expectedBoolValue) } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/61144")] public void RadioButtonGetsResetAfterSubmittingEnhancedForm() { GoTo("forms/form-with-checkbox-and-radio-button"); diff --git a/src/DataProtection/DataProtection/src/PublicAPI.Shipped.txt b/src/DataProtection/DataProtection/src/PublicAPI.Shipped.txt index ce4946328fd2..9b356ddc49a8 100644 --- a/src/DataProtection/DataProtection/src/PublicAPI.Shipped.txt +++ b/src/DataProtection/DataProtection/src/PublicAPI.Shipped.txt @@ -115,6 +115,9 @@ Microsoft.AspNetCore.DataProtection.IPersistedDataProtector.DangerousUnprotect(b Microsoft.AspNetCore.DataProtection.ISecret Microsoft.AspNetCore.DataProtection.ISecret.Length.get -> int Microsoft.AspNetCore.DataProtection.ISecret.WriteSecretIntoBuffer(System.ArraySegment buffer) -> void +Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager +Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager.CanDeleteKeys.get -> bool +Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager.DeleteKeys(System.Func! shouldDelete) -> bool Microsoft.AspNetCore.DataProtection.KeyManagement.IKey Microsoft.AspNetCore.DataProtection.KeyManagement.IKey.ActivationDate.get -> System.DateTimeOffset Microsoft.AspNetCore.DataProtection.KeyManagement.IKey.CreateEncryptor() -> Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor? @@ -166,7 +169,9 @@ Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions.XmlEncryp Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions.XmlRepository.get -> Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository? Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions.XmlRepository.set -> void Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager +Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CanDeleteKeys.get -> bool Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CreateNewKey(System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate) -> Microsoft.AspNetCore.DataProtection.KeyManagement.IKey! +Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.DeleteKeys(System.Func! shouldDelete) -> bool Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys() -> System.Collections.Generic.IReadOnlyCollection! Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetCacheExpirationToken() -> System.Threading.CancellationToken Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.RevokeAllKeys(System.DateTimeOffset revocationDate, string? reason = null) -> void @@ -176,6 +181,12 @@ Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.XmlKeyManager(Mi Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.Directory.get -> System.IO.DirectoryInfo! Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.FileSystemXmlRepository(System.IO.DirectoryInfo! directory, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.DeletionOrder.get -> int? +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.DeletionOrder.set -> void +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.Element.get -> System.Xml.Linq.XElement! +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableXmlRepository +Microsoft.AspNetCore.DataProtection.Repositories.IDeletableXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository.GetAllElements() -> System.Collections.Generic.IReadOnlyCollection! Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository.StoreElement(System.Xml.Linq.XElement! element, string! friendlyName) -> void @@ -269,8 +280,10 @@ static Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.De static Microsoft.AspNetCore.DataProtection.Secret.Random(int numBytes) -> Microsoft.AspNetCore.DataProtection.Secret! static Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionExtensions.AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder! static Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionExtensions.AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! setupAction) -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder! +virtual Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool virtual Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements() -> System.Collections.Generic.IReadOnlyCollection! virtual Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.StoreElement(System.Xml.Linq.XElement! element, string! friendlyName) -> void +virtual Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool virtual Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.GetAllElements() -> System.Collections.Generic.IReadOnlyCollection! virtual Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.StoreElement(System.Xml.Linq.XElement! element, string! friendlyName) -> void virtual Microsoft.AspNetCore.DataProtection.XmlEncryption.CertificateResolver.ResolveCertificate(string! thumbprint) -> System.Security.Cryptography.X509Certificates.X509Certificate2? diff --git a/src/DataProtection/DataProtection/src/PublicAPI.Unshipped.txt b/src/DataProtection/DataProtection/src/PublicAPI.Unshipped.txt index de9b28a68bda..7dc5c58110bf 100644 --- a/src/DataProtection/DataProtection/src/PublicAPI.Unshipped.txt +++ b/src/DataProtection/DataProtection/src/PublicAPI.Unshipped.txt @@ -1,14 +1 @@ #nullable enable -Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager -Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager.CanDeleteKeys.get -> bool -Microsoft.AspNetCore.DataProtection.KeyManagement.IDeletableKeyManager.DeleteKeys(System.Func! shouldDelete) -> bool -Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CanDeleteKeys.get -> bool -Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.DeleteKeys(System.Func! shouldDelete) -> bool -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.DeletionOrder.get -> int? -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.DeletionOrder.set -> void -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableElement.Element.get -> System.Xml.Linq.XElement! -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableXmlRepository -Microsoft.AspNetCore.DataProtection.Repositories.IDeletableXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool -virtual Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool -virtual Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.DeleteElements(System.Action!>! chooseElements) -> bool diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj index 48725d72139d..5f488e03a398 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -100,12 +100,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier.Replace('.', '_')) $(TargetOsName) - linux + linux $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) x64 $(BuildArchitecture) @@ -560,9 +560,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant - - - + + $(DotnetRuntimeSourceFeedKey) diff --git a/src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj b/src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj index 4c8e02e25b8f..322fea55238a 100644 --- a/src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj +++ b/src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj @@ -6,6 +6,7 @@ true false $(DefineConstants);IS_BENCHMARKS + true
diff --git a/src/Hosting/Server.IntegrationTesting/src/Common/DeploymentParameters.cs b/src/Hosting/Server.IntegrationTesting/src/Common/DeploymentParameters.cs index 0f13855c2c7e..ad6ccc2ab1d9 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Common/DeploymentParameters.cs +++ b/src/Hosting/Server.IntegrationTesting/src/Common/DeploymentParameters.cs @@ -183,11 +183,12 @@ public override string ToString() { return string.Format( CultureInfo.InvariantCulture, - "[Variation] :: ServerType={0}, Runtime={1}, Arch={2}, BaseUrlHint={3}, Publish={4}", + "[Variation] :: ServerType={0}, Runtime={1}, Arch={2}, BaseUrlHint={3}, Publish={4}, HostingModel={5}", ServerType, RuntimeFlavor, RuntimeArchitecture, ApplicationBaseUriHint, - PublishApplicationBeforeDeployment); + PublishApplicationBeforeDeployment, + HostingModel); } } diff --git a/src/Http/Headers/test/CookieHeaderValueTest.cs b/src/Http/Headers/test/CookieHeaderValueTest.cs index 6623a8ed13dd..6ad2e962d005 100644 --- a/src/Http/Headers/test/CookieHeaderValueTest.cs +++ b/src/Http/Headers/test/CookieHeaderValueTest.cs @@ -75,7 +75,7 @@ public static TheoryData InvalidCookieValues } } - public static TheoryData, string?[]> ListOfCookieHeaderDataSet + public static TheoryData, string?[]> ListOfStrictCookieHeaderDataSet { get { @@ -94,19 +94,30 @@ public static TheoryData InvalidCookieValues dataset.Add(new[] { header1 }.ToList(), new[] { string1 }); dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, string1 }); - dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, null, "", " ", ";", " , ", string1 }); dataset.Add(new[] { header2 }.ToList(), new[] { string2 }); dataset.Add(new[] { header1, header2 }.ToList(), new[] { string1, string2 }); - dataset.Add(new[] { header1, header2 }.ToList(), new[] { string1 + ", " + string2 }); dataset.Add(new[] { header2, header1 }.ToList(), new[] { string2 + "; " + string1 }); dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string1, string2, string3, string4 }); - dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string.Join(",", string1, string2, string3, string4) }); dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string.Join(";", string1, string2, string3, string4) }); return dataset; } } + public static TheoryData, string?[]> ListOfCookieHeaderDataSet + { + get + { + var header1 = new CookieHeaderValue("name1", "n1=v1&n2=v2&n3=v3"); + var string1 = "name1=n1=v1&n2=v2&n3=v3"; + + var dataset = new TheoryData, string?[]>(); + dataset.Concat(ListOfStrictCookieHeaderDataSet); + dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, null, "", " ", ";", " , ", string1 }); + return dataset; + } + } + public static TheoryData?, string?[]> ListWithInvalidCookieHeaderDataSet { get @@ -127,18 +138,19 @@ public static TheoryData InvalidCookieValues dataset.Add(new[] { header1 }.ToList(), new[] { validString1, invalidString1 }); dataset.Add(new[] { header1 }.ToList(), new[] { validString1, null, "", " ", ";", " , ", invalidString1 }); dataset.Add(new[] { header1 }.ToList(), new[] { invalidString1, null, "", " ", ";", " , ", validString1 }); - dataset.Add(new[] { header1 }.ToList(), new[] { validString1 + ", " + invalidString1 }); - dataset.Add(new[] { header2 }.ToList(), new[] { invalidString1 + ", " + validString2 }); + dataset.Add(null, new[] { validString1 + ", " }); + dataset.Add(null, new[] { invalidString1 + ", " + validString2 }); dataset.Add(new[] { header1 }.ToList(), new[] { invalidString1 + "; " + validString1 }); dataset.Add(new[] { header2 }.ToList(), new[] { validString2 + "; " + invalidString1 }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { invalidString1, validString1, validString2, validString3 }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, invalidString1, validString2, validString3 }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, validString2, invalidString1, validString3 }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, validString2, validString3, invalidString1 }); - dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", invalidString1, validString1, validString2, validString3) }); - dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, invalidString1, validString2, validString3) }); - dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, validString2, invalidString1, validString3) }); - dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, validString2, validString3, invalidString1) }); + dataset.Add(null, new[] { string.Join(",", invalidString1, validString1, validString2, validString3) }); + dataset.Add(null, new[] { string.Join(",", validString1, invalidString1, validString2, validString3) }); + dataset.Add(null, new[] { string.Join(",", validString1, validString2, invalidString1, validString3) }); + dataset.Add(null, new[] { string.Join(",", validString1, validString2, validString3, invalidString1) }); + dataset.Add(null, new[] { string.Join(",", validString1, validString2, validString3) }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", invalidString1, validString1, validString2, validString3) }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", validString1, invalidString1, validString2, validString3) }); dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", validString1, validString2, invalidString1, validString3) }); @@ -248,7 +260,7 @@ public void CookieHeaderValue_ParseList_AcceptsValidValues(IList cookies, string[] input) { var results = CookieHeaderValue.ParseStrictList(input); @@ -267,7 +279,7 @@ public void CookieHeaderValue_TryParseList_AcceptsValidValues(IList cookies, string[] input) { var result = CookieHeaderValue.TryParseStrictList(input, out var results); diff --git a/src/Http/Http.Abstractions/src/PublicAPI.Shipped.txt b/src/Http/Http.Abstractions/src/PublicAPI.Shipped.txt index d6c04a9a103f..1cd1d06dde8b 100644 --- a/src/Http/Http.Abstractions/src/PublicAPI.Shipped.txt +++ b/src/Http/Http.Abstractions/src/PublicAPI.Shipped.txt @@ -274,10 +274,10 @@ Microsoft.AspNetCore.Http.HostString.HasValue.get -> bool Microsoft.AspNetCore.Http.HostString.Host.get -> string! Microsoft.AspNetCore.Http.HostString.HostString() -> void Microsoft.AspNetCore.Http.HostString.HostString(string! host, int port) -> void -Microsoft.AspNetCore.Http.HostString.HostString(string! value) -> void +Microsoft.AspNetCore.Http.HostString.HostString(string? value) -> void Microsoft.AspNetCore.Http.HostString.Port.get -> int? Microsoft.AspNetCore.Http.HostString.ToUriComponent() -> string! -Microsoft.AspNetCore.Http.HostString.Value.get -> string! +Microsoft.AspNetCore.Http.HostString.Value.get -> string? Microsoft.AspNetCore.Http.HttpContext Microsoft.AspNetCore.Http.HttpContext.HttpContext() -> void Microsoft.AspNetCore.Http.HttpMethods @@ -294,6 +294,7 @@ Microsoft.AspNetCore.Http.HttpValidationProblemDetails.Errors.get -> System.Coll Microsoft.AspNetCore.Http.HttpValidationProblemDetails.Errors.set -> void Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails() -> void Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IDictionary! errors) -> void +Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void Microsoft.AspNetCore.Http.IBindableFromHttpContext Microsoft.AspNetCore.Http.IBindableFromHttpContext.BindAsync(Microsoft.AspNetCore.Http.HttpContext! context, System.Reflection.ParameterInfo! parameter) -> System.Threading.Tasks.ValueTask Microsoft.AspNetCore.Http.IContentTypeHttpResult @@ -344,6 +345,7 @@ Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata.ContentTypes.get -> System.Collections.Generic.IReadOnlyList! Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata.IsOptional.get -> bool Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata.RequestType.get -> System.Type? +Microsoft.AspNetCore.Http.Metadata.IDisableHttpMetricsMetadata Microsoft.AspNetCore.Http.Metadata.IEndpointDescriptionMetadata Microsoft.AspNetCore.Http.Metadata.IEndpointDescriptionMetadata.Description.get -> string! Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider @@ -374,6 +376,12 @@ Microsoft.AspNetCore.Http.Metadata.IFromQueryMetadata.Name.get -> string? Microsoft.AspNetCore.Http.Metadata.IFromRouteMetadata Microsoft.AspNetCore.Http.Metadata.IFromRouteMetadata.Name.get -> string? Microsoft.AspNetCore.Http.Metadata.IFromServiceMetadata +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.HasBindAsync.get -> bool +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.HasTryParse.get -> bool +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.IsOptional.get -> bool +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.Name.get -> string! +Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.ParameterInfo.get -> System.Reflection.ParameterInfo! Microsoft.AspNetCore.Http.Metadata.IProducesResponseTypeMetadata Microsoft.AspNetCore.Http.Metadata.IProducesResponseTypeMetadata.ContentTypes.get -> System.Collections.Generic.IEnumerable! Microsoft.AspNetCore.Http.Metadata.IProducesResponseTypeMetadata.StatusCode.get -> int diff --git a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt index 0d2aab25f97d..7dc5c58110bf 100644 --- a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt @@ -1,13 +1 @@ #nullable enable -*REMOVED*Microsoft.AspNetCore.Http.HostString.HostString(string! value) -> void -Microsoft.AspNetCore.Http.HostString.HostString(string? value) -> void -*REMOVED*Microsoft.AspNetCore.Http.HostString.Value.get -> string! -Microsoft.AspNetCore.Http.HostString.Value.get -> string? -Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void -Microsoft.AspNetCore.Http.Metadata.IDisableHttpMetricsMetadata -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.HasBindAsync.get -> bool -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.HasTryParse.get -> bool -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.IsOptional.get -> bool -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.Name.get -> string! -Microsoft.AspNetCore.Http.Metadata.IParameterBindingMetadata.ParameterInfo.get -> System.Reflection.ParameterInfo! diff --git a/src/Http/Http.Extensions/src/PublicAPI.Shipped.txt b/src/Http/Http.Extensions/src/PublicAPI.Shipped.txt index 62691cb28ddc..49c6f9937b56 100644 --- a/src/Http/Http.Extensions/src/PublicAPI.Shipped.txt +++ b/src/Http/Http.Extensions/src/PublicAPI.Shipped.txt @@ -1,4 +1,7 @@ #nullable enable +Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions +Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute +Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.DisableHttpMetricsAttribute() -> void Microsoft.AspNetCore.Http.EndpointDescriptionAttribute Microsoft.AspNetCore.Http.EndpointDescriptionAttribute.Description.get -> string! Microsoft.AspNetCore.Http.EndpointDescriptionAttribute.EndpointDescriptionAttribute(string! description) -> void @@ -107,6 +110,7 @@ Microsoft.AspNetCore.Http.HttpValidationProblemDetails.Errors.get -> System.Coll Microsoft.AspNetCore.Http.HttpValidationProblemDetails.Errors.set -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails() -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IDictionary! errors) -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) +Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) Microsoft.AspNetCore.Http.Json.JsonOptions Microsoft.AspNetCore.Http.Json.JsonOptions.JsonOptions() -> void Microsoft.AspNetCore.Http.Json.JsonOptions.SerializerOptions.get -> System.Text.Json.JsonSerializerOptions! @@ -153,12 +157,14 @@ Microsoft.AspNetCore.Mvc.ProblemDetails.Type.get -> string? (forwarded, containe Microsoft.AspNetCore.Mvc.ProblemDetails.Type.set -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) Microsoft.Extensions.DependencyInjection.HttpJsonServiceExtensions Microsoft.Extensions.DependencyInjection.ProblemDetailsServiceCollectionExtensions +override Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.ToString() -> string! override Microsoft.AspNetCore.Http.EndpointDescriptionAttribute.ToString() -> string! override Microsoft.AspNetCore.Http.EndpointSummaryAttribute.ToString() -> string! override Microsoft.AspNetCore.Http.Extensions.QueryBuilder.Equals(object? obj) -> bool override Microsoft.AspNetCore.Http.Extensions.QueryBuilder.GetHashCode() -> int override Microsoft.AspNetCore.Http.Extensions.QueryBuilder.ToString() -> string! override Microsoft.AspNetCore.Http.TagsAttribute.ToString() -> string! +static Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions.DisableHttpMetrics(this TBuilder builder) -> TBuilder static Microsoft.AspNetCore.Http.Extensions.HttpRequestMultipartExtensions.GetMultipartBoundary(this Microsoft.AspNetCore.Http.HttpRequest! request) -> string! static Microsoft.AspNetCore.Http.Extensions.StreamCopyOperation.CopyToAsync(System.IO.Stream! source, System.IO.Stream! destination, long? count, int bufferSize, System.Threading.CancellationToken cancel) -> System.Threading.Tasks.Task! static Microsoft.AspNetCore.Http.Extensions.StreamCopyOperation.CopyToAsync(System.IO.Stream! source, System.IO.Stream! destination, long? count, System.Threading.CancellationToken cancel) -> System.Threading.Tasks.Task! diff --git a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt index 8dc031273ecf..7dc5c58110bf 100644 --- a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt @@ -1,7 +1 @@ #nullable enable -Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) -Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions -Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute -Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.DisableHttpMetricsAttribute() -> void -override Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.ToString() -> string! -static Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions.DisableHttpMetrics(this TBuilder builder) -> TBuilder diff --git a/src/Http/Http.Extensions/src/RequestDelegateFactory.cs b/src/Http/Http.Extensions/src/RequestDelegateFactory.cs index f30dbe63ca10..159982900eda 100644 --- a/src/Http/Http.Extensions/src/RequestDelegateFactory.cs +++ b/src/Http/Http.Extensions/src/RequestDelegateFactory.cs @@ -543,6 +543,11 @@ private static Expression MapHandlerReturnTypeToValueTask(Expression methodCall, } } + if (returnType.IsValueType) + { + return Expression.Call(WrapObjectAsValueTaskMethod, Expression.Convert(methodCall, typeof(object))); + } + return Expression.Call(WrapObjectAsValueTaskMethod, methodCall); } diff --git a/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs b/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs index 33ecc3ff1ea8..b4071866534b 100644 --- a/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs +++ b/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs @@ -214,7 +214,7 @@ public void GetListT_StringWithQualityHeaderValidValue_Success() public void GetListT_CookieHeaderValue_Success() { var context = new DefaultHttpContext(); - context.Request.Headers.Cookie = "cookie1=a,cookie2=b"; + context.Request.Headers.Cookie = "cookie1=a;cookie2=b"; var result = context.Request.GetTypedHeaders().GetList(HeaderNames.Cookie); diff --git a/src/Http/Http.Extensions/test/RequestDelegateFactoryTests.EndpointFilters.cs b/src/Http/Http.Extensions/test/RequestDelegateFactoryTests.EndpointFilters.cs new file mode 100644 index 000000000000..894abb121049 --- /dev/null +++ b/src/Http/Http.Extensions/test/RequestDelegateFactoryTests.EndpointFilters.cs @@ -0,0 +1,98 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; + +namespace Microsoft.AspNetCore.Routing.Internal; + +public partial class RequestDelegateFactoryTests : LoggedTest +{ + public static object[][] ValueTypeReturningDelegates => + [ + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 'b')], + [(Func)((HttpContext httpContext) => true)], + [(Func)((HttpContext httpContext) => 4.2f)], + [(Func)((HttpContext httpContext) => 4.2)], + [(Func)((HttpContext httpContext) => 4.2m)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)] + ]; + + [Theory] + [MemberData(nameof(ValueTypeReturningDelegates))] + public void Create_WithEndpointFilterOnBuiltInValueTypeReturningDelegate_Works(Delegate @delegate) + { + var invokeCount = 0; + + RequestDelegateFactoryOptions options = new() + { + EndpointBuilder = CreateEndpointBuilderFromFilterFactories( + [ + (routeHandlerContext, next) => + { + invokeCount++; + return next; + }, + (routeHandlerContext, next) => + { + invokeCount++; + return next; + }, + ]), + }; + + var result = RequestDelegateFactory.Create(@delegate, options); + Assert.Equal(2, invokeCount); + } + + public static object[][] NullableValueTypeReturningDelegates => + [ + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 'b')], + [(Func)((HttpContext httpContext) => true)], + [(Func)((HttpContext httpContext) => 4.2f)], + [(Func)((HttpContext httpContext) => 4.2)], + [(Func)((HttpContext httpContext) => 4.2m)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)], + [(Func)((HttpContext httpContext) => 42)] + ]; + + [Theory] + [MemberData(nameof(NullableValueTypeReturningDelegates))] + public void Create_WithEndpointFilterOnNullableBuiltInValueTypeReturningDelegate_Works(Delegate @delegate) + { + var invokeCount = 0; + + RequestDelegateFactoryOptions options = new() + { + EndpointBuilder = CreateEndpointBuilderFromFilterFactories( + [ + (routeHandlerContext, next) => + { + invokeCount++; + return next; + }, + (routeHandlerContext, next) => + { + invokeCount++; + return next; + }, + ]), + }; + + var result = RequestDelegateFactory.Create(@delegate, options); + Assert.Equal(2, invokeCount); + } +} diff --git a/src/Http/Http.Features/src/PublicAPI.Shipped.txt b/src/Http/Http.Features/src/PublicAPI.Shipped.txt index b4621699e214..1e25190f2237 100644 --- a/src/Http/Http.Features/src/PublicAPI.Shipped.txt +++ b/src/Http/Http.Features/src/PublicAPI.Shipped.txt @@ -92,6 +92,8 @@ Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature.IsReadOnly.get Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature.MaxRequestBodySize.get -> long? Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature.MaxRequestBodySize.set -> void Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature +Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.get -> bool +Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.set -> void Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.Tags.get -> System.Collections.Generic.ICollection>! Microsoft.AspNetCore.Http.Features.IHttpRequestBodyDetectionFeature Microsoft.AspNetCore.Http.Features.IHttpRequestBodyDetectionFeature.CanHaveBody.get -> bool @@ -443,6 +445,8 @@ Microsoft.AspNetCore.Http.WebSocketAcceptContext.DangerousEnableCompression.get Microsoft.AspNetCore.Http.WebSocketAcceptContext.DangerousEnableCompression.set -> void Microsoft.AspNetCore.Http.WebSocketAcceptContext.DisableServerContextTakeover.get -> bool Microsoft.AspNetCore.Http.WebSocketAcceptContext.DisableServerContextTakeover.set -> void +Microsoft.AspNetCore.Http.WebSocketAcceptContext.KeepAliveTimeout.get -> System.TimeSpan? +Microsoft.AspNetCore.Http.WebSocketAcceptContext.KeepAliveTimeout.set -> void Microsoft.AspNetCore.Http.WebSocketAcceptContext.ServerMaxWindowBits.get -> int Microsoft.AspNetCore.Http.WebSocketAcceptContext.ServerMaxWindowBits.set -> void Microsoft.AspNetCore.Http.WebSocketAcceptContext.WebSocketAcceptContext() -> void diff --git a/src/Http/Http.Features/src/PublicAPI.Unshipped.txt b/src/Http/Http.Features/src/PublicAPI.Unshipped.txt index 998915f4d291..7dc5c58110bf 100644 --- a/src/Http/Http.Features/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Features/src/PublicAPI.Unshipped.txt @@ -1,5 +1 @@ #nullable enable -Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.get -> bool -Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.set -> void -Microsoft.AspNetCore.Http.WebSocketAcceptContext.KeepAliveTimeout.get -> System.TimeSpan? -Microsoft.AspNetCore.Http.WebSocketAcceptContext.KeepAliveTimeout.set -> void diff --git a/src/Http/Http.Results/src/PublicAPI.Shipped.txt b/src/Http/Http.Results/src/PublicAPI.Shipped.txt index 23f2cde22209..d0e74cc3a31d 100644 --- a/src/Http/Http.Results/src/PublicAPI.Shipped.txt +++ b/src/Http/Http.Results/src/PublicAPI.Shipped.txt @@ -121,6 +121,13 @@ Microsoft.AspNetCore.Http.HttpResults.ForbidHttpResult Microsoft.AspNetCore.Http.HttpResults.ForbidHttpResult.AuthenticationSchemes.get -> System.Collections.Generic.IReadOnlyList! Microsoft.AspNetCore.Http.HttpResults.ForbidHttpResult.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Http.HttpResults.ForbidHttpResult.Properties.get -> Microsoft.AspNetCore.Authentication.AuthenticationProperties? +Microsoft.AspNetCore.Http.HttpResults.InternalServerError +Microsoft.AspNetCore.Http.HttpResults.InternalServerError.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Http.HttpResults.InternalServerError.StatusCode.get -> int +Microsoft.AspNetCore.Http.HttpResults.InternalServerError +Microsoft.AspNetCore.Http.HttpResults.InternalServerError.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Http.HttpResults.InternalServerError.StatusCode.get -> int +Microsoft.AspNetCore.Http.HttpResults.InternalServerError.Value.get -> TValue? Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult.ContentType.get -> string? Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! @@ -255,6 +262,8 @@ static Microsoft.AspNetCore.Http.Results.File(byte[]! fileContents, string? cont static Microsoft.AspNetCore.Http.Results.File(string! path, string? contentType = null, string? fileDownloadName = null, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null, bool enableRangeProcessing = false) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.File(System.IO.Stream! fileStream, string? contentType = null, string? fileDownloadName = null, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null, bool enableRangeProcessing = false) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties = null, System.Collections.Generic.IList? authenticationSchemes = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.InternalServerError() -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Json(object? data, System.Text.Json.JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Json(object? data, System.Text.Json.Serialization.Metadata.JsonTypeInfo! jsonTypeInfo, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Json(object? data, System.Type! type, System.Text.Json.Serialization.JsonSerializerContext! context, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.IResult! @@ -268,7 +277,8 @@ static Microsoft.AspNetCore.Http.Results.NotFound(TValue? value) -> Micr static Microsoft.AspNetCore.Http.Results.Ok(object? value = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Ok(TValue? value) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Problem(Microsoft.AspNetCore.Mvc.ProblemDetails! problemDetails) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.Redirect(string! url, bool permanent = false, bool preserveMethod = false) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.RedirectToRoute(string? routeName = null, object? routeValues = null, bool permanent = false, bool preserveMethod = false, string? fragment = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.RedirectToRoute(string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? routeValues, bool permanent = false, bool preserveMethod = false, string? fragment = null) -> Microsoft.AspNetCore.Http.IResult! @@ -284,7 +294,8 @@ static Microsoft.AspNetCore.Http.Results.Text(System.ReadOnlySpan utf8Cont static Microsoft.AspNetCore.Http.Results.Unauthorized() -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.UnprocessableEntity(object? error = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.UnprocessableEntity(TValue? error) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.TypedResults.Accepted(string? uri) -> Microsoft.AspNetCore.Http.HttpResults.Accepted! static Microsoft.AspNetCore.Http.TypedResults.Accepted(System.Uri! uri) -> Microsoft.AspNetCore.Http.HttpResults.Accepted! static Microsoft.AspNetCore.Http.TypedResults.Accepted(string? uri, TValue? value) -> Microsoft.AspNetCore.Http.HttpResults.Accepted! @@ -317,6 +328,8 @@ static Microsoft.AspNetCore.Http.TypedResults.Extensions.get -> Microsoft.AspNet static Microsoft.AspNetCore.Http.TypedResults.File(byte[]! fileContents, string? contentType = null, string? fileDownloadName = null, bool enableRangeProcessing = false, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null) -> Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult! static Microsoft.AspNetCore.Http.TypedResults.File(System.IO.Stream! fileStream, string? contentType = null, string? fileDownloadName = null, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null, bool enableRangeProcessing = false) -> Microsoft.AspNetCore.Http.HttpResults.FileStreamHttpResult! static Microsoft.AspNetCore.Http.TypedResults.Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties = null, System.Collections.Generic.IList? authenticationSchemes = null) -> Microsoft.AspNetCore.Http.HttpResults.ForbidHttpResult! +static Microsoft.AspNetCore.Http.TypedResults.InternalServerError() -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! +static Microsoft.AspNetCore.Http.TypedResults.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! static Microsoft.AspNetCore.Http.TypedResults.Json(TValue? data, System.Text.Json.JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult! static Microsoft.AspNetCore.Http.TypedResults.Json(TValue? data, System.Text.Json.Serialization.JsonSerializerContext! context, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult! static Microsoft.AspNetCore.Http.TypedResults.Json(TValue? data, System.Text.Json.Serialization.Metadata.JsonTypeInfo! jsonTypeInfo, string? contentType = null, int? statusCode = null) -> Microsoft.AspNetCore.Http.HttpResults.JsonHttpResult! @@ -328,7 +341,8 @@ static Microsoft.AspNetCore.Http.TypedResults.Ok() -> Microsoft.AspNetCore.Http. static Microsoft.AspNetCore.Http.TypedResults.Ok(TValue? value) -> Microsoft.AspNetCore.Http.HttpResults.Ok! static Microsoft.AspNetCore.Http.TypedResults.PhysicalFile(string! path, string? contentType = null, string? fileDownloadName = null, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null, bool enableRangeProcessing = false) -> Microsoft.AspNetCore.Http.HttpResults.PhysicalFileHttpResult! static Microsoft.AspNetCore.Http.TypedResults.Problem(Microsoft.AspNetCore.Mvc.ProblemDetails! problemDetails) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! -static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! +static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! +static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! static Microsoft.AspNetCore.Http.TypedResults.Redirect(string! url, bool permanent = false, bool preserveMethod = false) -> Microsoft.AspNetCore.Http.HttpResults.RedirectHttpResult! static Microsoft.AspNetCore.Http.TypedResults.RedirectToRoute(string? routeName = null, object? routeValues = null, bool permanent = false, bool preserveMethod = false, string? fragment = null) -> Microsoft.AspNetCore.Http.HttpResults.RedirectToRouteHttpResult! static Microsoft.AspNetCore.Http.TypedResults.RedirectToRoute(string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? routeValues, bool permanent = false, bool preserveMethod = false, string? fragment = null) -> Microsoft.AspNetCore.Http.HttpResults.RedirectToRouteHttpResult! @@ -344,5 +358,6 @@ static Microsoft.AspNetCore.Http.TypedResults.Text(System.ReadOnlySpan utf static Microsoft.AspNetCore.Http.TypedResults.Unauthorized() -> Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult! static Microsoft.AspNetCore.Http.TypedResults.UnprocessableEntity() -> Microsoft.AspNetCore.Http.HttpResults.UnprocessableEntity! static Microsoft.AspNetCore.Http.TypedResults.UnprocessableEntity(TValue? error) -> Microsoft.AspNetCore.Http.HttpResults.UnprocessableEntity! -static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! +static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! +static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! static Microsoft.AspNetCore.Http.TypedResults.VirtualFile(string! path, string? contentType = null, string? fileDownloadName = null, System.DateTimeOffset? lastModified = null, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = null, bool enableRangeProcessing = false) -> Microsoft.AspNetCore.Http.HttpResults.VirtualFileHttpResult! diff --git a/src/Http/Http.Results/src/PublicAPI.Unshipped.txt b/src/Http/Http.Results/src/PublicAPI.Unshipped.txt index c68c37c4f19c..7dc5c58110bf 100644 --- a/src/Http/Http.Results/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Results/src/PublicAPI.Unshipped.txt @@ -1,24 +1 @@ #nullable enable -Microsoft.AspNetCore.Http.HttpResults.InternalServerError -Microsoft.AspNetCore.Http.HttpResults.InternalServerError.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.Http.HttpResults.InternalServerError.StatusCode.get -> int -Microsoft.AspNetCore.Http.HttpResults.InternalServerError -Microsoft.AspNetCore.Http.HttpResults.InternalServerError.ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.Http.HttpResults.InternalServerError.StatusCode.get -> int -Microsoft.AspNetCore.Http.HttpResults.InternalServerError.Value.get -> TValue? -static Microsoft.AspNetCore.Http.Results.InternalServerError() -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! -*REMOVED*static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! -*REMOVED*static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! -static Microsoft.AspNetCore.Http.TypedResults.InternalServerError() -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! -static Microsoft.AspNetCore.Http.TypedResults.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! -static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! -*REMOVED*static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! -static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! -*REMOVED*static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! -static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! -static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! diff --git a/src/Http/Http/src/PublicAPI.Shipped.txt b/src/Http/Http/src/PublicAPI.Shipped.txt index 4cecf2612f3d..52fecbb04ab7 100644 --- a/src/Http/Http/src/PublicAPI.Shipped.txt +++ b/src/Http/Http/src/PublicAPI.Shipped.txt @@ -312,6 +312,7 @@ override Microsoft.AspNetCore.Http.DefaultHttpContext.TraceIdentifier.set -> voi override Microsoft.AspNetCore.Http.DefaultHttpContext.User.get -> System.Security.Claims.ClaimsPrincipal! override Microsoft.AspNetCore.Http.DefaultHttpContext.User.set -> void override Microsoft.AspNetCore.Http.DefaultHttpContext.WebSockets.get -> Microsoft.AspNetCore.Http.WebSocketManager! +override Microsoft.AspNetCore.Http.Timeouts.DisableRequestTimeoutAttribute.ToString() -> string! static Microsoft.AspNetCore.Builder.RequestTimeoutsIApplicationBuilderExtensions.UseRequestTimeouts(this Microsoft.AspNetCore.Builder.IApplicationBuilder! builder) -> Microsoft.AspNetCore.Builder.IApplicationBuilder! static Microsoft.AspNetCore.Builder.RequestTimeoutsIEndpointConventionBuilderExtensions.DisableRequestTimeout(this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! builder) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.RequestTimeoutsIEndpointConventionBuilderExtensions.WithRequestTimeout(this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! builder, Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutPolicy! policy) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! diff --git a/src/Http/Http/src/PublicAPI.Unshipped.txt b/src/Http/Http/src/PublicAPI.Unshipped.txt index e87986053c89..7dc5c58110bf 100644 --- a/src/Http/Http/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http/src/PublicAPI.Unshipped.txt @@ -1,2 +1 @@ #nullable enable -override Microsoft.AspNetCore.Http.Timeouts.DisableRequestTimeoutAttribute.ToString() -> string! diff --git a/src/Http/Http/test/RequestCookiesCollectionTests.cs b/src/Http/Http/test/RequestCookiesCollectionTests.cs index e08a53f29711..d584f2db0599 100644 --- a/src/Http/Http/test/RequestCookiesCollectionTests.cs +++ b/src/Http/Http/test/RequestCookiesCollectionTests.cs @@ -33,11 +33,18 @@ public void ParseManyCookies() [Theory] [InlineData(",", null)] [InlineData(";", null)] - [InlineData("er=dd,cc,bb", new[] { "dd" })] - [InlineData("er=dd,err=cc,errr=bb", new[] { "dd", "cc", "bb" })] - [InlineData("errorcookie=dd,:(\"sa;", new[] { "dd" })] + [InlineData("er=dd,cc,bb", null)] + [InlineData("er=dd,err=cc,errr=bb", null)] + [InlineData("errorcookie=dd,:(\"sa;", null)] [InlineData("s;", null)] [InlineData("er=;,err=,errr=\\,errrr=\"", null)] + [InlineData("a@a=a;", null)] + [InlineData("a@ a=a;", null)] + [InlineData("a a=a;", null)] + [InlineData(",a=a;", null)] + [InlineData(",a=a", null)] + [InlineData("a=a;,b=b", new []{ "a" })] // valid cookie followed by invalid cookie + [InlineData(",a=a;b=b", new[] { "b" })] // invalid cookie followed by valid cookie public void ParseInvalidCookies(string cookieToParse, string[] expectedCookieValues) { var cookies = RequestCookieCollection.Parse(new StringValues(new[] { cookieToParse })); diff --git a/src/Http/Routing/src/PublicAPI.Shipped.txt b/src/Http/Routing/src/PublicAPI.Shipped.txt index ec77b6b45e60..2589d8973199 100644 --- a/src/Http/Routing/src/PublicAPI.Shipped.txt +++ b/src/Http/Routing/src/PublicAPI.Shipped.txt @@ -166,6 +166,10 @@ Microsoft.AspNetCore.Routing.Constraints.RequiredRouteConstraint.RequiredRouteCo Microsoft.AspNetCore.Routing.Constraints.StringRouteConstraint Microsoft.AspNetCore.Routing.Constraints.StringRouteConstraint.Match(Microsoft.AspNetCore.Http.HttpContext? httpContext, Microsoft.AspNetCore.Routing.IRouter? route, string! routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary! values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) -> bool Microsoft.AspNetCore.Routing.Constraints.StringRouteConstraint.StringRouteConstraint(string! value) -> void +Microsoft.AspNetCore.Routing.ContentEncodingMetadata +Microsoft.AspNetCore.Routing.ContentEncodingMetadata.ContentEncodingMetadata(string! value, double quality) -> void +Microsoft.AspNetCore.Routing.ContentEncodingMetadata.Quality.get -> double +Microsoft.AspNetCore.Routing.ContentEncodingMetadata.Value.get -> string! Microsoft.AspNetCore.Routing.DataTokensMetadata Microsoft.AspNetCore.Routing.DataTokensMetadata.DataTokens.get -> System.Collections.Generic.IReadOnlyDictionary! Microsoft.AspNetCore.Routing.DataTokensMetadata.DataTokensMetadata(System.Collections.Generic.IReadOnlyDictionary! dataTokens) -> void @@ -616,7 +620,9 @@ static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ExcludeFro static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.Produces(this Microsoft.AspNetCore.Builder.RouteHandlerBuilder! builder, int statusCode, System.Type? responseType = null, string? contentType = null, params string![]! additionalContentTypes) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.Produces(this Microsoft.AspNetCore.Builder.RouteHandlerBuilder! builder, int statusCode = 200, string? contentType = null, params string![]! additionalContentTypes) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesProblem(this Microsoft.AspNetCore.Builder.RouteHandlerBuilder! builder, int statusCode, string? contentType = null) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! +static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesProblem(this TBuilder builder, int statusCode, string? contentType = null) -> TBuilder static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesValidationProblem(this Microsoft.AspNetCore.Builder.RouteHandlerBuilder! builder, int statusCode = 400, string? contentType = null) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! +static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesValidationProblem(this TBuilder builder, int statusCode = 400, string? contentType = null) -> TBuilder static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.WithDescription(this TBuilder builder, string! description) -> TBuilder static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.WithSummary(this TBuilder builder, string! summary) -> TBuilder static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.WithTags(this Microsoft.AspNetCore.Builder.RouteHandlerBuilder! builder, params string![]! tags) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! @@ -693,6 +699,7 @@ static Microsoft.AspNetCore.Routing.RouteBase.GetConstraints(Microsoft.AspNetCor static Microsoft.AspNetCore.Routing.RouteBase.GetDefaults(Microsoft.AspNetCore.Routing.Template.RouteTemplate! parsedTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary? defaults) -> Microsoft.AspNetCore.Routing.RouteValueDictionary! static Microsoft.AspNetCore.Routing.RouteConstraintMatcher.Match(System.Collections.Generic.IDictionary! constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary! routeValues, Microsoft.AspNetCore.Http.HttpContext! httpContext, Microsoft.AspNetCore.Routing.IRouter! route, Microsoft.AspNetCore.Routing.RouteDirection routeDirection, Microsoft.Extensions.Logging.ILogger! logger) -> bool static Microsoft.AspNetCore.Routing.RouteHandlerServices.Map(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, System.Delegate! handler, System.Collections.Generic.IEnumerable? httpMethods, System.Func! populateMetadata, System.Func! createRequestDelegate) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! +static Microsoft.AspNetCore.Routing.RouteHandlerServices.Map(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, System.Delegate! handler, System.Collections.Generic.IEnumerable? httpMethods, System.Func! populateMetadata, System.Func! createRequestDelegate, System.Reflection.MethodInfo! methodInfo) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! static Microsoft.AspNetCore.Routing.RouteShortCircuitEndpointRouteBuilderExtensions.MapShortCircuit(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! builder, int statusCode, params string![]! routePrefixes) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! static Microsoft.AspNetCore.Routing.Template.RoutePrecedence.ComputeInbound(Microsoft.AspNetCore.Routing.Template.RouteTemplate! template) -> decimal static Microsoft.AspNetCore.Routing.Template.RoutePrecedence.ComputeOutbound(Microsoft.AspNetCore.Routing.Template.RouteTemplate! template) -> decimal diff --git a/src/Http/Routing/src/PublicAPI.Unshipped.txt b/src/Http/Routing/src/PublicAPI.Unshipped.txt index f36374cf8952..7dc5c58110bf 100644 --- a/src/Http/Routing/src/PublicAPI.Unshipped.txt +++ b/src/Http/Routing/src/PublicAPI.Unshipped.txt @@ -1,8 +1 @@ #nullable enable -Microsoft.AspNetCore.Routing.ContentEncodingMetadata -Microsoft.AspNetCore.Routing.ContentEncodingMetadata.ContentEncodingMetadata(string! value, double quality) -> void -Microsoft.AspNetCore.Routing.ContentEncodingMetadata.Quality.get -> double -Microsoft.AspNetCore.Routing.ContentEncodingMetadata.Value.get -> string! -static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesProblem(this TBuilder builder, int statusCode, string? contentType = null) -> TBuilder -static Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ProducesValidationProblem(this TBuilder builder, int statusCode = 400, string? contentType = null) -> TBuilder -static Microsoft.AspNetCore.Routing.RouteHandlerServices.Map(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, System.Delegate! handler, System.Collections.Generic.IEnumerable? httpMethods, System.Func! populateMetadata, System.Func! createRequestDelegate, System.Reflection.MethodInfo! methodInfo) -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder! diff --git a/src/Http/Shared/CookieHeaderParserShared.cs b/src/Http/Shared/CookieHeaderParserShared.cs index e4b1d83e519a..0eb1c64d533a 100644 --- a/src/Http/Shared/CookieHeaderParserShared.cs +++ b/src/Http/Shared/CookieHeaderParserShared.cs @@ -89,6 +89,17 @@ public static bool TryParseValue(StringSegment value, ref int index, bool suppor if (!TryGetCookieLength(value, ref current, out parsedName, out parsedValue)) { + var separatorIndex = value.IndexOf(';', current); + if (separatorIndex > 0) + { + // Skip the invalid values and keep trying. + index = separatorIndex; + } + else + { + // No more separators, so we're done. + index = value.Length; + } return false; } @@ -97,6 +108,17 @@ public static bool TryParseValue(StringSegment value, ref int index, bool suppor // If we support multiple values and we've not reached the end of the string, then we must have a separator. if ((separatorFound && !supportsMultipleValues) || (!separatorFound && (current < value.Length))) { + var separatorIndex = value.IndexOf(';', current); + if (separatorIndex > 0) + { + // Skip the invalid values and keep trying. + index = separatorIndex; + } + else + { + // No more separators, so we're done. + index = value.Length; + } return false; } @@ -112,7 +134,7 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta separatorFound = false; var current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex); - if ((current == input.Length) || (input[current] != ',' && input[current] != ';')) + if (current == input.Length || input[current] != ';') { return current; } @@ -125,8 +147,8 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta if (skipEmptyValues) { - // Most headers only split on ',', but cookies primarily split on ';' - while ((current < input.Length) && ((input[current] == ',') || (input[current] == ';'))) + // Cookies are split on ';' + while (current < input.Length && input[current] == ';') { current++; // skip delimiter. current = current + HttpRuleParser.GetWhitespaceLength(input, current); @@ -136,6 +158,18 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta return current; } + /* + * https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * cookie-pair = cookie-name "=" cookie-value + * cookie-name = token + * token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + CTL = + */ // name=value; name="value" internal static bool TryGetCookieLength(StringSegment input, ref int offset, [NotNullWhen(true)] out StringSegment? parsedName, [NotNullWhen(true)] out StringSegment? parsedValue) { diff --git a/src/Http/WebUtilities/src/MultipartReaderStream.cs b/src/Http/WebUtilities/src/MultipartReaderStream.cs index 208d1b38f0e0..9dd5ce6a76f8 100644 --- a/src/Http/WebUtilities/src/MultipartReaderStream.cs +++ b/src/Http/WebUtilities/src/MultipartReaderStream.cs @@ -174,7 +174,7 @@ public override int Read(byte[] buffer, int offset, int count) if (index != 0) { // Sync, it's already buffered - var slice = buffer.AsSpan(0, Math.Min(buffer.Length, index)); + var slice = buffer.AsSpan(offset, Math.Min(count, index)); var readAmount = _innerStream.Read(slice); return UpdatePosition(readAmount); diff --git a/src/Http/WebUtilities/src/PublicAPI.Shipped.txt b/src/Http/WebUtilities/src/PublicAPI.Shipped.txt index 6c0843f2c40d..bf0509e3760f 100644 --- a/src/Http/WebUtilities/src/PublicAPI.Shipped.txt +++ b/src/Http/WebUtilities/src/PublicAPI.Shipped.txt @@ -232,5 +232,6 @@ static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(byte[]! inp static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(byte[]! input, int offset, char[]! output, int outputOffset, int count) -> int static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(byte[]! input, int offset, int count) -> string! static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(System.ReadOnlySpan input) -> string! +static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(System.ReadOnlySpan input, System.Span output) -> int static Microsoft.AspNetCore.WebUtilities.WebEncoders.GetArraySizeRequiredToDecode(int count) -> int static Microsoft.AspNetCore.WebUtilities.WebEncoders.GetArraySizeRequiredToEncode(int count) -> int diff --git a/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt b/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt index 1edfae904adf..7dc5c58110bf 100644 --- a/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt +++ b/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt @@ -1,2 +1 @@ #nullable enable -static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(System.ReadOnlySpan input, System.Span output) -> int diff --git a/src/Http/WebUtilities/test/MultipartReaderTests.cs b/src/Http/WebUtilities/test/MultipartReaderTests.cs index 8231ec472bc0..bc442b567dc0 100644 --- a/src/Http/WebUtilities/test/MultipartReaderTests.cs +++ b/src/Http/WebUtilities/test/MultipartReaderTests.cs @@ -389,4 +389,28 @@ public async Task MultipartReader_StripQuotesFromBoundary() var section = await reader.ReadNextSectionAsync(); Assert.NotNull(section); } + + [Fact] + public async Task SyncReadWithOffsetWorks() + { + var stream = MakeStream(OnePartBody); + var reader = new MultipartReader(Boundary, stream); + var buffer = new byte[5]; + + var section = await reader.ReadNextSectionAsync(); + Assert.NotNull(section); + Assert.Single(section.Headers); + Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); + + var read = section.Body.Read(buffer, 2, buffer.Length - 2); + Assert.Equal("\0\0tex", GetString(buffer, read + 2)); + + read = section.Body.Read(buffer, 1, buffer.Length - 1); + Assert.Equal("\0t de", GetString(buffer, read + 1)); + + read = section.Body.Read(buffer, 0, buffer.Length); + Assert.Equal("fault", GetString(buffer, read)); + + Assert.Null(await reader.ReadNextSectionAsync()); + } } diff --git a/src/Identity/Core/src/SignInManager.cs b/src/Identity/Core/src/SignInManager.cs index b5659b329854..66f06c4d3465 100644 --- a/src/Identity/Core/src/SignInManager.cs +++ b/src/Identity/Core/src/SignInManager.cs @@ -162,8 +162,21 @@ public virtual async Task CanSignInAsync(TUser user) public virtual async Task RefreshSignInAsync(TUser user) { var auth = await Context.AuthenticateAsync(AuthenticationScheme); - IList claims = Array.Empty(); + if (!auth.Succeeded || auth.Principal?.Identity?.IsAuthenticated != true) + { + Logger.LogError("RefreshSignInAsync prevented because the user is not currently authenticated. Use SignInAsync instead for initial sign in."); + return; + } + var authenticatedUserId = UserManager.GetUserId(auth.Principal); + var newUserId = await UserManager.GetUserIdAsync(user); + if (authenticatedUserId == null || authenticatedUserId != newUserId) + { + Logger.LogError("RefreshSignInAsync prevented because currently authenticated user has a different UserId. Use SignInAsync instead to change users."); + return; + } + + IList claims = Array.Empty(); var authenticationMethod = auth?.Principal?.FindFirst(ClaimTypes.AuthenticationMethod); var amr = auth?.Principal?.FindFirst("amr"); diff --git a/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs b/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs index f55c2b48340d..fe7eb5ee9003 100644 --- a/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs +++ b/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs @@ -144,6 +144,9 @@ await Assert.ThrowsAsync("user", await Assert.ThrowsAsync("user", async () => await store.GetTwoFactorEnabledAsync(null)); await Assert.ThrowsAsync("user", async () => await store.SetTwoFactorEnabledAsync(null, true)); + await Assert.ThrowsAsync("user", async () => await store.RedeemCodeAsync(user: null, code: "fake", default)); + await Assert.ThrowsAsync("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: null, default)); + await Assert.ThrowsAsync("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: "", default)); await Assert.ThrowsAsync("user", async () => await store.GetAccessFailedCountAsync(null)); await Assert.ThrowsAsync("user", async () => await store.GetLockoutEnabledAsync(null)); await Assert.ThrowsAsync("user", async () => await store.SetLockoutEnabledAsync(null, false)); diff --git a/src/Identity/Extensions.Stores/src/UserStoreBase.cs b/src/Identity/Extensions.Stores/src/UserStoreBase.cs index c45dd197e4a2..804ebcbad7dc 100644 --- a/src/Identity/Extensions.Stores/src/UserStoreBase.cs +++ b/src/Identity/Extensions.Stores/src/UserStoreBase.cs @@ -969,7 +969,7 @@ public virtual async Task RedeemCodeAsync(TUser user, string code, Cancell ThrowIfDisposed(); ArgumentNullThrowHelper.ThrowIfNull(user); - ArgumentNullThrowHelper.ThrowIfNull(code); + ArgumentNullThrowHelper.ThrowIfNullOrEmpty(code); var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? ""; var splitCodes = mergedCodes.Split(';'); diff --git a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj index a43b8e998eec..d36fe09d60c4 100644 --- a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj @@ -90,11 +90,27 @@ %(RecursiveDir)%(FileName)%(Extension) - - + + - + + @@ -106,7 +122,7 @@ > - + - - + + + Discovered + + + Discovered + + + + + - + - + diff --git a/src/Identity/test/Identity.Test/SignInManagerTest.cs b/src/Identity/test/Identity.Test/SignInManagerTest.cs index d1072676138a..73fe6d6be218 100644 --- a/src/Identity/test/Identity.Test/SignInManagerTest.cs +++ b/src/Identity/test/Identity.Test/SignInManagerTest.cs @@ -592,38 +592,38 @@ public async Task CanExternalSignIn(bool isPersistent, bool supportsLockout) [InlineData(true, false)] [InlineData(false, true)] [InlineData(false, false)] - public async Task CanResignIn( - // Suppress warning that says theory methods should use all of their parameters. - // See comments below about why this isn't used. -#pragma warning disable xUnit1026 - bool isPersistent, -#pragma warning restore xUnit1026 - bool externalLogin) + public async Task CanResignIn(bool isPersistent, bool externalLogin) { // Setup var user = new PocoUser { UserName = "Foo" }; var context = new DefaultHttpContext(); var auth = MockAuth(context); var loginProvider = "loginprovider"; - var id = new ClaimsIdentity(); + var id = new ClaimsIdentity("authscheme"); if (externalLogin) { id.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, loginProvider)); } - // REVIEW: auth changes we lost the ability to mock is persistent - //var properties = new AuthenticationProperties { IsPersistent = isPersistent }; - var authResult = AuthenticateResult.NoResult(); + + var claimsPrincipal = new ClaimsPrincipal(id); + var properties = new AuthenticationProperties { IsPersistent = isPersistent }; + var authResult = AuthenticateResult.Success(new AuthenticationTicket(claimsPrincipal, properties, "authscheme")); auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme)) .Returns(Task.FromResult(authResult)).Verifiable(); var manager = SetupUserManager(user); + manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns(user.Id.ToString()); var signInManager = new Mock>(manager.Object, new HttpContextAccessor { HttpContext = context }, new Mock>().Object, null, null, new Mock().Object, null) { CallBase = true }; - //signInManager.Setup(s => s.SignInAsync(user, It.Is(p => p.IsPersistent == isPersistent), - //externalLogin? loginProvider : null)).Returns(Task.FromResult(0)).Verifiable(); - signInManager.Setup(s => s.SignInWithClaimsAsync(user, It.IsAny(), It.IsAny>())).Returns(Task.FromResult(0)).Verifiable(); + + signInManager.Setup(s => s.SignInWithClaimsAsync(user, + It.Is(properties => properties.IsPersistent == isPersistent), + It.Is>(claims => !externalLogin || + claims.Any(claim => claim.Type == ClaimTypes.AuthenticationMethod && claim.Value == loginProvider)))) + .Returns(Task.FromResult(0)).Verifiable(); + signInManager.Object.Context = context; // Act @@ -634,6 +634,58 @@ public async Task CanResignIn( signInManager.Verify(); } + [Fact] + public async Task ResignInNoOpsAndLogsErrorIfNotAuthenticated() + { + var user = new PocoUser { UserName = "Foo" }; + var context = new DefaultHttpContext(); + var auth = MockAuth(context); + var manager = SetupUserManager(user); + var logger = new TestLogger>(); + var signInManager = new Mock>(manager.Object, + new HttpContextAccessor { HttpContext = context }, + new Mock>().Object, + null, logger, new Mock().Object, null) + { CallBase = true }; + auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme)) + .Returns(Task.FromResult(AuthenticateResult.NoResult())).Verifiable(); + + await signInManager.Object.RefreshSignInAsync(user); + + Assert.Contains("RefreshSignInAsync prevented because the user is not currently authenticated. Use SignInAsync instead for initial sign in.", logger.LogMessages); + auth.Verify(); + signInManager.Verify(s => s.SignInWithClaimsAsync(It.IsAny(), It.IsAny(), It.IsAny>()), + Times.Never()); + } + + [Fact] + public async Task ResignInNoOpsAndLogsErrorIfAuthenticatedWithDifferentUser() + { + var user = new PocoUser { UserName = "Foo" }; + var context = new DefaultHttpContext(); + var auth = MockAuth(context); + var manager = SetupUserManager(user); + var logger = new TestLogger>(); + var signInManager = new Mock>(manager.Object, + new HttpContextAccessor { HttpContext = context }, + new Mock>().Object, + null, logger, new Mock().Object, null) + { CallBase = true }; + var id = new ClaimsIdentity("authscheme"); + var claimsPrincipal = new ClaimsPrincipal(id); + var authResult = AuthenticateResult.Success(new AuthenticationTicket(claimsPrincipal, new AuthenticationProperties(), "authscheme")); + auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme)) + .Returns(Task.FromResult(authResult)).Verifiable(); + manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns("different"); + + await signInManager.Object.RefreshSignInAsync(user); + + Assert.Contains("RefreshSignInAsync prevented because currently authenticated user has a different UserId. Use SignInAsync instead to change users.", logger.LogMessages); + auth.Verify(); + signInManager.Verify(s => s.SignInWithClaimsAsync(It.IsAny(), It.IsAny(), It.IsAny>()), + Times.Never()); + } + [Theory] [InlineData(true, true, true, true)] [InlineData(true, true, false, true)] diff --git a/src/Installers/Windows/WindowsHostingBundle/Bundle.wxs b/src/Installers/Windows/WindowsHostingBundle/Bundle.wxs index 6131a49404f4..dd23ad4ee5d4 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Bundle.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/Bundle.wxs @@ -1,8 +1,7 @@ - + - - - + + $(DotnetRuntimeSourceFeedKey) diff --git a/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Shipped.txt b/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Shipped.txt index 526b0d8f43d8..fb198e235585 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Shipped.txt +++ b/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Shipped.txt @@ -24,16 +24,6 @@ Microsoft.JSInterop.IJSRuntime.InvokeAsync(string! identifier, System.Th Microsoft.JSInterop.IJSStreamReference Microsoft.JSInterop.IJSStreamReference.Length.get -> long Microsoft.JSInterop.IJSStreamReference.OpenReadStreamAsync(long maxAllowedSize = 512000, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -Microsoft.JSInterop.IJSUnmarshalledObjectReference -Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier) -> TResult -Microsoft.JSInterop.IJSUnmarshalledRuntime -Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier) -> TResult Microsoft.JSInterop.Implementation.JSInProcessObjectReference Microsoft.JSInterop.Implementation.JSInProcessObjectReference.Dispose() -> void Microsoft.JSInterop.Implementation.JSInProcessObjectReference.Invoke(string! identifier, params object?[]? args) -> TValue diff --git a/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Unshipped.txt b/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Unshipped.txt index 3759e9ad0478..7dc5c58110bf 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Unshipped.txt +++ b/src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Unshipped.txt @@ -1,11 +1 @@ #nullable enable -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledObjectReference -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledObjectReference.InvokeUnmarshalled(string! identifier) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledRuntime -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1, T2 arg2) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0, T1 arg1) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier, T0 arg0) -> TResult -*REMOVED*Microsoft.JSInterop.IJSUnmarshalledRuntime.InvokeUnmarshalled(string! identifier) -> TResult diff --git a/src/Middleware/CORS/src/PublicAPI.Shipped.txt b/src/Middleware/CORS/src/PublicAPI.Shipped.txt index 8b3524c03289..2dcbbded8825 100644 --- a/src/Middleware/CORS/src/PublicAPI.Shipped.txt +++ b/src/Middleware/CORS/src/PublicAPI.Shipped.txt @@ -175,6 +175,8 @@ static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AccessCon static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AccessControlMaxAge -> string! static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AccessControlRequestHeaders -> string! static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AccessControlRequestMethod -> string! +static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyHeader -> string! +static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyMethod -> string! static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyOrigin -> string! static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.Origin -> string! static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.PreflightHttpMethod -> string! diff --git a/src/Middleware/CORS/src/PublicAPI.Unshipped.txt b/src/Middleware/CORS/src/PublicAPI.Unshipped.txt index 91f8b182bd09..7dc5c58110bf 100644 --- a/src/Middleware/CORS/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/CORS/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyHeader -> string! -static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyMethod -> string! diff --git a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs index 2f33111ccb3b..cfc26131c1a1 100644 --- a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs +++ b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs @@ -102,13 +102,8 @@ private static void SetExceptionHandlerFeatures(ErrorContext errorContext) /// /// /// - [DebuggerDisableUserUnhandledExceptions] public async Task Invoke(HttpContext context) { - // We want to avoid treating exceptions as user-unhandled if an exception filter like the DatabaseDeveloperPageExceptionFilter - // handles the exception rather than letting it flow to the default DisplayException method. This is because we don't want to stop the - // debugger if the developer shouldn't be handling the exception and instead just needs to do something like click a link to run a - // database migration. try { await _next(context); @@ -127,11 +122,6 @@ public async Task Invoke(HttpContext context) context.Response.StatusCode = StatusCodes.Status499ClientClosedRequest; } - // Generally speaking, we do not expect application code to handle things like IOExceptions during a request - // body read due to a client disconnect. But aborted requests should be rare in development, and developers - // might be surprised if an IOException propagating through their code was not considered user-unhandled. - // That said, if developers complain, we consider removing the following line. - Debugger.BreakForUserUnhandledException(ex); return; } @@ -141,8 +131,6 @@ public async Task Invoke(HttpContext context) { _logger.ResponseStartedErrorPageMiddleware(); _metrics.RequestException(exceptionName, ExceptionResult.Skipped, handler: null); - - // Rethrowing informs the debugger that this exception should be considered user-unhandled. throw; } @@ -173,16 +161,11 @@ public async Task Invoke(HttpContext context) } catch (Exception ex2) { - // It might make sense to call BreakForUserUnhandledException for ex2 after we do the same for the original exception. - // But for now, considering the rarity of user-defined IDeveloperPageExceptionFilters, we're not for simplicity. - // If there's a Exception while generating the error page, re-throw the original exception. _logger.DisplayErrorPageException(ex2); } _metrics.RequestException(exceptionName, ExceptionResult.Unhandled, handler: null); - - // Rethrowing informs the debugger that this exception should be considered user-unhandled. throw; } @@ -195,9 +178,6 @@ public async Task Invoke(HttpContext context) // Assumes the response headers have not been sent. If they have, still attempt to write to the body. private Task DisplayException(ErrorContext errorContext) { - // We need to inform the debugger that this exception should be considered user-unhandled since it wasn't fully handled by an exception filter. - Debugger.BreakForUserUnhandledException(errorContext.Exception); - var httpContext = errorContext.HttpContext; var headers = httpContext.Request.GetTypedHeaders(); var acceptHeader = headers.Accept; diff --git a/src/Middleware/Diagnostics/src/PublicAPI.Shipped.txt b/src/Middleware/Diagnostics/src/PublicAPI.Shipped.txt index 48f720a53c80..3201cd61f75c 100644 --- a/src/Middleware/Diagnostics/src/PublicAPI.Shipped.txt +++ b/src/Middleware/Diagnostics/src/PublicAPI.Shipped.txt @@ -17,6 +17,8 @@ Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.ExceptionHandler.set -> voi Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.ExceptionHandlerOptions() -> void Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.ExceptionHandlingPath.get -> Microsoft.AspNetCore.Http.PathString Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.ExceptionHandlingPath.set -> void +Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.StatusCodeSelector.get -> System.Func? +Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.StatusCodeSelector.set -> void Microsoft.AspNetCore.Builder.StatusCodePagesExtensions Microsoft.AspNetCore.Builder.StatusCodePagesOptions Microsoft.AspNetCore.Builder.StatusCodePagesOptions.HandleAsync.get -> System.Func! diff --git a/src/Middleware/Diagnostics/src/PublicAPI.Unshipped.txt b/src/Middleware/Diagnostics/src/PublicAPI.Unshipped.txt index c47812f983e8..7dc5c58110bf 100644 --- a/src/Middleware/Diagnostics/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/Diagnostics/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.StatusCodeSelector.get -> System.Func? -Microsoft.AspNetCore.Builder.ExceptionHandlerOptions.StatusCodeSelector.set -> void diff --git a/src/Middleware/Diagnostics/src/_package.json b/src/Middleware/Diagnostics/src/_package.json index a89dd3241cf6..7262c61e559d 100644 --- a/src/Middleware/Diagnostics/src/_package.json +++ b/src/Middleware/Diagnostics/src/_package.json @@ -1,5 +1,5 @@ { - "name": "DiagnosticsPages", + "name": "@microsoft/DiagnosticsPages", "version": "0.0.0", "description": "", "private": true, diff --git a/src/Middleware/HttpLogging/src/PublicAPI.Shipped.txt b/src/Middleware/HttpLogging/src/PublicAPI.Shipped.txt index b02a11efea6f..d6236083ea58 100644 --- a/src/Middleware/HttpLogging/src/PublicAPI.Shipped.txt +++ b/src/Middleware/HttpLogging/src/PublicAPI.Shipped.txt @@ -111,6 +111,7 @@ Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions static Microsoft.AspNetCore.Builder.HttpLoggingBuilderExtensions.UseHttpLogging(this Microsoft.AspNetCore.Builder.IApplicationBuilder! app) -> Microsoft.AspNetCore.Builder.IApplicationBuilder! static Microsoft.AspNetCore.Builder.HttpLoggingBuilderExtensions.UseW3CLogging(this Microsoft.AspNetCore.Builder.IApplicationBuilder! app) -> Microsoft.AspNetCore.Builder.IApplicationBuilder! static Microsoft.AspNetCore.Builder.HttpLoggingEndpointConventionBuilderExtensions.WithHttpLogging(this TBuilder builder, Microsoft.AspNetCore.HttpLogging.HttpLoggingFields loggingFields, int? requestBodyLogLimit = null, int? responseBodyLogLimit = null) -> TBuilder +static Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions.AddHttpLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions.AddHttpLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions.AddHttpLoggingInterceptor(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions.AddW3CLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Middleware/HttpLogging/src/PublicAPI.Unshipped.txt b/src/Middleware/HttpLogging/src/PublicAPI.Unshipped.txt index b27b861c528c..7dc5c58110bf 100644 --- a/src/Middleware/HttpLogging/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/HttpLogging/src/PublicAPI.Unshipped.txt @@ -1,2 +1 @@ #nullable enable -static Microsoft.Extensions.DependencyInjection.HttpLoggingServicesExtensions.AddHttpLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs b/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs index 6b2a118cb132..72cae1507a0e 100644 --- a/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs +++ b/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs @@ -21,6 +21,7 @@ public class ForwardedHeadersMiddleware private readonly ForwardedHeadersOptions _options; private readonly RequestDelegate _next; private readonly ILogger _logger; + private readonly bool _ignoreUnknownProxiesWithoutFor; private bool _allowAllHosts; private IList? _allowedHosts; @@ -63,6 +64,18 @@ public ForwardedHeadersMiddleware(RequestDelegate next, ILoggerFactory loggerFac _logger = loggerFactory.CreateLogger(); _next = next; + if (AppContext.TryGetSwitch("Microsoft.AspNetCore.HttpOverrides.IgnoreUnknownProxiesWithoutFor", out var enabled) + && enabled) + { + _ignoreUnknownProxiesWithoutFor = true; + } + + if (Environment.GetEnvironmentVariable("MICROSOFT_ASPNETCORE_HTTPOVERRIDES_IGNORE_UNKNOWN_PROXIES_WITHOUT_FOR") is string env + && (env.Equals("true", StringComparison.OrdinalIgnoreCase) || env.Equals("1"))) + { + _ignoreUnknownProxiesWithoutFor = true; + } + PreProcessHosts(); } @@ -220,19 +233,24 @@ public void ApplyForwarders(HttpContext context) for (; entriesConsumed < sets.Length; entriesConsumed++) { var set = sets[entriesConsumed]; - if (checkFor) + // Opt-out of breaking change behavior where we now always check KnownProxies and KnownNetworks + // It used to be guarded by the ForwardedHeaders.XForwardedFor flag, but now we always check it. + if (!_ignoreUnknownProxiesWithoutFor || checkFor) { // For the first instance, allow remoteIp to be null for servers that don't support it natively. if (currentValues.RemoteIpAndPort != null && checkKnownIps && !CheckKnownAddress(currentValues.RemoteIpAndPort.Address)) { // Stop at the first unknown remote IP, but still apply changes processed so far. - if (_logger.IsEnabled(LogLevel.Debug)) + if (_logger.IsEnabled(LogLevel.Warning)) { - _logger.LogDebug(1, "Unknown proxy: {RemoteIpAndPort}", currentValues.RemoteIpAndPort); + _logger.LogWarning(1, "Unknown proxy: {RemoteIpAndPort}", currentValues.RemoteIpAndPort); } break; } + } + if (checkFor) + { if (IPEndPoint.TryParse(set.IpAndPortText, out var parsedEndPoint)) { applyChanges = true; diff --git a/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs b/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs index aa33a191e7b7..627ad96a3cd6 100644 --- a/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs +++ b/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.TestHost; +using Microsoft.DotNet.RemoteExecutor; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -962,6 +963,201 @@ public async Task AllOptionsDisabledRequestDoesntChange() Assert.Equal(PathString.Empty, context.Request.PathBase); } + [Theory] + [InlineData(ForwardedHeaders.XForwardedFor, false)] + [InlineData(ForwardedHeaders.XForwardedFor, true)] + [InlineData(ForwardedHeaders.XForwardedHost, false)] + [InlineData(ForwardedHeaders.XForwardedHost, true)] + [InlineData(ForwardedHeaders.XForwardedProto, false)] + [InlineData(ForwardedHeaders.XForwardedProto, true)] + [InlineData(ForwardedHeaders.XForwardedPrefix, false)] + [InlineData(ForwardedHeaders.XForwardedPrefix, true)] + public async Task IgnoreXForwardedHeadersFromUnknownProxy(ForwardedHeaders forwardedHeaders, bool unknownProxy) + { + using var host = new HostBuilder() + .ConfigureWebHost(webHostBuilder => + { + webHostBuilder + .UseTestServer() + .Configure(app => + { + var options = new ForwardedHeadersOptions + { + ForwardedHeaders = forwardedHeaders + }; + if (!unknownProxy) + { + var proxy = IPAddress.Parse("10.0.0.1"); + options.KnownProxies.Add(proxy); + } + app.UseForwardedHeaders(options); + }); + }).Build(); + + await host.StartAsync(); + + var server = host.GetTestServer(); + + var context = await server.SendAsync(c => + { + c.Request.Headers["X-Forwarded-For"] = "11.111.111.11"; + c.Request.Headers["X-Forwarded-Host"] = "testhost"; + c.Request.Headers["X-Forwarded-Proto"] = "Protocol"; + c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase"; + c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); + c.Connection.RemotePort = 99; + }); + + if (unknownProxy) + { + Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString()); + Assert.Equal("localhost", context.Request.Host.ToString()); + Assert.Equal("http", context.Request.Scheme); + Assert.Equal(PathString.Empty, context.Request.PathBase); + } + else + { + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor)) + { + Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost)) + { + Assert.Equal("testhost", context.Request.Host.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto)) + { + Assert.Equal("Protocol", context.Request.Scheme); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix)) + { + Assert.Equal("/pathbase", context.Request.PathBase); + } + } + } + + [Theory] + [InlineData(ForwardedHeaders.XForwardedFor)] + [InlineData(ForwardedHeaders.XForwardedHost)] + [InlineData(ForwardedHeaders.XForwardedProto)] + [InlineData(ForwardedHeaders.XForwardedPrefix)] + public void AppContextDoesNotValidateUnknownProxyWithoutForwardedFor(ForwardedHeaders forwardedHeaders) + { + RemoteExecutor.Invoke(static async (forwardedHeadersName) => + { + Assert.True(Enum.TryParse(forwardedHeadersName, out var forwardedHeaders)); + AppContext.SetSwitch("Microsoft.AspNetCore.HttpOverrides.IgnoreUnknownProxiesWithoutFor", true); + using var host = new HostBuilder() + .ConfigureWebHost(webHostBuilder => + { + webHostBuilder + .UseTestServer() + .Configure(app => + { + var options = new ForwardedHeadersOptions + { + ForwardedHeaders = forwardedHeaders + }; + app.UseForwardedHeaders(options); + }); + }).Build(); + + await host.StartAsync(); + + var server = host.GetTestServer(); + + var context = await server.SendAsync(c => + { + c.Request.Headers["X-Forwarded-For"] = "11.111.111.11"; + c.Request.Headers["X-Forwarded-Host"] = "testhost"; + c.Request.Headers["X-Forwarded-Proto"] = "Protocol"; + c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase"; + c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); + c.Connection.RemotePort = 99; + }); + + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor)) + { + // X-Forwarded-For ignored since 10.0.0.1 isn't in KnownProxies + Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost)) + { + Assert.Equal("testhost", context.Request.Host.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto)) + { + Assert.Equal("Protocol", context.Request.Scheme); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix)) + { + Assert.Equal("/pathbase", context.Request.PathBase); + } + return RemoteExecutor.SuccessExitCode; + }, forwardedHeaders.ToString()).Dispose(); + } + + [Theory] + [InlineData(ForwardedHeaders.XForwardedFor)] + [InlineData(ForwardedHeaders.XForwardedHost)] + [InlineData(ForwardedHeaders.XForwardedProto)] + [InlineData(ForwardedHeaders.XForwardedPrefix)] + public void EnvVariableDoesNotValidateUnknownProxyWithoutForwardedFor(ForwardedHeaders forwardedHeaders) + { + RemoteExecutor.Invoke(static async (forwardedHeadersName) => + { + Assert.True(Enum.TryParse(forwardedHeadersName, out var forwardedHeaders)); + Environment.SetEnvironmentVariable("MICROSOFT_ASPNETCORE_HTTPOVERRIDES_IGNORE_UNKNOWN_PROXIES_WITHOUT_FOR", "true"); + using var host = new HostBuilder() + .ConfigureWebHost(webHostBuilder => + { + webHostBuilder + .UseTestServer() + .Configure(app => + { + var options = new ForwardedHeadersOptions + { + ForwardedHeaders = forwardedHeaders + }; + app.UseForwardedHeaders(options); + }); + }).Build(); + + await host.StartAsync(); + + var server = host.GetTestServer(); + + var context = await server.SendAsync(c => + { + c.Request.Headers["X-Forwarded-For"] = "11.111.111.11"; + c.Request.Headers["X-Forwarded-Host"] = "testhost"; + c.Request.Headers["X-Forwarded-Proto"] = "Protocol"; + c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase"; + c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); + c.Connection.RemotePort = 99; + }); + + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor)) + { + // X-Forwarded-For ignored since 10.0.0.1 isn't in KnownProxies + Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost)) + { + Assert.Equal("testhost", context.Request.Host.ToString()); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto)) + { + Assert.Equal("Protocol", context.Request.Scheme); + } + if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix)) + { + Assert.Equal("/pathbase", context.Request.PathBase); + } + return RemoteExecutor.SuccessExitCode; + }, forwardedHeaders.ToString()).Dispose(); + } + [Fact] public async Task PartiallyEnabledForwardsPartiallyChangesRequest() { diff --git a/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs b/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs index a75546b6793f..38a38069b32c 100644 --- a/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs +++ b/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Linq; using Microsoft.Extensions.Caching.Memory; namespace Microsoft.AspNetCore.OutputCaching.Memory; @@ -9,7 +10,7 @@ namespace Microsoft.AspNetCore.OutputCaching.Memory; internal sealed class MemoryOutputCacheStore : IOutputCacheStore { private readonly MemoryCache _cache; - private readonly Dictionary> _taggedEntries = new(); + private readonly Dictionary> _taggedEntries = []; private readonly object _tagsLock = new(); internal MemoryOutputCacheStore(MemoryCache cache) @@ -20,7 +21,7 @@ internal MemoryOutputCacheStore(MemoryCache cache) } // For testing - internal Dictionary> TaggedEntries => _taggedEntries; + internal Dictionary> TaggedEntries => _taggedEntries.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(t => t.Key).ToHashSet()); public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken) { @@ -30,7 +31,7 @@ public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken { if (_taggedEntries.TryGetValue(tag, out var keys)) { - if (keys != null && keys.Count > 0) + if (keys is { Count: > 0 }) { // If MemoryCache changed to run eviction callbacks inline in Remove, iterating over keys could throw // To prevent allocating a copy of the keys we check if the eviction callback ran, @@ -40,7 +41,7 @@ public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken while (i > 0) { var oldCount = keys.Count; - foreach (var key in keys) + foreach (var (key, _) in keys) { _cache.Remove(key); i--; @@ -74,6 +75,8 @@ public ValueTask SetAsync(string key, byte[] value, string[]? tags, TimeSpan val ArgumentNullException.ThrowIfNull(key); ArgumentNullException.ThrowIfNull(value); + var entryId = Guid.NewGuid(); + if (tags != null) { // Lock with SetEntry() to prevent EvictByTagAsync() from trying to remove a tag whose entry hasn't been added yet. @@ -90,27 +93,27 @@ public ValueTask SetAsync(string key, byte[] value, string[]? tags, TimeSpan val if (!_taggedEntries.TryGetValue(tag, out var keys)) { - keys = new HashSet(); + keys = new HashSet(); _taggedEntries[tag] = keys; } Debug.Assert(keys != null); - keys.Add(key); + keys.Add(new TaggedEntry(key, entryId)); } - SetEntry(key, value, tags, validFor); + SetEntry(key, value, tags, validFor, entryId); } } else { - SetEntry(key, value, tags, validFor); + SetEntry(key, value, tags, validFor, entryId); } return ValueTask.CompletedTask; } - void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor) + private void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor, Guid entryId) { Debug.Assert(key != null); @@ -120,22 +123,25 @@ void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor) Size = value.Length }; - if (tags != null && tags.Length > 0) + if (tags is { Length: > 0 }) { // Remove cache keys from tag lists when the entry is evicted - options.RegisterPostEvictionCallback(RemoveFromTags, tags); + options.RegisterPostEvictionCallback(RemoveFromTags, (tags, entryId)); } _cache.Set(key, value, options); } - void RemoveFromTags(object key, object? value, EvictionReason reason, object? state) + private void RemoveFromTags(object key, object? value, EvictionReason reason, object? state) { - var tags = state as string[]; + Debug.Assert(state != null); + + var (tags, entryId) = ((string[] Tags, Guid EntryId))state; Debug.Assert(tags != null); Debug.Assert(tags.Length > 0); Debug.Assert(key is string); + Debug.Assert(entryId != Guid.Empty); lock (_tagsLock) { @@ -143,7 +149,7 @@ void RemoveFromTags(object key, object? value, EvictionReason reason, object? st { if (_taggedEntries.TryGetValue(tag, out var tagged)) { - tagged.Remove((string)key); + tagged.Remove(new TaggedEntry((string)key, entryId)); // Remove the collection if there is no more keys in it if (tagged.Count == 0) @@ -154,4 +160,6 @@ void RemoveFromTags(object key, object? value, EvictionReason reason, object? st } } } + + private record TaggedEntry(string Key, Guid EntryId); } diff --git a/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs b/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs index e8c809911add..c1ad1d708f4b 100644 --- a/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs +++ b/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs @@ -197,6 +197,43 @@ public async Task ExpiredEntries_AreRemovedFromTags() Assert.Single(tag2s); } + [Fact] + public async Task ReplacedEntries_AreNotRemovedFromTags() + { + var testClock = new TestMemoryOptionsClock { UtcNow = DateTimeOffset.UtcNow }; + var cache = new MemoryCache(new MemoryCacheOptions { SizeLimit = 1000, Clock = testClock, ExpirationScanFrequency = TimeSpan.FromMilliseconds(1) }); + var store = new MemoryOutputCacheStore(cache); + var value = "abc"u8.ToArray(); + + await store.SetAsync("a", value, new[] { "tag1", "tag2" }, TimeSpan.FromMilliseconds(5), default); + await store.SetAsync("a", value, new[] { "tag1" }, TimeSpan.FromMilliseconds(20), default); + + testClock.Advance(TimeSpan.FromMilliseconds(10)); + + // Trigger background expiration by accessing the cache. + _ = cache.Get("a"); + + var resulta = await store.GetAsync("a", default); + + Assert.NotNull(resulta); + + HashSet tag1s, tag2s; + + // Wait for the tag2 HashSet to be removed by the background expiration thread. + + using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + + while (store.TaggedEntries.TryGetValue("tag2", out tag2s) && !cts.IsCancellationRequested) + { + await Task.Yield(); + } + + store.TaggedEntries.TryGetValue("tag1", out tag1s); + + Assert.Null(tag2s); + Assert.Single(tag1s); + } + [Theory] [InlineData(null)] public async Task Store_Throws_OnInvalidTag(string tag) diff --git a/src/Middleware/RateLimiting/src/PublicAPI.Shipped.txt b/src/Middleware/RateLimiting/src/PublicAPI.Shipped.txt index f7d3b893664d..636ddf670a01 100644 --- a/src/Middleware/RateLimiting/src/PublicAPI.Shipped.txt +++ b/src/Middleware/RateLimiting/src/PublicAPI.Shipped.txt @@ -33,6 +33,7 @@ static Microsoft.AspNetCore.Builder.RateLimiterApplicationBuilderExtensions.UseR static Microsoft.AspNetCore.Builder.RateLimiterEndpointConventionBuilderExtensions.DisableRateLimiting(this TBuilder builder) -> TBuilder static Microsoft.AspNetCore.Builder.RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting(this TBuilder builder, Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy! policy) -> TBuilder static Microsoft.AspNetCore.Builder.RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting(this TBuilder builder, string! policyName) -> TBuilder +static Microsoft.AspNetCore.Builder.RateLimiterServiceCollectionExtensions.AddRateLimiter(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.AspNetCore.Builder.RateLimiterServiceCollectionExtensions.AddRateLimiter(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.AspNetCore.RateLimiting.RateLimiterOptionsExtensions.AddConcurrencyLimiter(this Microsoft.AspNetCore.RateLimiting.RateLimiterOptions! options, string! policyName, System.Action! configureOptions) -> Microsoft.AspNetCore.RateLimiting.RateLimiterOptions! static Microsoft.AspNetCore.RateLimiting.RateLimiterOptionsExtensions.AddFixedWindowLimiter(this Microsoft.AspNetCore.RateLimiting.RateLimiterOptions! options, string! policyName, System.Action! configureOptions) -> Microsoft.AspNetCore.RateLimiting.RateLimiterOptions! diff --git a/src/Middleware/RateLimiting/src/PublicAPI.Unshipped.txt b/src/Middleware/RateLimiting/src/PublicAPI.Unshipped.txt index dc6c7f9e9fe5..7dc5c58110bf 100644 --- a/src/Middleware/RateLimiting/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/RateLimiting/src/PublicAPI.Unshipped.txt @@ -1,2 +1 @@ #nullable enable -static Microsoft.AspNetCore.Builder.RateLimiterServiceCollectionExtensions.AddRateLimiter(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/Middleware/WebSockets/src/PublicAPI.Shipped.txt b/src/Middleware/WebSockets/src/PublicAPI.Shipped.txt index 6d316d9ba21d..c3858c183339 100644 --- a/src/Middleware/WebSockets/src/PublicAPI.Shipped.txt +++ b/src/Middleware/WebSockets/src/PublicAPI.Shipped.txt @@ -9,6 +9,8 @@ Microsoft.AspNetCore.Builder.WebSocketOptions Microsoft.AspNetCore.Builder.WebSocketOptions.AllowedOrigins.get -> System.Collections.Generic.IList! Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveInterval.get -> System.TimeSpan Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveInterval.set -> void +Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveTimeout.get -> System.TimeSpan +Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveTimeout.set -> void Microsoft.AspNetCore.Builder.WebSocketOptions.ReceiveBufferSize.get -> int Microsoft.AspNetCore.Builder.WebSocketOptions.ReceiveBufferSize.set -> void Microsoft.AspNetCore.Builder.WebSocketOptions.WebSocketOptions() -> void diff --git a/src/Middleware/WebSockets/src/PublicAPI.Unshipped.txt b/src/Middleware/WebSockets/src/PublicAPI.Unshipped.txt index 913e2d3dc9f3..7dc5c58110bf 100644 --- a/src/Middleware/WebSockets/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/WebSockets/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveTimeout.get -> System.TimeSpan -Microsoft.AspNetCore.Builder.WebSocketOptions.KeepAliveTimeout.set -> void diff --git a/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt b/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt index 073e491b4a7e..ebb18238569f 100644 --- a/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt +++ b/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt @@ -953,6 +953,8 @@ Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor.ContentResultExecutor(Microsoft.Extensions.Logging.ILogger! logger, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! httpResponseStreamWriterFactory) -> void Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector.DefaultOutputFormatterSelector(Microsoft.Extensions.Options.IOptions! options, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory +Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.DefaultProblemDetailsFactory(Microsoft.Extensions.Options.IOptions! options, Microsoft.Extensions.Options.IOptions? problemDetailsOptions = null) -> void Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCodeAttribute Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCodeAttribute.DefaultStatusCodeAttribute(int statusCode) -> void Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCodeAttribute.StatusCode.get -> int @@ -1999,6 +2001,8 @@ override Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter.WriteResponse override Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext! context) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector.SelectFormatter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext! context, System.Collections.Generic.IList! formatters, Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection! contentTypes) -> Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter? +override Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.CreateProblemDetails(Microsoft.AspNetCore.Http.HttpContext! httpContext, int? statusCode = null, string? title = null, string? type = null, string? detail = null, string? instance = null) -> Microsoft.AspNetCore.Mvc.ProblemDetails! +override Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.CreateValidationProblemDetails(Microsoft.AspNetCore.Http.HttpContext! httpContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelStateDictionary, int? statusCode = null, string? title = null, string? type = null, string? detail = null, string? instance = null) -> Microsoft.AspNetCore.Mvc.ValidationProblemDetails! override Microsoft.AspNetCore.Mvc.JsonResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Mvc.LocalRedirectResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! override Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinder.CanCreateInstance(System.Type! targetType) -> bool @@ -2357,7 +2361,8 @@ virtual Microsoft.AspNetCore.Mvc.ControllerBase.PhysicalFile(string! physicalPat virtual Microsoft.AspNetCore.Mvc.ControllerBase.PhysicalFile(string! physicalPath, string! contentType, string? fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue! entityTag, bool enableRangeProcessing) -> Microsoft.AspNetCore.Mvc.PhysicalFileResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.PhysicalFile(string! physicalPath, string! contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue! entityTag) -> Microsoft.AspNetCore.Mvc.PhysicalFileResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.PhysicalFile(string! physicalPath, string! contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue! entityTag, bool enableRangeProcessing) -> Microsoft.AspNetCore.Mvc.PhysicalFileResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null) -> Microsoft.AspNetCore.Mvc.ObjectResult! +virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Mvc.ObjectResult! +virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail, string? instance, int? statusCode, string? title, string? type) -> Microsoft.AspNetCore.Mvc.ObjectResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.Redirect(string! url) -> Microsoft.AspNetCore.Mvc.RedirectResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.RedirectPermanent(string! url) -> Microsoft.AspNetCore.Mvc.RedirectResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.RedirectPermanentPreserveMethod(string! url) -> Microsoft.AspNetCore.Mvc.RedirectResult! @@ -2426,7 +2431,8 @@ virtual Microsoft.AspNetCore.Mvc.ControllerBase.UnprocessableEntity(object? erro virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem() -> Microsoft.AspNetCore.Mvc.ActionResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelStateDictionary) -> Microsoft.AspNetCore.Mvc.ActionResult! virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(Microsoft.AspNetCore.Mvc.ValidationProblemDetails! descriptor) -> Microsoft.AspNetCore.Mvc.ActionResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary = null) -> Microsoft.AspNetCore.Mvc.ActionResult! +virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Mvc.ActionResult! +virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail, string? instance, int? statusCode, string? title, string? type, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary) -> Microsoft.AspNetCore.Mvc.ActionResult! virtual Microsoft.AspNetCore.Mvc.ControllerContext.ValueProviderFactories.get -> System.Collections.Generic.IList! virtual Microsoft.AspNetCore.Mvc.ControllerContext.ValueProviderFactories.set -> void virtual Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor.ActionName.get -> string! diff --git a/src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt index b4560b45280f..7dc5c58110bf 100644 --- a/src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt @@ -1,11 +1 @@ #nullable enable -*REMOVED*virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null) -> Microsoft.AspNetCore.Mvc.ObjectResult! -*REMOVED*virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary = null) -> Microsoft.AspNetCore.Mvc.ActionResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail, string? instance, int? statusCode, string? title, string? type) -> Microsoft.AspNetCore.Mvc.ObjectResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Mvc.ObjectResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail, string? instance, int? statusCode, string? title, string? type, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary) -> Microsoft.AspNetCore.Mvc.ActionResult! -virtual Microsoft.AspNetCore.Mvc.ControllerBase.ValidationProblem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Mvc.ActionResult! -Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory -Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.DefaultProblemDetailsFactory(Microsoft.Extensions.Options.IOptions! options, Microsoft.Extensions.Options.IOptions? problemDetailsOptions = null) -> void -override Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.CreateProblemDetails(Microsoft.AspNetCore.Http.HttpContext! httpContext, int? statusCode = null, string? title = null, string? type = null, string? detail = null, string? instance = null) -> Microsoft.AspNetCore.Mvc.ProblemDetails! -override Microsoft.AspNetCore.Mvc.Infrastructure.DefaultProblemDetailsFactory.CreateValidationProblemDetails(Microsoft.AspNetCore.Http.HttpContext! httpContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelStateDictionary, int? statusCode = null, string? title = null, string? type = null, string? detail = null, string? instance = null) -> Microsoft.AspNetCore.Mvc.ValidationProblemDetails! diff --git a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Shipped.txt b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Shipped.txt index 977d073ed0da..da1d8690246b 100644 --- a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Shipped.txt +++ b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Shipped.txt @@ -15,6 +15,7 @@ const Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerSelectio Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder.Add(System.Action! convention) -> void Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder.Finally(System.Action! finalConvention) -> void +Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention.Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel! model) -> void @@ -393,6 +394,7 @@ override Microsoft.AspNetCore.Mvc.RazorPages.PageBase.EnsureRenderedBodyOrSectio override Microsoft.AspNetCore.Mvc.RazorPages.PageBase.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! override Microsoft.AspNetCore.Mvc.RazorPages.PageBase.ViewContext.set -> void override Microsoft.AspNetCore.Mvc.RazorPages.PageResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! builder, string? manifestPath = null) -> Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! static Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern) -> void static Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, object! state, int order) -> void static Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern, object? state) -> void diff --git a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt index 3dc85b737c41..7dc5c58110bf 100644 --- a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions -static Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! builder, string? manifestPath = null) -> Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! diff --git a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Shipped.txt b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Shipped.txt index 447cc36a67c6..6a1a48cc3160 100644 --- a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Shipped.txt +++ b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Shipped.txt @@ -211,6 +211,8 @@ ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.GlobbingUrlBuilder.get -> Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.GlobbingUrlBuilder.set -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.HostingEnvironment.get -> Microsoft.AspNetCore.Hosting.IWebHostEnvironment +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.get -> Microsoft.AspNetCore.Components.ImportMapDefinition +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.set -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.JavaScriptEncoder.get -> System.Text.Encodings.Web.JavaScriptEncoder ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ScriptTagHelper(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider cacheProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider fileVersionProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.JavaScriptEncoder javaScriptEncoder, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Src.get -> string @@ -219,6 +221,8 @@ ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.SrcExclude.set -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.SrcInclude.get -> string ~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.SrcInclude.set -> void +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.get -> string +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.set -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper.For.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression ~Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper.For.set -> void ~Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper.Generator.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator diff --git a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt index 1c4ffad9ba5e..7dc5c58110bf 100644 --- a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt @@ -1,5 +1 @@ #nullable enable -~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.get -> Microsoft.AspNetCore.Components.ImportMapDefinition -~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.set -> void -~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.get -> string -~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.set -> void diff --git a/src/Mvc/Mvc.TagHelpers/src/_package.json b/src/Mvc/Mvc.TagHelpers/src/_package.json index ea557bf64ef8..46d78f15d9c1 100644 --- a/src/Mvc/Mvc.TagHelpers/src/_package.json +++ b/src/Mvc/Mvc.TagHelpers/src/_package.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "name": "Microsoft.AspNetCore.Mvc.TagHelpers", + "name": "@microsoft/Microsoft.AspNetCore.Mvc.TagHelpers", "private": true, "devDependencies": { "grunt": "~0.4.5", diff --git a/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs b/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs index c1ac26b46742..f04f8895bd9a 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs @@ -25,8 +25,7 @@ public HtmlAttributePropertyHelper(PropertyHelper propertyHelper) /// /// Part of contract. /// - /// - public static void UpdateCache(Type _) + public static void ClearCache(Type[] _) { ReflectionCache.Clear(); } diff --git a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Shipped.txt b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Shipped.txt index bc4f78524a2e..b8dedc85b2e6 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Shipped.txt +++ b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Shipped.txt @@ -352,6 +352,7 @@ ~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo.ViewDataInfo(object container, System.Reflection.PropertyInfo propertyInfo, System.Func valueAccessor) -> void ~override Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultValidationHtmlAttributeProvider.AddValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, System.Collections.Generic.IDictionary attributes) -> void ~override Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) -> void +~static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder builder, string manifestPath = null) -> Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder ~static Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionaryExtensions.AddModelError(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression, string errorMessage) -> void ~static Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionaryExtensions.AddModelError(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) -> void ~static Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionaryExtensions.Remove(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression) -> bool @@ -595,6 +596,7 @@ ~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.SessionStateTempDataProvider.SaveTempData(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IDictionary values) -> void ~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider.AddAndTrackValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IDictionary attributes) -> void abstract Microsoft.AspNetCore.Mvc.RemoteAttributeBase.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> string! +Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.AutoValidateAntiforgeryTokenAttribute() -> void Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.CreateInstance(System.IServiceProvider! serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata! diff --git a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt index db29399a5c9e..7dc5c58110bf 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions -~static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder builder, string manifestPath = null) -> Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder diff --git a/src/Mvc/build/package-lock.json b/src/Mvc/build/package-lock.json index e876d6510dc8..b6a3602d452c 100644 --- a/src/Mvc/build/package-lock.json +++ b/src/Mvc/build/package-lock.json @@ -1,11 +1,11 @@ { - "name": "jquery-validation-dependency", + "name": "@microsoft/jquery-validation-dependency", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "jquery-validation-dependency", + "name": "@microsoft/jquery-validation-dependency", "version": "1.0.0", "devDependencies": { "jquery-validation": "1.20.0" diff --git a/src/Mvc/build/package.json b/src/Mvc/build/package.json index 9676c2415364..3367086617fd 100644 --- a/src/Mvc/build/package.json +++ b/src/Mvc/build/package.json @@ -1,5 +1,5 @@ { - "name": "jquery-validation-dependency", + "name": "@microsoft/jquery-validation-dependency", "version": "1.0.0", "private": true, "scripts": { diff --git a/src/Mvc/test/WebSites/BasicWebSite/_package.json b/src/Mvc/test/WebSites/BasicWebSite/_package.json index a0d2a37b7acb..f06282ec0ede 100644 --- a/src/Mvc/test/WebSites/BasicWebSite/_package.json +++ b/src/Mvc/test/WebSites/BasicWebSite/_package.json @@ -1,6 +1,6 @@ { "version": "0.0.0", - "name": "BasicWebSite", + "name": "@microsoft/BasicWebSite", "description": "Web site demonstrating various validations.", "private": true, "devDependencies": { diff --git a/src/Mvc/test/WebSites/GenericHostWebSite/_package.json b/src/Mvc/test/WebSites/GenericHostWebSite/_package.json index 45df438fd2a0..e927a42c5226 100644 --- a/src/Mvc/test/WebSites/GenericHostWebSite/_package.json +++ b/src/Mvc/test/WebSites/GenericHostWebSite/_package.json @@ -1,6 +1,6 @@ { "version": "0.0.0", - "name": "GenericHostWebSite", + "name": "@microsoft/GenericHostWebSite", "description": "Web site demonstrating various validations.", "private": true, "devDependencies": { diff --git a/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs b/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs index fd196d7fc101..acf7ae1bd41d 100644 --- a/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs +++ b/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs @@ -43,4 +43,92 @@ public static IEndpointConventionBuilder MapSwaggerUi(this IEndpointRouteBuilder """, "text/html")).ExcludeFromDescription(); } + + public static IEndpointRouteBuilder MapTypesWithRef(this IEndpointRouteBuilder endpoints) + { + endpoints.MapPost("/category", (Category category) => + { + return Results.Ok(category); + }); + endpoints.MapPost("/container", (ContainerType container) => + { + return Results.Ok(container); + }); + endpoints.MapPost("/root", (Root root) => + { + return Results.Ok(root); + }); + endpoints.MapPost("/location", (LocationContainer location) => + { + return Results.Ok(location); + }); + endpoints.MapPost("/parent", (ParentObject parent) => + { + return Results.Ok(parent); + }); + endpoints.MapPost("/child", (ChildObject child) => + { + return Results.Ok(child); + }); + return endpoints; + } + + public sealed class Category + { + public required string Name { get; set; } + + public required Category Parent { get; set; } + + public IEnumerable Tags { get; set; } = []; + } + + public sealed class Tag + { + public required string Name { get; set; } + } + + public sealed class ContainerType + { + public List> Seq1 { get; set; } = []; + public List> Seq2 { get; set; } = []; + } + + public sealed class Root + { + public Item Item1 { get; set; } = null!; + public Item Item2 { get; set; } = null!; + } + + public sealed class Item + { + public string[] Name { get; set; } = null!; + public int value { get; set; } + } + + public sealed class LocationContainer + { + public required LocationDto Location { get; set; } + } + + public sealed class LocationDto + { + public required AddressDto Address { get; set; } + } + + public sealed class AddressDto + { + public required LocationDto RelatedLocation { get; set; } + } + + public sealed class ParentObject + { + public int Id { get; set; } + public List Children { get; set; } = []; + } + + public sealed class ChildObject + { + public int Id { get; set; } + public required ParentObject Parent { get; set; } + } } diff --git a/src/OpenApi/sample/Program.cs b/src/OpenApi/sample/Program.cs index a622780ff482..e2a1c4c0866f 100644 --- a/src/OpenApi/sample/Program.cs +++ b/src/OpenApi/sample/Program.cs @@ -113,6 +113,7 @@ schemas.MapPost("/shape", (Shape shape) => { }); schemas.MapPost("/weatherforecastbase", (WeatherForecastBase forecast) => { }); schemas.MapPost("/person", (Person person) => { }); +schemas.MapTypesWithRef(); app.MapControllers(); diff --git a/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs b/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs index 0591035d2f47..46f91cd8a494 100644 --- a/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs +++ b/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs @@ -24,6 +24,36 @@ public bool Equals(OpenApiSchema? x, OpenApiSchema? y) return true; } + // If both have references, compare the final segments to handle + // equivalent types in different contexts, like the same schema + // in a dictionary value or list like "#/components/schemas/#/additionalProperties/properties/location/properties/address" + if (x.Reference != null && y.Reference != null) + { + if (x.Reference.Id.StartsWith("#", StringComparison.OrdinalIgnoreCase) && + y.Reference.Id.StartsWith("#", StringComparison.OrdinalIgnoreCase) && + x.Reference.ReferenceV3 is string xFullReferencePath && + y.Reference.ReferenceV3 is string yFullReferencePath) + { + // Compare the last segments of the reference paths + // to handle equivalent types in different contexts, + // like the same schema in a dictionary value or list + var xLastIndexOf = xFullReferencePath.LastIndexOf('/'); + var yLastIndexOf = yFullReferencePath.LastIndexOf('/'); + + if (xLastIndexOf != -1 && yLastIndexOf != -1) + { + return xFullReferencePath.AsSpan(xLastIndexOf).Equals(yFullReferencePath.AsSpan(yLastIndexOf), StringComparison.OrdinalIgnoreCase); + } + } + } + + // If only one has a reference, compare using schema IDs + if ((x.Reference != null && y.Reference == null) + || (x.Reference == null && y.Reference != null)) + { + return SchemaIdEquals(x, y); + } + // Compare property equality in an order that should help us find inequality faster return x.Type == y.Type && diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 9cc97724b1b3..7e456214cfb9 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -91,8 +91,23 @@ internal static void ApplyValidationAttributes(this JsonNode schema, IEnumerable } else if (attribute is RangeAttribute rangeAttribute) { - schema[OpenApiSchemaKeywords.MinimumKeyword] = decimal.Parse(rangeAttribute.Minimum.ToString()!, CultureInfo.InvariantCulture); - schema[OpenApiSchemaKeywords.MaximumKeyword] = decimal.Parse(rangeAttribute.Maximum.ToString()!, CultureInfo.InvariantCulture); + // Use InvariantCulture if explicitly requested or if the range has been set via the + // RangeAttribute(double, double) or RangeAttribute(int, int) constructors. + var targetCulture = rangeAttribute.ParseLimitsInInvariantCulture || rangeAttribute.Minimum is double || rangeAttribute.Maximum is int + ? CultureInfo.InvariantCulture + : CultureInfo.CurrentCulture; + + var minString = rangeAttribute.Minimum.ToString(); + var maxString = rangeAttribute.Maximum.ToString(); + + if (decimal.TryParse(minString, NumberStyles.Any, targetCulture, out var minDecimal)) + { + schema[OpenApiSchemaKeywords.MinimumKeyword] = minDecimal; + } + if (decimal.TryParse(maxString, NumberStyles.Any, targetCulture, out var maxDecimal)) + { + schema[OpenApiSchemaKeywords.MaximumKeyword] = maxDecimal; + } } else if (attribute is RegularExpressionAttribute regularExpressionAttribute) { diff --git a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs index c5bed38669e4..de74fd8d1257 100644 --- a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs @@ -43,7 +43,7 @@ public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder e } else { - var document = await documentService.GetOpenApiDocumentAsync(context.RequestServices, context.RequestAborted); + var document = await documentService.GetOpenApiDocumentAsync(context.RequestServices, context.Request, context.RequestAborted); var documentOptions = options.Get(documentName); using var output = MemoryBufferWriter.Get(); using var writer = Utf8BufferTextWriter.Get(output); diff --git a/src/OpenApi/src/PublicAPI.Shipped.txt b/src/OpenApi/src/PublicAPI.Shipped.txt index ca80deee675b..e5f97354be7f 100644 --- a/src/OpenApi/src/PublicAPI.Shipped.txt +++ b/src/OpenApi/src/PublicAPI.Shipped.txt @@ -1,4 +1,64 @@ #nullable enable Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions +Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions +Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer +Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiDocument! document, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer +Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiOperation! operation, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer +Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiSchema! schema, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.ApplicationServices.get -> System.IServiceProvider! +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.ApplicationServices.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DescriptionGroups.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DescriptionGroups.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DocumentName.get -> string! +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DocumentName.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.OpenApiDocumentTransformerContext() -> void +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.ApplicationServices.get -> System.IServiceProvider! +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.ApplicationServices.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription! +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.DocumentName.get -> string! +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.DocumentName.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.OpenApiOperationTransformerContext() -> void +Microsoft.AspNetCore.OpenApi.OpenApiOptions +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.get -> System.Func! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.set -> void +Microsoft.AspNetCore.OpenApi.OpenApiOptions.DocumentName.get -> string! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiOptions() -> void +Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.get -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.set -> void +Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.get -> System.Func! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.set -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.get -> System.IServiceProvider! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.get -> string! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonPropertyInfo.get -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo? +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonPropertyInfo.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonTypeInfo.get -> System.Text.Json.Serialization.Metadata.JsonTypeInfo! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonTypeInfo.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.OpenApiSchemaTransformerContext() -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.init -> void +Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.WithOpenApi(this TBuilder builder) -> TBuilder static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.WithOpenApi(this TBuilder builder, System.Func! configureOperation) -> TBuilder +static Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions.MapOpenApi(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern = "/openapi/{documentName}.json") -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! +static Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateDefaultSchemaReferenceId(System.Text.Json.Serialization.Metadata.JsonTypeInfo! jsonTypeInfo) -> string? +static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/OpenApi/src/PublicAPI.Unshipped.txt b/src/OpenApi/src/PublicAPI.Unshipped.txt index 5b3cb33941d0..7dc5c58110bf 100644 --- a/src/OpenApi/src/PublicAPI.Unshipped.txt +++ b/src/OpenApi/src/PublicAPI.Unshipped.txt @@ -1,61 +1 @@ #nullable enable -Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions -Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiDocument! document, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer -Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiOperation! operation, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer -Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiSchema! schema, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription! -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiOptions -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.get -> System.Func! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.set -> void -Microsoft.AspNetCore.OpenApi.OpenApiOptions.DocumentName.get -> string! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiOptions() -> void -Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.get -> Microsoft.OpenApi.OpenApiSpecVersion -Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.set -> void -Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.get -> System.Func! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.set -> void -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.get -> System.IServiceProvider! -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.get -> string! -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonPropertyInfo.get -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo? -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonPropertyInfo.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonTypeInfo.get -> System.Text.Json.Serialization.Metadata.JsonTypeInfo! -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.JsonTypeInfo.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.OpenApiSchemaTransformerContext() -> void -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? -Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.init -> void -Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions -static Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions.MapOpenApi(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern = "/openapi/{documentName}.json") -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! -static Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateDefaultSchemaReferenceId(System.Text.Json.Serialization.Metadata.JsonTypeInfo! jsonTypeInfo) -> string? -static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.ApplicationServices.get -> System.IServiceProvider! -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.ApplicationServices.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DescriptionGroups.get -> System.Collections.Generic.IReadOnlyList! -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DescriptionGroups.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DocumentName.get -> string! -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.DocumentName.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.OpenApiDocumentTransformerContext() -> void -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.ApplicationServices.get -> System.IServiceProvider! -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.ApplicationServices.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.DocumentName.get -> string! -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.DocumentName.init -> void -Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.OpenApiOperationTransformerContext() -> void diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index c9d90f5d9e5a..f05c595b5c2b 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -136,6 +136,8 @@ internal sealed partial class OpenApiJsonSchema { type = "array"; var array = new OpenApiArray(); + // Read to process JsonTokenType.StartArray before advancing + reader.Read(); while (reader.TokenType != JsonTokenType.EndArray) { array.Add(ReadOpenApiAny(ref reader)); @@ -280,6 +282,11 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, break; case OpenApiSchemaKeywords.AdditionalPropertiesKeyword: reader.Read(); + if (reader.TokenType == JsonTokenType.False) + { + schema.AdditionalPropertiesAllowed = false; + break; + } var additionalPropsConverter = (JsonConverter)options.GetTypeInfo(typeof(OpenApiJsonSchema)).Converter; schema.AdditionalProperties = additionalPropsConverter.Read(ref reader, typeof(OpenApiJsonSchema), options)?.Schema; break; diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index 2745d64770a7..b907cc6ecb20 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Concurrent; using System.Collections.Frozen; using System.ComponentModel; using System.ComponentModel.DataAnnotations; @@ -13,6 +14,7 @@ using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Http.Metadata; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApiExplorer; @@ -46,7 +48,7 @@ internal sealed class OpenApiDocumentService( /// are unique within the lifetime of an application and serve as helpful associators between /// operations, API descriptions, and their respective transformer contexts. /// - private readonly Dictionary _operationTransformerContextCache = new(); + private readonly ConcurrentDictionary _operationTransformerContextCache = new(); private static readonly ApiResponseType _defaultApiResponseType = new() { StatusCode = StatusCodes.Status200OK }; private static readonly FrozenSet _disallowedHeaderParameters = new[] { HeaderNames.Accept, HeaderNames.Authorization, HeaderNames.ContentType }.ToFrozenSet(StringComparer.OrdinalIgnoreCase); @@ -54,7 +56,7 @@ internal sealed class OpenApiDocumentService( internal bool TryGetCachedOperationTransformerContext(string descriptionId, [NotNullWhen(true)] out OpenApiOperationTransformerContext? context) => _operationTransformerContextCache.TryGetValue(descriptionId, out context); - public async Task GetOpenApiDocumentAsync(IServiceProvider scopedServiceProvider, CancellationToken cancellationToken = default) + public async Task GetOpenApiDocumentAsync(IServiceProvider scopedServiceProvider, HttpRequest? httpRequest = null, CancellationToken cancellationToken = default) { // For good hygiene, operation-level tags must also appear in the document-level // tags collection. This set captures all tags that have been seen so far. @@ -73,7 +75,7 @@ public async Task GetOpenApiDocumentAsync(IServiceProvider scop { Info = GetOpenApiInfo(), Paths = await GetOpenApiPathsAsync(capturedTags, scopedServiceProvider, operationTransformers, schemaTransformers, cancellationToken), - Servers = GetOpenApiServers(), + Servers = GetOpenApiServers(httpRequest), Tags = [.. capturedTags] }; try @@ -191,12 +193,26 @@ internal OpenApiInfo GetOpenApiInfo() }; } - internal List GetOpenApiServers() + // Resolve server URL from the request to handle reverse proxies. + // If there is active request object, assume a development environment and use the server addresses. + internal List GetOpenApiServers(HttpRequest? httpRequest = null) + { + if (httpRequest is not null) + { + var serverUrl = UriHelper.BuildAbsolute(httpRequest.Scheme, httpRequest.Host, httpRequest.PathBase); + return [new OpenApiServer { Url = serverUrl }]; + } + else + { + return GetDevelopmentOpenApiServers(); + } + } + private List GetDevelopmentOpenApiServers() { if (hostEnvironment.IsDevelopment() && server?.Features.Get()?.Addresses is { Count: > 0 } addresses) { - return addresses.Select(address => new OpenApiServer { Url = address }).ToList(); + return [.. addresses.Select(address => new OpenApiServer { Url = address })]; } return []; } @@ -410,10 +426,10 @@ private async Task GetResponseAsync( "Query" => ParameterLocation.Query, "Header" => ParameterLocation.Header, "Path" => ParameterLocation.Path, - _ => throw new InvalidOperationException($"Unsupported parameter source: {parameter.Source.Id}") + _ => ParameterLocation.Query }, Required = IsRequired(parameter), - Schema = await _componentService.GetOrCreateSchemaAsync(parameter.Type, scopedServiceProvider, schemaTransformers, parameter, cancellationToken: cancellationToken), + Schema = await _componentService.GetOrCreateSchemaAsync(GetTargetType(description, parameter), scopedServiceProvider, schemaTransformers, parameter, cancellationToken: cancellationToken), Description = GetParameterDescriptionFromAttribute(parameter) }; @@ -664,4 +680,41 @@ private async Task GetJsonRequestBody( return requestBody; } + + /// + /// This method is used to determine the target type for a given parameter. The target type + /// is the actual type that should be used to generate the schema for the parameter. This is + /// necessary because MVC's ModelMetadata layer will set ApiParameterDescription.Type to string + /// when the parameter is a parsable or convertible type. In this case, we want to use the actual + /// model type to generate the schema instead of the string type. + /// + /// + /// This method will also check if no target type was resolved from the + /// and default to a string schema. This will happen if we are dealing with an inert route parameter + /// that does not define a specific parameter type in the route handler or in the response. + /// + private static Type GetTargetType(ApiDescription description, ApiParameterDescription parameter) + { + var bindingMetadata = description.ActionDescriptor.EndpointMetadata + .OfType() + .SingleOrDefault(metadata => metadata.Name == parameter.Name); + var parameterType = parameter.Type is not null + ? Nullable.GetUnderlyingType(parameter.Type) ?? parameter.Type + : parameter.Type; + + // parameter.Type = typeof(string) + // parameter.ModelMetadata.Type = typeof(TEnum) + var requiresModelMetadataFallbackForEnum = parameterType == typeof(string) + && parameter.ModelMetadata.ModelType != parameter.Type + && parameter.ModelMetadata.ModelType.IsEnum; + // Enums are exempt because we want to set the OpenApiSchema.Enum field when feasible. + // parameter.Type = typeof(TEnum), typeof(TypeWithTryParse) + // parameter.ModelMetadata.Type = typeof(string) + var hasTryParse = bindingMetadata?.HasTryParse == true && parameterType is not null && !parameterType.IsEnum; + var targetType = requiresModelMetadataFallbackForEnum || hasTryParse + ? parameter.ModelMetadata.ModelType + : parameter.Type; + targetType ??= typeof(string); + return targetType; + } } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index d7ea158b919a..812f896ee25d 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -32,7 +32,7 @@ internal sealed class OpenApiSchemaService( IOptionsMonitor optionsMonitor) { private readonly OpenApiSchemaStore _schemaStore = serviceProvider.GetRequiredKeyedService(documentName); - private readonly OpenApiJsonSchemaContext _jsonSchemaContext = new OpenApiJsonSchemaContext(new(jsonOptions.Value.SerializerOptions)); + private readonly OpenApiJsonSchemaContext _jsonSchemaContext = new(new(jsonOptions.Value.SerializerOptions)); private readonly JsonSerializerOptions _jsonSerializerOptions = new(jsonOptions.Value.SerializerOptions) { // In order to properly handle the `RequiredAttribute` on type properties, add a modifier to support @@ -102,7 +102,7 @@ internal sealed class OpenApiSchemaService( // "nested": "#/properties/nested" becomes "nested": "#/components/schemas/NestedType" if (jsonPropertyInfo.PropertyType == jsonPropertyInfo.DeclaringType) { - return new JsonObject { [OpenApiSchemaKeywords.RefKeyword] = context.TypeInfo.GetSchemaReferenceId() }; + schema[OpenApiSchemaKeywords.RefKeyword] = createSchemaReferenceId(context.TypeInfo); } schema.ApplyNullabilityContextInfo(jsonPropertyInfo); } @@ -212,8 +212,119 @@ private async Task InnerApplySchemaTransformersAsync(OpenApiSchema schema, } } } + + if (schema is { AdditionalPropertiesAllowed: true, AdditionalProperties: not null } && jsonTypeInfo.ElementType is not null) + { + var elementTypeInfo = _jsonSerializerOptions.GetTypeInfo(jsonTypeInfo.ElementType); + await InnerApplySchemaTransformersAsync(schema.AdditionalProperties, elementTypeInfo, null, context, transformer, cancellationToken); + } } private JsonNode CreateSchema(OpenApiSchemaKey key) - => JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, key.Type, _configuration); + { + var sourceSchema = JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, key.Type, _configuration); + + // Resolve any relative references in the schema + ResolveRelativeReferences(sourceSchema, sourceSchema); + + return sourceSchema; + } + + // Helper method to recursively resolve relative references in a schema + private static void ResolveRelativeReferences(JsonNode node, JsonNode rootNode) + { + if (node is JsonObject jsonObj) + { + // Check if this node has a $ref property with a relative reference and no schemaId to + // resolve to + if (jsonObj.TryGetPropertyValue(OpenApiSchemaKeywords.RefKeyword, out var refNode) && + refNode is JsonValue refValue && + refValue.TryGetValue(out var refPath) && + refPath.StartsWith("#/", StringComparison.OrdinalIgnoreCase) && + !jsonObj.TryGetPropertyValue(OpenApiConstants.SchemaId, out var schemaId) && + schemaId is null) + { + // Found a relative reference, resolve it + var resolvedNode = ResolveJsonPointer(rootNode, refPath); + if (resolvedNode != null) + { + // Copy all properties from the resolved node + if (resolvedNode is JsonObject resolvedObj) + { + foreach (var property in resolvedObj) + { + // Clone the property value to avoid modifying the original + var clonedValue = property.Value != null + ? JsonNode.Parse(property.Value.ToJsonString()) + : null; + + jsonObj[property.Key] = clonedValue; + } + } + } + } + else + { + // Recursively process all properties + foreach (var property in jsonObj) + { + if (property.Value is JsonNode propNode) + { + ResolveRelativeReferences(propNode, rootNode); + } + } + } + } + else if (node is JsonArray jsonArray) + { + // Process each item in the array + for (var i = 0; i < jsonArray.Count; i++) + { + if (jsonArray[i] is JsonNode arrayItem) + { + ResolveRelativeReferences(arrayItem, rootNode); + } + } + } + } + + // Helper method to resolve a JSON pointer path and return the referenced node + private static JsonNode? ResolveJsonPointer(JsonNode root, string pointer) + { + if (string.IsNullOrEmpty(pointer) || !pointer.StartsWith("#/", StringComparison.OrdinalIgnoreCase)) + { + return null; // Invalid pointer + } + + // Remove the leading "#/" and split the path into segments + var jsonPointer = pointer.AsSpan(2); + var segments = jsonPointer.Split('/'); + var currentNode = root; + + foreach (var segment in segments) + { + if (currentNode is JsonObject jsonObj) + { + if (!jsonObj.TryGetPropertyValue(jsonPointer[segment].ToString(), out var nextNode)) + { + return null; // Path segment not found + } + currentNode = nextNode; + } + else if (currentNode is JsonArray jsonArray && int.TryParse(jsonPointer[segment], out var index)) + { + if (index < 0 || index >= jsonArray.Count) + { + return null; // Index out of range + } + currentNode = jsonArray[index]; + } + else + { + return null; // Cannot navigate further + } + } + + return currentNode; + } } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 88f1dd4633af..304aacdfa98d 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Concurrent; using System.IO.Pipelines; using System.Text.Json.Nodes; using Microsoft.AspNetCore.Http; @@ -14,7 +15,7 @@ namespace Microsoft.AspNetCore.OpenApi; /// internal sealed class OpenApiSchemaStore { - private readonly Dictionary _schemas = new() + private readonly ConcurrentDictionary _schemas = new() { // Pre-populate OpenAPI schemas for well-defined types in ASP.NET Core. [new OpenApiSchemaKey(typeof(IFormFile), null)] = new JsonObject @@ -48,8 +49,8 @@ internal sealed class OpenApiSchemaStore }, }; - public readonly Dictionary SchemasByReference = new(OpenApiSchemaComparer.Instance); - private readonly Dictionary _referenceIdCounter = new(); + public readonly ConcurrentDictionary SchemasByReference = new(OpenApiSchemaComparer.Instance); + private readonly ConcurrentDictionary _referenceIdCounter = new(); /// /// Resolves the JSON schema for the given type and parameter description. @@ -59,13 +60,7 @@ internal sealed class OpenApiSchemaStore /// A representing the JSON schema associated with the key. public JsonNode GetOrAdd(OpenApiSchemaKey key, Func valueFactory) { - if (_schemas.TryGetValue(key, out var schema)) - { - return schema; - } - var targetSchema = valueFactory(key); - _schemas.Add(key, targetSchema); - return targetSchema; + return _schemas.GetOrAdd(key, valueFactory); } /// @@ -159,6 +154,14 @@ private void AddOrUpdateAnyOfSubSchemaByReference(OpenApiSchema schema) private void AddOrUpdateSchemaByReference(OpenApiSchema schema, string? baseTypeSchemaId = null, bool captureSchemaByRef = false) { var targetReferenceId = baseTypeSchemaId is not null ? $"{baseTypeSchemaId}{GetSchemaReferenceId(schema)}" : GetSchemaReferenceId(schema); + // Schemas that already have a reference provided by JsonSchemaExporter are skipped here + // and handled by the OpenApiSchemaReferenceTransformer instead. This case typically kicks + // in for self-referencing schemas where JsonSchemaExporter inlines references to avoid + // infinite recursion. + if (schema.Reference is not null) + { + return; + } if (SchemasByReference.TryGetValue(schema, out var referenceId) || captureSchemaByRef) { // If we've already used this reference ID else where in the document, increment a counter value to the reference diff --git a/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs b/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs index 07c76fe22974..aa98a21894ff 100644 --- a/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs +++ b/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Concurrent; using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.OpenApi.Models; @@ -85,7 +86,7 @@ public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerC /// The inline schema to replace with a reference. /// A cache of schemas and their associated reference IDs. /// When , will skip resolving references for the top-most schema provided. - internal static OpenApiSchema? ResolveReferenceForSchema(OpenApiSchema? schema, Dictionary schemasByReference, bool isTopLevel = false) + internal static OpenApiSchema? ResolveReferenceForSchema(OpenApiSchema? schema, ConcurrentDictionary schemasByReference, bool isTopLevel = false) { if (schema is null) { @@ -101,6 +102,23 @@ public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerC return new OpenApiSchema { Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = referenceId } }; } + // Handle schemas where the references have been inline by the JsonSchemaExporter. In this case, + // the `#` ID is generated by the exporter since it has no base document to baseline against. In this + // case we we want to replace the reference ID with the schema ID that was generated by the + // `CreateSchemaReferenceId` method in the OpenApiSchemaService. + if (!isTopLevel && schema.Reference is { Type: ReferenceType.Schema, Id: "#" } + && schema.Annotations.TryGetValue(OpenApiConstants.SchemaId, out var schemaId)) + { + return new OpenApiSchema { Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = schemaId?.ToString() } }; + } + + // Handle relative schemas that don't point to the parent document but to another property in the same type. + // In this case, remove the reference and rely on the properties that have been resolved and copied by the OpenApiSchemaService. + if (schema.Reference is { Type: ReferenceType.Schema, Id: var id } && id.StartsWith("#/", StringComparison.Ordinal)) + { + schema.Reference = null; + } + if (schema.AllOf is not null) { for (var i = 0; i < schema.AllOf.Count; i++) diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentConcurrentRequestTests.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentConcurrentRequestTests.cs new file mode 100644 index 000000000000..3f2ce1177aa3 --- /dev/null +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentConcurrentRequestTests.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Net; +using System.Net.Http; + +namespace Microsoft.AspNetCore.OpenApi.Tests.Integration; + +public class OpenApiDocumentConcurrentRequestTests(SampleAppFixture fixture) : IClassFixture +{ + [Fact] + public async Task MapOpenApi_HandlesConcurrentRequests() + { + // Arrange + var client = fixture.CreateClient(); + + // Act + await Parallel.ForAsync(0, 150, async (_, ctx) => + { + var response = await client.GetAsync("/openapi/v1.json", ctx); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + }); + } +} diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt index cd00d261b632..3e5373a7e36b 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -375,6 +375,138 @@ } } } + }, + "/schemas-by-ref/category": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Category" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/container": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerType" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/root": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Root" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/location": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationContainer" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/parent": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParentObject" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/child": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChildObject" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } } }, "components": { @@ -391,6 +523,128 @@ } } }, + "AddressDto": { + "required": [ + "relatedLocation" + ], + "type": "object", + "properties": { + "relatedLocation": { + "$ref": "#/components/schemas/LocationDto" + } + } + }, + "Category": { + "required": [ + "name", + "parent" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parent": { + "$ref": "#/components/schemas/Category" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "ChildObject": { + "required": [ + "parent" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "parent": { + "$ref": "#/components/schemas/ParentObject" + } + } + }, + "ContainerType": { + "type": "object", + "properties": { + "seq1": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "seq2": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "Item": { + "type": "object", + "properties": { + "name": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "integer", + "format": "int32" + } + } + }, + "LocationContainer": { + "required": [ + "location" + ], + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/LocationDto" + } + } + }, + "LocationDto": { + "required": [ + "address" + ], + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/AddressDto" + } + } + }, + "ParentObject": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChildObject" + } + } + } + }, "Person": { "required": [ "discriminator" @@ -454,6 +708,17 @@ } } }, + "Root": { + "type": "object", + "properties": { + "item1": { + "$ref": "#/components/schemas/Item" + }, + "item2": { + "$ref": "#/components/schemas/Item" + } + } + }, "Shape": { "required": [ "$type" @@ -517,6 +782,17 @@ } } }, + "Tag": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, "Triangle": { "type": "object", "properties": { diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Parameters.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Parameters.cs index 10c65ae2787f..999283022706 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Parameters.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Parameters.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.OpenApi.Models; public partial class OpenApiDocumentServiceTests : OpenApiDocumentServiceTestBase @@ -190,4 +191,29 @@ await VerifyOpenApiDocument(builder, document => Assert.Null(document.Paths["/api/content-type-lower"].Operations[OperationType.Get].Parameters); }); } + + [Fact] + public async Task GetOpenApiParameters_ToleratesCustomBindingSource() + { + var action = CreateActionDescriptor(nameof(ActionWithCustomBinder)); + + await VerifyOpenApiDocument(action, document => + { + var operation = document.Paths["/custom-binding"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + Assert.Equal("model", parameter.Name); + Assert.Equal(ParameterLocation.Query, parameter.In); + }); + } + + [Route("/custom-binding")] + private void ActionWithCustomBinder([ModelBinder(BinderType = typeof(CustomBinder))] Todo model) { } + + public class CustomBinder : IModelBinder + { + public Task BindModelAsync(ModelBindingContext bindingContext) + { + return Task.CompletedTask; + } + } } diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs index c84c7e258510..1bc247c95ad4 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.OpenApi; using Microsoft.Extensions.DependencyInjection; @@ -10,6 +11,45 @@ public partial class OpenApiDocumentServiceTests { + [Theory] + [InlineData("Development", "localhost:5001", "", "http", "http://localhost:5001/")] + [InlineData("Development", "example.com", "/api", "https", "https://example.com/api")] + [InlineData("Staging", "localhost:5002", "/v1", "http", "http://localhost:5002/v1")] + [InlineData("Staging", "api.example.com", "/base/path", "https", "https://api.example.com/base/path")] + [InlineData("Development", "localhost", "/", "http", "http://localhost/")] + public void GetOpenApiServers_FavorsHttpContextRequestOverServerAddress(string environment, string host, string pathBase, string scheme, string expectedUri) + { + // Arrange + var hostEnvironment = new HostingEnvironment + { + ApplicationName = "TestApplication", + EnvironmentName = environment + }; + var docService = new OpenApiDocumentService( + "v1", + new Mock().Object, + hostEnvironment, + GetMockOptionsMonitor(), + new Mock().Object, + new OpenApiTestServer(["http://localhost:5000"])); + var httpContext = new DefaultHttpContext() + { + Request = + { + Host = new HostString(host), + PathBase = pathBase, + Scheme = scheme + + } + }; + + // Act + var servers = docService.GetOpenApiServers(httpContext.Request); + + // Assert + Assert.Contains(expectedUri, servers.Select(s => s.Url)); + } + [Fact] public void GetOpenApiServers_HandlesServerAddressFeatureWithValues() { diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentServiceTestsBase.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentServiceTestsBase.cs index e773ebf5ff89..b33eb153de4c 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentServiceTestsBase.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentServiceTestsBase.cs @@ -35,16 +35,16 @@ public static async Task VerifyOpenApiDocument(IEndpointRouteBuilder builder, Op { var documentService = CreateDocumentService(builder, openApiOptions); var scopedService = ((TestServiceProvider)builder.ServiceProvider).CreateScope(); - var document = await documentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider, cancellationToken); + var document = await documentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider, null, cancellationToken); verifyOpenApiDocument(document); } - public static async Task VerifyOpenApiDocument(ActionDescriptor action, Action verifyOpenApiDocument) + public static async Task VerifyOpenApiDocument(ActionDescriptor action, Action verifyOpenApiDocument, CancellationToken cancellationToken = default) { var builder = CreateBuilder(); var documentService = CreateDocumentService(builder, action); var scopedService = ((TestServiceProvider)builder.ServiceProvider).CreateScope(); - var document = await documentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider); + var document = await documentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider, null); verifyOpenApiDocument(document); } diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs index af9b7e5663d7..6f87374b1c92 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs @@ -3,10 +3,12 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.Globalization; using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; @@ -338,6 +340,7 @@ await VerifyOpenApiDocument(action, document => [([MinLength(2)] int[] id) => {}, (OpenApiSchema schema) => Assert.Equal(2, schema.MinItems)], [([Length(4, 8)] int[] id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.MinItems); Assert.Equal(8, schema.MaxItems); }], [([Range(4, 8)]int id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.Minimum); Assert.Equal(8, schema.Maximum); }], + [([Range(typeof(DateTime), "2024-02-01", "2024-02-031")] DateTime id) => {}, (OpenApiSchema schema) => { Assert.Null(schema.Minimum); Assert.Null(schema.Maximum); }], [([StringLength(10)] string name) => {}, (OpenApiSchema schema) => { Assert.Equal(10, schema.MaxLength); Assert.Equal(0, schema.MinLength); }], [([StringLength(10, MinimumLength = 5)] string name) => {}, (OpenApiSchema schema) => { Assert.Equal(10, schema.MaxLength); Assert.Equal(5, schema.MinLength); }], [([Url] string url) => {}, (OpenApiSchema schema) => { Assert.Equal("string", schema.Type); Assert.Equal("uri", schema.Format); }], @@ -365,6 +368,63 @@ await VerifyOpenApiDocument(builder, document => }); } + public static object[][] RouteParametersWithRangeAttributes => + [ + [([Range(4, 8)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.Minimum); Assert.Equal(8, schema.Maximum); }], + [([Range(int.MinValue, int.MaxValue)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(int.MinValue, schema.Minimum); Assert.Equal(int.MaxValue, schema.Maximum); }], + [([Range(0, double.MaxValue)] double id) => {}, (OpenApiSchema schema) => { Assert.Equal(0, schema.Minimum); Assert.Null(schema.Maximum); }], + [([Range(typeof(double), "0", "1.79769313486232E+308")] double id) => {}, (OpenApiSchema schema) => { Assert.Equal(0, schema.Minimum); Assert.Null(schema.Maximum); }], + [([Range(typeof(long), "-9223372036854775808", "9223372036854775807")] long id) => {}, (OpenApiSchema schema) => { Assert.Equal(long.MinValue, schema.Minimum); Assert.Equal(long.MaxValue, schema.Maximum); }], + [([Range(typeof(DateTime), "2024-02-01", "2024-02-031")] DateTime id) => {}, (OpenApiSchema schema) => { Assert.Null(schema.Minimum); Assert.Null(schema.Maximum); }], + ]; + + [Theory] + [MemberData(nameof(RouteParametersWithRangeAttributes))] + public async Task GetOpenApiParameters_HandlesRouteParametersWithRangeAttributes(Delegate requestHandler, Action verifySchema) + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/api/{id}", requestHandler); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api/{id}"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + verifySchema(parameter.Schema); + }); + } + + public static object[][] RouteParametersWithRangeAttributes_CultureInfo => + [ + [([Range(typeof(DateTime), "2024-02-01", "2024-02-031")] DateTime id) => {}, (OpenApiSchema schema) => { Assert.Null(schema.Minimum); Assert.Null(schema.Maximum); }], + [([Range(typeof(decimal), "1,99", "3,99")] decimal id) => {}, (OpenApiSchema schema) => { Assert.Equal(1.99m, schema.Minimum); Assert.Equal(3.99m, schema.Maximum); }], + [([Range(typeof(decimal), "1,99", "3,99", ParseLimitsInInvariantCulture = true)] decimal id) => {}, (OpenApiSchema schema) => { Assert.Equal(199, schema.Minimum); Assert.Equal(399, schema.Maximum); }], + [([Range(1000, 2000)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(1000, schema.Minimum); Assert.Equal(2000, schema.Maximum); }] + ]; + + [Theory] + [MemberData(nameof(RouteParametersWithRangeAttributes_CultureInfo))] + [UseCulture("fr-FR")] + public async Task GetOpenApiParameters_HandlesRouteParametersWithRangeAttributes_CultureInfo(Delegate requestHandler, Action verifySchema) + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/api/{id}", requestHandler); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api/{id}"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + verifySchema(parameter.Schema); + }); + } + [Fact] public async Task GetOpenApiParameters_HandlesParametersWithRequiredAttribute() { @@ -537,4 +597,218 @@ await VerifyOpenApiDocument(builder, document => Assert.Null(operation.RequestBody.Content["application/json"].Schema.Type); }); } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task SupportsParameterWithEnumType(bool useAction) + { + // Arrange + if (!useAction) + { + var builder = CreateBuilder(); + builder.MapGet("/api/with-enum", (Status status) => status); + await VerifyOpenApiDocument(builder, AssertOpenApiDocument); + } + else + { + var action = CreateActionDescriptor(nameof(GetItemStatus)); + await VerifyOpenApiDocument(action, AssertOpenApiDocument); + } + + static void AssertOpenApiDocument(OpenApiDocument document) + { + var operation = document.Paths["/api/with-enum"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + var response = Assert.Single(operation.Responses).Value.Content["application/json"].Schema; + Assert.NotNull(parameter.Schema.Reference); + Assert.Equal(parameter.Schema.Reference.Id, response.Reference.Id); + var schema = parameter.Schema.GetEffective(document); + Assert.Collection(schema.Enum, + value => + { + var openApiString = Assert.IsType(value); + Assert.Equal("Pending", openApiString.Value); + }, + value => + { + var openApiString = Assert.IsType(value); + Assert.Equal("Approved", openApiString.Value); + }, + value => + { + var openApiString = Assert.IsType(value); + Assert.Equal("Rejected", openApiString.Value); + }); + } + } + + [Route("/api/with-enum")] + private Status GetItemStatus([FromQuery] Status status) => status; + + [Fact] + public async Task SupportsMvcActionWithAmbientRouteParameter() + { + // Arrange + var action = CreateActionDescriptor(nameof(AmbientRouteParameter)); + + // Assert + await VerifyOpenApiDocument(action, document => + { + var operation = document.Paths["/api/with-ambient-route-param/{versionId}"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + Assert.Equal("string", parameter.Schema.Type); + }); + } + + [Route("/api/with-ambient-route-param/{versionId}")] + private void AmbientRouteParameter() { } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task SupportsRouteParameterWithCustomTryParse(bool useAction) + { + // Arrange + var builder = CreateBuilder(); + + // Act + if (!useAction) + { + builder.MapGet("/api/{student}", (Student student) => student); + await VerifyOpenApiDocument(builder, AssertOpenApiDocument); + } + else + { + var action = CreateActionDescriptor(nameof(GetStudent)); + await VerifyOpenApiDocument(action, AssertOpenApiDocument); + } + + // Assert + static void AssertOpenApiDocument(OpenApiDocument document) + { + // Parameter is a plain-old string when it comes from the route or query + var operation = document.Paths["/api/{student}"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + Assert.Equal("string", parameter.Schema.Type); + + // Type is fully serialized in the response + var response = Assert.Single(operation.Responses).Value; + Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => + { + Assert.Equal("name", property.Key); + Assert.Equal("string", property.Value.Type); + }); + } + } + + [Route("/api/{student}")] + private Student GetStudent(Student student) => student; + + public record Student(string Name) + { + public static bool TryParse(string value, out Student result) + { + if (value is null) + { + result = null; + return false; + } + + result = new Student(value); + return true; + } + } + + // Regression test for https://github.com/dotnet/aspnetcore/issues/62023 + // Testing that the array parsing in our OpenApiJsonSchema works + [Fact] + public async Task CustomConverterThatOutputsArrayWithDefaultValue() + { + // Arrange + var serviceCollection = new ServiceCollection(); + serviceCollection.ConfigureHttpJsonOptions(options => + { + options.SerializerOptions.Converters.Add(new EnumArrayTypeConverter()); + }); + var builder = CreateBuilder(serviceCollection); + + // Act + builder.MapPost("/api", (EnumArrayType e = EnumArrayType.None) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var param = Assert.Single(operation.Parameters); + Assert.NotNull(param.Schema); + Assert.IsType(param.Schema.Default); + // Type is null, it's up to the user to configure this via a custom schema + // transformer for types with a converter. + Assert.Null(param.Schema.Type); + }); + } + + [Fact] + public async Task CustomConverterThatOutputsObjectWithDefaultValue() + { + // Arrange + var serviceCollection = new ServiceCollection(); + serviceCollection.ConfigureHttpJsonOptions(options => + { + options.SerializerOptions.Converters.Add(new EnumObjectTypeConverter()); + }); + var builder = CreateBuilder(serviceCollection); + + // Act + builder.MapPost("/api", (EnumArrayType e = EnumArrayType.None) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var param = Assert.Single(operation.Parameters); + Assert.NotNull(param.Schema); + Assert.IsType(param.Schema.Default); + // Type is null, it's up to the user to configure this via a custom schema + // transformer for types with a converter. + Assert.Null(param.Schema.Type); + }); + } + + public enum EnumArrayType + { + None = 1 + } + + public class EnumArrayTypeConverter : JsonConverter + { + public override EnumArrayType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new EnumArrayType(); + } + + public override void Write(Utf8JsonWriter writer, EnumArrayType value, JsonSerializerOptions options) + { + writer.WriteStartArray(); + writer.WriteEndArray(); + } + } + + public class EnumObjectTypeConverter : JsonConverter + { + public override EnumArrayType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new EnumArrayType(); + } + + public override void Write(Utf8JsonWriter writer, EnumArrayType value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + } } diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs index e7d0ea13af19..3e95257e874b 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.IO.Pipelines; +using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; @@ -594,4 +595,107 @@ await VerifyOpenApiDocument(builder, document => }); }); } + + [Fact] + public async Task SupportsClassWithJsonUnmappedMemberHandlingDisallowed() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (ExampleWithDisallowedUnmappedMembers type) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + var schema = content.Value.Schema.GetEffective(document); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("number", property.Key); + Assert.Equal("integer", property.Value.Type); + }); + Assert.False(schema.AdditionalPropertiesAllowed); + }); + } + + [Fact] + public async Task SupportsClassWithJsonUnmappedMemberHandlingSkipped() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (ExampleWithSkippedUnmappedMembers type) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + var schema = content.Value.Schema.GetEffective(document); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("number", property.Key); + Assert.Equal("integer", property.Value.Type); + }); + Assert.True(schema.AdditionalPropertiesAllowed); + }); + } + + [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)] + private class ExampleWithDisallowedUnmappedMembers + { + public int Number { get; init; } + } + + [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Skip)] + private class ExampleWithSkippedUnmappedMembers + { + public int Number { get; init; } + } + + [Fact] + public async Task SupportsTypesWithSelfReferencedProperties() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Parent parent) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + var schema = content.Value.Schema.GetEffective(document); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("selfReferenceList", property.Key); + Assert.Equal("array", property.Value.Type); + Assert.Equal("Parent", property.Value.Items.Reference.Id); + }, + property => + { + Assert.Equal("selfReferenceDictionary", property.Key); + Assert.Equal("object", property.Value.Type); + Assert.Equal("Parent", property.Value.AdditionalProperties.Reference.Id); + }); + }); + } + + public class Parent + { + public IEnumerable SelfReferenceList { get; set; } = [ ]; + public IDictionary SelfReferenceDictionary { get; set; } = new Dictionary(); + } + } diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs index eecb520c1bb0..f8d46f771ca1 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -450,4 +450,363 @@ await VerifyOpenApiDocument(builder, document => } }); } + + [Fact] + public async Task SelfReferenceMapperOnlyOperatesOnSchemaReferenceTypes() + { + var builder = CreateBuilder(); + + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.AddSchemaTransformer((schema, context, cancellationToken) => + { + if (context.JsonTypeInfo.Type == typeof(Todo)) + { + schema.Reference = new OpenApiReference { Id = "#", Type = ReferenceType.Link }; + } + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/todo"].Operations[OperationType.Get]; + var response = operation.Responses["200"].Content["application/json"]; + var responseSchema = response.Schema; + Assert.Equal("#", responseSchema.Reference.Id); + Assert.Equal(ReferenceType.Link, responseSchema.Reference.Type); + }); + } + + [Fact] + public async Task SupportsNestedSchemasWithSelfReference() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/", (LocationContainer item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("LocationContainer", requestSchema.Reference.Id); + + // Assert that $ref is used for nested LocationDto + var locationContainerSchema = requestSchema.GetEffective(document); + Assert.Equal("LocationDto", locationContainerSchema.Properties["location"].Reference.Id); + + // Assert that $ref is used for nested AddressDto + var locationSchema = locationContainerSchema.Properties["location"].GetEffective(document); + Assert.Equal("AddressDto", locationSchema.Properties["address"].Reference.Id); + + // Assert that $ref is used for related LocationDto + var addressSchema = locationSchema.Properties["address"].GetEffective(document); + Assert.Equal("LocationDto", addressSchema.Properties["relatedLocation"].Reference.Id); + + // Assert that only expected schemas are generated at the top-level + Assert.Equal(["AddressDto", "LocationContainer", "LocationDto"], document.Components.Schemas.Keys); + }); + } + + [Fact] + public async Task SupportsListOfNestedSchemasWithSelfReference() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/list", (List items) => { }); + builder.MapPost("/array", (LocationContainer[] items) => { }); + builder.MapPost("/dictionary", (Dictionary items) => { }); + builder.MapPost("/", (LocationContainer item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var listOperation = document.Paths["/list"].Operations[OperationType.Post]; + var listRequestSchema = listOperation.RequestBody.Content["application/json"].Schema; + + var arrayOperation = document.Paths["/array"].Operations[OperationType.Post]; + var arrayRequestSchema = arrayOperation.RequestBody.Content["application/json"].Schema; + + var dictionaryOperation = document.Paths["/dictionary"].Operations[OperationType.Post]; + var dictionaryRequestSchema = dictionaryOperation.RequestBody.Content["application/json"].Schema; + + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("LocationContainer", listRequestSchema.Items.Reference.Id); + Assert.Equal("LocationContainer", arrayRequestSchema.Items.Reference.Id); + Assert.Equal("LocationContainer", dictionaryRequestSchema.AdditionalProperties.Reference.Id); + Assert.Equal("LocationContainer", requestSchema.Reference.Id); + + // Assert that $ref is used for nested LocationDto + var locationContainerSchema = requestSchema.GetEffective(document); + Assert.Equal("LocationDto", locationContainerSchema.Properties["location"].Reference.Id); + + // Assert that $ref is used for nested AddressDto + var locationSchema = locationContainerSchema.Properties["location"].GetEffective(document); + Assert.Equal("AddressDto", locationSchema.Properties["address"].Reference.Id); + + // Assert that $ref is used for related LocationDto + var addressSchema = locationSchema.Properties["address"].GetEffective(document); + Assert.Equal("LocationDto", addressSchema.Properties["relatedLocation"].Reference.Id); + + // Assert that only expected schemas are generated at the top-level + Assert.Equal(3, document.Components.Schemas.Count); + Assert.Equal(["AddressDto", "LocationContainer", "LocationDto"], document.Components.Schemas.Keys); + }); + } + + [Fact] + public async Task SupportsListNestedSchemasWithSelfReference() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/", (ParentObject item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("ParentObject", requestSchema.Reference.Id); + + // Assert that $ref is used for nested Children + var parentSchema = requestSchema.GetEffective(document); + Assert.Equal("ChildObject", parentSchema.Properties["children"].Items.Reference.Id); + + // Assert that $ref is used for nested Parent + var childSchema = parentSchema.Properties["children"].Items.GetEffective(document); + Assert.Equal("ParentObject", childSchema.Properties["parent"].Reference.Id); + + // Assert that only the expected schemas are registered + Assert.Equal(["ChildObject", "ParentObject"], document.Components.Schemas.Keys); + }); + } + + [Fact] + public async Task SupportsMultiplePropertiesWithSameType() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/", (Root item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("Root", requestSchema.Reference.Id); + + // Assert that $ref is used for nested Item1 + var rootSchema = requestSchema.GetEffective(document); + Assert.Equal("Item", rootSchema.Properties["item1"].Reference.Id); + + // Assert that $ref is used for nested Item2 + Assert.Equal("Item", rootSchema.Properties["item2"].Reference.Id); + }); + } + + // Test for: https://github.com/dotnet/aspnetcore/issues/60381 + [Fact] + public async Task ResolvesListBasedReferencesCorrectly() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/", (ContainerType item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("ContainerType", requestSchema.Reference.Id); + + // Get effective schema for ContainerType + var containerSchema = requestSchema.GetEffective(document); + Assert.Equal(2, containerSchema.Properties.Count); + + // Check Seq1 and Seq2 properties + var seq1Schema = containerSchema.Properties["seq1"]; + var seq2Schema = containerSchema.Properties["seq2"]; + + // Assert both are array types + Assert.Equal("array", seq1Schema.Type); + Assert.Equal("array", seq2Schema.Type); + + // Assert items are arrays of strings + Assert.Equal("array", seq1Schema.Items.Type); + Assert.Equal("array", seq2Schema.Items.Type); + + // Since both Seq1 and Seq2 are the same type (List>), + // they should reference the same schema structure + Assert.Equal(seq1Schema.Items.Type, seq2Schema.Items.Type); + + // Verify the inner arrays contain strings + Assert.Equal("string", seq1Schema.Items.Items.Type); + Assert.Equal("string", seq2Schema.Items.Items.Type); + + Assert.Equal(["ContainerType"], document.Components.Schemas.Keys); + }); + } + + // Tests for: https://github.com/dotnet/aspnetcore/issues/60012 + [Fact] + public async Task SupportsListOfClassInSelfReferentialSchema() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/", (Category item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("Category", requestSchema.Reference.Id); + + // Assert that $ref is used for nested Tags + var categorySchema = requestSchema.GetEffective(document); + Assert.Equal("Tag", categorySchema.Properties["tags"].Items.Reference.Id); + + // Assert that $ref is used for nested Parent + Assert.Equal("Category", categorySchema.Properties["parent"].Reference.Id); + + // Assert that no duplicate schemas are emitted + Assert.Collection(document.Components.Schemas, + schema => + { + Assert.Equal("Category", schema.Key); + }, + schema => + { + Assert.Equal("Tag", schema.Key); + }); + }); + } + + [Fact] + public async Task UsesSameReferenceForSameTypeInDifferentLocations() + { + // Arrange + var builder = CreateBuilder(); + + builder.MapPost("/parent-object", (ParentObject item) => { }); + builder.MapPost("/list", (List item) => { }); + builder.MapPost("/dictionary", (Dictionary item) => { }); + + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/parent-object"].Operations[OperationType.Post]; + var requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for top-level + Assert.Equal("ParentObject", requestSchema.Reference.Id); + + // Assert that $ref is used for nested Children + var parentSchema = requestSchema.GetEffective(document); + Assert.Equal("ChildObject", parentSchema.Properties["children"].Items.Reference.Id); + + // Assert that $ref is used for nested Parent + var childSchema = parentSchema.Properties["children"].Items.GetEffective(document); + Assert.Equal("ParentObject", childSchema.Properties["parent"].Reference.Id); + + operation = document.Paths["/list"].Operations[OperationType.Post]; + requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for items in the list definition + Assert.Equal("ParentObject", requestSchema.Items.Reference.Id); + parentSchema = requestSchema.Items.GetEffective(document); + Assert.Equal("ChildObject", parentSchema.Properties["children"].Items.Reference.Id); + + childSchema = parentSchema.Properties["children"].Items.GetEffective(document); + Assert.Equal("ParentObject", childSchema.Properties["parent"].Reference.Id); + + operation = document.Paths["/dictionary"].Operations[OperationType.Post]; + requestSchema = operation.RequestBody.Content["application/json"].Schema; + + // Assert $ref used for items in the dictionary definition + Assert.Equal("ParentObject", requestSchema.AdditionalProperties.Reference.Id); + parentSchema = requestSchema.AdditionalProperties.GetEffective(document); + Assert.Equal("ChildObject", parentSchema.Properties["children"].Items.Reference.Id); + + childSchema = parentSchema.Properties["children"].Items.GetEffective(document); + Assert.Equal("ParentObject", childSchema.Properties["parent"].Reference.Id); + + // Assert that only the expected schemas are registered + Assert.Equal(["ChildObject", "ParentObject"], document.Components.Schemas.Keys); + }); + } + + private class Category + { + public required string Name { get; set; } + + public Category Parent { get; set; } + + public IEnumerable Tags { get; set; } = []; + } + + public class Tag + { + public required string Name { get; set; } + } + + private class ContainerType + { + public List> Seq1 { get; set; } = []; + public List> Seq2 { get; set; } = []; + } + + private class Root + { + public Item Item1 { get; set; } = null!; + public Item Item2 { get; set; } = null!; + } + + private class Item + { + public string[] Name { get; set; } = null!; + public int value { get; set; } + } + + private class LocationContainer + { + public LocationDto Location { get; set; } + } + + private class LocationDto + { + public AddressDto Address { get; set; } + } + + private class AddressDto + { + public LocationDto RelatedLocation { get; set; } + } + +#nullable enable + private class ParentObject + { + public int Id { get; set; } + public List Children { get; set; } = []; + } + + private class ChildObject + { + public int Id { get; set; } + public required ParentObject Parent { get; set; } + } } +#nullable restore diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/SchemaTransformerTests.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/SchemaTransformerTests.cs index 5d20c810d6fa..565c3a2b48b1 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/SchemaTransformerTests.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/SchemaTransformerTests.cs @@ -444,6 +444,7 @@ public async Task SchemaTransformer_CanModifyItemTypesInADocument() builder.MapGet("/list", () => new List { 1, 2, 3, 4 }); builder.MapGet("/single", () => 1); + builder.MapGet("/dictionary", () => new Dictionary {{ "key", 1 }}); var options = new OpenApiOptions(); options.AddSchemaTransformer((schema, context, cancellationToken) => @@ -469,7 +470,13 @@ await VerifyOpenApiDocument(builder, options, document => getOperation = path.Operations[OperationType.Get]; responseSchema = getOperation.Responses["200"].Content["application/json"].Schema.GetEffective(document); Assert.Equal("modified-number-format", responseSchema.Format); - }); + + // Assert that the schema represent dictionary values has been modified + path = document.Paths["/dictionary"]; + getOperation = path.Operations[OperationType.Get]; + responseSchema = getOperation.Responses["200"].Content["application/json"].Schema.GetEffective(document); + Assert.Equal("modified-number-format", responseSchema.AdditionalProperties.Format); + }); } [Fact] diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Layout/NavMenu.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Layout/NavMenu.razor index bd05d545fc59..954d0d1db2e9 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Layout/NavMenu.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Layout/NavMenu.razor @@ -13,7 +13,7 @@ [CollectionDefinition(Name)] -public class IISTestSiteCollection : ICollectionFixture +public class IISTestSiteCollectionInProc : ICollectionFixture { - public const string Name = nameof(IISTestSiteCollection); + public const string Name = nameof(IISTestSiteCollectionInProc); +} + +[CollectionDefinition(Name)] +public class IISTestSiteCollectionOutOfProc : ICollectionFixture +{ + public const string Name = nameof(IISTestSiteCollectionOutOfProc); } [CollectionDefinition(Name)] diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISTestSiteFixture.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISTestSiteFixture.cs index 73074454b0c1..ec04ad06ba84 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISTestSiteFixture.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISTestSiteFixture.cs @@ -46,6 +46,15 @@ internal IISTestSiteFixture(Action configure) ApplicationPublisher = new PublishedApplicationPublisher(Helpers.GetInProcessTestSitesName()), ServerType = DeployerSelector.ServerType }; + + // Uncomment to add IIS debug logs to test output. + //DeploymentParameters.EnvironmentVariables.Add("ASPNETCORE_MODULE_DEBUG", "console"); + + // This queue does not have websockets enabled currently, adding the module will break all tests using this fixture. + if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022")) + { + DeploymentParameters.EnableModule("WebSocketModule", "%IIS_BIN%/iiswsock.dll"); + } } public HttpClient Client => DeploymentResult.HttpClient; diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs index c701dd6bea25..4428a6d1a6dd 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Server.IIS.NewShim.FunctionalTests; namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; #endif -[Collection(IISTestSiteCollection.Name)] +[Collection(IISTestSiteCollectionInProc.Name)] [SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open;")] public class RequestResponseTests { diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketInProcessTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketInProcessTests.cs new file mode 100644 index 000000000000..1491480b7a65 --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketInProcessTests.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting; +using Xunit.Abstractions; + +#if !IIS_FUNCTIONALS +using Microsoft.AspNetCore.Server.IIS.FunctionalTests; + +#if IISEXPRESS_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.IISExpress.FunctionalTests; +#elif NEWHANDLER_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewHandler.FunctionalTests; +#elif NEWSHIM_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewShim.FunctionalTests; +#endif +#else + +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; +#endif + +[Collection(IISTestSiteCollectionInProc.Name)] +[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "No WebSocket supported on Win7")] +#if IISEXPRESS_FUNCTIONALS +[SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open")] +#else +// These queues do not have websockets enabled currently for full IIS +[SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open;Windows.Amd64.Server2022.Open")] +#endif +public class WebSocketsInProcessTests : WebSocketsTests +{ + public WebSocketsInProcessTests(IISTestSiteFixture fixture, ITestOutputHelper testOutput) : base(fixture, testOutput) + { + Fixture.DeploymentParameters.HostingModel = HostingModel.InProcess; + } +} diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketOutOfProcessTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketOutOfProcessTests.cs new file mode 100644 index 000000000000..d50328d10170 --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketOutOfProcessTests.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting; +using Xunit.Abstractions; + +#if !IIS_FUNCTIONALS +using Microsoft.AspNetCore.Server.IIS.FunctionalTests; + +#if IISEXPRESS_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.IISExpress.FunctionalTests; +#elif NEWHANDLER_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewHandler.FunctionalTests; +#elif NEWSHIM_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewShim.FunctionalTests; +#endif +#else + +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; +#endif + +[Collection(IISTestSiteCollectionOutOfProc.Name)] +[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "No WebSocket supported on Win7")] +#if IISEXPRESS_FUNCTIONALS +[SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open")] +#else +// These queues do not have websockets enabled currently for full IIS +[SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open;Windows.Amd64.Server2022.Open")] +#endif +public class WebSocketsOutOfProcessTests : WebSocketsTests +{ + public WebSocketsOutOfProcessTests(IISTestSiteFixture fixture, ITestOutputHelper testOutput) : base(fixture, testOutput) + { + Fixture.DeploymentParameters.HostingModel = HostingModel.OutOfProcess; + } +} diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/InProcess/WebSocketTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketTests.cs similarity index 55% rename from src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/InProcess/WebSocketTests.cs rename to src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketTests.cs index a5586af0c0b9..606ba6c8c654 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/InProcess/WebSocketTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WebSocketTests.cs @@ -1,57 +1,72 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; +using System.Diagnostics; using System.Globalization; -using System.Linq; using System.Net.Http; using System.Net.Sockets; using System.Net.WebSockets; using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.IIS.FunctionalTests; using Microsoft.AspNetCore.InternalTesting; -using Xunit; +using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting.IIS; +using Xunit.Abstractions; + +#if !IIS_FUNCTIONALS +using Microsoft.AspNetCore.Server.IIS.FunctionalTests; +#if IISEXPRESS_FUNCTIONALS namespace Microsoft.AspNetCore.Server.IIS.IISExpress.FunctionalTests; +#elif NEWHANDLER_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewHandler.FunctionalTests; +#elif NEWSHIM_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewShim.FunctionalTests; +#endif +#else -[Collection(IISTestSiteCollection.Name)] -[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "No WebSocket supported on Win7")] -[SkipOnHelix("Unsupported queue", Queues = "Windows.Amd64.VS2022.Pre.Open;")] -public class WebSocketsTests +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; +#endif + +public abstract class WebSocketsTests : FunctionalTestsBase { - private readonly string _requestUri; - private readonly string _webSocketUri; + public IISTestSiteFixture Fixture { get; } - public WebSocketsTests(IISTestSiteFixture fixture) + public WebSocketsTests(IISTestSiteFixture fixture, ITestOutputHelper testOutput) : base(testOutput) { - _requestUri = fixture.DeploymentResult.ApplicationBaseUri; - _webSocketUri = _requestUri.Replace("http:", "ws:"); + Fixture = fixture; } [ConditionalFact] public async Task RequestWithBody_NotUpgradable() { using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) }; - using var response = await client.PostAsync(_requestUri + "WebSocketNotUpgradable", new StringContent("Hello World")); + using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable", new StringContent("Hello World")); response.EnsureSuccessStatusCode(); } [ConditionalFact] public async Task RequestWithoutBody_Upgradable() { + if (Fixture.DeploymentParameters.HostingModel == HostingModel.OutOfProcess) + { + // OutOfProcess doesn't support upgrade requests without the "Upgrade": "websocket" header. + return; + } + using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) }; // POST with Content-Length: 0 counts as not having a body. - using var response = await client.PostAsync(_requestUri + "WebSocketUpgradable", new StringContent("")); + using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradable", new StringContent("")); response.EnsureSuccessStatusCode(); } [ConditionalFact] public async Task OnStartedCalledForWebSocket() { - var cws = new ClientWebSocket(); - await cws.ConnectAsync(new Uri(_webSocketUri + "WebSocketLifetimeEvents"), default); + var webSocketUri = Fixture.DeploymentResult.ApplicationBaseUri; + webSocketUri = webSocketUri.Replace("http:", "ws:"); + + using var cws = new ClientWebSocket(); + await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketLifetimeEvents"), default); await ReceiveMessage(cws, "OnStarting"); await ReceiveMessage(cws, "Upgraded"); @@ -60,8 +75,11 @@ public async Task OnStartedCalledForWebSocket() [ConditionalFact] public async Task WebReadBeforeUpgrade() { - var cws = new ClientWebSocket(); - await cws.ConnectAsync(new Uri(_webSocketUri + "WebSocketReadBeforeUpgrade"), default); + var webSocketUri = Fixture.DeploymentResult.ApplicationBaseUri; + webSocketUri = webSocketUri.Replace("http:", "ws:"); + + using var cws = new ClientWebSocket(); + await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketReadBeforeUpgrade"), default); await ReceiveMessage(cws, "Yay"); } @@ -69,8 +87,11 @@ public async Task WebReadBeforeUpgrade() [ConditionalFact] public async Task CanSendAndReceieveData() { - var cws = new ClientWebSocket(); - await cws.ConnectAsync(new Uri(_webSocketUri + "WebSocketEcho"), default); + var webSocketUri = Fixture.DeploymentResult.ApplicationBaseUri; + webSocketUri = webSocketUri.Replace("http:", "ws:"); + + using var cws = new ClientWebSocket(); + await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketEcho"), default); for (int i = 0; i < 1000; i++) { @@ -80,10 +101,33 @@ public async Task CanSendAndReceieveData() } } + [ConditionalFact] + public async Task AttemptCompressionWorks() + { + var webSocketUri = Fixture.DeploymentResult.ApplicationBaseUri; + webSocketUri = webSocketUri.Replace("http:", "ws:"); + + using var cws = new ClientWebSocket(); + cws.Options.DangerousDeflateOptions = new WebSocketDeflateOptions(); + await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketAllowCompression"), default); + + // Compression doesn't work with OutOfProcess, let's make sure the websocket extensions aren't forwarded and the connection still works + var expected = Fixture.DeploymentParameters.HostingModel == HostingModel.InProcess + ? "permessage-deflate; client_max_window_bits=15" : "None"; + await ReceiveMessage(cws, expected); + + for (int i = 0; i < 1000; i++) + { + var message = i.ToString(CultureInfo.InvariantCulture); + await SendMessage(cws, message); + await ReceiveMessage(cws, message); + } + } + [ConditionalFact] public async Task Http1_0_Request_NotUpgradable() { - Uri uri = new Uri(_requestUri + "WebSocketNotUpgradable"); + Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable"); using TcpClient client = new TcpClient(); await client.ConnectAsync(uri.Host, uri.Port); @@ -103,7 +147,7 @@ public async Task Http1_0_Request_NotUpgradable() [ConditionalFact] public async Task Http1_0_Request_UpgradeErrors() { - Uri uri = new Uri(_requestUri + "WebSocketUpgradeFails"); + Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradeFails"); using TcpClient client = new TcpClient(); await client.ConnectAsync(uri.Host, uri.Port); @@ -148,6 +192,7 @@ private async Task SendMessage(ClientWebSocket webSocket, string message) private async Task ReceiveMessage(ClientWebSocket webSocket, string expectedMessage) { + Debug.Assert(expectedMessage.Length > 0); var received = new byte[expectedMessage.Length]; var offset = 0; @@ -156,7 +201,7 @@ private async Task ReceiveMessage(ClientWebSocket webSocket, string expectedMess { result = await webSocket.ReceiveAsync(new ArraySegment(received, offset, received.Length - offset), default); offset += result.Count; - } while (!result.EndOfMessage); + } while (!result.EndOfMessage && result.CloseStatus is null && received.Length - offset > 0); Assert.Equal(expectedMessage, Encoding.ASCII.GetString(received)); } diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj index 15ad8db11a2f..f34f4f9e7cee 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -11,7 +11,6 @@ true - diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj index 4fdccefc70e8..7a4cef0ef12d 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj @@ -28,6 +28,7 @@ + diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.WebSockets.cs b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.WebSockets.cs index d0750ef81fd4..c7d502039f55 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.WebSockets.cs +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.WebSockets.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net.WebSockets; using System.Text; @@ -50,6 +51,8 @@ private void WebSocketReadBeforeUpgrade(IApplicationBuilder app) var ws = await Upgrade(context); await SendMessages(ws, "Yay"); + + await CloseWebSocket(ws, false); }); } @@ -85,6 +88,8 @@ private void WebSocketLifetimeEvents(IApplicationBuilder app) messages.Add("Upgraded"); await SendMessages(ws, messages.ToArray()); + + await CloseWebSocket(ws, false); }); } @@ -94,10 +99,38 @@ private void WebSocketUpgradeFails(IApplicationBuilder app) { var upgradeFeature = context.Features.Get(); var ex = await Assert.ThrowsAsync(() => upgradeFeature.UpgradeAsync()); - Assert.Equal("Upgrade requires HTTP/1.1.", ex.Message); + if (ex.Message != "Upgrade requires HTTP/1.1." + && ex.Message != "Cannot upgrade a non-upgradable request. Check IHttpUpgradeFeature.IsUpgradableRequest to determine if a request can be upgraded.") + { + throw new InvalidOperationException("Unexpected error from UpgradeAsync."); + } }); } +#if !FORWARDCOMPAT + private void WebSocketAllowCompression(IApplicationBuilder app) + { + app.Run(async context => + { + var ws = await context.WebSockets.AcceptWebSocketAsync(new WebSocketAcceptContext() + { + DangerousEnableCompression = true + }); + + var appLifetime = app.ApplicationServices.GetRequiredService(); + + var extensionsHeader = context.Response.Headers.SecWebSocketExtensions.ToString(); + if (extensionsHeader.Length == 0) + { + extensionsHeader = "None"; + } + await ws.SendAsync(Encoding.ASCII.GetBytes(extensionsHeader), WebSocketMessageType.Text, endOfMessage: true, default); + using var cts = CancellationTokenSource.CreateLinkedTokenSource(appLifetime.ApplicationStopping, context.RequestAborted); + await Echo(ws, cts.Token); + }); + } +#endif + private static async Task SendMessages(WebSocket webSocket, params string[] messages) { foreach (var message in messages) @@ -157,17 +190,30 @@ private async Task Echo(WebSocket webSocket, CancellationToken token) } else { - // Server-initiated close handshake due to either of the two conditions: - // (1) The applicaton host is performing a graceful shutdown. - // (2) The client sent "CloseFromServer" text message to request the server to close (a test scenario). - await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeFromServerCmd, CancellationToken.None); - - // The server has sent the Close frame. - // Stop sending but keep receiving until we get the Close frame from the client. - while (!result.CloseStatus.HasValue) - { - result = await webSocket.ReceiveAsync(new ArraySegment(buffer), CancellationToken.None); - } + await CloseWebSocket(webSocket, false); + } + } + + private async Task CloseWebSocket(WebSocket webSocket, bool receivedClose) + { + // Server-initiated close handshake due to either of the two conditions: + // (1) The applicaton host is performing a graceful shutdown. + // (2) The client sent "CloseFromServer" text message to request the server to close (a test scenario). + await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "CloseFromServer", CancellationToken.None); + + if (receivedClose) + { + return; + } + + // The server has sent the Close frame. + // Stop sending but keep receiving until we get the Close frame from the client. + WebSocketReceiveResult result; + var buffer = new byte[100]; + do + { + result = await webSocket.ReceiveAsync(new ArraySegment(buffer), CancellationToken.None); } + while (!result.CloseStatus.HasValue); } } diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs index fba1940f881e..7588f67559ea 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs @@ -2,14 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Net; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.Marshalling; using System.Security.Principal; using System.Text; using System.Threading; @@ -44,6 +40,11 @@ public void Configure(IApplicationBuilder app, IHttpContextAccessor httpContextA { app.UseHttpsRedirection(); } + +#if !FORWARDCOMPAT + app.UseWebSockets(); +#endif + TestStartup.Register(app, this); _httpContextAccessor = httpContextAccessor; } diff --git a/src/Servers/IIS/IISIntegration.slnf b/src/Servers/IIS/IISIntegration.slnf index db899fc491a9..9b6e5ea81e86 100644 --- a/src/Servers/IIS/IISIntegration.slnf +++ b/src/Servers/IIS/IISIntegration.slnf @@ -20,6 +20,7 @@ "src\\Middleware\\HttpOverrides\\src\\Microsoft.AspNetCore.HttpOverrides.csproj", "src\\Middleware\\HttpsPolicy\\src\\Microsoft.AspNetCore.HttpsPolicy.csproj", "src\\Middleware\\ResponseCompression\\src\\Microsoft.AspNetCore.ResponseCompression.csproj", + "src\\Middleware\\WebSockets\\src\\Microsoft.AspNetCore.WebSockets.csproj", "src\\ObjectPool\\src\\Microsoft.Extensions.ObjectPool.csproj", "src\\Servers\\Connections.Abstractions\\src\\Microsoft.AspNetCore.Connections.Abstractions.csproj", "src\\Servers\\HttpSys\\src\\Microsoft.AspNetCore.Server.HttpSys.csproj", @@ -39,10 +40,10 @@ "src\\Servers\\IIS\\IIS\\samples\\NativeIISSample\\NativeIISSample.csproj", "src\\Servers\\IIS\\IIS\\src\\Microsoft.AspNetCore.Server.IIS.csproj", "src\\Servers\\IIS\\IIS\\test\\IIS.FunctionalTests\\IIS.FunctionalTests.csproj", + "src\\Servers\\IIS\\IIS\\test\\IIS.LongTests\\IIS.LongTests.csproj", "src\\Servers\\IIS\\IIS\\test\\IIS.NewHandler.FunctionalTests\\IIS.NewHandler.FunctionalTests.csproj", "src\\Servers\\IIS\\IIS\\test\\IIS.NewShim.FunctionalTests\\IIS.NewShim.FunctionalTests.csproj", "src\\Servers\\IIS\\IIS\\test\\IIS.ShadowCopy.Tests\\IIS.ShadowCopy.Tests.csproj", - "src\\Servers\\IIS\\IIS\\test\\IIS.LongTests\\IIS.LongTests.csproj", "src\\Servers\\IIS\\IIS\\test\\IIS.Tests\\IIS.Tests.csproj", "src\\Servers\\IIS\\IIS\\test\\IISExpress.FunctionalTests\\IISExpress.FunctionalTests.csproj", "src\\Servers\\IIS\\IIS\\test\\testassets\\IIS.Common.TestLib\\IIS.Common.TestLib.csproj", diff --git a/src/Servers/IIS/build/Build.Lib.Settings b/src/Servers/IIS/build/Build.Lib.Settings index 0dcba8c2011a..9327eb363771 100644 --- a/src/Servers/IIS/build/Build.Lib.Settings +++ b/src/Servers/IIS/build/Build.Lib.Settings @@ -9,7 +9,7 @@ - false + true _LIB;%(PreprocessorDefinitions) true diff --git a/src/Servers/Kestrel/Core/src/CoreStrings.resx b/src/Servers/Kestrel/Core/src/CoreStrings.resx index 7f6c785963f6..55f5bde688f0 100644 --- a/src/Servers/Kestrel/Core/src/CoreStrings.resx +++ b/src/Servers/Kestrel/Core/src/CoreStrings.resx @@ -737,4 +737,7 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l Call UseKestrelHttpsConfiguration() on IWebHostBuilder to automatically enable HTTPS when an https:// address is used. - + + The client sent a {frameType} frame to a control stream that was too large. + + \ No newline at end of file diff --git a/src/Servers/Kestrel/Core/src/Http3Limits.cs b/src/Servers/Kestrel/Core/src/Http3Limits.cs index 0d7801e48bf8..b6556557a340 100644 --- a/src/Servers/Kestrel/Core/src/Http3Limits.cs +++ b/src/Servers/Kestrel/Core/src/Http3Limits.cs @@ -37,7 +37,7 @@ internal int HeaderTableSize /// /// Indicates the size of the maximum allowed size of a request header field sequence. This limit applies to both name and value sequences in their compressed and uncompressed representations. /// - /// Value must be greater than 0, defaults to 2^14 (16,384). + /// Value must be greater than 0, defaults to 2^15 (32,768). /// /// public int MaxRequestHeaderFieldSize diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs index b8714d601f9c..178007ec06ac 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs @@ -3,7 +3,6 @@ using System.Buffers; using System.Diagnostics; -using System.Globalization; using System.IO.Pipelines; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections.Features; @@ -644,16 +643,24 @@ private void ValidateNonOriginHostHeader(string hostText) // authority component, excluding any userinfo subcomponent and its "@" // delimiter. + // Accessing authority always allocates, store it in a local to only allocate once + var authority = _absoluteRequestTarget!.Authority; + // System.Uri doesn't not tell us if the port was in the original string or not. // When IsDefaultPort = true, we will allow Host: with or without the default port - if (hostText != _absoluteRequestTarget!.Authority) + if (hostText != authority) { if (!_absoluteRequestTarget.IsDefaultPort - || hostText != _absoluteRequestTarget.Authority + ":" + _absoluteRequestTarget.Port.ToString(CultureInfo.InvariantCulture)) + || hostText != $"{authority}:{_absoluteRequestTarget.Port}") { if (_context.ServiceContext.ServerOptions.AllowHostHeaderOverride) { - hostText = _absoluteRequestTarget.Authority + ":" + _absoluteRequestTarget.Port.ToString(CultureInfo.InvariantCulture); + // No need to include the port here, it's either already in the Authority + // or it's the default port + // see: https://datatracker.ietf.org/doc/html/rfc2616/#section-14.23 + // A "host" without any trailing port information implies the default + // port for the service requested (e.g., "80" for an HTTP URL). + hostText = authority; HttpRequestHeaders.HeaderHost = hostText; } else diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Data.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Data.cs index 95dbbcb8e4d5..ce1e9b0db815 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Data.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Data.cs @@ -7,7 +7,7 @@ internal partial class Http3RawFrame { public void PrepareData() { - Length = 0; + RemainingLength = 0; Type = Http3FrameType.Data; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.GoAway.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.GoAway.cs index fe2eb3a6e42e..de1a73cb830e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.GoAway.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.GoAway.cs @@ -7,7 +7,7 @@ internal partial class Http3RawFrame { public void PrepareGoAway() { - Length = 0; + RemainingLength = 0; Type = Http3FrameType.GoAway; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Headers.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Headers.cs index bcf65929694d..11e8c971ff21 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Headers.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Headers.cs @@ -7,7 +7,7 @@ internal partial class Http3RawFrame { public void PrepareHeaders() { - Length = 0; + RemainingLength = 0; Type = Http3FrameType.Headers; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Settings.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Settings.cs index 9e74e07db5b8..03ed2a670250 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Settings.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.Settings.cs @@ -7,7 +7,7 @@ internal partial class Http3RawFrame { public void PrepareSettings() { - Length = 0; + RemainingLength = 0; Type = Http3FrameType.Settings; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.cs index 076b9640d0bb..5839d515524c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Frames/Http3RawFrame.cs @@ -9,7 +9,7 @@ namespace System.Net.Http; internal partial class Http3RawFrame #pragma warning restore CA1852 // Seal internal types { - public long Length { get; set; } + public long RemainingLength { get; set; } public Http3FrameType Type { get; internal set; } @@ -17,6 +17,6 @@ internal partial class Http3RawFrame public override string ToString() { - return $"{FormattedType} Length: {Length}"; + return $"{FormattedType} Length: {RemainingLength}"; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3ControlStream.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3ControlStream.cs index dbd99d838a0e..c179676663ff 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3ControlStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3ControlStream.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers; +using System.Diagnostics; using System.Globalization; using System.IO.Pipelines; using System.Net.Http; @@ -19,13 +20,18 @@ internal abstract class Http3ControlStream : IHttp3Stream, IThreadPoolWorkItem private const int EncoderStreamTypeId = 2; private const int DecoderStreamTypeId = 3; + // Arbitrarily chosen max frame length + // ControlStream frames currently are very small, either a single variable length integer (max 8 bytes), two variable length integers, + // or in the case of SETTINGS a small collection of two variable length integers + // We'll use a generous value of 10k in case new optional frame(s) are added that might be a little larger than the current frames. + private const int MaxFrameSize = 10_000; + private readonly Http3FrameWriter _frameWriter; private readonly Http3StreamContext _context; private readonly Http3PeerSettings _serverPeerSettings; private readonly IStreamIdFeature _streamIdFeature; private readonly IStreamClosedFeature _streamClosedFeature; private readonly IProtocolErrorCodeFeature _errorCodeFeature; - private readonly Http3RawFrame _incomingFrame = new Http3RawFrame(); private volatile int _isClosed; private long _headerType; private readonly object _completionLock = new(); @@ -159,9 +165,9 @@ private async ValueTask TryReadStreamHeaderAsync() { if (!readableBuffer.IsEmpty) { - var id = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out examined); - if (id != -1) + if (VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var id)) { + examined = consumed; return id; } } @@ -240,6 +246,8 @@ public async Task ProcessRequestAsync(IHttpApplication appli } finally { + await _context.StreamContext.DisposeAsync(); + ApplyCompletionFlag(StreamCompletionFlags.Completed); _context.StreamLifetimeHandler.OnStreamCompleted(this); } @@ -247,6 +255,8 @@ public async Task ProcessRequestAsync(IHttpApplication appli private async Task HandleControlStream() { + var incomingFrame = new Http3RawFrame(); + var isContinuedFrame = false; while (_isClosed == 0) { var result = await Input.ReadAsync(); @@ -259,12 +269,33 @@ private async Task HandleControlStream() if (!readableBuffer.IsEmpty) { // need to kick off httpprotocol process request async here. - while (Http3FrameReader.TryReadFrame(ref readableBuffer, _incomingFrame, out var framePayload)) + while (Http3FrameReader.TryReadFrame(ref readableBuffer, incomingFrame, isContinuedFrame, out var framePayload)) { - Log.Http3FrameReceived(_context.ConnectionId, _streamIdFeature.StreamId, _incomingFrame); - - consumed = examined = framePayload.End; - await ProcessHttp3ControlStream(framePayload); + Debug.Assert(incomingFrame.RemainingLength >= framePayload.Length); + + // Only log when parsing the beginning of the frame + if (!isContinuedFrame) + { + Log.Http3FrameReceived(_context.ConnectionId, _streamIdFeature.StreamId, incomingFrame); + } + + examined = framePayload.End; + await ProcessHttp3ControlStream(incomingFrame, isContinuedFrame, framePayload, out consumed); + + if (incomingFrame.RemainingLength == framePayload.Length) + { + Debug.Assert(framePayload.Slice(0, consumed).Length == framePayload.Length); + + incomingFrame.RemainingLength = 0; + isContinuedFrame = false; + } + else + { + incomingFrame.RemainingLength -= framePayload.Slice(0, consumed).Length; + isContinuedFrame = true; + + Debug.Assert(incomingFrame.RemainingLength > 0); + } } } @@ -294,56 +325,71 @@ private async ValueTask HandleEncodingDecodingTask() } } - private ValueTask ProcessHttp3ControlStream(in ReadOnlySequence payload) + private ValueTask ProcessHttp3ControlStream(Http3RawFrame incomingFrame, bool isContinuedFrame, in ReadOnlySequence payload, out SequencePosition consumed) { - switch (_incomingFrame.Type) + // default to consuming the entire payload, this is so that we don't need to set consumed from all the frame types that aren't implemented yet. + // individual frame types can set consumed if they're implemented and want to be able to partially consume the payload. + consumed = payload.End; + switch (incomingFrame.Type) { case Http3FrameType.Data: case Http3FrameType.Headers: case Http3FrameType.PushPromise: - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-7.2 - throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ErrorUnsupportedFrameOnControlStream(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame); + // https://www.rfc-editor.org/rfc/rfc9114.html#section-8.1-2.12.1 + throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ErrorUnsupportedFrameOnControlStream(incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame); case Http3FrameType.Settings: - return ProcessSettingsFrameAsync(payload); + CheckMaxFrameSize(incomingFrame); + return ProcessSettingsFrameAsync(isContinuedFrame, payload, out consumed); case Http3FrameType.GoAway: - return ProcessGoAwayFrameAsync(); + return ProcessGoAwayFrameAsync(isContinuedFrame, incomingFrame, payload, out consumed); case Http3FrameType.CancelPush: - return ProcessCancelPushFrameAsync(); + return ProcessCancelPushFrameAsync(incomingFrame, payload, out consumed); case Http3FrameType.MaxPushId: - return ProcessMaxPushIdFrameAsync(); + return ProcessMaxPushIdFrameAsync(incomingFrame, payload, out consumed); default: - return ProcessUnknownFrameAsync(_incomingFrame.Type); + CheckMaxFrameSize(incomingFrame); + return ProcessUnknownFrameAsync(incomingFrame.Type); } - } - private ValueTask ProcessSettingsFrameAsync(ReadOnlySequence payload) - { - if (_haveReceivedSettingsFrame) + static void CheckMaxFrameSize(Http3RawFrame http3RawFrame) { - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-settings - throw new Http3ConnectionErrorException(CoreStrings.Http3ErrorControlStreamMultipleSettingsFrames, Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame); + // Not part of the RFC, but it's a good idea to limit the size of frames when we know they're supposed to be small. + if (http3RawFrame.RemainingLength >= MaxFrameSize) + { + throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ControlStreamFrameTooLarge(http3RawFrame.FormattedType), Http3ErrorCode.FrameError, ConnectionEndReason.InvalidFrameLength); + } } + } - _haveReceivedSettingsFrame = true; - _streamClosedFeature.OnClosed(static state => + private ValueTask ProcessSettingsFrameAsync(bool isContinuedFrame, ReadOnlySequence payload, out SequencePosition consumed) + { + if (!isContinuedFrame) { - var stream = (Http3ControlStream)state!; - stream.OnStreamClosed(); - }, this); + if (_haveReceivedSettingsFrame) + { + // https://www.rfc-editor.org/rfc/rfc9114.html#section-7.2.4 + throw new Http3ConnectionErrorException(CoreStrings.Http3ErrorControlStreamMultipleSettingsFrames, Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame); + } + + _haveReceivedSettingsFrame = true; + _streamClosedFeature.OnClosed(static state => + { + var stream = (Http3ControlStream)state!; + stream.OnStreamClosed(); + }, this); + } while (true) { - var id = VariableLengthIntegerHelper.GetInteger(payload, out var consumed, out _); - if (id == -1) + if (!VariableLengthIntegerHelper.TryGetInteger(payload, out consumed, out var id)) { break; } - payload = payload.Slice(consumed); - - var value = VariableLengthIntegerHelper.GetInteger(payload, out consumed, out _); - if (value == -1) + if (!VariableLengthIntegerHelper.TryGetInteger(payload.Slice(consumed), out consumed, out var value)) { + // Reset consumed to very start even though we successfully read 1 varint. It's because we want to keep the id for when we have the value as well. + consumed = payload.Start; break; } @@ -382,37 +428,48 @@ private void ProcessSetting(long id, long value) } } - private ValueTask ProcessGoAwayFrameAsync() + private ValueTask ProcessGoAwayFrameAsync(bool isContinuedFrame, Http3RawFrame incomingFrame, ReadOnlySequence payload, out SequencePosition consumed) { - EnsureSettingsFrame(Http3FrameType.GoAway); + // https://www.rfc-editor.org/rfc/rfc9114.html#name-goaway + + // We've already triggered RequestClose since isContinuedFrame is only true + // after we've already parsed the frame type and called the processing function at least once. + if (!isContinuedFrame) + { + EnsureSettingsFrame(Http3FrameType.GoAway); - // StopProcessingNextRequest must be called before RequestClose to ensure it's considered client initiated. - _context.Connection.StopProcessingNextRequest(serverInitiated: false, ConnectionEndReason.ClientGoAway); - _context.ConnectionContext.Features.Get()?.RequestClose(); + // StopProcessingNextRequest must be called before RequestClose to ensure it's considered client initiated. + _context.Connection.StopProcessingNextRequest(serverInitiated: false, ConnectionEndReason.ClientGoAway); + _context.ConnectionContext.Features.Get()?.RequestClose(); + } - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-goaway - // PUSH is not implemented so nothing to do. + // PUSH is not implemented but we still want to parse the frame to do error checking + ParseVarIntWithFrameLengthValidation(incomingFrame, payload, out consumed); // TODO: Double check the connection remains open. return default; } - private ValueTask ProcessCancelPushFrameAsync() + private ValueTask ProcessCancelPushFrameAsync(Http3RawFrame incomingFrame, ReadOnlySequence payload, out SequencePosition consumed) { + // https://www.rfc-editor.org/rfc/rfc9114.html#section-7.2.3 + EnsureSettingsFrame(Http3FrameType.CancelPush); - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-cancel_push - // PUSH is not implemented so nothing to do. + // PUSH is not implemented but we still want to parse the frame to do error checking + ParseVarIntWithFrameLengthValidation(incomingFrame, payload, out consumed); return default; } - private ValueTask ProcessMaxPushIdFrameAsync() + private ValueTask ProcessMaxPushIdFrameAsync(Http3RawFrame incomingFrame, ReadOnlySequence payload, out SequencePosition consumed) { + // https://www.rfc-editor.org/rfc/rfc9114.html#section-7.2.7 + EnsureSettingsFrame(Http3FrameType.MaxPushId); - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-cancel_push - // PUSH is not implemented so nothing to do. + // PUSH is not implemented but we still want to parse the frame to do error checking + ParseVarIntWithFrameLengthValidation(incomingFrame, payload, out consumed); return default; } @@ -426,6 +483,23 @@ private ValueTask ProcessUnknownFrameAsync(Http3FrameType frameType) return default; } + // Used for frame types that aren't (fully) implemented yet and contain a single var int as part of their framing. (CancelPush, MaxPushId, GoAway) + // We want to throw an error if the length field of the frame is larger than the spec defined format of the frame. + private static void ParseVarIntWithFrameLengthValidation(Http3RawFrame incomingFrame, ReadOnlySequence payload, out SequencePosition consumed) + { + if (!VariableLengthIntegerHelper.TryGetInteger(payload, out consumed, out _)) + { + return; + } + + if (incomingFrame.RemainingLength > payload.Slice(0, consumed).Length) + { + // https://www.rfc-editor.org/rfc/rfc9114.html#section-10.8 + // An implementation MUST ensure that the length of a frame exactly matches the length of the fields it contains. + throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ControlStreamFrameTooLarge(Http3Formatting.ToFormattedType(incomingFrame.Type)), Http3ErrorCode.FrameError, ConnectionEndReason.InvalidFrameLength); + } + } + private void EnsureSettingsFrame(Http3FrameType frameType) { if (!_haveReceivedSettingsFrame) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameReader.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameReader.cs index 66740c710f10..2de0472483a1 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameReader.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameReader.cs @@ -19,36 +19,44 @@ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | Frame Payload (*) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ - internal static bool TryReadFrame(ref ReadOnlySequence readableBuffer, Http3RawFrame frame, out ReadOnlySequence framePayload) + // Reads and returns partial frames, don't rely on the frame being complete when using this method + // Set isContinuedFrame to true when expecting to read more of the previous frame + internal static bool TryReadFrame(ref ReadOnlySequence readableBuffer, Http3RawFrame frame, bool isContinuedFrame, out ReadOnlySequence framePayload) { framePayload = ReadOnlySequence.Empty; - SequencePosition consumed; + SequencePosition consumed = readableBuffer.Start; + var length = frame.RemainingLength; - var type = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out _); - if (type == -1) + if (!isContinuedFrame) { - return false; - } + if (!VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var type)) + { + return false; + } - var firstLengthBuffer = readableBuffer.Slice(consumed); + var firstLengthBuffer = readableBuffer.Slice(consumed); - var length = VariableLengthIntegerHelper.GetInteger(firstLengthBuffer, out consumed, out _); + if (!VariableLengthIntegerHelper.TryGetInteger(firstLengthBuffer, out consumed, out length)) + { + return false; + } - // Make sure the whole frame is buffered - if (length == -1) - { - return false; + frame.RemainingLength = length; + frame.Type = (Http3FrameType)type; } var startOfFramePayload = readableBuffer.Slice(consumed); - if (startOfFramePayload.Length < length) + + // Get all the available bytes or the rest of the frame whichever is less + length = Math.Min(startOfFramePayload.Length, length); + + // If we were expecting a non-empty payload, but haven't received any of it yet, + // there is nothing to process until we wait for more data. + if (length == 0 && frame.RemainingLength != 0) { return false; } - frame.Length = length; - frame.Type = (Http3FrameType)type; - // The remaining payload minus the extra fields framePayload = startOfFramePayload.Slice(0, length); readableBuffer = readableBuffer.Slice(framePayload.End); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameWriter.cs index 44ade9362ea1..6b94153f80d1 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3FrameWriter.cs @@ -121,7 +121,7 @@ internal Task WriteSettingsAsync(List settings) WriteSettings(settings, buffer); // Advance pipe writer and flush - _outgoingFrame.Length = totalLength; + _outgoingFrame.RemainingLength = totalLength; _outputWriter.Advance(totalLength); return _outputWriter.FlushAsync().GetAsTask(); @@ -186,7 +186,7 @@ private void WriteDataUnsynchronized(in ReadOnlySequence data, long dataLe return; } - _outgoingFrame.Length = (int)dataLength; + _outgoingFrame.RemainingLength = (int)dataLength; WriteHeaderUnsynchronized(); @@ -209,7 +209,7 @@ void SplitAndWriteDataUnsynchronized(in ReadOnlySequence data, long dataLe do { var currentData = remainingData.Slice(0, dataPayloadLength); - _outgoingFrame.Length = dataPayloadLength; + _outgoingFrame.RemainingLength = dataPayloadLength; WriteHeaderUnsynchronized(); @@ -223,7 +223,7 @@ void SplitAndWriteDataUnsynchronized(in ReadOnlySequence data, long dataLe } while (dataLength > dataPayloadLength); - _outgoingFrame.Length = (int)dataLength; + _outgoingFrame.RemainingLength = (int)dataLength; WriteHeaderUnsynchronized(); @@ -240,7 +240,7 @@ internal ValueTask WriteGoAway(long id) var length = VariableLengthIntegerHelper.GetByteCount(id); - _outgoingFrame.Length = length; + _outgoingFrame.RemainingLength = length; WriteHeaderUnsynchronized(); @@ -253,10 +253,10 @@ internal ValueTask WriteGoAway(long id) private void WriteHeaderUnsynchronized() { _log.Http3FrameSending(_connectionId, _streamIdFeature.StreamId, _outgoingFrame); - var headerLength = WriteHeader(_outgoingFrame.Type, _outgoingFrame.Length, _outputWriter); + var headerLength = WriteHeader(_outgoingFrame.Type, _outgoingFrame.RemainingLength, _outputWriter); // We assume the payload will be written prior to the next flush. - _unflushedBytes += headerLength + _outgoingFrame.Length; + _unflushedBytes += headerLength + _outgoingFrame.RemainingLength; } public ValueTask Write100ContinueAsync() @@ -269,7 +269,7 @@ public ValueTask Write100ContinueAsync() } _outgoingFrame.PrepareHeaders(); - _outgoingFrame.Length = ContinueBytes.Length; + _outgoingFrame.RemainingLength = ContinueBytes.Length; WriteHeaderUnsynchronized(); _outputWriter.Write(ContinueBytes); return TimeFlushUnsynchronizedAsync(); @@ -394,7 +394,7 @@ private void FinishWritingHeaders(int payloadLength, bool done) ValidateHeadersTotalSize(); - _outgoingFrame.Length = _headerEncodingBuffer.WrittenCount; + _outgoingFrame.RemainingLength = _headerEncodingBuffer.WrittenCount; WriteHeaderUnsynchronized(); _outputWriter.Write(_headerEncodingBuffer.WrittenSpan); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs index ac8307de6e46..0ac56eed4b4f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs @@ -68,25 +68,21 @@ public void StreamReset() _dataWriteProcessingTask = ProcessDataWrites().Preserve(); } - public void Dispose() + // Called once Application code has exited + // Or on Dispose which also would occur after Application code finished + public void Complete() { lock (_dataWriterLock) { - if (_disposed) - { - return; - } - - _disposed = true; - Stop(); + _pipeWriter.Complete(); + if (_fakeMemoryOwner != null) { _fakeMemoryOwner.Dispose(); _fakeMemoryOwner = null; } - if (_fakeMemory != null) { ArrayPool.Shared.Return(_fakeMemory); @@ -95,6 +91,21 @@ public void Dispose() } } + public void Dispose() + { + lock (_dataWriterLock) + { + if (_disposed) + { + return; + } + + _disposed = true; + + Complete(); + } + } + // In HTTP/1.x, this aborts the entire connection. For HTTP/3 we abort the stream. void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason) { @@ -288,7 +299,9 @@ public void Stop() _streamCompleted = true; - _pipeWriter.Complete(new OperationCanceledException()); + // Application code could be using this PipeWriter, we cancel the next (or in progress) flush so they can observe this Stop + // Additionally, _streamCompleted will cause any future PipeWriter operations to noop + _pipeWriter.CancelPendingFlush(); } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3PendingStream.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3PendingStream.cs index b6db0bb810db..7dabb9654c56 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3PendingStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3PendingStream.cs @@ -60,8 +60,7 @@ public async ValueTask ReadNextStreamHeaderAsync(Http3StreamContext contex if (!readableBuffer.IsEmpty) { - var value = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out _); - if (value != -1) + if (VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var value)) { if (!advanceOn.HasValue || value == (long)advanceOn) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs index ccf595d7f89f..832ba5b7540a 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs @@ -59,7 +59,6 @@ internal abstract partial class Http3Stream : HttpProtocol, IHttp3Stream, IHttpS private readonly object _completionLock = new(); protected RequestHeaderParsingState _requestHeaderParsingState; - protected readonly Http3RawFrame _incomingFrame = new(); public bool EndStreamReceived => (_completionState & StreamCompletionFlags.EndStreamReceived) == StreamCompletionFlags.EndStreamReceived; public bool IsAborted => (_completionState & StreamCompletionFlags.Aborted) == StreamCompletionFlags.Aborted; @@ -561,6 +560,8 @@ private void CompleteStream(bool errored) TryClose(); } + _http3Output.Complete(); + // Stream will be pooled after app completed. // Wait to signal app completed after any potential aborts on the stream. _appCompletedTaskSource.SetResult(null); @@ -607,6 +608,8 @@ public async Task ProcessRequestAsync(IHttpApplication appli try { + var incomingFrame = new Http3RawFrame(); + var isContinuedFrame = false; while (_isClosed == 0) { var result = await Input.ReadAsync(); @@ -618,12 +621,19 @@ public async Task ProcessRequestAsync(IHttpApplication appli { if (!readableBuffer.IsEmpty) { - while (Http3FrameReader.TryReadFrame(ref readableBuffer, _incomingFrame, out var framePayload)) + while (Http3FrameReader.TryReadFrame(ref readableBuffer, incomingFrame, isContinuedFrame, out var framePayload)) { - Log.Http3FrameReceived(ConnectionId, _streamIdFeature.StreamId, _incomingFrame); + // Only log when parsing the beginning of the frame + if (!isContinuedFrame) + { + Log.Http3FrameReceived(ConnectionId, _streamIdFeature.StreamId, incomingFrame); + } consumed = examined = framePayload.End; - await ProcessHttp3Stream(application, framePayload, result.IsCompleted && readableBuffer.IsEmpty); + await ProcessHttp3Stream(application, incomingFrame, isContinuedFrame, framePayload, result.IsCompleted && readableBuffer.IsEmpty); + + incomingFrame.RemainingLength -= framePayload.Length; + isContinuedFrame = incomingFrame.RemainingLength > 0 ? true : false; } } @@ -746,22 +756,23 @@ private ValueTask OnEndStreamReceived() return RequestBodyPipe.Writer.CompleteAsync(); } - private Task ProcessHttp3Stream(IHttpApplication application, in ReadOnlySequence payload, bool isCompleted) where TContext : notnull + private Task ProcessHttp3Stream(IHttpApplication application, Http3RawFrame incomingFrame, bool isContinuedFrame, + in ReadOnlySequence payload, bool isCompleted) where TContext : notnull { - return _incomingFrame.Type switch + return incomingFrame.Type switch { Http3FrameType.Data => ProcessDataFrameAsync(payload), - Http3FrameType.Headers => ProcessHeadersFrameAsync(application, payload, isCompleted), + Http3FrameType.Headers => ProcessHeadersFrameAsync(application, incomingFrame, isContinuedFrame, payload, isCompleted), // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-7.2.4 // These frames need to be on a control stream Http3FrameType.Settings or Http3FrameType.CancelPush or Http3FrameType.GoAway or Http3FrameType.MaxPushId => throw new Http3ConnectionErrorException( - CoreStrings.FormatHttp3ErrorUnsupportedFrameOnRequestStream(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame), + CoreStrings.FormatHttp3ErrorUnsupportedFrameOnRequestStream(incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame), // The server should never receive push promise Http3FrameType.PushPromise => throw new Http3ConnectionErrorException( - CoreStrings.FormatHttp3ErrorUnsupportedFrameOnServer(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame), + CoreStrings.FormatHttp3ErrorUnsupportedFrameOnServer(incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame), _ => ProcessUnknownFrameAsync(), }; } @@ -773,11 +784,13 @@ private static Task ProcessUnknownFrameAsync() return Task.CompletedTask; } - private async Task ProcessHeadersFrameAsync(IHttpApplication application, ReadOnlySequence payload, bool isCompleted) where TContext : notnull + private async Task ProcessHeadersFrameAsync(IHttpApplication application, Http3RawFrame incomingFrame, bool isContinuedFrame, + ReadOnlySequence payload, bool isCompleted) where TContext : notnull { // HEADERS frame after trailing headers is invalid. // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-4.1 - if (_requestHeaderParsingState == RequestHeaderParsingState.Trailers) + // Since we parse data as we get it, we can receive partial frames which means we need to check that we're in the middle of handling the trailers header frame + if (_requestHeaderParsingState == RequestHeaderParsingState.Trailers && !isContinuedFrame) { throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3StreamErrorFrameReceivedAfterTrailers(Http3Formatting.ToFormattedType(Http3FrameType.Headers)), Http3ErrorCode.UnexpectedFrame, ConnectionEndReason.UnexpectedFrame); } @@ -789,8 +802,17 @@ private async Task ProcessHeadersFrameAsync(IHttpApplication try { - QPackDecoder.Decode(payload, endHeaders: true, handler: this); - QPackDecoder.Reset(); + var endHeaders = payload.Length == incomingFrame.RemainingLength; + QPackDecoder.Decode(payload, endHeaders, handler: this); + if (endHeaders) + { + QPackDecoder.Reset(); + } + else + { + // Headers frame isn't complete, return to read more of the frame + return; + } } catch (QPackDecodingException ex) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.Http3.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.Http3.cs index 4159c927e531..54e32f258f00 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.Http3.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.Http3.cs @@ -37,7 +37,7 @@ public void Http3FrameReceived(string connectionId, long streamId, Http3RawFrame { if (_http3Logger.IsEnabled(LogLevel.Trace)) { - Http3Log.Http3FrameReceived(_http3Logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.Length); + Http3Log.Http3FrameReceived(_http3Logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.RemainingLength); } } @@ -45,7 +45,7 @@ public void Http3FrameSending(string connectionId, long streamId, Http3RawFrame { if (_http3Logger.IsEnabled(LogLevel.Trace)) { - Http3Log.Http3FrameSending(_http3Logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.Length); + Http3Log.Http3FrameSending(_http3Logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.RemainingLength); } } diff --git a/src/Servers/Kestrel/Core/src/Internal/KestrelServerImpl.cs b/src/Servers/Kestrel/Core/src/Internal/KestrelServerImpl.cs index cefdd3d65282..6bcede93dbea 100644 --- a/src/Servers/Kestrel/Core/src/Internal/KestrelServerImpl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/KestrelServerImpl.cs @@ -39,8 +39,9 @@ public KestrelServerImpl( IEnumerable multiplexedFactories, IHttpsConfigurationService httpsConfigurationService, ILoggerFactory loggerFactory, + DiagnosticSource? diagnosticSource, KestrelMetrics metrics) - : this(transportFactories, multiplexedFactories, httpsConfigurationService, CreateServiceContext(options, loggerFactory, diagnosticSource: null, metrics)) + : this(transportFactories, multiplexedFactories, httpsConfigurationService, CreateServiceContext(options, loggerFactory, diagnosticSource, metrics)) { } @@ -111,7 +112,8 @@ private static ServiceContext CreateServiceContext(IOptions ServiceContext.ServerOptions; - private ServiceContext ServiceContext { get; } + // Internal for testing + internal ServiceContext ServiceContext { get; } private KestrelTrace Trace => ServiceContext.Log; diff --git a/src/Servers/Kestrel/Core/src/KestrelServer.cs b/src/Servers/Kestrel/Core/src/KestrelServer.cs index 75cec0130767..7f2909c77cf6 100644 --- a/src/Servers/Kestrel/Core/src/KestrelServer.cs +++ b/src/Servers/Kestrel/Core/src/KestrelServer.cs @@ -36,6 +36,7 @@ public KestrelServer(IOptions options, IConnectionListener Array.Empty(), new SimpleHttpsConfigurationService(), loggerFactory, + diagnosticSource: null, new KestrelMetrics(new DummyMeterFactory())); } diff --git a/src/Servers/Kestrel/Core/src/PublicAPI.Shipped.txt b/src/Servers/Kestrel/Core/src/PublicAPI.Shipped.txt index 9e7d3f10a3d6..5c9b229d4e7e 100644 --- a/src/Servers/Kestrel/Core/src/PublicAPI.Shipped.txt +++ b/src/Servers/Kestrel/Core/src/PublicAPI.Shipped.txt @@ -260,6 +260,8 @@ Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.HandleEndpoint(ul Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Load() -> void Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.LocalhostEndpoint(int port) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.LocalhostEndpoint(int port, System.Action! configure) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! +Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! +Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName, System.Action! configure) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Options.get -> Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions! Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.UnixSocketEndpoint(string! socketPath) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.UnixSocketEndpoint(string! socketPath, System.Action! configure) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! diff --git a/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt b/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt index 562e688fc91b..7dc5c58110bf 100644 --- a/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt +++ b/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! -Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName, System.Action! configure) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! diff --git a/src/Servers/Kestrel/Core/test/KestrelServerTests.cs b/src/Servers/Kestrel/Core/test/KestrelServerTests.cs index a0709d00ad19..e688812a6075 100644 --- a/src/Servers/Kestrel/Core/test/KestrelServerTests.cs +++ b/src/Servers/Kestrel/Core/test/KestrelServerTests.cs @@ -309,6 +309,7 @@ private static KestrelServerImpl CreateKestrelServer( multiplexedFactories, httpsConfigurationService, loggerFactory ?? new LoggerFactory(new[] { new KestrelTestLoggerProvider() }), + diagnosticSource: null, metrics ?? new KestrelMetrics(new TestMeterFactory())); } diff --git a/src/Servers/Kestrel/Core/test/VariableIntHelperTests.cs b/src/Servers/Kestrel/Core/test/VariableIntHelperTests.cs index 8b73bd0e2c48..f8fa53170829 100644 --- a/src/Servers/Kestrel/Core/test/VariableIntHelperTests.cs +++ b/src/Servers/Kestrel/Core/test/VariableIntHelperTests.cs @@ -14,7 +14,8 @@ public class VariableIntHelperTests [MemberData(nameof(IntegerData))] public void CheckDecoding(long expected, byte[] input) { - var decoded = VariableLengthIntegerHelper.GetInteger(new ReadOnlySequence(input), out _, out _); + var result = VariableLengthIntegerHelper.TryGetInteger(new ReadOnlySequence(input), out _, out var decoded); + Assert.True(result); Assert.Equal(expected, decoded); } diff --git a/src/Servers/Kestrel/Kestrel/test/WebHostBuilderKestrelExtensionsTests.cs b/src/Servers/Kestrel/Kestrel/test/WebHostBuilderKestrelExtensionsTests.cs index 759d074a6d82..b24da893ab53 100644 --- a/src/Servers/Kestrel/Kestrel/test/WebHostBuilderKestrelExtensionsTests.cs +++ b/src/Servers/Kestrel/Kestrel/test/WebHostBuilderKestrelExtensionsTests.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.IO.Pipelines; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Server.Kestrel.Core; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; using Microsoft.Extensions.DependencyInjection; @@ -107,6 +109,11 @@ public void ServerIsKestrelServerImpl() .UseKestrel() .Configure(app => { }); - Assert.IsType(hostBuilder.Build().Services.GetService()); + var server = Assert.IsType(hostBuilder.Build().Services.GetService()); + + Assert.NotNull(server.ServiceContext.DiagnosticSource); + Assert.IsType(server.ServiceContext.Metrics); + Assert.Equal(PipeScheduler.ThreadPool, server.ServiceContext.Scheduler); + Assert.Equal(TimeProvider.System, server.ServiceContext.TimeProvider); } } diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Shipped.txt b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Shipped.txt index 95024ad9a9e5..25dce3264f33 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Shipped.txt +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Shipped.txt @@ -1,6 +1,16 @@ #nullable enable Microsoft.AspNetCore.Hosting.WebHostBuilderNamedPipeExtensions +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.CreateNamedPipeServerStreamContext() -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.get -> Microsoft.AspNetCore.Connections.NamedPipeEndPoint! +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.init -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.get -> System.IO.Pipes.PipeOptions +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.init -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.get -> System.IO.Pipes.PipeSecurity? +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.init -> void Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.get -> System.Func! +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.set -> void Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CurrentUserOnly.get -> bool Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CurrentUserOnly.set -> void Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.ListenerQueueCount.get -> int @@ -14,3 +24,4 @@ Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptio Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.PipeSecurity.set -> void static Microsoft.AspNetCore.Hosting.WebHostBuilderNamedPipeExtensions.UseNamedPipes(this Microsoft.AspNetCore.Hosting.IWebHostBuilder! hostBuilder) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder! static Microsoft.AspNetCore.Hosting.WebHostBuilderNamedPipeExtensions.UseNamedPipes(this Microsoft.AspNetCore.Hosting.IWebHostBuilder! hostBuilder, System.Action! configureOptions) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder! +static Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateDefaultNamedPipeServerStream(Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext! context) -> System.IO.Pipes.NamedPipeServerStream! diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt index e5e7753bb42a..7dc5c58110bf 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt @@ -1,12 +1 @@ #nullable enable -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.CreateNamedPipeServerStreamContext() -> void -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.get -> Microsoft.AspNetCore.Connections.NamedPipeEndPoint! -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.init -> void -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.get -> System.IO.Pipes.PipeOptions -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.init -> void -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.get -> System.IO.Pipes.PipeSecurity? -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.init -> void -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.get -> System.Func! -Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.set -> void -static Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateDefaultNamedPipeServerStream(Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext! context) -> System.IO.Pipes.NamedPipeServerStream! diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj index 9258e26fcba1..055f5f8e297e 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj +++ b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj @@ -44,5 +44,6 @@ + diff --git a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs index 64ebcdb07b41..9cae05272fab 100644 --- a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs +++ b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs @@ -395,15 +395,15 @@ private static long GetOutputResponseBufferSize(ServiceContext serviceContext) return bufferSize ?? 0; } - internal ValueTask CreateControlStream() + internal ValueTask CreateControlStream(PipeScheduler clientWriterScheduler = null) { - return CreateControlStream(id: 0); + return CreateControlStream(id: 0, clientWriterScheduler); } - internal async ValueTask CreateControlStream(int? id) + internal async ValueTask CreateControlStream(int? id, PipeScheduler clientWriterScheduler = null) { var testStreamContext = new TestStreamContext(canRead: true, canWrite: false, this); - testStreamContext.Initialize(streamId: 2); + testStreamContext.Initialize(streamId: 2, clientWriterScheduler); var stream = new Http3ControlStream(this, testStreamContext); _runningStreams[stream.StreamId] = stream; @@ -416,16 +416,17 @@ internal async ValueTask CreateControlStream(int? id) return stream; } - internal async ValueTask CreateRequestStream(IEnumerable> headers, Http3RequestHeaderHandler headerHandler = null, bool endStream = false, TaskCompletionSource tsc = null) + internal async ValueTask CreateRequestStream(IEnumerable> headers, + Http3RequestHeaderHandler headerHandler = null, bool endStream = false, TaskCompletionSource tsc = null, PipeScheduler clientWriterScheduler = null) { - var stream = CreateRequestStreamCore(headerHandler); + var stream = CreateRequestStreamCore(headerHandler, clientWriterScheduler); if (tsc is not null) { stream.StartStreamDisposeTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); } - if (headers is not null) + if (headers is not null && headers.Any()) { await stream.SendHeadersAsync(headers, endStream); } @@ -437,9 +438,10 @@ internal async ValueTask CreateRequestStream(IEnumerable CreateRequestStream(Http3HeadersEnumerator headers, Http3RequestHeaderHandler headerHandler = null, bool endStream = false, TaskCompletionSource tsc = null) + internal async ValueTask CreateRequestStream(Http3HeadersEnumerator headers, Http3RequestHeaderHandler headerHandler = null, + bool endStream = false, TaskCompletionSource tsc = null, PipeScheduler clientWriterScheduler = null) { - var stream = CreateRequestStreamCore(headerHandler); + var stream = CreateRequestStreamCore(headerHandler, clientWriterScheduler); if (tsc is not null) { @@ -455,7 +457,7 @@ internal async ValueTask CreateRequestStream(Http3HeadersEnu return stream; } - private Http3RequestStream CreateRequestStreamCore(Http3RequestHeaderHandler headerHandler) + private Http3RequestStream CreateRequestStreamCore(Http3RequestHeaderHandler headerHandler, PipeScheduler clientWriterScheduler) { var requestStreamId = GetStreamId(0x00); if (!_streamContextPool.TryDequeue(out var testStreamContext)) @@ -466,7 +468,7 @@ private Http3RequestStream CreateRequestStreamCore(Http3RequestHeaderHandler hea { Logger.LogDebug($"Reusing context for request stream {requestStreamId}."); } - testStreamContext.Initialize(requestStreamId); + testStreamContext.Initialize(requestStreamId, clientWriterScheduler); return new Http3RequestStream(this, Connection, testStreamContext, headerHandler ?? new Http3RequestHeaderHandler()); } @@ -566,7 +568,7 @@ internal async ValueTask ReceiveFrameAsync(bool expectEnd throw new InvalidOperationException("No data received."); } - if (Http3FrameReader.TryReadFrame(ref buffer, frame, out var framePayload)) + if (Http3FrameReader.TryReadFrame(ref buffer, frame, isContinuedFrame: false, out var framePayload)) { consumed = examined = framePayload.End; frame.Payload = framePayload.ToArray(); @@ -844,16 +846,14 @@ internal async ValueTask> ExpectSettingsAsync() var settings = new Dictionary(); while (true) { - var id = VariableLengthIntegerHelper.GetInteger(payload, out var consumed, out _); - if (id == -1) + if (!VariableLengthIntegerHelper.TryGetInteger(payload, out var consumed, out var id)) { break; } payload = payload.Slice(consumed); - var value = VariableLengthIntegerHelper.GetInteger(payload, out consumed, out _); - if (value == -1) + if (!VariableLengthIntegerHelper.TryGetInteger(payload, out consumed, out var value)) { break; } @@ -934,9 +934,9 @@ public async ValueTask TryReadStreamIdAsync() { if (!readableBuffer.IsEmpty) { - var id = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out examined); - if (id != -1) + if (VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var id)) { + examined = consumed; return id; } } @@ -1013,6 +1013,7 @@ public TestMultiplexedConnectionContext(Http3InMemory testBase) Features.Set(this); Features.Set(this); ConnectionClosedRequested = ConnectionClosingCts.Token; + ConnectionClosed = ConnectionClosedCts.Token; MetricsContext = TestContextFactory.CreateMetricsContext(this); } @@ -1027,6 +1028,8 @@ public TestMultiplexedConnectionContext(Http3InMemory testBase) public CancellationTokenSource ConnectionClosingCts { get; set; } = new CancellationTokenSource(); + public CancellationTokenSource ConnectionClosedCts { get; set; } = new CancellationTokenSource(); + public long Error { get => _error ?? -1; @@ -1046,6 +1049,7 @@ public override void Abort(ConnectionAbortedException abortReason) { ToServerAcceptQueue.Writer.TryComplete(); ToClientAcceptQueue.Writer.TryComplete(); + ConnectionClosedCts.Cancel(); } public override async ValueTask AcceptAsync(CancellationToken cancellationToken = default) @@ -1119,38 +1123,30 @@ public TestStreamContext(bool canRead, bool canWrite, Http3InMemory testBase) _testBase = testBase; } - public void Initialize(long streamId) + public void Initialize(long streamId, PipeScheduler clientWriterScheduler = null) { - if (!_isComplete) - { - // Create new pipes when test stream context is reused rather than reseting them. - // This is required because the client tests read from these directly from these pipes. - // When a request is finished they'll check to see whether there is anymore content - // in the Application.Output pipe. If it has been reset then that code will error. - var inputOptions = Http3InMemory.GetInputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool); - var outputOptions = Http3InMemory.GetOutputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool); - - _inputPipe = new Pipe(inputOptions); - _outputPipe = new Pipe(outputOptions); - - _transportPipeReader = new CompletionPipeReader(_inputPipe.Reader); - _transportPipeWriter = new CompletionPipeWriter(_outputPipe.Writer); - - _pair = new DuplexPipePair( - new DuplexPipe(_transportPipeReader, _transportPipeWriter), - new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer)); - } - else + if (_isComplete) { _pair.Application.Input.Complete(); _pair.Application.Output.Complete(); + } - _transportPipeReader.Reset(); - _transportPipeWriter.Reset(); + // Create new pipes when test stream context is reused rather than reseting them. + // This is required because the client tests read from these directly from these pipes. + // When a request is finished they'll check to see whether there is anymore content + // in the Application.Output pipe. If it has been reset then that code will error. + var inputOptions = Http3InMemory.GetInputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, clientWriterScheduler ?? PipeScheduler.ThreadPool); + var outputOptions = Http3InMemory.GetOutputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool); - _inputPipe.Reset(); - _outputPipe.Reset(); - } + _inputPipe = new Pipe(inputOptions); + _outputPipe = new Pipe(outputOptions); + + _transportPipeReader = new CompletionPipeReader(_inputPipe.Reader); + _transportPipeWriter = new CompletionPipeWriter(_outputPipe.Writer); + + _pair = new DuplexPipePair( + new DuplexPipe(_transportPipeReader, _transportPipeWriter), + new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer)); Features.Set(this); Features.Set(this); diff --git a/src/Servers/Kestrel/shared/test/HttpParsingData.cs b/src/Servers/Kestrel/shared/test/HttpParsingData.cs index 6b240e18b5c8..a301e27e3877 100644 --- a/src/Servers/Kestrel/shared/test/HttpParsingData.cs +++ b/src/Servers/Kestrel/shared/test/HttpParsingData.cs @@ -497,8 +497,10 @@ public static TheoryData HostHeaderData { "GET /pub/WWW/", "www.example.org" }, { "GET http://localhost/", "localhost" }, { "GET http://localhost:80/", "localhost:80" }, + { "GET http://localhost:80/", "localhost" }, { "GET https://localhost/", "localhost" }, { "GET https://localhost:443/", "localhost:443" }, + { "GET https://localhost:443/", "localhost" }, { "CONNECT asp.net:80", "asp.net:80" }, { "CONNECT asp.net:443", "asp.net:443" }, { "CONNECT user-images.githubusercontent.com:443", "user-images.githubusercontent.com:443" }, @@ -534,10 +536,13 @@ public static TheoryData HostHeaderInvalidData data.Add("CONNECT contoso.com", host); } - // port mismatch when target contains port + // port mismatch when target contains default https port data.Add("GET https://contoso.com:443/", "contoso.com:5000"); data.Add("CONNECT contoso.com:443", "contoso.com:5000"); + // port mismatch when target contains default http port + data.Add("GET http://contoso.com:80/", "contoso.com:5000"); + return data; } } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/BadHttpRequestTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/BadHttpRequestTests.cs index d7076dacfd4c..af9d93aea3d6 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/BadHttpRequestTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/BadHttpRequestTests.cs @@ -153,9 +153,12 @@ public Task BadRequestIfHostHeaderDoesNotMatchRequestTarget(string requestTarget } [Theory] - [InlineData("Host: www.foo.comConnection: keep-alive")] // Corrupted - missing line-break - [InlineData("Host: www.notfoo.com")] // Syntactically correct but not matching - public async Task CanOptOutOfBadRequestIfHostHeaderDoesNotMatchRequestTarget(string hostHeader) + [InlineData("http://www.foo.com", "Host: www.foo.comConnection: keep-alive", "www.foo.com")] // Corrupted - missing line-break + [InlineData("http://www.foo.com/", "Host: www.notfoo.com", "www.foo.com")] // Syntactically correct but not matching + [InlineData("http://www.foo.com:80", "Host: www.notfoo.com", "www.foo.com")] // Explicit default port in request string + [InlineData("http://www.foo.com:5129", "Host: www.foo.com", "www.foo.com:5129")] // Non-default port in request string + [InlineData("http://www.foo.com:5129", "Host: www.foo.com:5128", "www.foo.com:5129")] // Different port in host header + public async Task CanOptOutOfBadRequestIfHostHeaderDoesNotMatchRequestTarget(string requestString, string hostHeader, string expectedHost) { var testMeterFactory = new TestMeterFactory(); using var connectionDuration = new MetricCollector(testMeterFactory, "Microsoft.AspNetCore.Server.Kestrel", "kestrel.connection.duration"); @@ -175,13 +178,13 @@ public async Task CanOptOutOfBadRequestIfHostHeaderDoesNotMatchRequestTarget(str { using (var client = server.CreateConnection()) { - await client.SendAll($"GET http://www.foo.com/api/data HTTP/1.1\r\n{hostHeader}\r\n\r\n"); + await client.SendAll($"GET {requestString} HTTP/1.1\r\n{hostHeader}\r\n\r\n"); await client.Receive("HTTP/1.1 200 OK"); } } - Assert.Equal("www.foo.com:80", receivedHost); + Assert.Equal(expectedHost, receivedHost); Assert.Collection(connectionDuration.GetMeasurementSnapshot(), m => MetricsAssert.NoError(m.Tags)); } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs index 06d96adc238f..ab8bc5e9a1e6 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs @@ -360,6 +360,35 @@ await Http3Api.WaitForConnectionErrorAsync( MetricsAssert.Equal(ConnectionEndReason.ClosedCriticalStream, Http3Api.ConnectionTags); } + [Theory] + [InlineData((int)Http3FrameType.Settings, 20_000)] + //[InlineData((int)Http3FrameType.GoAway, 30)] // GoAway frames trigger graceful connection close which races with sending FRAME_ERROR + [InlineData((int)Http3FrameType.CancelPush, 30)] + [InlineData((int)Http3FrameType.MaxPushId, 30)] + [InlineData(int.MaxValue, 20_000)] // Unknown frame type + public async Task ControlStream_ClientToServer_LargeFrame_ConnectionError(int frameType, int length) + { + await Http3Api.InitializeConnectionAsync(_noopApplication); + + var controlStream = await Http3Api.CreateControlStream(); + + // Need to send settings frame before other frames, otherwise it's a connection error + if (frameType != (int)Http3FrameType.Settings) + { + await controlStream.SendSettingsAsync(new List()); + } + + await controlStream.SendFrameAsync((Http3FrameType)frameType, new byte[length]); + + await Http3Api.WaitForConnectionErrorAsync( + ignoreNonGoAwayFrames: true, + expectedLastStreamId: 0, + expectedErrorCode: Http3ErrorCode.FrameError, + matchExpectedErrorMessage: AssertExpectedErrorMessages, + expectedErrorMessage: CoreStrings.FormatHttp3ControlStreamFrameTooLarge(Http3Formatting.ToFormattedType((Http3FrameType)frameType))); + MetricsAssert.Equal(ConnectionEndReason.InvalidFrameLength, Http3Api.ConnectionTags); + } + [Fact] public async Task SETTINGS_MaxFieldSectionSizeSent_ServerReceivesValue() { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs index 6a44a92e6805..b7697117452e 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; using System.Globalization; +using System.IO.Pipelines; using System.Net.Http; using System.Runtime.ExceptionServices; using System.Text; @@ -11,8 +13,8 @@ using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.WebUtilities; +using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; @@ -1977,7 +1979,7 @@ public async Task RequestTrailers_CanReadTrailersFromRequest() var trailers = new[] { new KeyValuePair("TestName", "TestValue"), - }; + }; var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async c => { await c.Request.Body.DrainAsync(default); @@ -2370,6 +2372,21 @@ public Task HEADERS_Received_HeaderBlockOverLimitx2_ConnectionError() return HEADERS_Received_InvalidHeaderFields_StreamError(headers, CoreStrings.BadRequest_HeadersExceedMaxTotalSize, Http3ErrorCode.RequestRejected); } + [Fact] + public Task HEADERS_Received_HeaderValueOverLimit_ConnectionError() + { + var limit = _serviceContext.ServerOptions.Limits.Http3.MaxRequestHeaderFieldSize; + // Single header value exceeds limit + var headers = new[] + { + new KeyValuePair("a", new string('a', limit + 1)), + }; + + return HEADERS_Received_InvalidHeaderFields_StreamError(headers, + SR.Format(SR.net_http_headers_exceeded_length, limit), + Http3ErrorCode.InternalError); + } + [Fact] public async Task HEADERS_Received_TooManyHeaders_431() { @@ -3000,4 +3017,296 @@ public async Task GetMemory_AfterAbort_GetsFakeMemory(int sizeHint) context.Response.BodyWriter.Advance(memory.Length); }, headers); } + + [Fact] + public async Task ControlStream_CloseBeforeSendingSettings() + { + await Http3Api.InitializeConnectionAsync(_noopApplication); + + var outboundcontrolStream = await Http3Api.CreateControlStream(); + + await outboundcontrolStream.EndStreamAsync(); + + await outboundcontrolStream.ReceiveEndAsync(); + } + + [Fact] + public async Task ControlStream_PartialFrameThenClose() + { + await Http3Api.InitializeConnectionAsync(_noopApplication); + + var outboundcontrolStream = await Http3Api.CreateControlStream(); + + var settings = new List + { + new Http3PeerSetting(Internal.Http3.Http3SettingType.MaxFieldSectionSize, 100), + new Http3PeerSetting(Internal.Http3.Http3SettingType.EnableWebTransport, 1), + new Http3PeerSetting(Internal.Http3.Http3SettingType.H3Datagram, 1) + }; + var len = Http3FrameWriter.CalculateSettingsSize(settings); + + Http3FrameWriter.WriteHeader(Http3FrameType.Settings, len, outboundcontrolStream.Pair.Application.Output); + + var parameterLength = VariableLengthIntegerHelper.WriteInteger(outboundcontrolStream.Pair.Application.Output.GetSpan(), (long)Internal.Http3.Http3SettingType.MaxFieldSectionSize); + outboundcontrolStream.Pair.Application.Output.Advance(parameterLength); + await outboundcontrolStream.Pair.Application.Output.FlushAsync(); + + await outboundcontrolStream.EndStreamAsync(); + + await outboundcontrolStream.ReceiveEndAsync(); + } + + [Fact] + public async Task SendDataObservesBackpressureFromApp() + { + var headers = new[] + { + new KeyValuePair(InternalHeaderNames.Method, "Custom"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + new KeyValuePair(InternalHeaderNames.Authority, "localhost:80"), + }; + + // Http3Stream hardcodes a 64k size for the RequestBodyPipe there is also the transport Pipe which we can influence with MaxRequestBufferSize + // So we need to send enough to fill up the 64k Pipe as well as the 100 byte Pipe. + var sendSize = 1024 * 65; + _serviceContext.ServerOptions.Limits.MaxRequestBufferSize = 100; + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var startedReadingTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async c => + { + // Read a single byte to make sure data has gotten here before we start verifying backpressure in the test code + var res = await c.Request.BodyReader.ReadAsync(); + Assert.Equal(sendSize, res.Buffer.Length); + c.Request.BodyReader.AdvanceTo(res.Buffer.Slice(1).Start); + startedReadingTcs.SetResult(); + + await tcs.Task; + res = await c.Request.BodyReader.ReadAsync(); + Assert.Equal(sendSize - 1, res.Buffer.Length); + c.Request.BodyReader.AdvanceTo(res.Buffer.End); + }, headers); + + var sendTask = requestStream.SendDataAsync(Encoding.ASCII.GetBytes(new string('a', sendSize))); + + // Wait for "app" code to start reading to ensure it has gotten bytes before we start verifying backpressure + await startedReadingTcs.Task; + Assert.False(sendTask.IsCompleted); + tcs.SetResult(); + + await sendTask; + + var responseHeaders = await requestStream.ExpectHeadersAsync(); + Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); + + await requestStream.ExpectReceiveEndOfStream(); + } + + [Fact] + public async Task Request_FrameParsingSingleByteAtATimeWorks() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var total = 0; + var trailerValue = string.Empty; + await Http3Api.InitializeConnectionAsync(async context => + { + var buffer = new byte[100]; + var read = await context.Request.Body.ReadAsync(buffer, 0, buffer.Length); + var captureTcs = tcs; + tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + captureTcs.SetResult(); + Assert.Equal(1, read); + total = read; + while (read > 0) + { + read = await context.Request.Body.ReadAsync(buffer, total, buffer.Length - total); + captureTcs = tcs; + tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + captureTcs.SetResult(); + total += read; + if (read == 0) + { + break; + } + Assert.Equal(1, read); + } + + trailerValue = context.Request.GetTrailer("TestName"); + }); + + // Use Inline scheduling and buffer size of 1 to guarantee each write will wait for the parsing loop to complete before writing more data + _serviceContext.ServerOptions.Limits.MaxRequestBufferSize = 1; + var stream = await Http3Api.CreateRequestStream(headers: [], clientWriterScheduler: PipeScheduler.Inline); + + // Use local pipe to write frames so we can get the entire buffer in order to write it one byte at a time + var bufferPipe = new Pipe(); + Http3FrameWriter.WriteHeader(Http3FrameType.Headers, frameLength: 38, bufferPipe.Writer); + + var headersTotalSize = 0; + var headers = new Http3HeadersEnumerator(); + headers.Initialize(new Dictionary() { + { InternalHeaderNames.Method, "POST" }, + { InternalHeaderNames.Path, "/" }, + { InternalHeaderNames.Scheme, "http" }, }); + + var mem = bufferPipe.Writer.GetMemory(); + var done = QPackHeaderWriter.BeginEncodeHeaders(headers, mem.Span, ref headersTotalSize, out var length); + Assert.True(done); + bufferPipe.Writer.Advance(length); + await bufferPipe.Writer.FlushAsync(); + + // Write header frame one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, stream.Pair.Application.Output); + + Http3FrameWriter.WriteHeader(Http3FrameType.Data, frameLength: 12, bufferPipe.Writer); + await bufferPipe.Writer.FlushAsync(); + + // Write data header one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, stream.Pair.Application.Output); + + bufferPipe.Writer.Write(new byte[12]); + await bufferPipe.Writer.FlushAsync(); + + // Write data in data frame one byte at a time + // Don't use WriteOneByteAtATime() as we want to wait on the TCS after every flush to make sure app code consumed the data + // before we send another byte + var res = await bufferPipe.Reader.ReadAsync(); + for (var i = 0; i < res.Buffer.Length; i++) + { + mem = stream.Pair.Application.Output.GetMemory(); + mem.Span[0] = res.Buffer.Slice(i).FirstSpan[0]; + stream.Pair.Application.Output.Advance(1); + // Use TCS to make sure app can read data before we send more + var capturedTcs = tcs; + await stream.Pair.Application.Output.FlushAsync(); + await capturedTcs.Task; + } + bufferPipe.Reader.AdvanceTo(res.Buffer.End); + + var trailers = new Http3HeadersEnumerator(); + trailers.Initialize(new Dictionary() + { + { "TestName", "TestValue" } + }); + + Http3FrameWriter.WriteHeader(Http3FrameType.Headers, frameLength: 22, bufferPipe.Writer); + mem = bufferPipe.Writer.GetMemory(); + done = QPackHeaderWriter.BeginEncodeHeaders(trailers, mem.Span, ref headersTotalSize, out length); + Assert.True(done); + bufferPipe.Writer.Advance(length); + await bufferPipe.Writer.FlushAsync(); + + // Write trailer frame one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, stream.Pair.Application.Output); + + await stream.EndStreamAsync(); + + var responseHeaders = await stream.ExpectHeadersAsync(); + Assert.Equal(3, responseHeaders.Count); + Assert.Contains("date", responseHeaders.Keys, StringComparer.OrdinalIgnoreCase); + Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); + Assert.Equal("0", responseHeaders["content-length"]); + + await stream.ExpectReceiveEndOfStream(); + + Assert.Equal(12, total); + Assert.Equal("TestValue", trailerValue); + } + + [Fact] + public async Task Control_FrameParsingSingleByteAtATimeWorks() + { + await Http3Api.InitializeConnectionAsync(_noopApplication); + + // Use Inline scheduling and buffer size of 1 to guarantee each write will wait for the parsing loop to complete before writing more data + _serviceContext.ServerOptions.Limits.MaxRequestBufferSize = 1; + var outboundcontrolStream = await Http3Api.CreateControlStream(clientWriterScheduler: PipeScheduler.Inline); + + // Use local pipe to write frames so we can get the entire buffer in order to write it one byte at a time + var bufferPipe = new Pipe(); + + var settings = new List + { + new Http3PeerSetting(Internal.Http3.Http3SettingType.MaxFieldSectionSize, 100), + new Http3PeerSetting(Internal.Http3.Http3SettingType.EnableWebTransport, 1), + new Http3PeerSetting(Internal.Http3.Http3SettingType.H3Datagram, 1) + }; + var len = Http3FrameWriter.CalculateSettingsSize(settings); + + Http3FrameWriter.WriteHeader(Http3FrameType.Settings, len, bufferPipe.Writer); + var mem = bufferPipe.Writer.GetMemory(); + Http3FrameWriter.WriteSettings(settings, mem.Span); + + bufferPipe.Writer.Advance(len); + await bufferPipe.Writer.FlushAsync(); + + // Write Settings frame one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, outboundcontrolStream.Pair.Application.Output); + + var fieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); + + Assert.Equal(Internal.Http3.Http3SettingType.MaxFieldSectionSize, fieldSetting.Key); + Assert.Equal(100, fieldSetting.Value); + + fieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); + Assert.Equal(Internal.Http3.Http3SettingType.EnableWebTransport, fieldSetting.Key); + Assert.Equal(1, fieldSetting.Value); + + fieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); + Assert.Equal(Internal.Http3.Http3SettingType.H3Datagram, fieldSetting.Key); + Assert.Equal(1, fieldSetting.Value); + + // Frames must be well-formed otherwise we close the connection with a frame error + Http3FrameWriter.WriteHeader(Http3FrameType.CancelPush, frameLength: 2, bufferPipe.Writer); + var idLength = VariableLengthIntegerHelper.WriteInteger(bufferPipe.Writer.GetSpan(), longToEncode: 1026); + bufferPipe.Writer.Advance(idLength); + await bufferPipe.Writer.FlushAsync(); + + // Write CancelPush frame one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, outboundcontrolStream.Pair.Application.Output); + + // Frames must be well-formed otherwise we close the connection with a frame error + Http3FrameWriter.WriteHeader(Http3FrameType.GoAway, frameLength: 4, bufferPipe.Writer); + idLength = VariableLengthIntegerHelper.WriteInteger(bufferPipe.Writer.GetSpan(), longToEncode: 100026); + bufferPipe.Writer.Advance(idLength); + await bufferPipe.Writer.FlushAsync(); + + try + { + // Write GoAway frame one byte at a time + await WriteOneByteAtATime(bufferPipe.Reader, outboundcontrolStream.Pair.Application.Output); + } + // As soon as the GOAWAY frame identifier is processed we initiate the connection close process. + // That means it's possible to still be writing to the stream when we close the + // connection which would result in an exception. We'll just ignore the exception in this case. + catch (Exception) { } + + await outboundcontrolStream.EndStreamAsync(); + + // Check that connection is closed. + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + Http3Api.MultiplexedConnectionContext.ConnectionClosed.Register(() => tcs.TrySetResult()); + await tcs.Task; + + await outboundcontrolStream.ReceiveEndAsync(); + } + + private async Task WriteOneByteAtATime(PipeReader reader, PipeWriter writer) + { + var res = await reader.ReadAsync(); + try + { + for (var i = 0; i < res.Buffer.Length; i++) + { + var mem = writer.GetMemory(); + mem.Span[0] = res.Buffer.Slice(i).FirstSpan[0]; + writer.Advance(1); + await writer.FlushAsync(); + } + } + finally + { + reader.AdvanceTo(res.Buffer.End); + } + } } diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs index 1b7ae1ff0132..8fe339e066d5 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; using System.Diagnostics; using System.Diagnostics.Metrics; using System.Net; @@ -1145,6 +1146,137 @@ public async Task POST_Bidirectional_LargeData_Cancellation_Error(HttpProtocols } } + internal class MemoryPoolFeature : IMemoryPoolFeature + { + public MemoryPool MemoryPool { get; set; } + } + + [ConditionalTheory] + [MsQuicSupported] + [InlineData(HttpProtocols.Http3)] + [InlineData(HttpProtocols.Http2)] + public async Task ApplicationWriteWhenConnectionClosesPreservesMemory(HttpProtocols protocol) + { + // Arrange + var memoryPool = new DiagnosticMemoryPool(new PinnedBlockMemoryPool(), allowLateReturn: true); + + var writingTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var cancelTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var completionTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + var builder = CreateHostBuilder(async context => + { + try + { + var requestBody = context.Request.Body; + + await context.Response.BodyWriter.FlushAsync(); + + // Test relies on Htt2Stream/Http3Stream aborting the token after stopping Http2OutputProducer/Http3OutputProducer + // It's very fragile but it is sort of a best effort test anyways + // Additionally, Http2 schedules it's stopping, so doesn't directly do anything to the PipeWriter when calling stop on Http2OutputProducer + context.RequestAborted.Register(() => + { + cancelTcs.SetResult(); + }); + + while (true) + { + var memory = context.Response.BodyWriter.GetMemory(); + + // Unblock client-side to close the connection + writingTcs.TrySetResult(); + + await cancelTcs.Task; + + // Verify memory is still rented from the memory pool after the producer has been stopped + Assert.True(memoryPool.ContainsMemory(memory)); + + context.Response.BodyWriter.Advance(memory.Length); + var flushResult = await context.Response.BodyWriter.FlushAsync(); + + if (flushResult.IsCanceled || flushResult.IsCompleted) + { + break; + } + } + + completionTcs.SetResult(); + } + catch (Exception ex) + { + writingTcs.TrySetException(ex); + // Exceptions annoyingly don't show up on the client side when doing E2E + cancellation testing + // so we need to use a TCS to observe any unexpected errors + completionTcs.TrySetException(ex); + throw; + } + }, protocol: protocol, + configureKestrel: o => + { + o.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions => + { + listenOptions.Protocols = protocol; + listenOptions.UseHttps(TestResources.GetTestCertificate()).Use(@delegate => + { + // Connection middleware for Http/1.1 and Http/2 + return (context) => + { + // Set the memory pool used by the connection so we can observe if memory from the PipeWriter is still rented from the pool + context.Features.Set(new MemoryPoolFeature() { MemoryPool = memoryPool }); + return @delegate(context); + }; + }); + + IMultiplexedConnectionBuilder multiplexedConnectionBuilder = listenOptions; + multiplexedConnectionBuilder.Use(@delegate => + { + // Connection middleware for Http/3 + return (context) => + { + // Set the memory pool used by the connection so we can observe if memory from the PipeWriter is still rented from the pool + context.Features.Set(new MemoryPoolFeature() { MemoryPool = memoryPool }); + return @delegate(context); + }; + }); + }); + }); + + var httpClientHandler = new HttpClientHandler(); + httpClientHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; + + using (var host = builder.Build()) + using (var client = new HttpClient(httpClientHandler)) + { + await host.StartAsync().DefaultTimeout(); + + var cts = new CancellationTokenSource(); + + var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); + request.Version = GetProtocol(protocol); + request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; + + // Act + var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); + + Logger.LogInformation("Client waiting for headers."); + var response = await responseTask.DefaultTimeout(); + await writingTcs.Task; + + Logger.LogInformation("Client canceled request."); + response.Dispose(); + + // Assert + await host.StopAsync().DefaultTimeout(); + + await completionTcs.Task; + + memoryPool.Dispose(); + + await memoryPool.WhenAllBlocksReturnedAsync(TimeSpan.FromSeconds(15)); + } + } + // Verify HTTP/2 and HTTP/3 match behavior [ConditionalTheory] [MsQuicSupported] diff --git a/src/Shared/Buffers.MemoryPool/DiagnosticMemoryPool.cs b/src/Shared/Buffers.MemoryPool/DiagnosticMemoryPool.cs index 2a35f095e630..2250dd045427 100644 --- a/src/Shared/Buffers.MemoryPool/DiagnosticMemoryPool.cs +++ b/src/Shared/Buffers.MemoryPool/DiagnosticMemoryPool.cs @@ -160,4 +160,27 @@ public async Task WhenAllBlocksReturnedAsync(TimeSpan timeout) await task; } + + public bool ContainsMemory(Memory memory) + { + lock (_syncObj) + { + foreach (var block in _blocks) + { + unsafe + { + fixed (byte* inUseMemoryPtr = memory.Span) + fixed (byte* beginPooledMemoryPtr = block.Memory.Span) + { + byte* endPooledMemoryPtr = beginPooledMemoryPtr + block.Memory.Length; + if (inUseMemoryPtr >= beginPooledMemoryPtr && inUseMemoryPtr < endPooledMemoryPtr) + { + return true; + } + } + } + } + return false; + } + } } diff --git a/src/Shared/CertificateGeneration/CertificateManager.cs b/src/Shared/CertificateGeneration/CertificateManager.cs index 96e5630c43f1..491eb5adb974 100644 --- a/src/Shared/CertificateGeneration/CertificateManager.cs +++ b/src/Shared/CertificateGeneration/CertificateManager.cs @@ -328,6 +328,7 @@ public EnsureCertificateResult EnsureAspNetCoreHttpsDevelopmentCertificate( var exportDir = Path.GetDirectoryName(path); if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir)) { + result = EnsureCertificateResult.ErrorExportingTheCertificateToNonExistentDirectory; throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); } diff --git a/src/Shared/CertificateGeneration/EnsureCertificateResult.cs b/src/Shared/CertificateGeneration/EnsureCertificateResult.cs index cb6b7e145428..5c28eaca3063 100644 --- a/src/Shared/CertificateGeneration/EnsureCertificateResult.cs +++ b/src/Shared/CertificateGeneration/EnsureCertificateResult.cs @@ -10,6 +10,7 @@ internal enum EnsureCertificateResult ErrorCreatingTheCertificate, ErrorSavingTheCertificateIntoTheCurrentUserPersonalStore, ErrorExportingTheCertificate, + ErrorExportingTheCertificateToNonExistentDirectory, FailedToTrustTheCertificate, PartiallyFailedToTrustTheCertificate, UserCancelledTrustStep, diff --git a/src/Shared/CertificateGeneration/UnixCertificateManager.cs b/src/Shared/CertificateGeneration/UnixCertificateManager.cs index c583c4d370ed..9212fc475cf7 100644 --- a/src/Shared/CertificateGeneration/UnixCertificateManager.cs +++ b/src/Shared/CertificateGeneration/UnixCertificateManager.cs @@ -62,18 +62,32 @@ public override TrustLevel GetTrustLevel(X509Certificate2 certificate) // Building the chain will check whether dotnet trusts the cert. We could, instead, // enumerate the Root store and/or look for the file in the OpenSSL directory, but // this tests the real-world behavior. - using var chain = new X509Chain(); - // This is just a heuristic for whether or not we should prompt the user to re-run with `--trust` - // so we don't need to check revocation (which doesn't really make sense for dev certs anyway) - chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; - if (chain.Build(certificate)) + var chain = new X509Chain(); + try { - sawTrustSuccess = true; + // This is just a heuristic for whether or not we should prompt the user to re-run with `--trust` + // so we don't need to check revocation (which doesn't really make sense for dev certs anyway) + chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; + if (chain.Build(certificate)) + { + sawTrustSuccess = true; + } + else + { + sawTrustFailure = true; + Log.UnixNotTrustedByDotnet(); + } } - else + finally { - sawTrustFailure = true; - Log.UnixNotTrustedByDotnet(); + // Disposing the chain does not dispose the elements we potentially built. + // Do the full walk manually to dispose. + for (var i = 0; i < chain.ChainElements.Count; i++) + { + chain.ChainElements[i].Certificate.Dispose(); + } + + chain.Dispose(); } // Will become the name of the file on disk and the nickname in the NSS DBs @@ -94,7 +108,7 @@ public override TrustLevel GetTrustLevel(X509Certificate2 certificate) var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); if (File.Exists(certPath)) { - var candidate = X509CertificateLoader.LoadCertificateFromFile(certPath); + using var candidate = X509CertificateLoader.LoadCertificateFromFile(certPath); if (AreCertificatesEqual(certificate, candidate)) { foundCert = true; diff --git a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs index fc1d5c847d74..e83e87423745 100644 --- a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs +++ b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs @@ -30,6 +30,29 @@ public static void ThrowIfNull( #endif } + /// Throws an if is null or empty. + /// The argument to validate as non-null and non-empty. + /// The name of the parameter with which corresponds. + public static void ThrowIfNullOrEmpty( +#if INTERNAL_NULLABLE_ATTRIBUTES || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER + [NotNull] +#endif + string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) + { +#if !NET7_0_OR_GREATER || NETSTANDARD || NETFRAMEWORK + if (argument is null) + { + Throw(paramName); + } + else if (argument.Length == 0) + { + throw new ArgumentException("Must not be null or empty", paramName); + } +#else + ArgumentException.ThrowIfNullOrEmpty(argument, paramName); +#endif + } + #if !NET7_0_OR_GREATER || NETSTANDARD || NETFRAMEWORK #if INTERNAL_NULLABLE_ATTRIBUTES || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER [DoesNotReturn] diff --git a/src/Shared/runtime/Http3/Helpers/VariableLengthIntegerHelper.cs b/src/Shared/runtime/Http3/Helpers/VariableLengthIntegerHelper.cs index 3a343a62a4cc..c7f1ec908d0f 100644 --- a/src/Shared/runtime/Http3/Helpers/VariableLengthIntegerHelper.cs +++ b/src/Shared/runtime/Http3/Helpers/VariableLengthIntegerHelper.cs @@ -128,19 +128,19 @@ static bool TryReadSlow(ref SequenceReader reader, out long value) } } - public static long GetInteger(in ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined) + // If callsite has 'examined', set it to buffer.End if the integer wasn't successfully read, otherwise set examined = consumed. + public static bool TryGetInteger(in ReadOnlySequence buffer, out SequencePosition consumed, out long integer) { var reader = new SequenceReader(buffer); - if (TryRead(ref reader, out long value)) + if (TryRead(ref reader, out integer)) { - consumed = examined = buffer.GetPosition(reader.Consumed); - return value; + consumed = buffer.GetPosition(reader.Consumed); + return true; } else { - consumed = default; - examined = buffer.End; - return -1; + consumed = buffer.Start; + return false; } } diff --git a/src/Shared/test/Shared.Tests/runtime/Http3/VariableLengthIntegerHelperTests.cs b/src/Shared/test/Shared.Tests/runtime/Http3/VariableLengthIntegerHelperTests.cs index d67d24c0ba25..e461bfd41ed4 100644 --- a/src/Shared/test/Shared.Tests/runtime/Http3/VariableLengthIntegerHelperTests.cs +++ b/src/Shared/test/Shared.Tests/runtime/Http3/VariableLengthIntegerHelperTests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -223,12 +223,12 @@ public void GetInteger_ValidSegmentedSequence() MemorySegment memorySegment2 = memorySegment1.Append(new byte[] { 0, 0, 0, 0, 0, 0, 2 }); ReadOnlySequence readOnlySequence = new ReadOnlySequence( memorySegment1, 0, memorySegment2, memorySegment2.Memory.Length); - long result = VariableLengthIntegerHelper.GetInteger(readOnlySequence, - out SequencePosition consumed, out SequencePosition examined); + bool result = VariableLengthIntegerHelper.TryGetInteger(readOnlySequence, + out SequencePosition consumed, out long integer); - Assert.Equal(2, result); + Assert.True(result); + Assert.Equal(2, integer); Assert.Equal(7, consumed.GetInteger()); - Assert.Equal(7, examined.GetInteger()); } [Fact] @@ -238,12 +238,11 @@ public void GetInteger_NotValidSegmentedSequence() MemorySegment memorySegment2 = memorySegment1.Append(new byte[] { 0, 0, 0, 0, 0, 2 }); ReadOnlySequence readOnlySequence = new ReadOnlySequence( memorySegment1, 0, memorySegment2, memorySegment2.Memory.Length); - long result = VariableLengthIntegerHelper.GetInteger(readOnlySequence, - out SequencePosition consumed, out SequencePosition examined); + bool result = VariableLengthIntegerHelper.TryGetInteger(readOnlySequence, + out SequencePosition consumed, out long integer); - Assert.Equal(-1, result); + Assert.False(result); Assert.Equal(0, consumed.GetInteger()); - Assert.Equal(6, examined.GetInteger()); } [Fact] diff --git a/src/SignalR/clients/java/signalr/build.gradle b/src/SignalR/clients/java/signalr/build.gradle index 7314185e2fa4..3e192445c97e 100644 --- a/src/SignalR/clients/java/signalr/build.gradle +++ b/src/SignalR/clients/java/signalr/build.gradle @@ -6,13 +6,12 @@ buildscript { } dependencies { classpath "com.diffplug.spotless:spotless-plugin-gradle:6.6.1" - classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0' } } plugins { id 'java' - id 'maven' + id 'maven-publish' } allprojects { @@ -22,7 +21,9 @@ allprojects { // If we're run from outside MSBuild, just assign a bogus dev version. version project.findProperty('packageVersion') ?: "99.99.99-dev" - sourceCompatibility = 1.8 + java { + sourceCompatibility = 1.9 + } repositories { mavenCentral() @@ -52,4 +53,4 @@ spotless { indentWithSpaces(4) removeUnusedImports() // removes any unused imports } -} \ No newline at end of file +} diff --git a/src/SignalR/clients/java/signalr/core/build.gradle b/src/SignalR/clients/java/signalr/core/build.gradle index 8d6dbc010274..146655b3490b 100644 --- a/src/SignalR/clients/java/signalr/core/build.gradle +++ b/src/SignalR/clients/java/signalr/core/build.gradle @@ -1,10 +1,15 @@ plugins { id 'java' - id 'maven' + id 'maven-publish' } group 'com.microsoft.signalr' +java { + withJavadocJar() + withSourcesJar() +} + dependencies { implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.squareup.okhttp3:okhttp:4.12.0' @@ -12,49 +17,51 @@ dependencies { implementation 'org.slf4j:slf4j-api:1.7.25' } -archivesBaseName = 'signalr' - -task sourceJar(type: Jar) { - classifier "sources" - from sourceSets.main.allJava +base { + archivesName = 'signalr' } -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier "javadoc" - from javadoc.destinationDir -} +publishing { + publications { + release(MavenPublication) { + from components.java -task generatePOM { - pom { - project { artifactId 'signalr' - inceptionYear '2018' - description 'ASP.NET Core SignalR Client for Java applications' - url 'https://github.com/dotnet/aspnetcore' - name groupId + ':' + artifactId - licenses { - license { - name 'MIT License' - url 'https://opensource.org/licenses/MIT' - distribution 'repo' + + pom { + packaging = 'jar' + inceptionYear = '2018' + url = 'https://github.com/dotnet/aspnetcore' + name = groupId + ':' + artifactId + description = 'ASP.NET Core SignalR Client for Java applications' + licenses { + license { + name = 'MIT License' + url = 'https://opensource.org/licenses/MIT' + distribution = 'repo' + } } - } - scm { - connection 'scm:git:https://github.com/dotnet/aspnetcore.git' - developerConnection 'scm:git:https://github.com/dotnet/aspnetcore.git' - url 'https://github.com/dotnet/aspnetcore/tree/main' - } - developers { - developer { - id 'microsoft' - name 'Microsoft' + scm { + connection = 'scm:git:https://github.com/dotnet/aspnetcore.git' + developerConnection = 'scm:git:https://github.com/dotnet/aspnetcore.git' + url = 'https://github.com/dotnet/aspnetcore/tree/main' + } + developers { + developer { + id = 'microsoft' + name = 'Microsoft' + } } } } - }.writeTo("${buildDir}/libs/signalr-${project.version}.pom") + } } -task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM]) +tasks.withType(GenerateMavenPom).all { + def matcher = name =~ /generatePomFileFor(\w+)Publication/ + def publicationName = matcher[0][1] + destination = layout.buildDirectory.file("libs/signalr-${project.version}.pom").get().asFile +} task generateVersionClass { inputs.property "version", project.version diff --git a/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/DefaultHttpClient.java b/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/DefaultHttpClient.java index 767f306cd9b6..3ef3a6968843 100644 --- a/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/DefaultHttpClient.java +++ b/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/DefaultHttpClient.java @@ -116,9 +116,9 @@ public Single send(HttpRequest httpRequest, ByteBuffer bodyContent case "POST": RequestBody body; if (bodyContent != null) { - body = RequestBody.create(MediaType.parse("text/plain"), ByteString.of(bodyContent)); + body = RequestBody.Companion.create(ByteString.of(bodyContent), MediaType.parse("text/plain")); } else { - body = RequestBody.create(null, new byte[]{}); + body = RequestBody.Companion.create(new byte[]{}, null); } requestBuilder.post(body); diff --git a/src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.properties b/src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.properties index 3eb10089fafd..df5ca3a8b779 100644 --- a/src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.properties +++ b/src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=23e7d37e9bb4f8dabb8a3ea7fdee9dd0428b9b1a71d298aefd65b11dccea220f -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/SignalR/clients/java/signalr/messagepack/build.gradle b/src/SignalR/clients/java/signalr/messagepack/build.gradle index 4787c62e3aae..69e0802b51a9 100644 --- a/src/SignalR/clients/java/signalr/messagepack/build.gradle +++ b/src/SignalR/clients/java/signalr/messagepack/build.gradle @@ -1,56 +1,64 @@ plugins { id 'java' - id 'maven' + id 'maven-publish' } group 'com.microsoft.signalr.messagepack' +java +{ + withJavadocJar() + withSourcesJar() +} + dependencies { implementation project(':core') - compile 'org.msgpack:msgpack-core:0.8.20' - compile 'org.msgpack:jackson-dataformat-msgpack:0.8.20' + implementation 'org.msgpack:msgpack-core:0.8.20' + implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20' } -archivesBaseName = 'signalr-messagepack' - -task sourceJar(type: Jar) { - classifier "sources" - from sourceSets.main.allJava +base { + archivesName = 'signalr-messagepack' } -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier "javadoc" - from javadoc.destinationDir -} +publishing { + publications { + release(MavenPublication) { + from components.java -task generatePOM { - pom { - project { artifactId 'signalr-messagepack' - inceptionYear '2020' - description 'MessagePack protocol implementation for ASP.NET Core SignalR Client for Java applications' - url 'https://github.com/dotnet/aspnetcore' - name groupId + ':' + artifactId - licenses { - license { - name 'MIT License' - url 'https://opensource.org/licenses/MIT' - distribution 'repo' + + pom { + packaging = 'jar' + inceptionYear = '2020' + url = 'https://github.com/dotnet/aspnetcore' + name = groupId + ':' + artifactId + description = 'MessagePack protocol implementation for ASP.NET Core SignalR Client for Java applications' + licenses { + license { + name = 'MIT License' + url = 'https://opensource.org/licenses/MIT' + distribution = 'repo' + } } - } - scm { - connection 'scm:git:https://github.com/dotnet/aspnetcore.git' - developerConnection 'scm:git:https://github.com/dotnet/aspnetcore.git' - url 'https://github.com/dotnet/aspnetcore/tree/main' - } - developers { - developer { - id 'microsoft' - name 'Microsoft' + scm { + connection = 'scm:git:https://github.com/dotnet/aspnetcore.git' + developerConnection = 'scm:git:https://github.com/dotnet/aspnetcore.git' + url = 'https://github.com/dotnet/aspnetcore/tree/main' + } + developers { + developer { + id = 'microsoft' + name = 'Microsoft' + } } } } - }.writeTo("${buildDir}/libs/signalr-messagepack-${project.version}.pom") + } } -task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM]) +tasks.withType(GenerateMavenPom).all { + def matcher = name =~ /generatePomFileFor(\w+)Publication/ + def publicationName = matcher[0][1] + destination = layout.buildDirectory.file("libs/signalr-messagepack-${project.version}.pom").get().asFile +} diff --git a/src/SignalR/clients/java/signalr/test/build.gradle b/src/SignalR/clients/java/signalr/test/build.gradle index 2fefd54f6481..27b81b32c947 100644 --- a/src/SignalR/clients/java/signalr/test/build.gradle +++ b/src/SignalR/clients/java/signalr/test/build.gradle @@ -1,16 +1,61 @@ -apply plugin: 'org.junit.platform.gradle.plugin' +plugins { + id 'java' +} + +configurations { + antJUnit +} dependencies { - implementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' - compile 'org.junit.jupiter:junit-jupiter-params:5.3.1' - runtime 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + implementation 'org.junit.jupiter:junit-jupiter-params:5.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter:5.11.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.2' implementation 'com.google.code.gson:gson:2.8.5' - compile 'ch.qos.logback:logback-classic:1.2.3' + implementation 'ch.qos.logback:logback-classic:1.2.3' implementation project(':core') implementation project(':messagepack') - compile project(':messagepack') + implementation project(':messagepack') + antJUnit 'org.apache.ant:ant-junit:1.10.15' +} + +sourceSets { + test { + java { + srcDir 'src' + } + } +} + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } + + reports { + html.required = false + junitXml.outputPerTestCase = true + junitXml.required = true + } +} + +// Merge test results into a single file for Helix to detect JUnit test file +task testReport { + ext { + resultsDir = file("$buildDir/test-results") + mergedFile = "test-results/junit-results.xml" + } + + doLast { + mkdir 'test-results' + ant.taskdef(name: 'junitreport', + classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator', + classpath: configurations.antJUnit.asPath) + + ant.junitreport(tofile: mergedFile) { + fileset(dir: resultsDir, includes: '**/TEST-*.xml') + } + } } -junitPlatform { - reportsDir file('test-results') -} \ No newline at end of file +test.finalizedBy(testReport) \ No newline at end of file diff --git a/src/SignalR/clients/java/signalr/test/signalr.client.java.Tests.javaproj b/src/SignalR/clients/java/signalr/test/signalr.client.java.Tests.javaproj index 3e8dfac79be9..8068629f03b3 100644 --- a/src/SignalR/clients/java/signalr/test/signalr.client.java.Tests.javaproj +++ b/src/SignalR/clients/java/signalr/test/signalr.client.java.Tests.javaproj @@ -6,6 +6,8 @@ true true + + OSX.15.Amd64.Open;$(SkipHelixQueues) $(OutputPath) true @@ -49,8 +51,8 @@ - - + + diff --git a/src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/GsonHubProtocolTest.java b/src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/GsonHubProtocolTest.java index 53454be031b6..d696a74850eb 100644 --- a/src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/GsonHubProtocolTest.java +++ b/src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/GsonHubProtocolTest.java @@ -444,7 +444,7 @@ public void invocationBindingFailureWhenParsingLocalDateTimeWithoutAppropriateTy assertEquals(HubMessageType.INVOCATION_BINDING_FAILURE, message.getMessageType()); InvocationBindingFailureMessage failureMessage = (InvocationBindingFailureMessage) messages.get(0); - assertEquals("java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 41 path $.arguments[0]", failureMessage.getException().getMessage()); + assertEquals("com.google.gson.JsonSyntaxException", failureMessage.getException().getClass().getName()); } @Test diff --git a/src/SignalR/clients/ts/FunctionalTests/package.json b/src/SignalR/clients/ts/FunctionalTests/package.json index 515f26d01c9b..e830b4a64979 100644 --- a/src/SignalR/clients/ts/FunctionalTests/package.json +++ b/src/SignalR/clients/ts/FunctionalTests/package.json @@ -1,5 +1,5 @@ { - "name": "functionaltests", + "name": "@microsoft/functionaltests", "private": true, "version": "1.0.0", "description": "", diff --git a/src/SignalR/clients/ts/package.json b/src/SignalR/clients/ts/package.json index b353c6f9e48d..c88f93d1b94f 100644 --- a/src/SignalR/clients/ts/package.json +++ b/src/SignalR/clients/ts/package.json @@ -1,5 +1,5 @@ { - "name": "client-ts", + "name": "@microsoft/client-ts", "version": "1.0.0", "description": "Common dependencies used during dev time. DO NOT PUBLISH", "private": true, diff --git a/src/SignalR/clients/ts/signalr/package.json b/src/SignalR/clients/ts/signalr/package.json index 9be27b13d8b3..805aed5a9bb2 100644 --- a/src/SignalR/clients/ts/signalr/package.json +++ b/src/SignalR/clients/ts/signalr/package.json @@ -45,7 +45,7 @@ "eventsource": "^2.0.2", "fetch-cookie": "^2.0.3", "node-fetch": "^2.6.7", - "ws": "^7.4.5" + "ws": "^7.5.10" }, "overrides": { "ansi-regex": "5.0.1", diff --git a/src/SignalR/common/Shared/MessageBuffer.cs b/src/SignalR/common/Shared/MessageBuffer.cs index 17b9ae170fe0..f08fff86aa40 100644 --- a/src/SignalR/common/Shared/MessageBuffer.cs +++ b/src/SignalR/common/Shared/MessageBuffer.cs @@ -121,15 +121,16 @@ private async Task RunTimer() public ValueTask WriteAsync(SerializedHubMessage hubMessage, CancellationToken cancellationToken) { - return WriteAsyncCore(hubMessage.Message!, hubMessage.GetSerializedMessage(_protocol), cancellationToken); + // Default to HubInvocationMessage as that's the only type we use SerializedHubMessage for currently when Message is null. Should harden this in the future. + return WriteAsyncCore(hubMessage.Message?.GetType() ?? typeof(HubInvocationMessage), hubMessage.GetSerializedMessage(_protocol), cancellationToken); } public ValueTask WriteAsync(HubMessage hubMessage, CancellationToken cancellationToken) { - return WriteAsyncCore(hubMessage, _protocol.GetMessageBytes(hubMessage), cancellationToken); + return WriteAsyncCore(hubMessage.GetType(), _protocol.GetMessageBytes(hubMessage), cancellationToken); } - private async ValueTask WriteAsyncCore(HubMessage hubMessage, ReadOnlyMemory messageBytes, CancellationToken cancellationToken) + private async ValueTask WriteAsyncCore(Type hubMessageType, ReadOnlyMemory messageBytes, CancellationToken cancellationToken) { // TODO: Add backpressure based on message count if (_bufferedByteCount > _bufferLimit) @@ -158,7 +159,7 @@ private async ValueTask WriteAsyncCore(HubMessage hubMessage, ReadO await _writeLock.WaitAsync(cancellationToken: default).ConfigureAwait(false); try { - if (hubMessage is HubInvocationMessage invocationMessage) + if (typeof(HubInvocationMessage).IsAssignableFrom(hubMessageType)) { _totalMessageCount++; _bufferedByteCount += messageBytes.Length; diff --git a/src/SignalR/server/Core/src/SerializedHubMessage.cs b/src/SignalR/server/Core/src/SerializedHubMessage.cs index e355b0329128..9f4327a4cc58 100644 --- a/src/SignalR/server/Core/src/SerializedHubMessage.cs +++ b/src/SignalR/server/Core/src/SerializedHubMessage.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using Microsoft.AspNetCore.SignalR.Protocol; namespace Microsoft.AspNetCore.SignalR; @@ -40,6 +41,8 @@ public SerializedHubMessage(IReadOnlyList messages) /// The hub message for the cache. This will be serialized with an in to get the message's serialized representation. public SerializedHubMessage(HubMessage message) { + // Type currently only used for invocation messages, we should probably refactor it to be explicit about that e.g. new property for message type? + Debug.Assert(message.GetType().IsAssignableTo(typeof(HubInvocationMessage))); Message = message; } diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs index a7e87d2b8bda..540ea462e199 100644 --- a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs @@ -2,11 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO.Pipelines; +using System.Text.Json; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.SignalR.Internal; using Microsoft.AspNetCore.SignalR.Protocol; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Time.Testing; @@ -169,6 +170,62 @@ public async Task UnAckedMessageResentOnReconnect() Assert.False(messageBuffer.ShouldProcessMessage(CompletionMessage.WithResult("1", null))); } + // Regression test for https://github.com/dotnet/aspnetcore/issues/55575 + [Fact] + public async Task UnAckedSerializedMessageResentOnReconnect() + { + var protocol = new JsonHubProtocol(); + var connection = new TestConnectionContext(); + var pipes = DuplexPipe.CreateConnectionPair(new PipeOptions(), new PipeOptions()); + connection.Transport = pipes.Transport; + using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1000, NullLogger.Instance); + + var invocationMessage = new SerializedHubMessage([new SerializedMessage(protocol.Name, + protocol.GetMessageBytes(new InvocationMessage("method1", [1])))]); + await messageBuffer.WriteAsync(invocationMessage, default); + + var res = await pipes.Application.Input.ReadAsync(); + + var buffer = res.Buffer; + Assert.True(protocol.TryParseMessage(ref buffer, new TestBinder(), out var message)); + var parsedMessage = Assert.IsType(message); + Assert.Equal("method1", parsedMessage.Target); + Assert.Equal(1, ((JsonElement)Assert.Single(parsedMessage.Arguments)).GetInt32()); + + pipes.Application.Input.AdvanceTo(buffer.Start); + + DuplexPipe.UpdateConnectionPair(ref pipes, connection); + await messageBuffer.ResendAsync(pipes.Transport.Output); + + Assert.True(messageBuffer.ShouldProcessMessage(PingMessage.Instance)); + Assert.True(messageBuffer.ShouldProcessMessage(CompletionMessage.WithResult("1", null))); + Assert.True(messageBuffer.ShouldProcessMessage(new SequenceMessage(1))); + + res = await pipes.Application.Input.ReadAsync(); + + buffer = res.Buffer; + Assert.True(protocol.TryParseMessage(ref buffer, new TestBinder(), out message)); + var seqMessage = Assert.IsType(message); + Assert.Equal(1, seqMessage.SequenceId); + + pipes.Application.Input.AdvanceTo(buffer.Start); + + res = await pipes.Application.Input.ReadAsync(); + + buffer = res.Buffer; + Assert.True(protocol.TryParseMessage(ref buffer, new TestBinder(), out message)); + parsedMessage = Assert.IsType(message); + Assert.Equal("method1", parsedMessage.Target); + Assert.Equal(1, ((JsonElement)Assert.Single(parsedMessage.Arguments)).GetInt32()); + + pipes.Application.Input.AdvanceTo(buffer.Start); + + messageBuffer.ShouldProcessMessage(new SequenceMessage(1)); + + Assert.True(messageBuffer.ShouldProcessMessage(PingMessage.Instance)); + Assert.False(messageBuffer.ShouldProcessMessage(CompletionMessage.WithResult("1", null))); + } + [Fact] public async Task AckedMessageNotResentOnReconnect() { diff --git a/src/SignalR/server/StackExchangeRedis/test/Docker.cs b/src/SignalR/server/StackExchangeRedis/test/Docker.cs index 76fa6440e672..41315734daea 100644 --- a/src/SignalR/server/StackExchangeRedis/test/Docker.cs +++ b/src/SignalR/server/StackExchangeRedis/test/Docker.cs @@ -16,7 +16,8 @@ public class Docker { private static readonly string _exeSuffix = OperatingSystem.IsWindows() ? ".exe" : string.Empty; - private static readonly string _dockerContainerName = "redisTestContainer"; + private static readonly string _redisImageName = "dotnetdhmirror-f8bzbjakh8cga6ab.azurecr.io/library/redis:7.4"; + private static readonly string _dockerContainerName = "redisTestContainer74"; private static readonly string _dockerMonitorContainerName = _dockerContainerName + "Monitor"; private static readonly Lazy _instance = new Lazy(Create); @@ -112,7 +113,7 @@ void Run() // use static name 'redisTestContainer' so if the container doesn't get removed we don't keep adding more // use redis base docker image // 30 second timeout to allow redis image to be downloaded, should be a rare occurrence, only happening when a new version is released - RunProcessAndThrowIfFailed(_path, $"run --rm -p 6379:6379 --name {_dockerContainerName} -d redis", "redis", logger, TimeSpan.FromMinutes(1)); + RunProcessAndThrowIfFailed(_path, $"run --rm -p 6379:6379 --name {_dockerContainerName} -d {_redisImageName}", "redis", logger, TimeSpan.FromMinutes(1)); } } diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs index 63445379ac35..f3501fb69c1e 100644 --- a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs +++ b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Collections.Generic; -using System.Threading.Tasks; +using System.Net.WebSockets; using Microsoft.AspNetCore.Http.Connections; +using Microsoft.AspNetCore.Http.Connections.Client; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.SignalR.Client; using Microsoft.AspNetCore.SignalR.Protocol; using Microsoft.AspNetCore.SignalR.Tests; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Xunit; namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests; @@ -37,6 +35,7 @@ public RedisEndToEndTests(RedisServerFixture serverFixture) [ConditionalTheory] [SkipIfDockerNotPresent] [MemberData(nameof(TransportTypesAndProtocolTypes))] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/62435")] public async Task HubConnectionCanSendAndReceiveMessages(HttpTransportType transportType, string protocolName) { using (StartVerifiableLog()) @@ -57,6 +56,7 @@ public async Task HubConnectionCanSendAndReceiveMessages(HttpTransportType trans [ConditionalTheory] [SkipIfDockerNotPresent] [MemberData(nameof(TransportTypesAndProtocolTypes))] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/62435")] public async Task HubConnectionCanSendAndReceiveGroupMessages(HttpTransportType transportType, string protocolName) { using (StartVerifiableLog()) @@ -118,6 +118,7 @@ public async Task CanSendAndReceiveUserMessagesFromMultipleConnectionsWithSameUs [ConditionalTheory] [SkipIfDockerNotPresent] [MemberData(nameof(TransportTypesAndProtocolTypes))] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/62435")] public async Task CanSendAndReceiveUserMessagesWhenOneConnectionWithUserDisconnects(HttpTransportType transportType, string protocolName) { // Regression test: @@ -147,6 +148,7 @@ public async Task CanSendAndReceiveUserMessagesWhenOneConnectionWithUserDisconne [ConditionalTheory] [SkipIfDockerNotPresent] [MemberData(nameof(TransportTypesAndProtocolTypes))] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/62435")] public async Task HubConnectionCanSendAndReceiveGroupMessagesGroupNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName) { using (StartVerifiableLog()) @@ -211,7 +213,106 @@ public async Task CanSendAndReceiveUserMessagesUserNameWithPatternIsTreatedAsLit } } - private static HubConnection CreateConnection(string url, HttpTransportType transportType, IHubProtocol protocol, ILoggerFactory loggerFactory, string userName = null) + [ConditionalTheory] + [SkipIfDockerNotPresent] + [InlineData("messagepack")] + [InlineData("json")] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/62435")] + public async Task StatefulReconnectPreservesMessageFromOtherServer(string protocolName) + { + using (StartVerifiableLog()) + { + var protocol = HubProtocolHelpers.GetHubProtocol(protocolName); + + ClientWebSocket innerWs = null; + WebSocketWrapper ws = null; + TaskCompletionSource reconnectTcs = null; + TaskCompletionSource startedReconnectTcs = null; + + var connection = CreateConnection(_serverFixture.FirstServer.Url + "/stateful", HttpTransportType.WebSockets, protocol, LoggerFactory, + customizeConnection: builder => + { + builder.WithStatefulReconnect(); + builder.Services.Configure(o => + { + // Replace the websocket creation for the first connection so we can make the client think there was an ungraceful closure + // Which will trigger the stateful reconnect flow + o.WebSocketFactory = async (context, token) => + { + if (reconnectTcs is null) + { + reconnectTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + startedReconnectTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + } + else + { + startedReconnectTcs.SetResult(); + // We only want to wait on the reconnect, not the initial connection attempt + await reconnectTcs.Task.DefaultTimeout(); + } + + innerWs = new ClientWebSocket(); + ws = new WebSocketWrapper(innerWs); + await innerWs.ConnectAsync(context.Uri, token); + + _ = Task.Run(async () => + { + try + { + while (innerWs.State == WebSocketState.Open) + { + var buffer = new byte[1024]; + var res = await innerWs.ReceiveAsync(buffer, default); + ws.SetReceiveResult((res, buffer.AsMemory(0, res.Count))); + } + } + // Log but ignore receive errors, that likely just means the connection closed + catch (Exception ex) + { + Logger.LogInformation(ex, "Error while reading from inner websocket"); + } + }); + + return ws; + }; + }); + }); + var secondConnection = CreateConnection(_serverFixture.SecondServer.Url + "/stateful", HttpTransportType.WebSockets, protocol, LoggerFactory); + + var tcs = new TaskCompletionSource(); + connection.On("SendToAll", message => tcs.TrySetResult(message)); + + var tcs2 = new TaskCompletionSource(); + secondConnection.On("SendToAll", message => tcs2.TrySetResult(message)); + + await connection.StartAsync().DefaultTimeout(); + await secondConnection.StartAsync().DefaultTimeout(); + + // Close first connection before the second connection sends a message to all clients + await ws.CloseOutputAsync(WebSocketCloseStatus.InternalServerError, statusDescription: null, default); + await startedReconnectTcs.Task.DefaultTimeout(); + + // Send to all clients, since both clients are on different servers this means the backplane will be used + // And we want to test that messages are still preserved for stateful reconnect purposes when a client disconnects + // But is on a different server from the original message sender. + await secondConnection.SendAsync("SendToAll", "test message").DefaultTimeout(); + + // Check that second connection still receives the message + Assert.Equal("test message", await tcs2.Task.DefaultTimeout()); + Assert.False(tcs.Task.IsCompleted); + + // allow first connection to reconnect + reconnectTcs.SetResult(); + + // Check that first connection received the message once it reconnected + Assert.Equal("test message", await tcs.Task.DefaultTimeout()); + + await connection.DisposeAsync().DefaultTimeout(); + } + } + + private static HubConnection CreateConnection(string url, HttpTransportType transportType, IHubProtocol protocol, ILoggerFactory loggerFactory, string userName = null, + Action customizeConnection = null) { var hubConnectionBuilder = new HubConnectionBuilder() .WithLoggerFactory(loggerFactory) @@ -225,6 +326,8 @@ private static HubConnection CreateConnection(string url, HttpTransportType tran hubConnectionBuilder.Services.AddSingleton(protocol); + customizeConnection?.Invoke(hubConnectionBuilder); + return hubConnectionBuilder.Build(); } @@ -253,4 +356,67 @@ public static IEnumerable TransportTypesAndProtocolTypes } } } + + internal sealed class WebSocketWrapper : WebSocket + { + private readonly WebSocket _inner; + private TaskCompletionSource<(WebSocketReceiveResult, ReadOnlyMemory)> _receiveTcs = new(TaskCreationOptions.RunContinuationsAsynchronously); + + public WebSocketWrapper(WebSocket inner) + { + _inner = inner; + } + + public override WebSocketCloseStatus? CloseStatus => _inner.CloseStatus; + + public override string CloseStatusDescription => _inner.CloseStatusDescription; + + public override WebSocketState State => _inner.State; + + public override string SubProtocol => _inner.SubProtocol; + + public override void Abort() + { + _inner.Abort(); + } + + public override Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) + { + return _inner.CloseAsync(closeStatus, statusDescription, cancellationToken); + } + + public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) + { + _receiveTcs.TrySetException(new IOException("force reconnect")); + return Task.CompletedTask; + } + + public override void Dispose() + { + _inner.Dispose(); + } + + public void SetReceiveResult((WebSocketReceiveResult, ReadOnlyMemory) result) + { + _receiveTcs.SetResult(result); + } + + public override async Task ReceiveAsync(ArraySegment buffer, CancellationToken cancellationToken) + { + var res = await _receiveTcs.Task; + // Handle zero-byte reads + if (buffer.Count == 0) + { + return res.Item1; + } + _receiveTcs = new(TaskCreationOptions.RunContinuationsAsynchronously); + res.Item2.CopyTo(buffer); + return res.Item1; + } + + public override Task SendAsync(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) + { + return _inner.SendAsync(buffer, messageType, endOfMessage, cancellationToken); + } + } } diff --git a/src/SignalR/server/StackExchangeRedis/test/Startup.cs b/src/SignalR/server/StackExchangeRedis/test/Startup.cs index 3fd461aed98e..1b55bd1cff53 100644 --- a/src/SignalR/server/StackExchangeRedis/test/Startup.cs +++ b/src/SignalR/server/StackExchangeRedis/test/Startup.cs @@ -33,6 +33,7 @@ public void Configure(IApplicationBuilder app) app.UseEndpoints(endpoints => { endpoints.MapHub("/echo"); + endpoints.MapHub("/stateful", o => o.AllowStatefulReconnects = true); }); } diff --git a/src/SignalR/server/StackExchangeRedis/test/StatefulHub.cs b/src/SignalR/server/StackExchangeRedis/test/StatefulHub.cs new file mode 100644 index 000000000000..1efa1d84fcd0 --- /dev/null +++ b/src/SignalR/server/StackExchangeRedis/test/StatefulHub.cs @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests; + +public class StatefulHub : Hub +{ + public Task SendToAll(string message) + { + return Clients.All.SendAsync("SendToAll", message); + } +} diff --git a/src/StaticAssets/src/PublicAPI.Shipped.txt b/src/StaticAssets/src/PublicAPI.Shipped.txt index ab058de62d44..b577e6d02d5f 100644 --- a/src/StaticAssets/src/PublicAPI.Shipped.txt +++ b/src/StaticAssets/src/PublicAPI.Shipped.txt @@ -1 +1,34 @@ -#nullable enable +#nullable enable +Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions +Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.StaticAssetDescriptor() -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.StaticAssetProperty(string! name, string! value) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Value.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.StaticAssetResponseHeader(string! name, string! value) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Value.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Quality.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.StaticAssetSelector(string! name, string! value, string! quality) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Value.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder +Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Add(System.Action! convention) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Finally(System.Action! convention) -> void +static Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string? staticAssetsManifestPath = null) -> Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder! +static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.HasStaticAssetsDataSource(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! builder, string? staticAssetsManifestPath = null) -> bool +static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.ResolveStaticAssetDescriptors(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpointRouteBuilder, string? manifestPath) -> System.Collections.Generic.IReadOnlyList! diff --git a/src/StaticAssets/src/PublicAPI.Unshipped.txt b/src/StaticAssets/src/PublicAPI.Unshipped.txt index ded8dc823703..7dc5c58110bf 100644 --- a/src/StaticAssets/src/PublicAPI.Unshipped.txt +++ b/src/StaticAssets/src/PublicAPI.Unshipped.txt @@ -1,33 +1 @@ -Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions -Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.set -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.get -> System.Collections.Generic.IReadOnlyList! -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.set -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.get -> System.Collections.Generic.IReadOnlyList! -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.set -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.set -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.get -> System.Collections.Generic.IReadOnlyList! -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.set -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.StaticAssetDescriptor() -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetProperty -Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Name.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.StaticAssetProperty(string! name, string! value) -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Value.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader -Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Name.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.StaticAssetResponseHeader(string! name, string! value) -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Value.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetSelector -Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Name.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Quality.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.StaticAssetSelector(string! name, string! value, string! quality) -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Value.get -> string! -Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder -Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Add(System.Action! convention) -> void -Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Finally(System.Action! convention) -> void -static Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string? staticAssetsManifestPath = null) -> Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder! -static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.HasStaticAssetsDataSource(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! builder, string? staticAssetsManifestPath = null) -> bool -static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.ResolveStaticAssetDescriptors(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpointRouteBuilder, string? manifestPath) -> System.Collections.Generic.IReadOnlyList! +#nullable enable diff --git a/src/StaticAssets/src/StaticAssetsInvoker.cs b/src/StaticAssets/src/StaticAssetsInvoker.cs index 1d21cc2929ec..c7555c901b93 100644 --- a/src/StaticAssets/src/StaticAssetsInvoker.cs +++ b/src/StaticAssets/src/StaticAssetsInvoker.cs @@ -223,7 +223,7 @@ private async Task SendRangeAsync(StaticAssetInvocationContext requestContext, R if (requestContext.Response.StatusCode == StatusCodes.Status200OK) { - requestContext.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + requestContext.Response.StatusCode = StatusCodes.Status206PartialContent; } await ApplyResponseHeadersAsync(requestContext, StatusCodes.Status206PartialContent); diff --git a/src/StaticAssets/test/StaticAssetsIntegrationTests.cs b/src/StaticAssets/test/StaticAssetsIntegrationTests.cs index 541a468a15a2..fda161ea055a 100644 --- a/src/StaticAssets/test/StaticAssetsIntegrationTests.cs +++ b/src/StaticAssets/test/StaticAssetsIntegrationTests.cs @@ -989,6 +989,33 @@ public async Task IfUnmodifiedSinceDateLessThanLastModifiedShouldReturn412(HttpM Assert.Equal(HttpStatusCode.PreconditionFailed, res2.StatusCode); } + // 14.35.2 Range Retrieval Requests + // The presence of a Range header in an unconditional GET modifies + // what is returned if the GET is otherwise successful. In other + // words, the response carries a status code of 206 (Partial + // Content) instead of 200 (OK). + [Fact] + public async Task RangeGivesMatchingRange() + { + var client = await CreateClient(); + + var req1 = new HttpRequestMessage(HttpMethod.Get, "http://localhost/sample.txt"); + req1.Headers.Range = new RangeHeaderValue(0, 4); + var res1 = await client.SendAsync(req1); + + var req2 = new HttpRequestMessage(HttpMethod.Get, "http://localhost/sample.txt"); + req2.Headers.Range = new RangeHeaderValue(7, 11); + var res2 = await client.SendAsync(req2); + + Assert.Equal(HttpStatusCode.PartialContent, res1.StatusCode); + Assert.Equal("Hello", await res1.Content.ReadAsStringAsync()); + Assert.Equal(5, res1.Content.Headers.ContentLength); + + Assert.Equal(HttpStatusCode.PartialContent, res2.StatusCode); + Assert.Equal("World", await res2.Content.ReadAsStringAsync()); + Assert.Equal(5, res2.Content.Headers.ContentLength); + } + public static IEnumerable SupportedMethods => new[] { new [] { HttpMethod.Get }, diff --git a/src/Testing/src/xunit/SkipOnHelixAttribute.cs b/src/Testing/src/xunit/SkipOnHelixAttribute.cs index 38b376cb6808..2c7b66f75a67 100644 --- a/src/Testing/src/xunit/SkipOnHelixAttribute.cs +++ b/src/Testing/src/xunit/SkipOnHelixAttribute.cs @@ -66,7 +66,10 @@ private bool ShouldSkip() return true; } - return Queues.ToLowerInvariant().Split(';').Contains(targetQueue); + // We have "QueueName" and "QueueName.Open" queues for internal and public builds + // If we want to skip the test in the public queue, we want to skip it in the internal queue, and vice versa + return Queues.ToLowerInvariant().Split(';').Any(q => q.Equals(targetQueue, StringComparison.Ordinal) || q.StartsWith(targetQueue, StringComparison.Ordinal) || + targetQueue.StartsWith(q, StringComparison.Ordinal)); } public static bool OnHelix() => HelixHelper.OnHelix(); diff --git a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs index 09a32825e50e..bcc2d6ef05b5 100644 --- a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs +++ b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs @@ -373,7 +373,7 @@ public void EnsureCreateHttpsCertificate_CannotExportToNonExistentDirectory() .EnsureAspNetCoreHttpsDevelopmentCertificate(now, now.AddYears(1), Path.Combine("NoSuchDirectory", CertificateName)); // Assert - Assert.Equal(EnsureCertificateResult.ErrorExportingTheCertificate, result); + Assert.Equal(EnsureCertificateResult.ErrorExportingTheCertificateToNonExistentDirectory, result); } [Fact] diff --git a/src/Tools/Tools.slnf b/src/Tools/Tools.slnf index 484313af8712..38dbc4a65ae9 100644 --- a/src/Tools/Tools.slnf +++ b/src/Tools/Tools.slnf @@ -29,6 +29,7 @@ "src\\Hosting\\Abstractions\\src\\Microsoft.AspNetCore.Hosting.Abstractions.csproj", "src\\Hosting\\Hosting\\src\\Microsoft.AspNetCore.Hosting.csproj", "src\\Hosting\\Server.Abstractions\\src\\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj", + "src\\Hosting\\TestHost\\src\\Microsoft.AspNetCore.TestHost.csproj", "src\\Html.Abstractions\\src\\Microsoft.AspNetCore.Html.Abstractions.csproj", "src\\Http\\Authentication.Abstractions\\src\\Microsoft.AspNetCore.Authentication.Abstractions.csproj", "src\\Http\\Authentication.Core\\src\\Microsoft.AspNetCore.Authentication.Core.csproj", @@ -109,9 +110,9 @@ "src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj", "src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj", "src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj", + "src\\Tools\\GetDocumentInsider\\sample\\GetDocumentSample.csproj", "src\\Tools\\GetDocumentInsider\\src\\GetDocument.Insider.csproj", "src\\Tools\\GetDocumentInsider\\tests\\GetDocumentInsider.Tests.csproj", - "src\\Tools\\GetDocumentInsider\\sample\\GetDocumentSample.csproj", "src\\Tools\\LinkabilityChecker\\LinkabilityChecker.csproj", "src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj", "src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj", @@ -125,4 +126,4 @@ "src\\WebEncoders\\src\\Microsoft.Extensions.WebEncoders.csproj" ] } -} +} \ No newline at end of file diff --git a/src/Tools/dotnet-dev-certs/src/Program.cs b/src/Tools/dotnet-dev-certs/src/Program.cs index 9f5407d9d3e4..9b195dbcd9fa 100644 --- a/src/Tools/dotnet-dev-certs/src/Program.cs +++ b/src/Tools/dotnet-dev-certs/src/Program.cs @@ -425,6 +425,10 @@ private static int EnsureHttpsCertificate(CommandOption exportPath, CommandOptio case EnsureCertificateResult.ErrorExportingTheCertificate: reporter.Warn("There was an error exporting the HTTPS developer certificate to a file."); return ErrorExportingTheCertificate; + case EnsureCertificateResult.ErrorExportingTheCertificateToNonExistentDirectory: + // A distinct warning is useful, but a distinct error code is probably not. + reporter.Warn("There was an error exporting the HTTPS developer certificate to a file. Please create the target directory before exporting. Choose permissions carefully when creating it."); + return ErrorExportingTheCertificate; case EnsureCertificateResult.PartiallyFailedToTrustTheCertificate: // A distinct warning is useful, but a distinct error code is probably not. reporter.Warn("There was an error trusting the HTTPS developer certificate. It will be trusted by some clients but not by others."); diff --git a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj index d753a475d044..558065640962 100644 --- a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj +++ b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj @@ -16,6 +16,7 @@ + diff --git a/src/Tools/dotnet-user-jwts/test/UserJwtsTests.cs b/src/Tools/dotnet-user-jwts/test/UserJwtsTests.cs index 71cc2cdb7d10..801e414fe95e 100644 --- a/src/Tools/dotnet-user-jwts/test/UserJwtsTests.cs +++ b/src/Tools/dotnet-user-jwts/test/UserJwtsTests.cs @@ -1,14 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.RegularExpressions; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.TestHost; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.UserSecrets; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Tools.Internal; using Xunit.Abstractions; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Nodes; -using System.IdentityModel.Tokens.Jwt; namespace Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests; @@ -62,6 +67,38 @@ public void Create_WritesGeneratedTokenToDisk() Assert.Contains("dotnet-user-jwts", File.ReadAllText(appsettings)); } + [Fact] + public async Task Create_TokenAcceptedByJwtBearerHandler() + { + var project = Path.Combine(fixture.CreateProject(), "TestProject.csproj"); + var appsettings = Path.Combine(Path.GetDirectoryName(project), "appsettings.Development.json"); + var secrets = PathHelper.GetSecretsPathFromSecretsId(fixture.TestSecretsId); + var app = new Program(_console); + + app.Run(["create", "--project", project, "-o", "token"]); + var token = _console.GetOutput().Trim(); + + var builder = WebApplication.CreateEmptyBuilder(new()); + builder.WebHost.UseTestServer(); + + builder.Configuration.AddJsonFile(appsettings); + builder.Configuration.AddJsonFile(secrets); + + builder.Services.AddRouting(); + builder.Services.AddAuthentication().AddJwtBearer(); + builder.Services.AddAuthorization(); + + using var webApp = builder.Build(); + webApp.MapGet("/secret", (ClaimsPrincipal user) => $"Hello {user.Identity?.Name}!") + .RequireAuthorization(); + + await webApp.StartAsync(); + + var client = webApp.GetTestClient(); + client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token}"); + Assert.Equal($"Hello {Environment.UserName}!", await client.GetStringAsync("/secret")); + } + [Fact] public void Create_CanModifyExistingScheme() { diff --git a/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj b/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj index 5ad17868a98a..b362c30d0611 100644 --- a/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj +++ b/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj @@ -14,4 +14,10 @@ + + + + + + diff --git a/src/submodules/MessagePack-CSharp b/src/submodules/MessagePack-CSharp index ecc4e18ad7a0..9aeb12b9bdb0 160000 --- a/src/submodules/MessagePack-CSharp +++ b/src/submodules/MessagePack-CSharp @@ -1 +1 @@ -Subproject commit ecc4e18ad7a0c7db51cd7e3d2997a291ed01444d +Subproject commit 9aeb12b9bdb024512ffe2e4bddfa2785dca6e39e diff --git a/src/submodules/googletest b/src/submodules/googletest index 0953a17a4281..373af2e3df71 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 0953a17a4281fc26831da647ad3fcd5e21e6473b +Subproject commit 373af2e3df71599b87a40ce0e37164523849166b