@automattic/vip 4.1.3 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.buildkite/build-macos-installer.sh +34 -0
- package/.buildkite/build-macos.sh +2 -3
- package/.buildkite/build-windows-installer.ps1 +65 -0
- package/.buildkite/build-windows.ps1 +2 -18
- package/.buildkite/pipeline.yml +32 -0
- package/.buildkite/sign-windows.ps1 +21 -0
- package/.buildkite/test-windows-installer-download.ps1 +54 -0
- package/.buildkite/test_pipeline.py +69 -0
- package/Gemfile.lock +44 -41
- package/cmd/installer-payload/main.go +19 -0
- package/cmd/installer-version/main.go +22 -0
- package/cmd/vip-next/commands/app_debug_test.go +89 -0
- package/cmd/vip-next/commands/app_deploy.go +4 -0
- package/cmd/vip-next/commands/app_deploy_validate.go +2 -0
- package/cmd/vip-next/commands/config_debug_test.go +137 -0
- package/cmd/vip-next/commands/config_envvar_delete.go +2 -0
- package/cmd/vip-next/commands/config_envvar_get.go +2 -0
- package/cmd/vip-next/commands/config_envvar_get_all.go +2 -0
- package/cmd/vip-next/commands/config_envvar_list.go +2 -0
- package/cmd/vip-next/commands/config_envvar_set.go +2 -0
- package/cmd/vip-next/commands/config_software_update.go +12 -1
- package/cmd/vip-next/commands/devenv.go +1 -0
- package/cmd/vip-next/commands/devenv_create_test.go +5 -5
- package/cmd/vip-next/commands/devenv_debug_test.go +34 -0
- package/cmd/vip-next/commands/devenv_envvar.go +12 -0
- package/cmd/vip-next/commands/devenv_lifecycle.go +37 -11
- package/cmd/vip-next/commands/devenv_resolve.go +15 -3
- package/cmd/vip-next/commands/devenv_telemetry.go +265 -0
- package/cmd/vip-next/commands/devenv_telemetry_test.go +322 -0
- package/cmd/vip-next/commands/devenv_update.go +1 -1
- package/cmd/vip-next/commands/devenv_update_test.go +28 -2
- package/cmd/vip-next/commands/import_debug_test.go +110 -0
- package/cmd/vip-next/commands/import_media.go +4 -0
- package/cmd/vip-next/commands/import_sql.go +9 -1
- package/cmd/vip-next/commands/logout.go +1 -1
- package/cmd/vip-next/commands/searchreplace.go +3 -1
- package/cmd/vip-next/commands/searchreplace_debug_test.go +82 -0
- package/cmd/vip-next/commands/whoami.go +10 -1
- package/cmd/vip-next/commands/whoami_debug_test.go +79 -0
- package/cmd/vip-next/commands/wp.go +2 -0
- package/cmd/vip-next/commands/wp_debug_test.go +32 -0
- package/cmd/vip-next/debug_args.go +63 -0
- package/cmd/vip-next/debug_test.go +122 -0
- package/cmd/vip-next/main.go +58 -2
- package/cmd/vip-next/pendo_wiring_test.go +148 -0
- package/cmd/vip-next/root.go +17 -0
- package/dist/bin/vip-dev-env-envvar-get.js +2 -2
- package/dist/bin/vip-dev-env-envvar-set.js +2 -2
- package/dist/bin/vip-dev-env-update.js +1 -1
- package/dist/lib/analytics/clients/pendo.js +19 -7
- package/dist/lib/constants/dev-environment.js +8 -7
- package/dist/lib/dev-environment/dev-environment-cli.js +15 -4
- package/dist/lib/dev-environment/dev-environment-core.js +1 -1
- package/docs/BUILD-SIGNING.md +147 -6
- package/docs/DEBUGGING.md +61 -0
- package/docs/GO-UPDATES.md +7 -1
- package/docs/RELEASING.md +3 -2
- package/docs/SETUP.md +2 -1
- package/fastlane/Fastfile +66 -3
- package/fastlane/test_signing.rb +83 -0
- package/internal/auth/logout.go +14 -1
- package/internal/auth/logout_test.go +46 -0
- package/internal/debuglog/debuglog.go +85 -0
- package/internal/debuglog/debuglog_test.go +44 -0
- package/internal/devenv/compose/view.go +6 -3
- package/internal/devenv/compose/view_test.go +1 -1
- package/internal/devenv/debug.go +4 -0
- package/internal/devenv/debug_test.go +103 -0
- package/internal/devenv/devenv.go +20 -2
- package/internal/devenv/devexec.go +3 -0
- package/internal/devenv/importdata.go +4 -1
- package/internal/devenv/list.go +9 -1
- package/internal/devenv/logs.go +2 -0
- package/internal/devenv/proxy/ca.go +9 -2
- package/internal/devenv/proxy/ca_test.go +1 -1
- package/internal/devenv/proxy/network.go +7 -3
- package/internal/devenv/proxy/network_test.go +6 -0
- package/internal/devenv/proxy/proxy.go +37 -8
- package/internal/devenv/proxy/proxy_test.go +61 -6
- package/internal/devenv/proxy/scripts/gen-certs.sh +20 -5
- package/internal/devenv/update.go +2 -0
- package/internal/gql/debug_test.go +79 -0
- package/internal/gql/error.go +27 -1
- package/internal/gql/rechallenge.go +9 -5
- package/internal/gql/retry.go +21 -2
- package/internal/gql/transport.go +9 -0
- package/internal/httpproxy/debug_test.go +32 -0
- package/internal/httpproxy/httpproxy.go +8 -1
- package/internal/installer/version.go +41 -0
- package/internal/installer/version_test.go +33 -0
- package/internal/parity/edge_workers_debug_test.go +87 -0
- package/internal/parity/pendo_test.go +122 -0
- package/internal/rechallenge/flow.go +8 -0
- package/internal/rechallenge/flow_test.go +15 -1
- package/internal/releasepromotion/buildkite.go +12 -1
- package/internal/releasepromotion/buildkite_test.go +31 -0
- package/internal/releasepromotion/contract.go +49 -1
- package/internal/releasepromotion/contract_test.go +38 -0
- package/internal/releasepromotion/github.go +4 -10
- package/internal/releasepromotion/optional_installers_test.go +87 -0
- package/internal/releasepromotion/verify.go +99 -2
- package/internal/releasepromotion/verify_test.go +99 -0
- package/internal/searchreplace/debug_test.go +71 -0
- package/internal/searchreplace/searchreplace.go +14 -0
- package/internal/siteimport/debug_test.go +34 -0
- package/internal/siteimport/status.go +11 -0
- package/internal/telemetry/pendo.go +41 -10
- package/internal/telemetry/pendo_auth_test.go +92 -0
- package/internal/telemetry/pendo_test.go +24 -5
- package/internal/telemetry/tracker.go +26 -0
- package/internal/update/github.go +36 -17
- package/internal/update/ownership.go +22 -0
- package/internal/update/ownership_test.go +44 -0
- package/internal/update/release_test.go +53 -13
- package/internal/update/service_test.go +39 -0
- package/internal/upload/debug_test.go +76 -0
- package/internal/upload/multipart.go +3 -0
- package/internal/upload/orchestrate.go +10 -0
- package/internal/upload/putobject.go +3 -0
- package/internal/wpssh/debug_test.go +67 -0
- package/internal/wpssh/wpssh.go +7 -0
- package/internal/wpstream/debug_test.go +116 -0
- package/internal/wpstream/run.go +10 -1
- package/node_modules/@apollo/client/CHANGELOG.md +1136 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.cjs +36 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.d.cts +56 -0
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs +32 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.d.cts +89 -6
- package/node_modules/@apollo/client/__cjs/cache/core/types/Cache.d.cts +30 -2
- package/node_modules/@apollo/client/__cjs/cache/index.cjs +3 -1
- package/node_modules/@apollo/client/__cjs/cache/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/index.d.cts +2 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs +63 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.d.cts +11 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs +95 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.d.cts +44 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs +34 -6
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.d.cts +3 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs +489 -45
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.d.cts +11 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/types.d.cts +31 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs +5 -9
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs +14 -14
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.d.cts +11 -11
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs +186 -72
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.d.cts +4 -7
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs +164 -197
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.d.cts +17 -21
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs +75 -48
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryManager.d.cts +4 -4
- package/node_modules/@apollo/client/__cjs/core/RefetchEventManager.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/core/deprecated.d.cts +3 -3
- package/node_modules/@apollo/client/__cjs/core/index.cjs +2 -1
- package/node_modules/@apollo/client/__cjs/core/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/index.d.cts +4 -3
- package/node_modules/@apollo/client/__cjs/core/types.d.cts +11 -7
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.d.cts +55 -0
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.d.cts +2 -4
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs +47 -16
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.d.cts +29 -6
- package/node_modules/@apollo/client/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/index.d.cts +1 -0
- package/node_modules/@apollo/client/__cjs/{utilities/internal/types/NoInfer.cjs → incremental/internal/types.cjs} +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/internal/types.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/incremental/internal/types.d.cts +17 -0
- package/node_modules/@apollo/client/__cjs/incremental/types.d.cts +55 -4
- package/node_modules/@apollo/client/__cjs/invariantErrorCodes.cjs +164 -113
- package/node_modules/@apollo/client/__cjs/link/core/ApolloLink.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/link/http/checkFetcher.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/persisted-queries/index.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/link/ws/index.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.cjs +11 -11
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/masking/internal/types.d.cts +1 -2
- package/node_modules/@apollo/client/__cjs/masking/maskDefinition.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/masking/maskFragment.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/masking/maskOperation.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/masking/utils.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/react/context/ApolloContext.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/hooks/useApolloClient.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useBackgroundQuery.d.cts +3 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.d.cts +0 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs +29 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useMutation.d.cts +14 -14
- package/node_modules/@apollo/client/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useQuery.d.cts +16 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.cjs +7 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.d.cts +27 -5
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseFragment.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseQuery.d.cts +30 -30
- package/node_modules/@apollo/client/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/internal/cache/QueryReference.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/query-preloader/createQueryPreloader.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/ssr/prerenderStatic.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/types/deprecated.d.cts +5 -4
- package/node_modules/@apollo/client/__cjs/react/types/types.documentation.d.cts +12 -1
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.cjs +25 -5
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.d.cts +1 -2
- package/node_modules/@apollo/client/__cjs/utilities/caching/sizes.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/caching/sizes.d.cts +39 -1
- package/node_modules/@apollo/client/__cjs/utilities/graphql/DocumentTransform.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.cjs +27 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.d.cts +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.cjs +33 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.d.cts +7 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs +102 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.cjs +20 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.d.cts +19 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.cjs +19 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentDefinition.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentDefinition.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentFromSelection.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentFromSelection.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentQueryDocument.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMainDefinition.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.cjs +6 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.d.cts +4 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getQueryDefinition.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs +27 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.d.cts +17 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs +38 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs +37 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.cjs +7 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.cjs +17 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/shouldInclude.cjs +4 -4
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.cjs +20 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.d.cts +2 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.d.cts +4 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/StreamInfoTrie.d.cts +2 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/valueToObjectRepresentation.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs.map +1 -1
- package/node_modules/@apollo/client/cache/core/Scalar.d.ts +56 -0
- package/node_modules/@apollo/client/cache/core/Scalar.js +32 -0
- package/node_modules/@apollo/client/cache/core/Scalar.js.map +1 -0
- package/node_modules/@apollo/client/cache/core/cache.d.ts +89 -6
- package/node_modules/@apollo/client/cache/core/cache.js +33 -2
- package/node_modules/@apollo/client/cache/core/cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/core/types/Cache.d.ts +30 -2
- package/node_modules/@apollo/client/cache/core/types/Cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/index.d.ts +2 -1
- package/node_modules/@apollo/client/cache/index.js +1 -0
- package/node_modules/@apollo/client/cache/index.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts +3 -0
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js +64 -6
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/helpers.d.ts +11 -2
- package/node_modules/@apollo/client/cache/inmemory/helpers.js +11 -0
- package/node_modules/@apollo/client/cache/inmemory/helpers.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts +44 -5
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js +97 -6
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/key-extractor.js +1 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.d.ts +3 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.js +34 -6
- package/node_modules/@apollo/client/cache/inmemory/policies.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts +11 -2
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js +485 -45
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/types.d.ts +32 -5
- package/node_modules/@apollo/client/cache/inmemory/types.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js +6 -10
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map +1 -1
- package/node_modules/@apollo/client/core/ApolloClient.d.ts +11 -11
- package/node_modules/@apollo/client/core/ApolloClient.js +14 -14
- package/node_modules/@apollo/client/core/ApolloClient.js.map +1 -1
- package/node_modules/@apollo/client/core/ObservableQuery.d.ts +4 -7
- package/node_modules/@apollo/client/core/ObservableQuery.js +183 -73
- package/node_modules/@apollo/client/core/ObservableQuery.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryInfo.d.ts +18 -22
- package/node_modules/@apollo/client/core/QueryInfo.js +165 -198
- package/node_modules/@apollo/client/core/QueryInfo.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryManager.d.ts +4 -4
- package/node_modules/@apollo/client/core/QueryManager.js +76 -49
- package/node_modules/@apollo/client/core/QueryManager.js.map +1 -1
- package/node_modules/@apollo/client/core/RefetchEventManager.js +3 -3
- package/node_modules/@apollo/client/core/dataStateErrorCache.d.ts +3 -0
- package/node_modules/@apollo/client/core/dataStateErrorCache.js +9 -0
- package/node_modules/@apollo/client/core/dataStateErrorCache.js.map +1 -0
- package/node_modules/@apollo/client/core/deprecated.d.ts +3 -3
- package/node_modules/@apollo/client/core/deprecated.js.map +1 -1
- package/node_modules/@apollo/client/core/index.d.ts +4 -3
- package/node_modules/@apollo/client/core/index.js +1 -1
- package/node_modules/@apollo/client/core/index.js.map +1 -1
- package/node_modules/@apollo/client/core/types.d.ts +11 -7
- package/node_modules/@apollo/client/core/types.js.map +1 -1
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.d.ts +55 -0
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.js +2 -0
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.js.map +1 -0
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.d.ts +2 -4
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.d.ts +29 -6
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js +48 -17
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/notImplemented.js +1 -1
- package/node_modules/@apollo/client/incremental/index.d.ts +1 -0
- package/node_modules/@apollo/client/incremental/index.js.map +1 -1
- package/node_modules/@apollo/client/incremental/internal/types.d.ts +17 -0
- package/node_modules/@apollo/client/incremental/internal/types.js +2 -0
- package/node_modules/@apollo/client/incremental/internal/types.js.map +1 -0
- package/node_modules/@apollo/client/incremental/types.d.ts +55 -4
- package/node_modules/@apollo/client/incremental/types.js.map +1 -1
- package/node_modules/@apollo/client/invariantErrorCodes.js +164 -113
- package/node_modules/@apollo/client/link/core/ApolloLink.js +3 -3
- package/node_modules/@apollo/client/link/http/checkFetcher.js +1 -1
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +1 -1
- package/node_modules/@apollo/client/link/persisted-queries/index.js +2 -2
- package/node_modules/@apollo/client/link/ws/index.js +1 -1
- package/node_modules/@apollo/client/local-state/LocalState.d.ts +1 -1
- package/node_modules/@apollo/client/local-state/LocalState.js +11 -11
- package/node_modules/@apollo/client/local-state/LocalState.js.map +1 -1
- package/node_modules/@apollo/client/masking/internal/types.d.ts +1 -2
- package/node_modules/@apollo/client/masking/internal/types.js.map +1 -1
- package/node_modules/@apollo/client/masking/maskDefinition.js +2 -2
- package/node_modules/@apollo/client/masking/maskFragment.js +2 -2
- package/node_modules/@apollo/client/masking/maskOperation.js +1 -1
- package/node_modules/@apollo/client/masking/utils.js +3 -3
- package/node_modules/@apollo/client/package.json +1 -1
- package/node_modules/@apollo/client/react/context/ApolloContext.js +1 -1
- package/node_modules/@apollo/client/react/context/ApolloProvider.js +1 -1
- package/node_modules/@apollo/client/react/hooks/internal/validateSuspenseHookOptions.js +2 -2
- package/node_modules/@apollo/client/react/hooks/useApolloClient.js +1 -1
- package/node_modules/@apollo/client/react/hooks/useBackgroundQuery.d.ts +3 -3
- package/node_modules/@apollo/client/react/hooks/useBackgroundQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useFragment.d.ts +0 -1
- package/node_modules/@apollo/client/react/hooks/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js +29 -3
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useLoadableQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks/useMutation.d.ts +14 -14
- package/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useQuery.d.ts +16 -3
- package/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSubscription.d.ts +27 -5
- package/node_modules/@apollo/client/react/hooks/useSubscription.js +7 -3
- package/node_modules/@apollo/client/react/hooks/useSubscription.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseFragment.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseQuery.d.ts +30 -30
- package/node_modules/@apollo/client/react/hooks/useSuspenseQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/internal/validateSuspenseHookOptions.js +2 -2
- package/node_modules/@apollo/client/react/hooks-compiled/useApolloClient.js +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useBackgroundQuery.d.ts +3 -3
- package/node_modules/@apollo/client/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.d.ts +0 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js +29 -3
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLoadableQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks-compiled/useMutation.d.ts +14 -14
- package/node_modules/@apollo/client/react/hooks-compiled/useMutation.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useQuery.d.ts +16 -3
- package/node_modules/@apollo/client/react/hooks-compiled/useQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.d.ts +27 -5
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.js +107 -93
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseFragment.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseQuery.d.ts +30 -30
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSyncExternalStore.js +1 -1
- package/node_modules/@apollo/client/react/internal/cache/QueryReference.js +1 -1
- package/node_modules/@apollo/client/react/query-preloader/createQueryPreloader.d.ts +1 -1
- package/node_modules/@apollo/client/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/node_modules/@apollo/client/react/ssr/prerenderStatic.js +2 -2
- package/node_modules/@apollo/client/react/types/deprecated.d.ts +5 -4
- package/node_modules/@apollo/client/react/types/deprecated.js.map +1 -1
- package/node_modules/@apollo/client/react/types/types.documentation.d.ts +12 -1
- package/node_modules/@apollo/client/react/types/types.documentation.js.map +1 -1
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.d.ts +1 -2
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.js +25 -5
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.js.map +1 -1
- package/node_modules/@apollo/client/utilities/caching/sizes.d.ts +39 -1
- package/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/node_modules/@apollo/client/utilities/graphql/DocumentTransform.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.d.ts +12 -0
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.js +23 -0
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.d.ts +3 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.js +30 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.d.ts +7 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.js +95 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/constants.d.ts +19 -0
- package/node_modules/@apollo/client/utilities/internal/constants.js +19 -0
- package/node_modules/@apollo/client/utilities/internal/constants.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.js +16 -0
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/getFragmentDefinition.js +3 -3
- package/node_modules/@apollo/client/utilities/internal/getFragmentDefinition.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getFragmentFromSelection.js +2 -2
- package/node_modules/@apollo/client/utilities/internal/getFragmentFromSelection.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getFragmentQueryDocument.js +2 -2
- package/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.d.ts +4 -0
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +6 -0
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getQueryDefinition.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/index.d.ts +17 -2
- package/node_modules/@apollo/client/utilities/internal/index.js +13 -1
- package/node_modules/@apollo/client/utilities/internal/index.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js +35 -0
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js +34 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.d.ts +3 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.js +4 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.js +14 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/removeDirectivesFromDocument.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/shouldInclude.js +4 -4
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.js +17 -0
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.d.ts +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.d.ts +4 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/StreamInfoTrie.d.ts +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/StreamInfoTrie.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/valueToObjectRepresentation.js +1 -1
- package/node_modules/@apollo/client/version.js +1 -1
- package/node_modules/@apollo/client/version.js.map +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
- package/node_modules/@types/node/buffer.d.ts +1 -0
- package/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +22 -12
- package/node_modules/@types/node/dgram.d.ts +119 -4
- package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/node/ffi.d.ts +15 -1
- package/node_modules/@types/node/fs/promises.d.ts +61 -65
- package/node_modules/@types/node/fs.d.ts +86 -76
- package/node_modules/@types/node/http.d.ts +18 -2
- package/node_modules/@types/node/http2.d.ts +15 -6
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +2 -1
- package/node_modules/@types/node/net.d.ts +124 -20
- package/node_modules/@types/node/package.json +3 -18
- package/node_modules/@types/node/perf_hooks.d.ts +31 -19
- package/node_modules/@types/node/process.d.ts +53 -0
- package/node_modules/@types/node/quic.d.ts +290 -42
- package/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@types/node/stream/iter.d.ts +13 -16
- package/node_modules/@types/node/stream/web.d.ts +20 -0
- package/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@types/node/test.d.ts +108 -0
- package/node_modules/@types/node/tls.d.ts +64 -25
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/tty.d.ts +4 -3
- package/node_modules/@types/node/vfs.d.ts +211 -0
- package/node_modules/@types/node/vm.d.ts +3 -2
- package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
- package/node_modules/@types/node/worker_threads.d.ts +4 -1
- package/node_modules/@types/node/zlib.d.ts +17 -0
- package/node_modules/cpu-features/build/Makefile +2 -2
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpufeatures/src/binding.o.d +145 -145
- package/node_modules/cpu-features/build/config.gypi +8 -9
- package/node_modules/cpu-features/build/cpufeatures.target.mk +14 -14
- package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.target.mk +14 -14
- package/node_modules/default-browser/package.json +1 -1
- package/node_modules/default-browser/windows.js +3 -1
- package/node_modules/js-yaml/README.md +0 -3
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +822 -779
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +425 -397
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.d.ts +101 -32
- package/node_modules/js-yaml/dist/js-yaml.mjs +429 -397
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js +11 -3
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/lib/loader.js +16 -3
- package/node_modules/lando/node_modules/js-yaml/package.json +1 -1
- package/node_modules/open/index.js +15 -3
- package/node_modules/open/package.json +3 -3
- package/node_modules/{lando → path-scurry}/node_modules/lru-cache/README.md +96 -10
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/commonjs → path-scurry/node_modules/lru-cache/dist/commonjs/browser}/index.d.ts +109 -32
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/esm → path-scurry/node_modules/lru-cache/dist/commonjs}/index.d.ts +109 -32
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/esm → path-scurry/node_modules/lru-cache/dist/esm/browser}/index.js +315 -177
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/commonjs → path-scurry/node_modules/lru-cache/dist/esm}/index.js +316 -182
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1729 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/powershell-utils/index.d.ts +16 -2
- package/node_modules/powershell-utils/index.js +12 -9
- package/node_modules/powershell-utils/package.json +1 -1
- package/node_modules/powershell-utils/readme.md +7 -2
- package/node_modules/socket.io-client/README.md +1 -0
- package/node_modules/socket.io-client/build/cjs/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/cjs/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/cjs/manager.js +17 -7
- package/node_modules/socket.io-client/build/cjs/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/cjs/socket.js +0 -1
- package/node_modules/socket.io-client/build/esm/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/esm/index.js +1 -1
- package/node_modules/socket.io-client/build/esm/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/esm/package.json +1 -1
- package/node_modules/socket.io-client/build/esm/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/esm/socket.js +0 -1
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/esm-debug/index.js +1 -1
- package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/esm-debug/package.json +1 -1
- package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/esm-debug/socket.js +0 -1
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.js +174 -242
- package/node_modules/socket.io-client/dist/socket.io.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -1
- package/node_modules/socket.io-client/package.json +2 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Makefile +2 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d +237 -237
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/sshcrypto.target.mk +14 -14
- package/node_modules/undici/README.md +10 -1
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +8 -3
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/undici/lib/dispatcher/client-h2.js +94 -10
- package/node_modules/undici/lib/dispatcher/client.js +9 -3
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +31 -9
- package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +33 -3
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +29 -10
- package/node_modules/undici/lib/handler/redirect-handler.js +26 -4
- package/node_modules/undici/lib/handler/retry-handler.js +215 -38
- package/node_modules/undici/lib/interceptor/cache.js +69 -13
- package/node_modules/undici/lib/interceptor/decompress.js +319 -50
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +38 -4
- package/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/undici/lib/web/fetch/index.js +52 -25
- package/node_modules/undici/lib/web/fetch/request.js +76 -82
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +13 -8
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/webidl/index.js +5 -17
- package/node_modules/undici/lib/web/websocket/connection.js +34 -13
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +27 -14
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +10 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +2 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici/types/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
- package/node_modules/undici/types/webidl.d.ts +13 -7
- package/node_modules/undici-types/client.d.ts +8 -3
- package/node_modules/undici-types/connector.d.ts +1 -0
- package/node_modules/undici-types/cookies.d.ts +1 -1
- package/node_modules/undici-types/dispatcher.d.ts +3 -3
- package/node_modules/undici-types/errors.d.ts +10 -0
- package/node_modules/undici-types/fetch.d.ts +5 -1
- package/node_modules/undici-types/handlers.d.ts +2 -0
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/proxy-agent.d.ts +7 -0
- package/package.json +2 -2
- package/packaging/macos/build-pkg.sh +53 -0
- package/packaging/macos/preinstall +33 -0
- package/packaging/macos/test-install.sh +51 -0
- package/packaging/macos/test_package.py +74 -0
- package/packaging/macos/uninstall.sh +24 -0
- package/packaging/macos/verify-pkg.py +61 -0
- package/packaging/windows/build-msi.ps1 +153 -0
- package/packaging/windows/test-msi.ps1 +225 -0
- package/packaging/windows/verify-msi.ps1 +74 -0
- package/packaging/windows/vip-next.wxs +79 -0
- package/testdata/installer-fixture/main.go +40 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/NoInfer.cjs.map +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/NoInfer.d.cts +0 -35
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.d.ts +0 -35
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.js +0 -2
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.min.js +0 -2
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.min.js.map +0 -7
- package/node_modules/lando/node_modules/lru-cache/package.json +0 -93
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/LICENSE.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/README.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.d.ts +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.d.ts.map +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.js +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.js.map +0 -0
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/dist/commonjs/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.d.ts +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.d.ts.map +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.js +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.js.map +0 -0
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/dist/esm/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/LICENSE.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/dist/commonjs/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/dist/esm/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/package.json +0 -0
|
@@ -34,10 +34,19 @@ const argumentsPrefix = [
|
|
|
34
34
|
|
|
35
35
|
const encodeCommand = command => Buffer.from(command, 'utf16le').toString('base64');
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
/*
|
|
38
|
+
PowerShell's tokenizer treats the typographic single quotes U+2018, U+2019, U+201A, and U+201B as string delimiters, exactly like the ASCII one, and it does not require the closing quote to match the opening quote. Escaping only the ASCII quote would let any of the others terminate the string and inject a statement. Doubling works for all of them.
|
|
39
|
+
*/
|
|
40
|
+
const escapeArgument = value => `'${String(value).replaceAll(/['‘’‚‛]/g, match => match + match)}'`;
|
|
38
41
|
|
|
39
42
|
const createArguments = command => [...argumentsPrefix, encodeCommand(command)];
|
|
40
43
|
|
|
44
|
+
const createExecFileOptions = options => ({
|
|
45
|
+
encoding: 'utf8',
|
|
46
|
+
...options,
|
|
47
|
+
shell: false,
|
|
48
|
+
});
|
|
49
|
+
|
|
41
50
|
export const executePowerShell = async (command, options = {}) => {
|
|
42
51
|
const {
|
|
43
52
|
powerShellPath: psPath,
|
|
@@ -47,10 +56,7 @@ export const executePowerShell = async (command, options = {}) => {
|
|
|
47
56
|
return execFile(
|
|
48
57
|
psPath ?? powerShellPath(),
|
|
49
58
|
createArguments(command),
|
|
50
|
-
|
|
51
|
-
encoding: 'utf8',
|
|
52
|
-
...execFileOptions,
|
|
53
|
-
},
|
|
59
|
+
createExecFileOptions(execFileOptions),
|
|
54
60
|
);
|
|
55
61
|
};
|
|
56
62
|
|
|
@@ -68,9 +74,6 @@ export const executePowerShellSync = (command, options = {}) => {
|
|
|
68
74
|
return childProcess.execFileSync(
|
|
69
75
|
psPath ?? powerShellPath(),
|
|
70
76
|
createArguments(command),
|
|
71
|
-
|
|
72
|
-
encoding: 'utf8',
|
|
73
|
-
...execFileOptions,
|
|
74
|
-
},
|
|
77
|
+
createExecFileOptions(execFileOptions),
|
|
75
78
|
);
|
|
76
79
|
};
|
|
@@ -76,7 +76,7 @@ The PowerShell command to execute.
|
|
|
76
76
|
|
|
77
77
|
Type: `object`
|
|
78
78
|
|
|
79
|
-
The below option and
|
|
79
|
+
The below option and all options except `shell` in Node.js [`child_process.execFile()`](https://nodejs.org/api/child_process.html#child_processexecfilefile-args-options-callback) are supported. PowerShell is always executed directly to prevent shell injection.
|
|
80
80
|
|
|
81
81
|
##### powerShellPath
|
|
82
82
|
|
|
@@ -126,6 +126,11 @@ Returns: `string`
|
|
|
126
126
|
|
|
127
127
|
Escape a string argument for use in PowerShell single-quoted strings.
|
|
128
128
|
|
|
129
|
+
> [!IMPORTANT]
|
|
130
|
+
> This makes a value safe as a PowerShell string literal, not as an argument to a native program. PowerShell removes the outer quotes before passing a value onwards, and the receiving process then re-splits it under its own command-line rules, where spaces and double quotes are delimiters. For example, `Start-Process -ArgumentList` receives `'a b'` as two arguments rather than one.
|
|
131
|
+
>
|
|
132
|
+
> Escaping also does not make an untrusted value safe to use as the program that `Start-Process` runs. Validate such values against an allowlist.
|
|
133
|
+
|
|
129
134
|
#### value
|
|
130
135
|
|
|
131
136
|
Type: `unknown`
|
|
@@ -187,7 +192,7 @@ The PowerShell command to execute.
|
|
|
187
192
|
|
|
188
193
|
Type: `object`
|
|
189
194
|
|
|
190
|
-
The below option and
|
|
195
|
+
The below option and all options except `shell` in Node.js [`child_process.execFileSync()`](https://nodejs.org/api/child_process.html#child_processexecfilesyncfile-args-options) are supported. PowerShell is always executed directly to prevent shell injection.
|
|
191
196
|
|
|
192
197
|
##### powerShellPath
|
|
193
198
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Manager, ManagerOptions } from "./manager.js";
|
|
2
|
-
import { DisconnectDescription, Socket, SocketOptions } from "./socket.js";
|
|
1
|
+
import { Manager, ManagerOptions, ManagerReservedEvents } from "./manager.js";
|
|
2
|
+
import { DisconnectDescription, ExtendedError, Socket, SocketOptions, SocketReservedEvents } from "./socket.js";
|
|
3
3
|
/**
|
|
4
4
|
* Looks up an existing `Manager` for multiplexing.
|
|
5
5
|
* If the user summons:
|
|
@@ -25,5 +25,5 @@ export { protocol } from "socket.io-parser";
|
|
|
25
25
|
*
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export { DisconnectDescription, Manager, ManagerOptions, Socket, SocketOptions, lookup as io, lookup as connect, lookup as default, };
|
|
28
|
+
export { DisconnectDescription, ExtendedError, Manager, ManagerOptions, ManagerReservedEvents, Socket, SocketOptions, SocketReservedEvents, lookup as io, lookup as connect, lookup as default, };
|
|
29
29
|
export { Fetch, NodeXHR, XHR, NodeWebSocket, WebSocket, WebTransport, } from "engine.io-client";
|
|
@@ -59,7 +59,7 @@ export interface ManagerOptions extends EngineOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
parser: any;
|
|
61
61
|
}
|
|
62
|
-
interface ManagerReservedEvents {
|
|
62
|
+
export interface ManagerReservedEvents {
|
|
63
63
|
open: () => void;
|
|
64
64
|
error: (err: Error) => void;
|
|
65
65
|
ping: () => void;
|
|
@@ -292,4 +292,3 @@ export declare class Manager<ListenEvents extends EventsMap = DefaultEventsMap,
|
|
|
292
292
|
*/
|
|
293
293
|
private onreconnect;
|
|
294
294
|
}
|
|
295
|
-
export {};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -52,9 +52,12 @@ export type DisconnectDescription = Error | {
|
|
|
52
52
|
description: string;
|
|
53
53
|
context?: unknown;
|
|
54
54
|
};
|
|
55
|
-
interface
|
|
55
|
+
export interface ExtendedError extends Error {
|
|
56
|
+
data?: any;
|
|
57
|
+
}
|
|
58
|
+
export interface SocketReservedEvents {
|
|
56
59
|
connect: () => void;
|
|
57
|
-
connect_error: (err:
|
|
60
|
+
connect_error: (err: ExtendedError) => void;
|
|
58
61
|
disconnect: (reason: Socket.DisconnectReason, description?: DisconnectDescription) => void;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
@@ -522,7 +522,6 @@ class Socket extends component_emitter_1.Emitter {
|
|
|
522
522
|
case socket_io_parser_1.PacketType.CONNECT_ERROR:
|
|
523
523
|
this.destroy();
|
|
524
524
|
const err = new Error(packet.data.message);
|
|
525
|
-
// @ts-ignore
|
|
526
525
|
err.data = packet.data.data;
|
|
527
526
|
this.emitReserved("connect_error", err);
|
|
528
527
|
break;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Manager, ManagerOptions } from "./manager.js";
|
|
2
|
-
import { DisconnectDescription, Socket, SocketOptions } from "./socket.js";
|
|
1
|
+
import { Manager, ManagerOptions, ManagerReservedEvents } from "./manager.js";
|
|
2
|
+
import { DisconnectDescription, ExtendedError, Socket, SocketOptions, SocketReservedEvents } from "./socket.js";
|
|
3
3
|
/**
|
|
4
4
|
* Looks up an existing `Manager` for multiplexing.
|
|
5
5
|
* If the user summons:
|
|
@@ -25,5 +25,5 @@ export { protocol } from "socket.io-parser";
|
|
|
25
25
|
*
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export { DisconnectDescription, Manager, ManagerOptions, Socket, SocketOptions, lookup as io, lookup as connect, lookup as default, };
|
|
28
|
+
export { DisconnectDescription, ExtendedError, Manager, ManagerOptions, ManagerReservedEvents, Socket, SocketOptions, SocketReservedEvents, lookup as io, lookup as connect, lookup as default, };
|
|
29
29
|
export { Fetch, NodeXHR, XHR, NodeWebSocket, WebSocket, WebTransport, } from "engine.io-client";
|
|
@@ -59,7 +59,7 @@ export interface ManagerOptions extends EngineOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
parser: any;
|
|
61
61
|
}
|
|
62
|
-
interface ManagerReservedEvents {
|
|
62
|
+
export interface ManagerReservedEvents {
|
|
63
63
|
open: () => void;
|
|
64
64
|
error: (err: Error) => void;
|
|
65
65
|
ping: () => void;
|
|
@@ -292,4 +292,3 @@ export declare class Manager<ListenEvents extends EventsMap = DefaultEventsMap,
|
|
|
292
292
|
*/
|
|
293
293
|
private onreconnect;
|
|
294
294
|
}
|
|
295
|
-
export {};
|
|
@@ -52,9 +52,12 @@ export type DisconnectDescription = Error | {
|
|
|
52
52
|
description: string;
|
|
53
53
|
context?: unknown;
|
|
54
54
|
};
|
|
55
|
-
interface
|
|
55
|
+
export interface ExtendedError extends Error {
|
|
56
|
+
data?: any;
|
|
57
|
+
}
|
|
58
|
+
export interface SocketReservedEvents {
|
|
56
59
|
connect: () => void;
|
|
57
|
-
connect_error: (err:
|
|
60
|
+
connect_error: (err: ExtendedError) => void;
|
|
58
61
|
disconnect: (reason: Socket.DisconnectReason, description?: DisconnectDescription) => void;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Manager, ManagerOptions } from "./manager.js";
|
|
2
|
-
import { DisconnectDescription, Socket, SocketOptions } from "./socket.js";
|
|
1
|
+
import { Manager, ManagerOptions, ManagerReservedEvents } from "./manager.js";
|
|
2
|
+
import { DisconnectDescription, ExtendedError, Socket, SocketOptions, SocketReservedEvents } from "./socket.js";
|
|
3
3
|
/**
|
|
4
4
|
* Looks up an existing `Manager` for multiplexing.
|
|
5
5
|
* If the user summons:
|
|
@@ -25,5 +25,5 @@ export { protocol } from "socket.io-parser";
|
|
|
25
25
|
*
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export { DisconnectDescription, Manager, ManagerOptions, Socket, SocketOptions, lookup as io, lookup as connect, lookup as default, };
|
|
28
|
+
export { DisconnectDescription, ExtendedError, Manager, ManagerOptions, ManagerReservedEvents, Socket, SocketOptions, SocketReservedEvents, lookup as io, lookup as connect, lookup as default, };
|
|
29
29
|
export { Fetch, NodeXHR, XHR, NodeWebSocket, WebSocket, WebTransport, } from "engine.io-client";
|
|
@@ -59,7 +59,7 @@ export interface ManagerOptions extends EngineOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
parser: any;
|
|
61
61
|
}
|
|
62
|
-
interface ManagerReservedEvents {
|
|
62
|
+
export interface ManagerReservedEvents {
|
|
63
63
|
open: () => void;
|
|
64
64
|
error: (err: Error) => void;
|
|
65
65
|
ping: () => void;
|
|
@@ -292,4 +292,3 @@ export declare class Manager<ListenEvents extends EventsMap = DefaultEventsMap,
|
|
|
292
292
|
*/
|
|
293
293
|
private onreconnect;
|
|
294
294
|
}
|
|
295
|
-
export {};
|
|
@@ -52,9 +52,12 @@ export type DisconnectDescription = Error | {
|
|
|
52
52
|
description: string;
|
|
53
53
|
context?: unknown;
|
|
54
54
|
};
|
|
55
|
-
interface
|
|
55
|
+
export interface ExtendedError extends Error {
|
|
56
|
+
data?: any;
|
|
57
|
+
}
|
|
58
|
+
export interface SocketReservedEvents {
|
|
56
59
|
connect: () => void;
|
|
57
|
-
connect_error: (err:
|
|
60
|
+
connect_error: (err: ExtendedError) => void;
|
|
58
61
|
disconnect: (reason: Socket.DisconnectReason, description?: DisconnectDescription) => void;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Socket.IO v4.8.
|
|
3
|
-
* (c) 2014-
|
|
2
|
+
* Socket.IO v4.8.4
|
|
3
|
+
* (c) 2014-2026 Guillermo Rauch
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
const t=Object.create(null);t.open="0",t.close="1",t.ping="2",t.pong="3",t.message="4",t.upgrade="5",t.noop="6";const s=Object.create(null);Object.keys(t).forEach((i=>{s[t[i]]=i}));const i={type:"error",data:"parser error"},e="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,r=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:s,data:i},o,c)=>e&&i instanceof Blob?o?c(i):h(i,c):n&&(i instanceof ArrayBuffer||r(i))?o?c(i):h(new Blob([i]),c):c(t[s]+(i||"")),h=(t,s)=>{const i=new FileReader;return i.onload=function(){const t=i.result.split(",")[1];s("b"+(t||""))},i.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let a;const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)f[u.charCodeAt(t)]=t;const l="function"==typeof ArrayBuffer,d=(t,e)=>{if("string"!=typeof t)return{type:"message",data:y(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:p(t.substring(1),e)};return s[n]?t.length>1?{type:s[n],data:t.substring(1)}:{type:s[n]}:i},p=(t,s)=>{if(l){const i=(t=>{let s,i,e,n,r,o=.75*t.length,h=t.length,c=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);const a=new ArrayBuffer(o),u=new Uint8Array(a);for(s=0;s<h;s+=4)i=f[t.charCodeAt(s)],e=f[t.charCodeAt(s+1)],n=f[t.charCodeAt(s+2)],r=f[t.charCodeAt(s+3)],u[c++]=i<<2|e>>4,u[c++]=(15&e)<<4|n>>2,u[c++]=(3&n)<<6|63&r;return a})(t);return y(i,s)}return{base64:!0,data:t}},y=(t,s)=>"blob"===s?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,b=String.fromCharCode(30);function g(){return new TransformStream({transform(t,s){!function(t,s){e&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(s):n&&(t.data instanceof ArrayBuffer||r(t.data))?s(c(t.data)):o(t,!1,(t=>{a||(a=new TextEncoder),s(a.encode(t))}))}(t,(i=>{const e=i.length;let n;if(e<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,e);else if(e<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,e)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(n[0]|=128),s.enqueue(n),s.enqueue(i)}))}})}let w;function v(t){return t.reduce(((t,s)=>t+s.length),0)}function m(t,s){if(t[0].length===s)return t.shift();const i=new Uint8Array(s);let e=0;for(let n=0;n<s;n++)i[n]=t[0][e++],e===t[0].length&&(t.shift(),e=0);return t.length&&e<t[0].length&&(t[0]=t[0].slice(e)),i}function k(t){if(t)return function(t){for(var s in k.prototype)t[s]=k.prototype[s];return t}(t)}k.prototype.on=k.prototype.addEventListener=function(t,s){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(s),this},k.prototype.once=function(t,s){function i(){this.off(t,i),s.apply(this,arguments)}return i.fn=s,this.on(t,i),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(t,s){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,e=this.t["$"+t];if(!e)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var n=0;n<e.length;n++)if((i=e[n])===s||i.fn===s){e.splice(n,1);break}return 0===e.length&&delete this.t["$"+t],this},k.prototype.emit=function(t){this.t=this.t||{};for(var s=new Array(arguments.length-1),i=this.t["$"+t],e=1;e<arguments.length;e++)s[e-1]=arguments[e];if(i){e=0;for(var n=(i=i.slice(0)).length;e<n;++e)i[e].apply(this,s)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},k.prototype.hasListeners=function(t){return!!this.listeners(t).length};const A="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,s)=>s(t,0),E="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function O(t,...s){return s.reduce(((s,i)=>(t.hasOwnProperty(i)&&(s[i]=t[i]),s)),{})}const _=E.setTimeout,j=E.clearTimeout;function x(t,s){s.useNativeTimers?(t.setTimeoutFn=_.bind(E),t.clearTimeoutFn=j.bind(E)):(t.setTimeoutFn=E.setTimeout.bind(E),t.clearTimeoutFn=E.clearTimeout.bind(E))}function B(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class C extends Error{constructor(t,s,i){super(t),this.description=s,this.context=i,this.type="TransportError"}}class T extends k{constructor(t){super(),this.writable=!1,x(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,i){return super.emitReserved("error",new C(t,s,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=d(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,s={}){return t+"://"+this.i()+this.o()+this.opts.path+this.h(s)}i(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}h(t){const s=function(t){let s="";for(let i in t)t.hasOwnProperty(i)&&(s.length&&(s+="&"),s+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return s}(t);return s.length?"?"+s:""}}class N extends T{constructor(){super(...arguments),this.u=!1}get name(){return"polling"}doOpen(){this.l()}pause(t){this.readyState="pausing";const s=()=>{this.readyState="paused",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once("pollComplete",(function(){--t||s()}))),this.writable||(t++,this.once("drain",(function(){--t||s()})))}else s()}l(){this.u=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,s)=>{const i=t.split(b),e=[];for(let t=0;t<i.length;t++){const n=d(i[t],s);if(e.push(n),"error"===n.type)break}return e})(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.u=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,s)=>{const i=t.length,e=new Array(i);let n=0;t.forEach(((t,r)=>{o(t,!1,(t=>{e[r]=t,++n===i&&s(e.join(b))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return!1!==this.opts.timestampRequests&&(s[this.opts.timestampParam]=B()),this.supportsBinary||s.sid||(s.b64=1),this.createUri(t,s)}}let U=!1;try{U="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const P=U;function D(){}class M extends N{constructor(t){if(super(t),"undefined"!=typeof location){const s="https:"===location.protocol;let i=location.port;i||(i=s?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:"POST",data:t});i.on("success",s),i.on("error",((t,s)=>{this.onError("xhr post error",t,s)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,s)=>{this.onError("xhr poll error",t,s)})),this.pollXhr=t}}class S extends k{constructor(t,s,i){super(),this.createRequest=t,x(this,i),this.p=i,this.v=i.method||"GET",this.m=s,this.k=void 0!==i.data?i.data:null,this.A()}A(){var t;const s=O(this.p,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(t){}if("POST"===this.v)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{i.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.p.cookieJar)||void 0===t||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn((()=>{this.j("number"==typeof i.status?i.status:0)}),0))},i.send(this.k)}catch(t){return void this.setTimeoutFn((()=>{this.j(t)}),0)}"undefined"!=typeof document&&(this.B=S.requestsCount++,S.requests[this.B]=this)}j(t){this.emitReserved("error",t,this.O),this.C(!0)}C(t){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=D,t)try{this.O.abort()}catch(t){}"undefined"!=typeof document&&delete S.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.C())}abort(){this.C()}}if(S.requestsCount=0,S.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",L);else if("function"==typeof addEventListener){addEventListener("onpagehide"in E?"pagehide":"unload",L,!1)}function L(){for(let t in S.requests)S.requests.hasOwnProperty(t)&&S.requests[t].abort()}const R=function(){const t=F({xdomain:!1});return t&&null!==t.responseType}();class I extends M{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=R&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new S(F,this.uri(),t)}}function F(t){const s=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!s||P))return new XMLHttpRequest}catch(t){}if(!s)try{return new(E[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const $="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class V extends T{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=$?{}:O(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;o(i,this.supportsBinary,(t=>{try{this.doWrite(i,t)}catch(t){}e&&A((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=B()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const H=E.WebSocket||E.MozWebSocket;class W extends V{createSocket(t,s,i){return $?new H(t,s,i):s?new H(t,s):new H(t)}doWrite(t,s){this.ws.send(s)}}class q extends T{get name(){return"webtransport"}doOpen(){try{this.N=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.N.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.N.ready.then((()=>{this.N.createBidirectionalStream().then((t=>{const s=function(t,s){w||(w=new TextDecoder);const e=[];let n=0,r=-1,o=!1;return new TransformStream({transform(h,c){for(e.push(h);;){if(0===n){if(v(e)<1)break;const t=m(e,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(v(e)<2)break;const t=m(e,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(v(e)<8)break;const t=m(e,8),s=new DataView(t.buffer,t.byteOffset,t.length),o=s.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(i);break}r=o*Math.pow(2,32)+s.getUint32(4),n=3}else{if(v(e)<r)break;const t=m(e,r);c.enqueue(d(o?t:w.decode(t),s)),n=0}if(0===r||r>t){c.enqueue(i);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(s).getReader(),n=g();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{e.read().then((({done:t,value:s})=>{t||(this.onPacket(s),r())})).catch((t=>{}))};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.U.write(o).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;this.U.write(i).then((()=>{e&&A((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}}const X={websocket:W,webtransport:q,polling:I},z=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,J=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Q(t){if(t.length>8e3)throw"URI too long";const s=t,i=t.indexOf("["),e=t.indexOf("]");-1!=i&&-1!=e&&(t=t.substring(0,i)+t.substring(i,e).replace(/:/g,";")+t.substring(e,t.length));let n=z.exec(t||""),r={},o=14;for(;o--;)r[J[o]]=n[o]||"";return-1!=i&&-1!=e&&(r.source=s,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=function(t,s){const i=/\/{2,9}/g,e=s.replace(i,"/").split("/");"/"!=s.slice(0,1)&&0!==s.length||e.splice(0,1);"/"==s.slice(-1)&&e.splice(e.length-1,1);return e}(0,r.path),r.queryKey=function(t,s){const i={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,s,e){s&&(i[s]=e)})),i}(0,r.query),r}const G="function"==typeof addEventListener&&"function"==typeof removeEventListener,K=[];G&&addEventListener("offline",(()=>{K.forEach((t=>t()))}),!1);class Y extends k{constructor(t,s){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this.P=0,this.D=-1,this.M=-1,this.S=-1,this.L=1/0,t&&"object"==typeof t&&(s=t,t=null),t){const i=Q(t);s.hostname=i.host,s.secure="https"===i.protocol||"wss"===i.protocol,s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Q(s.host).host);x(this,s),this.secure=null!=s.secure?s.secure:"undefined"!=typeof location&&"https:"===location.protocol,s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=s.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this.R={},s.transports.forEach((t=>{const s=t.prototype.name;this.transports.push(s),this.R[s]=t})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let s={},i=t.split("&");for(let t=0,e=i.length;t<e;t++){let e=i[t].split("=");s[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return s}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this.I=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.I,!1)),"localhost"!==this.hostname&&(this.F=()=>{this.$("transport close",{description:"network connection lost"})},K.push(this.F))),this.opts.withCredentials&&(this.V=void 0),this.H()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=4,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.R[t](i)}H(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.W.bind(this)).on("packet",this.q.bind(this)).on("error",this.j.bind(this)).on("close",(t=>this.$("transport close",t)))}onOpen(){this.readyState="open",Y.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}q(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.X("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.J();break;case"error":const s=new Error("server error");s.code=t.data,this.j(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=t.pingInterval,this.M=t.pingTimeout,this.S=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.J()}J(){this.clearTimeoutFn(this.G);const t=this.D+this.M;this.L=Date.now()+t,this.G=this.setTimeoutFn((()=>{this.$("ping timeout")}),t),this.opts.autoUnref&&this.G.unref()}W(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.K();this.transport.send(t),this.P=t.length,this.emitReserved("flush")}}K(){if(!(this.S&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let i=0;i<this.writeBuffer.length;i++){const e=this.writeBuffer[i].data;if(e&&(t+="string"==typeof(s=e)?function(t){let s=0,i=0;for(let e=0,n=t.length;e<n;e++)s=t.charCodeAt(e),s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(e++,i+=4);return i}(s):Math.ceil(1.33*(s.byteLength||s.size))),i>0&&t>this.S)return this.writeBuffer.slice(0,i);t+=2}var s;return this.writeBuffer}Y(){if(!this.L)return!0;const t=Date.now()>this.L;return t&&(this.L=0,A((()=>{this.$("ping timeout")}),this.setTimeoutFn)),t}write(t,s,i){return this.X("message",t,s,i),this}send(t,s,i){return this.X("message",t,s,i),this}X(t,s,i,e){if("function"==typeof s&&(e=s,s=void 0),"function"==typeof i&&(e=i,i=null),"closing"===this.readyState||"closed"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;const n={type:t,data:s,options:i};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),e&&this.once("flush",e),this.flush()}close(){const t=()=>{this.$("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?i():t()})):this.upgrading?i():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.H();this.emitReserved("error",t),this.$("transport error",t)}$(t,s){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.G),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),G&&(this.I&&removeEventListener("beforeunload",this.I,!1),this.F)){const t=K.indexOf(this.F);-1!==t&&K.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this.P=0}}}Y.protocol=4;class Z extends Y{constructor(){super(...arguments),this.Z=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.Z.length;t++)this.tt(this.Z[t])}tt(t){let s=this.createTransport(t),i=!1;Y.priorWebsocketSuccess=!1;const e=()=>{i||(s.send([{type:"ping",data:"probe"}]),s.once("packet",(t=>{if(!i)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Y.priorWebsocketSuccess="websocket"===s.name,this.transport.pause((()=>{i||"closed"!==this.readyState&&(a(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=s.name,this.emitReserved("upgradeError",t)}})))};function n(){i||(i=!0,a(),s.close(),s=null)}const r=t=>{const i=new Error("probe error: "+t);i.transport=s.name,n(),this.emitReserved("upgradeError",i)};function o(){r("transport closed")}function h(){r("socket closed")}function c(t){s&&t.name!==s.name&&n()}const a=()=>{s.removeListener("open",e),s.removeListener("error",r),s.removeListener("close",o),this.off("close",h),this.off("upgrading",c)};s.once("open",e),s.once("error",r),s.once("close",o),this.once("close",h),this.once("upgrading",c),-1!==this.Z.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{i||s.open()}),200):s.open()}onHandshake(t){this.Z=this.st(t.upgrades),super.onHandshake(t)}st(t){const s=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&s.push(t[i]);return s}}class tt extends Z{constructor(t,s={}){const i="object"==typeof t?t:s;(!i.transports||i.transports&&"string"==typeof i.transports[0])&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map((t=>X[t])).filter((t=>!!t))),super(t,i)}}class st extends N{doPoll(){this.it().then((t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError("fetch read error",t)}))}doWrite(t,s){this.it(t).then((t=>{if(!t.ok)return this.onError("fetch write error",t.status,t);s()})).catch((t=>{this.onError("fetch write error",t)}))}it(t){var s;const i=void 0!==t,e=new Headers(this.opts.extraHeaders);return i&&e.set("content-type","text/plain;charset=UTF-8"),null===(s=this.socket.V)||void 0===s||s.appendCookies(e),fetch(this.uri(),{method:i?"POST":"GET",body:i?t:null,headers:e,credentials:this.opts.withCredentials?"include":"omit"}).then((t=>{var s;return null===(s=this.socket.V)||void 0===s||s.parseCookies(t.headers.getSetCookie()),t}))}}const it="function"==typeof ArrayBuffer,et=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,nt=Object.prototype.toString,rt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===nt.call(Blob),ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===nt.call(File);function ht(t){return it&&(t instanceof ArrayBuffer||et(t))||rt&&t instanceof Blob||ot&&t instanceof File}function ct(t,s){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,i=t.length;s<i;s++)if(ct(t[s]))return!0;return!1}if(ht(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return ct(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&ct(t[s]))return!0;return!1}function at(t){const s=[],i=t.data,e=t;return e.data=ut(i,s),e.attachments=s.length,{packet:e,buffers:s}}function ut(t,s){if(!t)return t;if(ht(t)){const i={_placeholder:!0,num:s.length};return s.push(t),i}if(Array.isArray(t)){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=ut(t[e],s);return i}if("object"==typeof t&&!(t instanceof Date)){const i={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=ut(t[e],s));return i}return t}function ft(t,s){return t.data=lt(t.data,s),delete t.attachments,t}function lt(t,s){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<s.length)return s[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=lt(t[i],s);else if("object"==typeof t)for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=lt(t[i],s));return t}const dt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pt=5;var yt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(yt||(yt={}));class bt extends k{constructor(t){super(),this.reviver=t}add(t){let s;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(t);const i=s.type===yt.BINARY_EVENT;i||s.type===yt.BINARY_ACK?(s.type=i?yt.EVENT:yt.ACK,this.reconstructor=new gt(s),0===s.attachments&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else{if(!ht(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved("decoded",s))}}decodeString(t){let s=0;const i={type:Number(t.charAt(0))};if(void 0===yt[i.type])throw new Error("unknown packet type "+i.type);if(i.type===yt.BINARY_EVENT||i.type===yt.BINARY_ACK){const e=s+1;for(;"-"!==t.charAt(++s)&&s!=t.length;);const n=t.substring(e,s);if(n!=Number(n)||"-"!==t.charAt(s))throw new Error("Illegal attachments");i.attachments=Number(n)}if("/"===t.charAt(s+1)){const e=s+1;for(;++s;){if(","===t.charAt(s))break;if(s===t.length)break}i.nsp=t.substring(e,s)}else i.nsp="/";const e=t.charAt(s+1);if(""!==e&&Number(e)==e){const e=s+1;for(;++s;){const i=t.charAt(s);if(null==i||Number(i)!=i){--s;break}if(s===t.length)break}i.id=Number(t.substring(e,s+1))}if(t.charAt(++s)){const e=this.tryParse(t.substr(s));if(!bt.isPayloadValid(i.type,e))throw new Error("invalid payload");i.data=e}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,s){switch(t){case yt.CONNECT:return vt(s);case yt.DISCONNECT:return void 0===s;case yt.CONNECT_ERROR:return"string"==typeof s||vt(s);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(s)&&("number"==typeof s[0]||"string"==typeof s[0]&&-1===dt.indexOf(s[0]));case yt.ACK:case yt.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class gt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=ft(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wt=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function vt(t){return"[object Object]"===Object.prototype.toString.call(t)}var mt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return yt},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==yt.EVENT&&t.type!==yt.ACK||!ct(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let s=""+t.type;return t.type!==yt.BINARY_EVENT&&t.type!==yt.BINARY_ACK||(s+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(s+=t.nsp+","),null!=t.id&&(s+=t.id),null!=t.data&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=at(t),i=this.encodeAsString(s.packet),e=s.buffers;return e.unshift(i),e}},Decoder:bt,isPacketValid:function(t){return"string"==typeof t.nsp&&(void 0===(s=t.id)||wt(s))&&function(t,s){switch(t){case yt.CONNECT:return void 0===s||vt(s);case yt.DISCONNECT:return void 0===s;case yt.EVENT:return Array.isArray(s)&&("number"==typeof s[0]||"string"==typeof s[0]&&-1===dt.indexOf(s[0]));case yt.ACK:return Array.isArray(s);case yt.CONNECT_ERROR:return"string"==typeof s||vt(s);default:return!1}}(t.type,t.data);var s}});function kt(t,s,i){return t.on(s,i),function(){t.off(s,i)}}const At=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Et extends k{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this.p=Object.assign({},i),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[kt(t,"open",this.onopen.bind(this)),kt(t,"packet",this.onpacket.bind(this)),kt(t,"error",this.onerror.bind(this)),kt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),"open"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var i,e,n;if(At.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(s),this;const r={type:yt.EVENT,data:s,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof s[s.length-1]){const t=this.ids++,i=s.pop();this.ut(t,i),r.id=t}const o=null===(e=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===e?void 0:e.writable,h=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.Y());return this.flags.volatile&&!o||(h?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,s){var i;const e=null!==(i=this.flags.timeout)&&void 0!==i?i:this.p.ackTimeout;if(void 0===e)return void(this.acks[t]=s);const n=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);s.call(this,new Error("operation has timed out"))}),e),r=(...t)=>{this.io.clearTimeoutFn(n),s.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...s){return new Promise(((i,e)=>{const n=(t,s)=>t?e(t):i(s);n.withError=!0,s.push(n),this.emit(t,...s)}))}ct(t){let s;"function"==typeof t[t.length-1]&&(s=t.pop());const i={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...e)=>{this.et[0];return null!==t?i.tryCount>this.p.retries&&(this.et.shift(),s&&s(t)):(this.et.shift(),s&&s(null,...e)),i.pending=!1,this.ft()})),this.et.push(i),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const s=this.et[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this.dt(t)})):this.dt(this.auth)}dt(t){this.packet({type:yt.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this.gt()}gt(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((s=>String(s.id)===t))){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case yt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(t);break;case yt.ACK:case yt.BINARY_ACK:this.onack(t);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s)}}onevent(t){const s=t.data||[];null!=t.id&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this.wt&&this.wt.length){const s=this.wt.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&"string"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...e){i||(i=!0,s.packet({type:yt.ACK,id:t,data:e}))}}onack(t){const s=this.acks[t.id];"function"==typeof s&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this.yt===s,this.yt=s,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.wt=this.wt||[],this.wt.push(t),this}prependAny(t){return this.wt=this.wt||[],this.wt.unshift(t),this}offAny(t){if(!this.wt)return this;if(t){const s=this.wt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.wt=[];return this}listenersAny(){return this.wt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const s=this.kt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const s=this.kt.slice();for(const i of s)i.apply(this,t.data)}}}function Ot(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ot.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),i=Math.floor(s*this.jitter*t);t=1&Math.floor(10*s)?t+i:t-i}return 0|Math.min(t,this.max)},Ot.prototype.reset=function(){this.attempts=0},Ot.prototype.setMin=function(t){this.ms=t},Ot.prototype.setMax=function(t){this.max=t},Ot.prototype.setJitter=function(t){this.jitter=t};class _t extends k{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(s=t,t=void 0),(s=s||{}).path=s.path||"/socket.io",this.opts=s,x(this,s),this.reconnection(!1!==s.reconnection),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=s.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new Ot({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==s.timeout?2e4:s.timeout),this.ht="closed",this.uri=t;const e=s.parser||mt;this.encoder=new e.Encoder,this.decoder=new e.Decoder,this.rt=!1!==s.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var s;return void 0===t?this.Ot:(this.Ot=t,null===(s=this.backoff)||void 0===s||s.setMin(t),this)}randomizationFactor(t){var s;return void 0===t?this._t:(this._t=t,null===(s=this.backoff)||void 0===s||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return void 0===t?this.jt:(this.jt=t,null===(s=this.backoff)||void 0===s||s.setMax(t),this)}timeout(t){return arguments.length?(this.xt=t,this):this.xt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf("open"))return this;this.engine=new tt(this.uri,this.opts);const s=this.engine,i=this;this.ht="opening",this.skipReconnect=!1;const e=kt(s,"open",(function(){i.onopen(),t&&t()})),n=s=>{this.cleanup(),this.ht="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},r=kt(s,"error",n);if(!1!==this.xt){const t=this.xt,i=this.setTimeoutFn((()=>{e(),n(new Error("timeout")),s.close()}),t);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}return this.subs.push(e),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht="open",this.emitReserved("open");const t=this.engine;this.subs.push(kt(t,"ping",this.onping.bind(this)),kt(t,"data",this.ondata.bind(this)),kt(t,"error",this.onerror.bind(this)),kt(t,"close",this.onclose.bind(this)),kt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){A((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let i=this.nsps[t];return i?this.rt&&!i.active&&i.connect():(i=new Et(this,t,s),this.nsps[t]=i),i}vt(t){const s=Object.keys(this.nsps);for(const t of s){if(this.nsps[t].active)return}this.Bt()}lt(t){const s=this.encoder.encode(t);for(let i=0;i<s.length;i++)this.engine.write(s[i],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}Bt(){this.skipReconnect=!0,this.ot=!1,this.onclose("forced close")}disconnect(){return this.Bt()}onclose(t,s){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this.ht="closed",this.emitReserved("close",t,s),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{const s=this.backoff.duration();this.ot=!0;const i=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((s=>{s?(t.ot=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()})))}),s);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const jt={};function xt(t,s){"object"==typeof t&&(s=t,t=void 0);const i=function(t,s="",i){let e=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),e=Q(t)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port="80":/^(http|ws)s$/.test(e.protocol)&&(e.port="443")),e.path=e.path||"/";const n=-1!==e.host.indexOf(":")?"["+e.host+"]":e.host;return e.id=e.protocol+"://"+n+":"+e.port+s,e.href=e.protocol+"://"+n+(i&&i.port===e.port?"":":"+e.port),e}(t,(s=s||{}).path||"/socket.io"),e=i.source,n=i.id,r=i.path,o=jt[n]&&r in jt[n].nsps;let h;return s.forceNew||s["force new connection"]||!1===s.multiplex||o?h=new _t(e,s):(jt[n]||(jt[n]=new _t(e,s)),h=jt[n]),i.query&&!s.query&&(s.query=i.queryKey),h.socket(i.path,s)}Object.assign(xt,{Manager:_t,Socket:Et,io:xt,connect:xt});export{st as Fetch,_t as Manager,W as NodeWebSocket,I as NodeXHR,Et as Socket,W as WebSocket,q as WebTransport,I as XHR,xt as connect,xt as default,xt as io,pt as protocol};
|
|
6
|
+
const t=Object.create(null);t.open="0",t.close="1",t.ping="2",t.pong="3",t.message="4",t.upgrade="5",t.noop="6";const s=Object.create(null);Object.keys(t).forEach((i=>{s[t[i]]=i}));const i={type:"error",data:"parser error"},e="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,r=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:s,data:i},o,c)=>e&&i instanceof Blob?o?c(i):h(i,c):n&&(i instanceof ArrayBuffer||r(i))?o?c(i):h(new Blob([i]),c):c(t[s]+(i||"")),h=(t,s)=>{const i=new FileReader;return i.onload=function(){const t=i.result.split(",")[1];s("b"+(t||""))},i.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let a;const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)f[u.charCodeAt(t)]=t;const l="function"==typeof ArrayBuffer,d=(t,e)=>{if("string"!=typeof t)return{type:"message",data:y(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:p(t.substring(1),e)};return s[n]?t.length>1?{type:s[n],data:t.substring(1)}:{type:s[n]}:i},p=(t,s)=>{if(l){const i=(t=>{let s,i,e,n,r,o=.75*t.length,h=t.length,c=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);const a=new ArrayBuffer(o),u=new Uint8Array(a);for(s=0;s<h;s+=4)i=f[t.charCodeAt(s)],e=f[t.charCodeAt(s+1)],n=f[t.charCodeAt(s+2)],r=f[t.charCodeAt(s+3)],u[c++]=i<<2|e>>4,u[c++]=(15&e)<<4|n>>2,u[c++]=(3&n)<<6|63&r;return a})(t);return y(i,s)}return{base64:!0,data:t}},y=(t,s)=>"blob"===s?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,b=String.fromCharCode(30);function w(){return new TransformStream({transform(t,s){!function(t,s){e&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(s):n&&(t.data instanceof ArrayBuffer||r(t.data))?s(c(t.data)):o(t,!1,(t=>{a||(a=new TextEncoder),s(a.encode(t))}))}(t,(i=>{const e=i.length;let n;if(e<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,e);else if(e<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,e)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(n[0]|=128),s.enqueue(n),s.enqueue(i)}))}})}let g;function v(t){return t.reduce(((t,s)=>t+s.length),0)}function m(t,s){if(t[0].length===s)return t.shift();const i=new Uint8Array(s);let e=0;for(let n=0;n<s;n++)i[n]=t[0][e++],e===t[0].length&&(t.shift(),e=0);return t.length&&e<t[0].length&&(t[0]=t[0].slice(e)),i}function k(t){if(t)return function(t){for(var s in k.prototype)t[s]=k.prototype[s];return t}(t)}k.prototype.on=k.prototype.addEventListener=function(t,s){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(s),this},k.prototype.once=function(t,s){function i(){this.off(t,i),s.apply(this,arguments)}return i.fn=s,this.on(t,i),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(t,s){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,e=this.t["$"+t];if(!e)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var n=0;n<e.length;n++)if((i=e[n])===s||i.fn===s){e.splice(n,1);break}return 0===e.length&&delete this.t["$"+t],this},k.prototype.emit=function(t){this.t=this.t||{};for(var s=new Array(arguments.length-1),i=this.t["$"+t],e=1;e<arguments.length;e++)s[e-1]=arguments[e];if(i){e=0;for(var n=(i=i.slice(0)).length;e<n;++e)i[e].apply(this,s)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},k.prototype.hasListeners=function(t){return!!this.listeners(t).length};const A="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,s)=>s(t,0),E="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function O(t,...s){return s.reduce(((s,i)=>(t.hasOwnProperty(i)&&(s[i]=t[i]),s)),{})}const _=E.setTimeout,j=E.clearTimeout;function B(t,s){s.useNativeTimers?(t.setTimeoutFn=_.bind(E),t.clearTimeoutFn=j.bind(E)):(t.setTimeoutFn=E.setTimeout.bind(E),t.clearTimeoutFn=E.clearTimeout.bind(E))}function x(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class C extends Error{constructor(t,s,i){super(t),this.description=s,this.context=i,this.type="TransportError"}}class T extends k{constructor(t){super(),this.writable=!1,B(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,i){return super.emitReserved("error",new C(t,s,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=d(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,s={}){return t+"://"+this.i()+this.o()+this.opts.path+this.h(s)}i(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}h(t){const s=function(t){let s="";for(let i in t)t.hasOwnProperty(i)&&(s.length&&(s+="&"),s+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return s}(t);return s.length?"?"+s:""}}class N extends T{constructor(){super(...arguments),this.u=!1}get name(){return"polling"}doOpen(){this.l()}pause(t){this.readyState="pausing";const s=()=>{this.readyState="paused",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once("pollComplete",(function(){--t||s()}))),this.writable||(t++,this.once("drain",(function(){--t||s()})))}else s()}l(){this.u=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,s)=>{const i=t.split(b),e=[];for(let t=0;t<i.length;t++){const n=d(i[t],s);if(e.push(n),"error"===n.type)break}return e})(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.u=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,s)=>{const i=t.length,e=new Array(i);let n=0;t.forEach(((t,r)=>{o(t,!1,(t=>{e[r]=t,++n===i&&s(e.join(b))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return!1!==this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||s.sid||(s.b64=1),this.createUri(t,s)}}let U=!1;try{U="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const P=U;function D(){}class M extends N{constructor(t){if(super(t),"undefined"!=typeof location){const s="https:"===location.protocol;let i=location.port;i||(i=s?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:"POST",data:t});i.on("success",s),i.on("error",((t,s)=>{this.onError("xhr post error",t,s)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,s)=>{this.onError("xhr poll error",t,s)})),this.pollXhr=t}}class S extends k{constructor(t,s,i){super(),this.createRequest=t,B(this,i),this.p=i,this.v=i.method||"GET",this.m=s,this.k=void 0!==i.data?i.data:null,this.A()}A(){var t;const s=O(this.p,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(t){}if("POST"===this.v)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{i.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.p.cookieJar)||void 0===t||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn((()=>{this.j("number"==typeof i.status?i.status:0)}),0))},i.send(this.k)}catch(t){return void this.setTimeoutFn((()=>{this.j(t)}),0)}"undefined"!=typeof document&&(this.B=S.requestsCount++,S.requests[this.B]=this)}j(t){this.emitReserved("error",t,this.O),this.C(!0)}C(t){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=D,t)try{this.O.abort()}catch(t){}"undefined"!=typeof document&&delete S.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.C())}abort(){this.C()}}if(S.requestsCount=0,S.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",L);else if("function"==typeof addEventListener){addEventListener("onpagehide"in E?"pagehide":"unload",L,!1)}function L(){for(let t in S.requests)S.requests.hasOwnProperty(t)&&S.requests[t].abort()}const R=function(){const t=F({xdomain:!1});return t&&null!==t.responseType}();class I extends M{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=R&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new S(F,this.uri(),t)}}function F(t){const s=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!s||P))return new XMLHttpRequest}catch(t){}if(!s)try{return new(E[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const $="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class V extends T{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=$?{}:O(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;o(i,this.supportsBinary,(t=>{try{this.doWrite(i,t)}catch(t){}e&&A((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const W=E.WebSocket||E.MozWebSocket;class q extends V{createSocket(t,s,i){return $?new W(t,s,i):s?new W(t,s):new W(t)}doWrite(t,s){this.ws.send(s)}}class H extends T{get name(){return"webtransport"}doOpen(){try{this.N=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.N.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.N.ready.then((()=>{this.N.createBidirectionalStream().then((t=>{const s=function(t,s){g||(g=new TextDecoder);const e=[];let n=0,r=-1,o=!1;return new TransformStream({transform(h,c){for(e.push(h);;){if(0===n){if(v(e)<1)break;const t=m(e,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(v(e)<2)break;const t=m(e,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(v(e)<8)break;const t=m(e,8),s=new DataView(t.buffer,t.byteOffset,t.length),o=s.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(i);break}r=o*Math.pow(2,32)+s.getUint32(4),n=3}else{if(v(e)<r)break;const t=m(e,r);c.enqueue(d(o?t:g.decode(t),s)),n=0}if(0===r||r>t){c.enqueue(i);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(s).getReader(),n=w();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{e.read().then((({done:t,value:s})=>{t||(this.onPacket(s),r())})).catch((t=>{}))};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.U.write(o).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;this.U.write(i).then((()=>{e&&A((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}}const X={websocket:q,webtransport:H,polling:I},z=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,J=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Q(t){if(t.length>8e3)throw"URI too long";const s=t,i=t.indexOf("["),e=t.indexOf("]");-1!=i&&-1!=e&&(t=t.substring(0,i)+t.substring(i,e).replace(/:/g,";")+t.substring(e,t.length));let n=z.exec(t||""),r={},o=14;for(;o--;)r[J[o]]=n[o]||"";return-1!=i&&-1!=e&&(r.source=s,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=function(t,s){const i=/\/{2,9}/g,e=s.replace(i,"/").split("/");"/"!=s.slice(0,1)&&0!==s.length||e.splice(0,1);"/"==s.slice(-1)&&e.splice(e.length-1,1);return e}(0,r.path),r.queryKey=function(t,s){const i={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,s,e){s&&(i[s]=e)})),i}(0,r.query),r}const G="function"==typeof addEventListener&&"function"==typeof removeEventListener,K=[];G&&addEventListener("offline",(()=>{K.forEach((t=>t()))}),!1);class Y extends k{constructor(t,s={}){var i,e;if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this.P=0,this.D=[],this.M=-1,this.S=-1,this.L=-1,this.R=1/0,t&&"object"==typeof t&&(s=t,t=null),t){const i=Q(t);s.hostname=i.host,s.secure="https"===i.protocol||"wss"===i.protocol,s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Q(s.host).host);if(B(this,s),this.secure=null!=s.secure?s.secure:"undefined"!=typeof location&&"https:"===location.protocol,s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=s.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),s.transportImplementations&&s.transports)throw new Error("specifying both 'transportImplementations' and 'transports' options is not supported");s.transportImplementations||(null===(i=s.transports)||void 0===i?void 0:i.length)&&"function"==typeof s.transports[0]?(this.transports=[],this.I=Object.create(null),(null!==(e=s.transportImplementations)&&void 0!==e?e:s.transports).forEach((t=>{const s=t.prototype.name;this.transports.push(s),this.I[s]=t}))):(this.transports=s.transports?[...s.transports]:["polling","websocket","webtransport"],this.I=X),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let s={},i=t.split("&");for(let t=0,e=i.length;t<e;t++){let e=i[t].split("=");s[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return s}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this.F=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.F,!1)),"localhost"!==this.hostname&&(this.$=()=>{this.V("transport close",{description:"network connection lost"})},K.push(this.$))),this.opts.withCredentials&&(this.W=void 0),this.q()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=4,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.I[t](i)}q(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.H.bind(this)).on("packet",this.X.bind(this)).on("error",this.j.bind(this)).on("close",(t=>this.V("transport close",t)))}J(t){let s=this.createTransport(t),i=!1;Y.priorWebsocketSuccess=!1;const e=()=>{i||(s.send([{type:"ping",data:"probe"}]),s.once("packet",(t=>{if(!i)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Y.priorWebsocketSuccess="websocket"===s.name,this.transport.pause((()=>{i||"closed"!==this.readyState&&(a(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=s.name,this.emitReserved("upgradeError",t)}})))};function n(){i||(i=!0,a(),s.close(),s=null)}const r=t=>{const i=new Error("probe error: "+t);i.transport=s.name,n(),this.emitReserved("upgradeError",i)};function o(){r("transport closed")}function h(){r("socket closed")}function c(t){s&&t.name!==s.name&&n()}const a=()=>{s.removeListener("open",e),s.removeListener("error",r),s.removeListener("close",o),this.off("close",h),this.off("upgrading",c)};s.once("open",e),s.once("error",r),s.once("close",o),this.once("close",h),this.once("upgrading",c),-1!==this.D.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{i||s.open()}),200):s.open()}onOpen(){if(this.readyState="open",Y.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.D.length;t++)this.J(this.D[t])}X(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.G("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.K();break;case"error":const s=new Error("server error");s.code=t.data,this.j(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=this.Y(t.upgrades),this.M=t.pingInterval,this.S=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.K()}K(){this.clearTimeoutFn(this.Z);const t=this.M+this.S;this.R=Date.now()+t,this.Z=this.setTimeoutFn((()=>{this.V("ping timeout")}),t),this.opts.autoUnref&&this.Z.unref()}H(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.tt();this.transport.send(t),this.P=t.length,this.emitReserved("flush")}}tt(){if(!(this.L&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let i=0;i<this.writeBuffer.length;i++){const e=this.writeBuffer[i].data;if(e&&(t+="string"==typeof(s=e)?function(t){let s=0,i=0;for(let e=0,n=t.length;e<n;e++)s=t.charCodeAt(e),s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(e++,i+=4);return i}(s):Math.ceil(1.33*(s.byteLength||s.size))),i>0&&t>this.L)return this.writeBuffer.slice(0,i);t+=2}var s;return this.writeBuffer}st(){if(!this.R)return!0;const t=Date.now()>this.R;return t&&(this.R=0,A((()=>{this.V("ping timeout")}),this.setTimeoutFn)),t}write(t,s,i){return this.G("message",t,s,i),this}send(t,s,i){return this.G("message",t,s,i),this}G(t,s,i,e){if("function"==typeof s&&(e=s,s=void 0),"function"==typeof i&&(e=i,i=null),"closing"===this.readyState||"closed"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;const n={type:t,data:s,options:i};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),e&&this.once("flush",e),this.flush()}close(){const t=()=>{this.V("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?i():t()})):this.upgrading?i():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.V("transport error",t)}V(t,s){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Z),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),G&&(this.F&&removeEventListener("beforeunload",this.F,!1),this.$)){const t=K.indexOf(this.$);-1!==t&&K.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this.P=0}}Y(t){const s=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&s.push(t[i]);return s}}Y.protocol=4;class Z extends N{doPoll(){this.it().then((t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError("fetch read error",t)}))}doWrite(t,s){this.it(t).then((t=>{if(!t.ok)return this.onError("fetch write error",t.status,t);s()})).catch((t=>{this.onError("fetch write error",t)}))}it(t){var s;const i=void 0!==t,e=new Headers(this.opts.extraHeaders);return i&&e.set("content-type","text/plain;charset=UTF-8"),null===(s=this.socket.W)||void 0===s||s.appendCookies(e),fetch(this.uri(),{method:i?"POST":"GET",body:i?t:null,headers:e,credentials:this.opts.withCredentials?"include":"omit"}).then((t=>{var s;return null===(s=this.socket.W)||void 0===s||s.parseCookies(t.headers.getSetCookie()),t}))}}const tt="function"==typeof ArrayBuffer,st=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,it=Object.prototype.toString,et="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===it.call(Blob),nt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===it.call(File);function rt(t){return tt&&(t instanceof ArrayBuffer||st(t))||et&&t instanceof Blob||nt&&t instanceof File}function ot(t,s){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,i=t.length;s<i;s++)if(ot(t[s]))return!0;return!1}if(rt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return ot(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&ot(t[s]))return!0;return!1}function ht(t){const s=[],i=t.data,e=t;return e.data=ct(i,s),e.attachments=s.length,{packet:e,buffers:s}}function ct(t,s,i){if(!t)return t;if(rt(t)){const i={_placeholder:!0,num:s.length};return s.push(t),i}if(Array.isArray(t)){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=ct(t[e],s);return i}if("object"==typeof t&&!(t instanceof Date)){if(t.toJSON&&"function"==typeof t.toJSON&&!i)return ct(t.toJSON(),s,!0);const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=ct(t[i],s));return e}return t}function at(t,s){return t.data=ut(t.data,s),delete t.attachments,t}function ut(t,s){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<s.length)return s[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ut(t[i],s);else if("object"==typeof t)for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ut(t[i],s));return t}const ft=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],lt=5;var dt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(dt||(dt={}));class pt extends k{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let s;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(t);const i=s.type===dt.BINARY_EVENT;i||s.type===dt.BINARY_ACK?(s.type=i?dt.EVENT:dt.ACK,this.reconstructor=new yt(s)):super.emitReserved("decoded",s)}else{if(!rt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved("decoded",s))}}decodeString(t){let s=0;const i={type:Number(t.charAt(0))};if(void 0===dt[i.type])throw new Error("unknown packet type "+i.type);if(i.type===dt.BINARY_EVENT||i.type===dt.BINARY_ACK){const e=s+1;for(;"-"!==t.charAt(++s)&&s!=t.length;);const n=t.substring(e,s);if(n!=Number(n)||"-"!==t.charAt(s))throw new Error("Illegal attachments");const r=Number(n);if(!bt(r)||r<1)throw new Error("Illegal attachments");if(r>this.opts.maxAttachments)throw new Error("too many attachments");i.attachments=r}if("/"===t.charAt(s+1)){const e=s+1;for(;++s;){if(","===t.charAt(s))break;if(s===t.length)break}i.nsp=t.substring(e,s)}else i.nsp="/";const e=t.charAt(s+1);if(""!==e&&Number(e)==e){const e=s+1;for(;++s;){const i=t.charAt(s);if(null==i||Number(i)!=i){--s;break}if(s===t.length)break}i.id=Number(t.substring(e,s+1))}if(t.charAt(++s)){const e=this.tryParse(t.substr(s));if(!pt.isPayloadValid(i.type,e))throw new Error("invalid payload");i.data=e}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,s){switch(t){case dt.CONNECT:return wt(s);case dt.DISCONNECT:return void 0===s;case dt.CONNECT_ERROR:return"string"==typeof s||wt(s);case dt.EVENT:case dt.BINARY_EVENT:return Array.isArray(s)&&("number"==typeof s[0]||"string"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:case dt.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=at(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const bt=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function wt(t){return"[object Object]"===Object.prototype.toString.call(t)}var gt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return dt},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==dt.EVENT&&t.type!==dt.ACK||!ot(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===dt.EVENT?dt.BINARY_EVENT:dt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let s=""+t.type;return t.type!==dt.BINARY_EVENT&&t.type!==dt.BINARY_ACK||(s+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(s+=t.nsp+","),null!=t.id&&(s+=t.id),null!=t.data&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=ht(t),i=this.encodeAsString(s.packet),e=s.buffers;return e.unshift(i),e}},Decoder:pt,isPacketValid:function(t){return"string"==typeof t.nsp&&(void 0===(s=t.id)||bt(s))&&function(t,s){switch(t){case dt.CONNECT:return void 0===s||wt(s);case dt.DISCONNECT:return void 0===s;case dt.EVENT:return Array.isArray(s)&&("number"==typeof s[0]||"string"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:return Array.isArray(s);case dt.CONNECT_ERROR:return"string"==typeof s||wt(s);default:return!1}}(t.type,t.data);var s}});function vt(t,s,i){return t.on(s,i),function(){t.off(s,i)}}const mt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kt extends k{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this.p=Object.assign({},i),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vt(t,"open",this.onopen.bind(this)),vt(t,"packet",this.onpacket.bind(this)),vt(t,"error",this.onerror.bind(this)),vt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),"open"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var i,e,n;if(mt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(s),this;const r={type:dt.EVENT,data:s,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof s[s.length-1]){const t=this.ids++,i=s.pop();this.ut(t,i),r.id=t}const o=null===(e=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===e?void 0:e.writable,h=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.st());return this.flags.volatile&&!o||(h?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,s){var i;const e=null!==(i=this.flags.timeout)&&void 0!==i?i:this.p.ackTimeout;if(void 0===e)return void(this.acks[t]=s);const n=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);s.call(this,new Error("operation has timed out"))}),e),r=(...t)=>{this.io.clearTimeoutFn(n),s.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...s){return new Promise(((i,e)=>{const n=(t,s)=>t?e(t):i(s);n.withError=!0,s.push(n),this.emit(t,...s)}))}ct(t){let s;"function"==typeof t[t.length-1]&&(s=t.pop());const i={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...e)=>{this.et[0];return null!==t?i.tryCount>this.p.retries&&(this.et.shift(),s&&s(t)):(this.et.shift(),s&&s(null,...e)),i.pending=!1,this.ft()})),this.et.push(i),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const s=this.et[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this.dt(t)})):this.dt(this.auth)}dt(t){this.packet({type:dt.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this.wt()}wt(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((s=>String(s.id)===t))){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case dt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case dt.EVENT:case dt.BINARY_EVENT:this.onevent(t);break;case dt.ACK:case dt.BINARY_ACK:this.onack(t);break;case dt.DISCONNECT:this.ondisconnect();break;case dt.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s)}}onevent(t){const s=t.data||[];null!=t.id&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this.gt&&this.gt.length){const s=this.gt.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&"string"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...e){i||(i=!0,s.packet({type:dt.ACK,id:t,data:e}))}}onack(t){const s=this.acks[t.id];"function"==typeof s&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this.yt===s,this.yt=s,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:dt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.gt=this.gt||[],this.gt.push(t),this}prependAny(t){return this.gt=this.gt||[],this.gt.unshift(t),this}offAny(t){if(!this.gt)return this;if(t){const s=this.gt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.gt=[];return this}listenersAny(){return this.gt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const s=this.kt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const s=this.kt.slice();for(const i of s)i.apply(this,t.data)}}}function At(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}At.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),i=Math.floor(s*this.jitter*t);t=1&Math.floor(10*s)?t+i:t-i}return 0|Math.min(t,this.max)},At.prototype.reset=function(){this.attempts=0},At.prototype.setMin=function(t){this.ms=t},At.prototype.setMax=function(t){this.max=t},At.prototype.setJitter=function(t){this.jitter=t};class Et extends k{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(s=t,t=void 0),(s=s||{}).path=s.path||"/socket.io",this.opts=s,B(this,s),this.reconnection(!1!==s.reconnection),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=s.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new At({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==s.timeout?2e4:s.timeout),this.ht="closed",this.uri=t;const e=s.parser||gt;this.encoder=new e.Encoder,this.decoder=new e.Decoder,this.rt=!1!==s.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var s;return void 0===t?this.Ot:(this.Ot=t,null===(s=this.backoff)||void 0===s||s.setMin(t),this)}randomizationFactor(t){var s;return void 0===t?this._t:(this._t=t,null===(s=this.backoff)||void 0===s||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return void 0===t?this.jt:(this.jt=t,null===(s=this.backoff)||void 0===s||s.setMax(t),this)}timeout(t){return arguments.length?(this.Bt=t,this):this.Bt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf("open"))return this;this.engine=new Y(this.uri,this.opts);const s=this.engine,i=this;this.ht="opening",this.skipReconnect=!1;const e=vt(s,"open",(function(){i.onopen(),t&&t()})),n=s=>{this.cleanup(),this.ht="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},r=vt(s,"error",n);if(!1!==this.Bt){const t=this.Bt,i=this.setTimeoutFn((()=>{e(),n(new Error("timeout")),s.close()}),t);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}return this.subs.push(e),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht="open",this.emitReserved("open");const t=this.engine;this.subs.push(vt(t,"ping",this.onping.bind(this)),vt(t,"data",this.ondata.bind(this)),vt(t,"error",this.onerror.bind(this)),vt(t,"close",this.onclose.bind(this)),vt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){A((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let i=this.nsps[t];return i?this.rt&&!i.active&&i.connect():(i=new kt(this,t,s),this.nsps[t]=i),i}vt(t){const s=Object.keys(this.nsps);for(const t of s){if(this.nsps[t].active)return}this.xt()}lt(t){const s=this.encoder.encode(t);for(let i=0;i<s.length;i++)this.engine.write(s[i],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}xt(){this.skipReconnect=!0,this.ot=!1,this.onclose("forced close")}disconnect(){return this.xt()}onclose(t,s){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this.ht="closed",this.emitReserved("close",t,s),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{const s=this.backoff.duration();this.ot=!0;const i=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((s=>{s?(t.ot=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()})))}),s);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ot={};function _t(t,s){"object"==typeof t&&(s=t,t=void 0);const i=function(t,s="",i){let e=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),e=Q(t)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port="80":/^(http|ws)s$/.test(e.protocol)&&(e.port="443")),e.path=e.path||"/";const n=-1!==e.host.indexOf(":")?"["+e.host+"]":e.host;return e.id=e.protocol+"://"+n+":"+e.port+s,e.href=e.protocol+"://"+n+(i&&i.port===e.port?"":":"+e.port),e}(t,(s=s||{}).path||"/socket.io"),e=i.source,n=i.id,r=i.path,o=Ot[n]&&r in Ot[n].nsps;let h;return s.forceNew||s["force new connection"]||!1===s.multiplex||o?h=new Et(e,s):(Ot[n]||(Ot[n]=new Et(e,s)),h=Ot[n]),i.query&&!s.query&&(s.query=i.queryKey),h.socket(i.path,s)}Object.assign(_t,{Manager:Et,Socket:kt,io:_t,connect:_t});export{Z as Fetch,Et as Manager,q as NodeWebSocket,I as NodeXHR,kt as Socket,q as WebSocket,H as WebTransport,I as XHR,_t as connect,_t as default,_t as io,lt as protocol};
|
|
7
7
|
//# sourceMappingURL=socket.io.esm.min.js.map
|