zudoku 0.1.1-dev.9 → 0.3.0-dev.100
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/LICENSE.md +21 -0
- package/cli.js +5 -1
- package/dist/app/App.d.ts +1 -2
- package/dist/app/App.js +1 -19
- package/dist/app/App.js.map +1 -1
- package/dist/app/demo.d.ts +2 -0
- package/dist/app/demo.js +52 -0
- package/dist/app/demo.js.map +1 -0
- package/dist/app/entry.client.d.ts +2 -0
- package/dist/app/entry.client.js +35 -0
- package/dist/app/entry.client.js.map +1 -0
- package/dist/app/entry.server.d.ts +14 -0
- package/dist/app/entry.server.js +105 -0
- package/dist/app/entry.server.js.map +1 -0
- package/dist/app/main.d.ts +6 -1
- package/dist/app/main.js +79 -4
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.d.ts +2 -0
- package/dist/app/standalone.js +49 -0
- package/dist/app/standalone.js.map +1 -0
- package/dist/app/tailwind.d.ts +1 -1
- package/dist/app/tailwind.js +0 -4
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.js +3 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +3 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/outdated.js +4 -4
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +4 -4
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +6 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +34 -36
- package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
- package/dist/config/validators/InputSidebarSchema.js +71 -0
- package/dist/config/validators/InputSidebarSchema.js.map +1 -0
- package/dist/config/validators/SidebarSchema.d.ts +17 -0
- package/dist/config/validators/SidebarSchema.js +76 -0
- package/dist/config/validators/SidebarSchema.js.map +1 -0
- package/dist/config/validators/auth.d.ts +2 -0
- package/dist/config/validators/auth.js +2 -0
- package/dist/config/validators/auth.js.map +1 -0
- package/dist/config/validators/validate.d.ts +1323 -0
- package/dist/config/validators/validate.js +182 -0
- package/dist/config/validators/validate.js.map +1 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
- package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +15 -0
- package/dist/lib/authentication/authentication.js.map +1 -0
- package/dist/lib/authentication/components/SignIn.d.ts +1 -0
- package/dist/lib/authentication/components/SignIn.js +14 -0
- package/dist/lib/authentication/components/SignIn.js.map +1 -0
- package/dist/lib/authentication/components/SignOut.d.ts +1 -0
- package/dist/lib/authentication/components/SignOut.js +12 -0
- package/dist/lib/authentication/components/SignOut.js.map +1 -0
- package/dist/lib/authentication/components/SignUp.d.ts +1 -0
- package/dist/lib/authentication/components/SignUp.js +10 -0
- package/dist/lib/authentication/components/SignUp.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +15 -0
- package/dist/lib/authentication/errors.js +10 -0
- package/dist/lib/authentication/errors.js.map +1 -0
- package/dist/lib/authentication/hook.d.ts +8 -0
- package/dist/lib/authentication/hook.js +30 -0
- package/dist/lib/authentication/hook.js.map +1 -0
- package/dist/lib/authentication/providers/auth0.d.ts +4 -0
- package/dist/lib/authentication/providers/auth0.js +46 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.d.ts +4 -0
- package/dist/lib/authentication/providers/clerk.js +85 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -0
- package/dist/lib/authentication/providers/openid.d.ts +58 -0
- package/dist/lib/authentication/providers/openid.js +256 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +14 -0
- package/dist/lib/authentication/state.js +6 -0
- package/dist/lib/authentication/state.js.map +1 -0
- package/dist/lib/components/AnchorLink.js.map +1 -0
- package/dist/lib/components/Bootstrap.d.ts +13 -0
- package/dist/lib/components/Bootstrap.js +12 -0
- package/dist/lib/components/Bootstrap.js.map +1 -0
- package/dist/lib/components/CategoryHeading.js.map +1 -0
- package/dist/lib/components/ClientOnly.d.ts +3 -0
- package/dist/lib/components/ClientOnly.js +7 -0
- package/dist/lib/components/ClientOnly.js.map +1 -0
- package/dist/lib/components/DevPortal.d.ts +7 -0
- package/dist/lib/components/DevPortal.js +54 -0
- package/dist/lib/components/DevPortal.js.map +1 -0
- package/dist/lib/components/DeveloperHint.d.ts +5 -0
- package/dist/lib/components/DeveloperHint.js +10 -0
- package/dist/lib/components/DeveloperHint.js.map +1 -0
- package/dist/lib/components/Dialog.d.ts +19 -0
- package/dist/lib/components/Dialog.js +23 -0
- package/dist/lib/components/Dialog.js.map +1 -0
- package/dist/lib/components/ErrorPage.d.ts +6 -0
- package/dist/lib/components/ErrorPage.js +9 -0
- package/dist/lib/components/ErrorPage.js.map +1 -0
- package/dist/lib/components/Header.d.ts +1 -0
- package/dist/lib/components/Header.js +35 -0
- package/dist/lib/components/Header.js.map +1 -0
- package/dist/lib/components/Heading.d.ts +14 -0
- package/dist/lib/components/Heading.js +42 -0
- package/dist/lib/components/Heading.js.map +1 -0
- package/dist/lib/components/InlineCode.d.ts +5 -0
- package/dist/lib/components/InlineCode.js +4 -0
- package/dist/lib/components/InlineCode.js.map +1 -0
- package/dist/lib/components/Layout.js +30 -0
- package/dist/lib/components/Layout.js.map +1 -0
- package/dist/lib/components/Markdown.js.map +1 -0
- package/dist/lib/components/NotFoundPage.d.ts +1 -0
- package/dist/lib/components/NotFoundPage.js +12 -0
- package/dist/lib/components/NotFoundPage.js.map +1 -0
- package/dist/lib/components/Search.d.ts +1 -0
- package/dist/lib/components/Search.js +34 -0
- package/dist/lib/components/Search.js.map +1 -0
- package/dist/lib/components/Select.d.ts +13 -0
- package/dist/lib/components/Select.js +27 -0
- package/dist/lib/components/Select.js.map +1 -0
- package/dist/lib/components/SlotletProvider.d.ts +9 -0
- package/dist/lib/components/SlotletProvider.js +11 -0
- package/dist/lib/components/SlotletProvider.js.map +1 -0
- package/dist/lib/components/Spinner.d.ts +3 -0
- package/dist/lib/components/Spinner.js +4 -0
- package/dist/lib/components/Spinner.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +11 -0
- package/dist/lib/components/SyntaxHighlight.js +42 -0
- package/dist/lib/components/SyntaxHighlight.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +1 -0
- package/dist/lib/components/TopNavigation.js +15 -0
- package/dist/lib/components/TopNavigation.js.map +1 -0
- package/dist/lib/components/context/ComponentsContext.d.ts +10 -0
- package/dist/lib/components/context/ComponentsContext.js.map +1 -0
- package/dist/lib/components/context/PluginSystem.js.map +1 -0
- package/dist/lib/components/context/ThemeContext.d.ts +2 -0
- package/dist/lib/components/context/ThemeContext.js +7 -0
- package/dist/lib/components/context/ThemeContext.js.map +1 -0
- package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
- package/dist/lib/components/context/ThemeProvider.js +23 -0
- package/dist/lib/components/context/ThemeProvider.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
- package/dist/lib/components/context/ZudokuContext.js +46 -0
- package/dist/lib/components/context/ZudokuContext.js.map +1 -0
- package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
- package/dist/lib/components/context/ZudokuProvider.js +16 -0
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
- package/dist/lib/components/index.d.ts +32 -0
- package/dist/lib/components/index.js +22 -0
- package/dist/lib/components/index.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
- package/dist/lib/components/navigation/Sidebar.js +12 -0
- package/dist/lib/components/navigation/Sidebar.js.map +1 -0
- package/dist/lib/components/navigation/SidebarBadge.d.ts +23 -0
- package/dist/lib/components/navigation/SidebarBadge.js +24 -0
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
- package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
- package/dist/lib/components/navigation/SidebarCategory.js +33 -0
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
- package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
- package/dist/lib/components/navigation/SidebarItem.js +42 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +6 -0
- package/dist/lib/components/navigation/SidebarWrapper.js +7 -0
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +16 -0
- package/dist/lib/components/navigation/utils.js +85 -0
- package/dist/lib/components/navigation/utils.js.map +1 -0
- package/dist/lib/core/DevPortalContext.d.ts +74 -0
- package/dist/lib/core/DevPortalContext.js +49 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +41 -0
- package/dist/lib/core/plugins.js +8 -0
- package/dist/lib/core/plugins.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.d.ts +3 -0
- package/dist/lib/errors/ErrorAlert.js +8 -0
- package/dist/lib/errors/ErrorAlert.js.map +1 -0
- package/dist/lib/errors/RouterError.d.ts +1 -0
- package/dist/lib/errors/RouterError.js +12 -0
- package/dist/lib/errors/RouterError.js.map +1 -0
- package/dist/lib/errors/ServerError.d.ts +3 -0
- package/dist/lib/errors/ServerError.js +6 -0
- package/dist/lib/errors/ServerError.js.map +1 -0
- package/dist/lib/errors/TopLevelError.d.ts +2 -0
- package/dist/lib/errors/TopLevelError.js +7 -0
- package/dist/lib/errors/TopLevelError.js.map +1 -0
- package/dist/lib/oas/graphql/index.js +299 -0
- package/dist/lib/oas/graphql/index.js.map +1 -0
- package/dist/lib/oas/parser/dereference/index.js.map +1 -0
- package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -0
- package/dist/lib/oas/parser/index.d.ts +21 -0
- package/dist/lib/oas/parser/index.js +84 -0
- package/dist/lib/oas/parser/index.js.map +1 -0
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.js +37 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/api-keys/index.d.ts +29 -0
- package/dist/lib/plugins/api-keys/index.js +92 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -0
- package/dist/lib/plugins/custom-page/index.d.ts +8 -0
- package/dist/lib/plugins/custom-page/index.js +12 -0
- package/dist/lib/plugins/custom-page/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +6 -0
- package/dist/lib/plugins/markdown/MdxPage.js +30 -0
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -0
- package/dist/lib/plugins/markdown/Toc.js +48 -0
- package/dist/lib/plugins/markdown/Toc.js.map +1 -0
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -0
- package/dist/lib/plugins/markdown/generateRoutes.js +22 -0
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -0
- package/dist/lib/plugins/markdown/index.d.ts +21 -0
- package/dist/lib/plugins/markdown/index.js +5 -0
- package/dist/lib/plugins/markdown/index.js.map +1 -0
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +12 -0
- package/dist/lib/plugins/openapi/ColorizedParam.js +50 -0
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.js +103 -0
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationListItem.js +23 -0
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterList.d.ts +7 -0
- package/dist/lib/plugins/openapi/ParameterList.js +6 -0
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterListItem.js +13 -0
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -0
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +5 -0
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +13 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -0
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListView.d.ts +7 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +27 -0
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.d.ts +8 -0
- package/dist/lib/plugins/openapi/Sidecar.js +128 -0
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -0
- package/dist/lib/plugins/openapi/SidecarBox.d.ts +9 -0
- package/dist/lib/plugins/openapi/SidecarBox.js +7 -0
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/SimpleSelect.d.ts +10 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/createServer.js +30 -0
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +61 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/client/worker.js +20 -0
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +19 -0
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +58 -0
- package/dist/lib/plugins/openapi/graphql/gql.js +21 -0
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +291 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +576 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/index.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +7 -0
- package/dist/lib/plugins/openapi/index.js +146 -0
- package/dist/lib/plugins/openapi/index.js.map +1 -0
- package/dist/lib/plugins/openapi/interfaces.d.ts +16 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.js +5 -0
- package/dist/lib/plugins/openapi/playground/Editor.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +25 -0
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js +3 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +17 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +44 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +125 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js +31 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +22 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js +11 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +3 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +60 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -0
- package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/prose.js +4 -0
- package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
- package/dist/lib/plugins/openapi/util/urql.js.map +1 -0
- package/dist/lib/plugins/openapi-worker.d.ts +1 -0
- package/dist/lib/plugins/openapi-worker.js +2 -0
- package/dist/lib/plugins/openapi-worker.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +8 -0
- package/dist/lib/plugins/redirect/index.js +10 -0
- package/dist/lib/plugins/redirect/index.js.map +1 -0
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +2 -0
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +3 -0
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +1 -0
- package/dist/lib/plugins/search-inkeep/index.d.ts +6 -0
- package/dist/lib/plugins/search-inkeep/index.js +18 -0
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -0
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +23 -0
- package/dist/lib/plugins/search-inkeep/inkeep.js +23 -0
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +11 -0
- package/dist/lib/ui/Button.js +34 -0
- package/dist/lib/ui/Button.js.map +1 -0
- package/dist/lib/ui/Callout.js +50 -0
- package/dist/lib/ui/Callout.js.map +1 -0
- package/dist/lib/ui/Card.js +17 -0
- package/dist/lib/ui/Card.js.map +1 -0
- package/dist/lib/ui/DropdownMenu.d.ts +27 -0
- package/dist/lib/ui/DropdownMenu.js +36 -0
- package/dist/lib/ui/DropdownMenu.js.map +1 -0
- package/dist/lib/ui/Input.js.map +1 -0
- package/dist/lib/ui/Note.js.map +1 -0
- package/dist/lib/ui/Tabs.d.ts +7 -0
- package/dist/lib/ui/Tabs.js +13 -0
- package/dist/lib/ui/Tabs.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +27 -0
- package/dist/lib/util/MdxComponents.js +42 -0
- package/dist/lib/util/MdxComponents.js.map +1 -0
- package/dist/lib/util/cn.js.map +1 -0
- package/dist/lib/util/createVariantComponent.d.ts +9 -0
- package/dist/lib/util/createVariantComponent.js +17 -0
- package/dist/lib/util/createVariantComponent.js.map +1 -0
- package/dist/lib/util/createWaitForNotify.js.map +1 -0
- package/dist/lib/util/fetchTimeout.d.ts +1 -0
- package/dist/lib/util/fetchTimeout.js +14 -0
- package/dist/lib/util/fetchTimeout.js.map +1 -0
- package/dist/lib/util/groupBy.d.ts +1 -0
- package/dist/lib/util/groupBy.js +11 -0
- package/dist/lib/util/groupBy.js.map +1 -0
- package/dist/lib/util/invariant.d.ts +6 -0
- package/dist/lib/util/invariant.js +21 -0
- package/dist/lib/util/invariant.js.map +1 -0
- package/dist/lib/util/joinPath.js +9 -0
- package/dist/lib/util/joinPath.js.map +1 -0
- package/dist/lib/util/logInit.js +9 -0
- package/dist/lib/util/logInit.js.map +1 -0
- package/dist/lib/util/objectEntries.d.ts +4 -0
- package/dist/lib/util/objectEntries.js +2 -0
- package/dist/lib/util/objectEntries.js.map +1 -0
- package/dist/lib/util/pastellize.js.map +1 -0
- package/dist/lib/util/renderIf.d.ts +1 -0
- package/dist/lib/util/renderIf.js +2 -0
- package/dist/lib/util/renderIf.js.map +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
- package/dist/lib/util/slugify.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +47 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -0
- package/dist/lib/util/useScrollToTop.js.map +1 -0
- package/dist/ts.js +1 -2
- package/dist/ts.js.map +1 -1
- package/dist/vite/build.js +31 -14
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +23 -7
- package/dist/vite/config.js +153 -60
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +8 -5
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.d.ts +3 -0
- package/dist/vite/dev-server.js +60 -11
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +18 -5
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +4 -0
- package/dist/vite/plugin-api-keys.js +32 -0
- package/dist/vite/plugin-api-keys.js.map +1 -0
- package/dist/vite/plugin-api.js +9 -23
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +7 -7
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +4 -0
- package/dist/vite/plugin-component.js +21 -0
- package/dist/vite/plugin-component.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +0 -1
- package/dist/vite/plugin-config.js +2 -12
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +6 -0
- package/dist/vite/plugin-custom-css.js +54 -0
- package/dist/vite/plugin-custom-css.js.map +1 -0
- package/dist/vite/plugin-docs.js +13 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +1 -2
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +3 -1
- package/dist/vite/plugin-mdx.js +7 -5
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +6 -0
- package/dist/vite/plugin-metadata.js +24 -0
- package/dist/vite/plugin-metadata.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +4 -0
- package/dist/vite/plugin-redirect.js +32 -0
- package/dist/vite/plugin-redirect.js.map +1 -0
- package/dist/vite/plugin-sidebar.d.ts +3 -0
- package/dist/vite/plugin-sidebar.js +23 -0
- package/dist/vite/plugin-sidebar.js.map +1 -0
- package/dist/vite/plugin.js +11 -3
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +17 -0
- package/dist/vite/prerender.js +79 -0
- package/dist/vite/prerender.js.map +1 -0
- package/lib/AuthenticationPlugin-CH5NSVOu.js +55 -0
- package/lib/AuthenticationPlugin-CH5NSVOu.js.map +1 -0
- package/lib/CategoryHeading-BWq12Bfa.js +10 -0
- package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
- package/lib/Combination-D-9IH0zy.js +2789 -0
- package/lib/Combination-D-9IH0zy.js.map +1 -0
- package/lib/DeveloperHint-BQSFXH01.js +10 -0
- package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +6 -0
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +1 -0
- package/lib/Input-HmAaR6kw.js +2239 -0
- package/lib/Input-HmAaR6kw.js.map +1 -0
- package/lib/Markdown-B_Gax7at.js +14108 -0
- package/lib/Markdown-B_Gax7at.js.map +1 -0
- package/lib/MdxPage-oN3huD58.js +187 -0
- package/lib/MdxPage-oN3huD58.js.map +1 -0
- package/lib/OperationList-Ctj0ihBN.js +448 -0
- package/lib/OperationList-Ctj0ihBN.js.map +1 -0
- package/lib/Route-DAF15JAU.js +14 -0
- package/lib/Route-DAF15JAU.js.map +1 -0
- package/lib/SlotletProvider-CzMAO73_.js +82 -0
- package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
- package/lib/Spinner-BCz1kNGw.js +276 -0
- package/lib/Spinner-BCz1kNGw.js.map +1 -0
- package/lib/ZudokuContext-BIZ8zHbZ.js +1084 -0
- package/lib/ZudokuContext-BIZ8zHbZ.js.map +1 -0
- package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/assets/index-BPdJm2ty.js +4765 -0
- package/lib/assets/index-BPdJm2ty.js.map +1 -0
- package/lib/assets/worker-CR7aeKop.js +14900 -0
- package/lib/assets/worker-CR7aeKop.js.map +1 -0
- package/lib/index-7kcHaXD6.js +1771 -0
- package/lib/index-7kcHaXD6.js.map +1 -0
- package/lib/index-CtKkHGcd.js +5942 -0
- package/lib/index-CtKkHGcd.js.map +1 -0
- package/lib/index-D-9Z7HSn.js +124 -0
- package/lib/index-D-9Z7HSn.js.map +1 -0
- package/lib/index-pI9JkN46.js +4765 -0
- package/lib/index-pI9JkN46.js.map +1 -0
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js +7 -0
- package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
- package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
- package/lib/prism-java.min-d5iT_mOd.js +7 -0
- package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
- package/lib/prism-json.min-B1GJqK1k.js +2 -0
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +62 -0
- package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
- package/lib/prism-php.min-o7FpoMP_.js +11 -0
- package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +10 -0
- package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
- package/lib/router-BiRCp01d.js +2971 -0
- package/lib/router-BiRCp01d.js.map +1 -0
- package/lib/slugify-CiPVjteN.js +28 -0
- package/lib/slugify-CiPVjteN.js.map +1 -0
- package/lib/state-DsXXkBLH.js +288 -0
- package/lib/state-DsXXkBLH.js.map +1 -0
- package/lib/urql-DrBfkb92.js +1591 -0
- package/lib/urql-DrBfkb92.js.map +1 -0
- package/lib/utils-Bh4upQ0e.js +749 -0
- package/lib/utils-Bh4upQ0e.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +38 -0
- package/lib/zudoku.auth-auth0.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +79 -0
- package/lib/zudoku.auth-clerk.js.map +1 -0
- package/lib/zudoku.auth-openid.js +1081 -0
- package/lib/zudoku.auth-openid.js.map +1 -0
- package/lib/zudoku.components.js +2273 -0
- package/lib/zudoku.components.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +15114 -0
- package/lib/zudoku.openapi-worker.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +325 -0
- package/lib/zudoku.plugin-api-keys.js.map +1 -0
- package/lib/zudoku.plugin-custom-page.js +13 -0
- package/lib/zudoku.plugin-custom-page.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +31 -0
- package/lib/zudoku.plugin-markdown.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +14 -0
- package/lib/zudoku.plugin-openapi.js.map +1 -0
- package/lib/zudoku.plugin-redirect.js +11 -0
- package/lib/zudoku.plugin-redirect.js.map +1 -0
- package/lib/zudoku.plugin-search-inkeep.js +51 -0
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -0
- package/package.json +112 -38
- package/src/app/App.tsx +0 -30
- package/src/app/demo-cdn.html +26 -0
- package/src/app/demo.html +18 -0
- package/src/app/demo.tsx +61 -0
- package/src/app/entry.client.tsx +47 -0
- package/src/app/entry.server.tsx +160 -0
- package/src/app/main.css +84 -3
- package/src/app/main.tsx +95 -9
- package/src/app/standalone.html +20 -0
- package/src/app/standalone.tsx +53 -0
- package/src/app/tailwind.ts +2 -6
- package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
- package/src/lib/authentication/authentication.ts +13 -0
- package/src/lib/authentication/components/SignIn.tsx +15 -0
- package/src/lib/authentication/components/SignOut.tsx +13 -0
- package/src/lib/authentication/components/SignUp.tsx +11 -0
- package/src/lib/authentication/errors.ts +21 -0
- package/src/lib/authentication/hook.ts +34 -0
- package/src/lib/authentication/providers/auth0.tsx +63 -0
- package/src/lib/authentication/providers/clerk.tsx +98 -0
- package/src/lib/authentication/providers/openid.tsx +384 -0
- package/src/lib/authentication/state.ts +21 -0
- package/src/lib/components/Bootstrap.tsx +45 -0
- package/src/lib/components/CategoryHeading.tsx +16 -0
- package/src/lib/components/ClientOnly.tsx +13 -0
- package/src/lib/components/DevPortal.tsx +111 -0
- package/src/lib/components/DeveloperHint.tsx +25 -0
- package/src/lib/components/Dialog.tsx +119 -0
- package/src/lib/components/ErrorPage.tsx +28 -0
- package/src/lib/components/Header.tsx +142 -0
- package/src/lib/components/Heading.tsx +79 -0
- package/src/lib/components/InlineCode.tsx +19 -0
- package/src/lib/components/Layout.tsx +70 -0
- package/src/lib/components/NotFoundPage.tsx +33 -0
- package/src/lib/components/Search.tsx +60 -0
- package/src/lib/components/Select.tsx +157 -0
- package/src/lib/components/SlotletProvider.tsx +25 -0
- package/src/lib/components/Spinner.tsx +5 -0
- package/src/lib/components/SyntaxHighlight.tsx +114 -0
- package/src/lib/components/TopNavigation.tsx +37 -0
- package/src/lib/components/context/ThemeContext.tsx +8 -0
- package/src/lib/components/context/ThemeProvider.tsx +27 -0
- package/src/lib/components/context/ZudokuContext.ts +58 -0
- package/src/lib/components/context/ZudokuProvider.tsx +26 -0
- package/src/lib/components/index.ts +25 -0
- package/src/lib/components/navigation/Sidebar.tsx +24 -0
- package/src/lib/components/navigation/SidebarBadge.tsx +43 -0
- package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
- package/src/lib/components/navigation/SidebarItem.tsx +128 -0
- package/src/lib/components/navigation/SidebarWrapper.tsx +24 -0
- package/src/lib/components/navigation/utils.ts +117 -0
- package/src/lib/core/DevPortalContext.ts +134 -0
- package/src/lib/core/plugins.ts +80 -0
- package/src/lib/errors/ErrorAlert.tsx +21 -0
- package/src/lib/errors/RouterError.tsx +13 -0
- package/src/lib/errors/ServerError.tsx +5 -0
- package/src/lib/errors/TopLevelError.tsx +8 -0
- package/src/lib/oas/graphql/index.ts +433 -0
- package/src/lib/oas/parser/index.ts +115 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +94 -0
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +165 -0
- package/src/lib/plugins/api-keys/index.tsx +146 -0
- package/src/lib/plugins/custom-page/index.tsx +22 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +131 -0
- package/src/lib/plugins/markdown/Toc.tsx +135 -0
- package/src/lib/plugins/markdown/generateRoutes.tsx +39 -0
- package/src/lib/plugins/markdown/index.tsx +34 -0
- package/src/lib/plugins/openapi/ColorizedParam.tsx +87 -0
- package/src/lib/plugins/openapi/OperationList.tsx +163 -0
- package/src/lib/plugins/openapi/OperationListItem.tsx +114 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +35 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +62 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +39 -0
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +60 -0
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/SchemaListView.tsx +75 -0
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
- package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +207 -0
- package/src/lib/plugins/openapi/SidecarBox.tsx +47 -0
- package/src/lib/plugins/openapi/SimpleSelect.tsx +38 -0
- package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
- package/src/lib/plugins/openapi/client/createServer.ts +33 -0
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +80 -0
- package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
- package/src/lib/plugins/openapi/client/worker.ts +30 -0
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +111 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +70 -0
- package/src/lib/plugins/openapi/graphql/graphql.ts +854 -0
- package/src/lib/plugins/openapi/index.tsx +217 -0
- package/src/lib/plugins/openapi/interfaces.ts +10 -0
- package/src/lib/plugins/openapi/playground/Editor.tsx +4 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +87 -0
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +6 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +89 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +371 -0
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +130 -0
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +32 -0
- package/src/lib/plugins/openapi/playground/createUrl.ts +19 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +72 -0
- package/src/lib/plugins/openapi/util/prose.ts +7 -0
- package/src/lib/plugins/openapi-worker.ts +1 -0
- package/src/lib/plugins/redirect/index.tsx +19 -0
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +3 -0
- package/src/lib/plugins/search-inkeep/index.tsx +63 -0
- package/src/lib/plugins/search-inkeep/inkeep.ts +32 -0
- package/src/lib/ui/Button.tsx +55 -0
- package/src/lib/ui/Callout.tsx +87 -0
- package/src/lib/ui/Card.tsx +82 -0
- package/src/lib/ui/DropdownMenu.tsx +199 -0
- package/src/lib/ui/Tabs.tsx +52 -0
- package/src/lib/util/MdxComponents.tsx +87 -0
- package/src/lib/util/createVariantComponent.tsx +35 -0
- package/src/lib/util/fetchTimeout.tsx +21 -0
- package/src/lib/util/groupBy.ts +19 -0
- package/src/lib/util/invariant.ts +26 -0
- package/src/lib/util/joinPath.tsx +11 -0
- package/src/lib/util/logInit.ts +9 -0
- package/src/lib/util/objectEntries.ts +5 -0
- package/src/lib/util/renderIf.ts +4 -0
- package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
- package/src/lib/util/useScrollToAnchor.ts +59 -0
- package/dist/app/DevPortal.d.ts +0 -25
- package/dist/app/DevPortal.js +0 -41
- package/dist/app/DevPortal.js.map +0 -1
- package/dist/app/Heading.d.ts +0 -9
- package/dist/app/Heading.js +0 -27
- package/dist/app/Heading.js.map +0 -1
- package/dist/app/authentication/authentication.d.ts +0 -13
- package/dist/app/authentication/authentication.js.map +0 -1
- package/dist/app/authentication/clerk.d.ts +0 -5
- package/dist/app/authentication/clerk.js +0 -36
- package/dist/app/authentication/clerk.js.map +0 -1
- package/dist/app/authentication/openid.d.ts +0 -11
- package/dist/app/authentication/openid.js +0 -118
- package/dist/app/authentication/openid.js.map +0 -1
- package/dist/app/components/AnchorLink.js.map +0 -1
- package/dist/app/components/CategoryHeading.js.map +0 -1
- package/dist/app/components/Dialog.d.ts +0 -19
- package/dist/app/components/Dialog.js +0 -23
- package/dist/app/components/Dialog.js.map +0 -1
- package/dist/app/components/DynamicIcon.d.ts +0 -6
- package/dist/app/components/DynamicIcon.js +0 -6
- package/dist/app/components/DynamicIcon.js.map +0 -1
- package/dist/app/components/Header.d.ts +0 -1
- package/dist/app/components/Header.js +0 -15
- package/dist/app/components/Header.js.map +0 -1
- package/dist/app/components/Input.js.map +0 -1
- package/dist/app/components/Layout.js +0 -31
- package/dist/app/components/Layout.js.map +0 -1
- package/dist/app/components/Markdown.js.map +0 -1
- package/dist/app/components/SyntaxHighlight.d.ts +0 -9
- package/dist/app/components/SyntaxHighlight.js +0 -33
- package/dist/app/components/SyntaxHighlight.js.map +0 -1
- package/dist/app/components/TopNavigation.d.ts +0 -1
- package/dist/app/components/TopNavigation.js +0 -11
- package/dist/app/components/TopNavigation.js.map +0 -1
- package/dist/app/components/context/ComponentsContext.d.ts +0 -10
- package/dist/app/components/context/ComponentsContext.js.map +0 -1
- package/dist/app/components/context/DevPortalProvider.d.ts +0 -9
- package/dist/app/components/context/DevPortalProvider.js +0 -39
- package/dist/app/components/context/DevPortalProvider.js.map +0 -1
- package/dist/app/components/context/PluginSystem.js.map +0 -1
- package/dist/app/components/context/ThemeContext.d.ts +0 -5
- package/dist/app/components/context/ThemeContext.js +0 -33
- package/dist/app/components/context/ThemeContext.js.map +0 -1
- package/dist/app/components/context/ViewportAnchorContext.js.map +0 -1
- package/dist/app/components/navigation/SideNavigation.d.ts +0 -1
- package/dist/app/components/navigation/SideNavigation.js +0 -11
- package/dist/app/components/navigation/SideNavigation.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationCategory.d.ts +0 -4
- package/dist/app/components/navigation/SideNavigationCategory.js +0 -26
- package/dist/app/components/navigation/SideNavigationCategory.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationItem.d.ts +0 -12
- package/dist/app/components/navigation/SideNavigationItem.js +0 -38
- package/dist/app/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationWrapper.d.ts +0 -3
- package/dist/app/components/navigation/SideNavigationWrapper.js +0 -6
- package/dist/app/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/app/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
- package/dist/app/components/navigation/useNavigationCollapsibleState.js +0 -16
- package/dist/app/components/navigation/useNavigationCollapsibleState.js.map +0 -1
- package/dist/app/components/navigation/util.d.ts +0 -8
- package/dist/app/components/navigation/util.js +0 -15
- package/dist/app/components/navigation/util.js.map +0 -1
- package/dist/app/core/DevPortalContext.d.ts +0 -80
- package/dist/app/core/DevPortalContext.js +0 -68
- package/dist/app/core/DevPortalContext.js.map +0 -1
- package/dist/app/core/helmet.d.ts +0 -4
- package/dist/app/core/helmet.js +0 -5
- package/dist/app/core/helmet.js.map +0 -1
- package/dist/app/core/icons.d.ts +0 -1
- package/dist/app/core/icons.js +0 -2
- package/dist/app/core/icons.js.map +0 -1
- package/dist/app/core/plugins.d.ts +0 -24
- package/dist/app/core/plugins.js +0 -4
- package/dist/app/core/plugins.js.map +0 -1
- package/dist/app/core/router.d.ts +0 -1
- package/dist/app/core/router.js +0 -2
- package/dist/app/core/router.js.map +0 -1
- package/dist/app/core/types/combine.d.ts +0 -4
- package/dist/app/core/types/combine.js +0 -2
- package/dist/app/core/types/combine.js.map +0 -1
- package/dist/app/oas/graphql/index.js +0 -290
- package/dist/app/oas/graphql/index.js.map +0 -1
- package/dist/app/oas/graphql/server.js +0 -8
- package/dist/app/oas/graphql/server.js.map +0 -1
- package/dist/app/oas/parser/dereference/index.js.map +0 -1
- package/dist/app/oas/parser/dereference/resolveRef.js.map +0 -1
- package/dist/app/oas/parser/index.d.ts +0 -21
- package/dist/app/oas/parser/index.js +0 -58
- package/dist/app/oas/parser/index.js.map +0 -1
- package/dist/app/oas/parser/upgrade/index.js.map +0 -1
- package/dist/app/plugins/api-key/SettingsApiKeys.d.ts +0 -4
- package/dist/app/plugins/api-key/SettingsApiKeys.js +0 -7
- package/dist/app/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/app/plugins/api-key/index.d.ts +0 -32
- package/dist/app/plugins/api-key/index.js +0 -55
- package/dist/app/plugins/api-key/index.js.map +0 -1
- package/dist/app/plugins/markdown/MdxPage.d.ts +0 -3
- package/dist/app/plugins/markdown/MdxPage.js +0 -55
- package/dist/app/plugins/markdown/MdxPage.js.map +0 -1
- package/dist/app/plugins/markdown/Toc.js +0 -40
- package/dist/app/plugins/markdown/Toc.js.map +0 -1
- package/dist/app/plugins/markdown/generateRoutes.d.ts +0 -3
- package/dist/app/plugins/markdown/generateRoutes.js +0 -50
- package/dist/app/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/app/plugins/markdown/index.d.ts +0 -18
- package/dist/app/plugins/markdown/index.js +0 -9
- package/dist/app/plugins/markdown/index.js.map +0 -1
- package/dist/app/plugins/openapi/ColorizedParam.d.ts +0 -12
- package/dist/app/plugins/openapi/ColorizedParam.js +0 -45
- package/dist/app/plugins/openapi/ColorizedParam.js.map +0 -1
- package/dist/app/plugins/openapi/MakeRequest.d.ts +0 -4
- package/dist/app/plugins/openapi/MakeRequest.js +0 -23
- package/dist/app/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/app/plugins/openapi/MethodBadge.d.ts +0 -13
- package/dist/app/plugins/openapi/MethodBadge.js +0 -26
- package/dist/app/plugins/openapi/MethodBadge.js.map +0 -1
- package/dist/app/plugins/openapi/OperationList.js +0 -82
- package/dist/app/plugins/openapi/OperationList.js.map +0 -1
- package/dist/app/plugins/openapi/OperationListItem.js +0 -15
- package/dist/app/plugins/openapi/OperationListItem.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterList.d.ts +0 -7
- package/dist/app/plugins/openapi/ParameterList.js +0 -5
- package/dist/app/plugins/openapi/ParameterList.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterListItem.js +0 -13
- package/dist/app/plugins/openapi/ParameterListItem.js.map +0 -1
- package/dist/app/plugins/openapi/RequestBodySidecarBox.js +0 -19
- package/dist/app/plugins/openapi/RequestBodySidecarBox.js.map +0 -1
- package/dist/app/plugins/openapi/ResponsesSidecarBox.js +0 -15
- package/dist/app/plugins/openapi/ResponsesSidecarBox.js.map +0 -1
- package/dist/app/plugins/openapi/Select.d.ts +0 -9
- package/dist/app/plugins/openapi/Select.js +0 -5
- package/dist/app/plugins/openapi/Select.js.map +0 -1
- package/dist/app/plugins/openapi/Sidecar.d.ts +0 -4
- package/dist/app/plugins/openapi/Sidecar.js +0 -94
- package/dist/app/plugins/openapi/Sidecar.js.map +0 -1
- package/dist/app/plugins/openapi/SidecarBox.d.ts +0 -8
- package/dist/app/plugins/openapi/SidecarBox.js +0 -6
- package/dist/app/plugins/openapi/SidecarBox.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/fragment-masking.d.ts +0 -19
- package/dist/app/plugins/openapi/graphql/fragment-masking.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/gql.d.ts +0 -58
- package/dist/app/plugins/openapi/graphql/gql.js +0 -22
- package/dist/app/plugins/openapi/graphql/gql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/graphql.d.ts +0 -282
- package/dist/app/plugins/openapi/graphql/graphql.js +0 -526
- package/dist/app/plugins/openapi/graphql/graphql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/index.js.map +0 -1
- package/dist/app/plugins/openapi/index.d.ts +0 -21
- package/dist/app/plugins/openapi/index.js +0 -91
- package/dist/app/plugins/openapi/index.js.map +0 -1
- package/dist/app/plugins/openapi/playground/Playground.d.ts +0 -8
- package/dist/app/plugins/openapi/playground/Playground.js +0 -98
- package/dist/app/plugins/openapi/playground/Playground.js.map +0 -1
- package/dist/app/plugins/openapi/util/generateSchemaExample.d.ts +0 -3
- package/dist/app/plugins/openapi/util/generateSchemaExample.js +0 -52
- package/dist/app/plugins/openapi/util/generateSchemaExample.js.map +0 -1
- package/dist/app/plugins/openapi/util/urql.js.map +0 -1
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js +0 -47
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/app/plugins/openapi/worker/worker.js +0 -20
- package/dist/app/plugins/openapi/worker/worker.js.map +0 -1
- package/dist/app/plugins/redirect/index.d.ts +0 -10
- package/dist/app/plugins/redirect/index.js +0 -11
- package/dist/app/plugins/redirect/index.js.map +0 -1
- package/dist/app/ui/Button.d.ts +0 -11
- package/dist/app/ui/Button.js +0 -34
- package/dist/app/ui/Button.js.map +0 -1
- package/dist/app/ui/Callout.js +0 -50
- package/dist/app/ui/Callout.js.map +0 -1
- package/dist/app/ui/Card.js +0 -17
- package/dist/app/ui/Card.js.map +0 -1
- package/dist/app/ui/Note.js.map +0 -1
- package/dist/app/ui/Tabs.d.ts +0 -7
- package/dist/app/ui/Tabs.js +0 -13
- package/dist/app/ui/Tabs.js.map +0 -1
- package/dist/app/util/MdxComponents.d.ts +0 -27
- package/dist/app/util/MdxComponents.js +0 -40
- package/dist/app/util/MdxComponents.js.map +0 -1
- package/dist/app/util/cn.js.map +0 -1
- package/dist/app/util/createVariantComponent.d.ts +0 -15
- package/dist/app/util/createVariantComponent.js +0 -12
- package/dist/app/util/createVariantComponent.js.map +0 -1
- package/dist/app/util/createWaitForNotify.js.map +0 -1
- package/dist/app/util/groupBy.d.ts +0 -6
- package/dist/app/util/groupBy.js +0 -9
- package/dist/app/util/groupBy.js.map +0 -1
- package/dist/app/util/joinPath.js +0 -8
- package/dist/app/util/joinPath.js.map +0 -1
- package/dist/app/util/pastellize.js.map +0 -1
- package/dist/app/util/slugify.js.map +0 -1
- package/dist/app/util/traverseNavigation.d.ts +0 -6
- package/dist/app/util/traverseNavigation.js +0 -30
- package/dist/app/util/traverseNavigation.js.map +0 -1
- package/dist/app/util/useScrollToAnchor.js +0 -33
- package/dist/app/util/useScrollToAnchor.js.map +0 -1
- package/dist/app/util/useScrollToTop.js.map +0 -1
- package/dist/auth.d.ts +0 -2
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -1
- package/dist/plugins.d.ts +0 -4
- package/dist/plugins.js +0 -6
- package/dist/plugins.js.map +0 -1
- package/dist/vite/plugin-html.d.ts +0 -3
- package/dist/vite/plugin-html.js +0 -50
- package/dist/vite/plugin-html.js.map +0 -1
- package/src/app/DevPortal.tsx +0 -115
- package/src/app/Heading.tsx +0 -60
- package/src/app/authentication/authentication.ts +0 -18
- package/src/app/authentication/clerk.ts +0 -47
- package/src/app/authentication/openid.ts +0 -192
- package/src/app/components/CategoryHeading.tsx +0 -16
- package/src/app/components/Dialog.tsx +0 -119
- package/src/app/components/DynamicIcon.tsx +0 -60
- package/src/app/components/Header.tsx +0 -69
- package/src/app/components/Layout.tsx +0 -56
- package/src/app/components/SyntaxHighlight.tsx +0 -94
- package/src/app/components/TopNavigation.tsx +0 -32
- package/src/app/components/context/DevPortalProvider.ts +0 -54
- package/src/app/components/context/ThemeContext.tsx +0 -46
- package/src/app/components/navigation/SideNavigation.tsx +0 -18
- package/src/app/components/navigation/SideNavigationCategory.tsx +0 -74
- package/src/app/components/navigation/SideNavigationItem.tsx +0 -143
- package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
- package/src/app/components/navigation/useNavigationCollapsibleState.ts +0 -27
- package/src/app/components/navigation/util.ts +0 -38
- package/src/app/core/DevPortalContext.ts +0 -164
- package/src/app/core/helmet.ts +0 -5
- package/src/app/core/icons.tsx +0 -1
- package/src/app/core/plugins.ts +0 -43
- package/src/app/core/router.tsx +0 -1
- package/src/app/core/types/combine.ts +0 -16
- package/src/app/oas/graphql/index.ts +0 -422
- package/src/app/oas/graphql/server.ts +0 -10
- package/src/app/oas/parser/index.ts +0 -94
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
- package/src/app/plugins/api-key/index.tsx +0 -123
- package/src/app/plugins/markdown/MdxPage.tsx +0 -128
- package/src/app/plugins/markdown/Toc.tsx +0 -122
- package/src/app/plugins/markdown/generateRoutes.tsx +0 -72
- package/src/app/plugins/markdown/index.tsx +0 -31
- package/src/app/plugins/openapi/ColorizedParam.tsx +0 -82
- package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
- package/src/app/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/app/plugins/openapi/OperationList.tsx +0 -117
- package/src/app/plugins/openapi/OperationListItem.tsx +0 -55
- package/src/app/plugins/openapi/ParameterList.tsx +0 -32
- package/src/app/plugins/openapi/ParameterListItem.tsx +0 -60
- package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +0 -51
- package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +0 -60
- package/src/app/plugins/openapi/Select.tsx +0 -35
- package/src/app/plugins/openapi/Sidecar.tsx +0 -160
- package/src/app/plugins/openapi/SidecarBox.tsx +0 -36
- package/src/app/plugins/openapi/graphql/fragment-masking.ts +0 -111
- package/src/app/plugins/openapi/graphql/gql.ts +0 -70
- package/src/app/plugins/openapi/graphql/graphql.ts +0 -795
- package/src/app/plugins/openapi/index.tsx +0 -142
- package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
- package/src/app/plugins/openapi/queries.graphql +0 -6
- package/src/app/plugins/openapi/util/generateSchemaExample.ts +0 -59
- package/src/app/plugins/openapi/worker/createSharedWorkerClient.ts +0 -60
- package/src/app/plugins/openapi/worker/worker.ts +0 -30
- package/src/app/plugins/redirect/index.tsx +0 -20
- package/src/app/ui/Button.tsx +0 -56
- package/src/app/ui/Callout.tsx +0 -87
- package/src/app/ui/Card.tsx +0 -82
- package/src/app/ui/Tabs.tsx +0 -52
- package/src/app/util/MdxComponents.tsx +0 -70
- package/src/app/util/createVariantComponent.tsx +0 -30
- package/src/app/util/groupBy.ts +0 -24
- package/src/app/util/joinPath.tsx +0 -10
- package/src/app/util/traverseNavigation.ts +0 -55
- package/src/app/util/useScrollToAnchor.ts +0 -38
- /package/dist/{app → lib}/authentication/authentication.js +0 -0
- /package/dist/{app → lib}/components/AnchorLink.d.ts +0 -0
- /package/dist/{app → lib}/components/AnchorLink.js +0 -0
- /package/dist/{app → lib}/components/CategoryHeading.d.ts +0 -0
- /package/dist/{app → lib}/components/CategoryHeading.js +0 -0
- /package/dist/{app → lib}/components/Layout.d.ts +0 -0
- /package/dist/{app → lib}/components/Markdown.d.ts +0 -0
- /package/dist/{app → lib}/components/Markdown.js +0 -0
- /package/dist/{app → lib}/components/context/ComponentsContext.js +0 -0
- /package/dist/{app → lib}/components/context/PluginSystem.d.ts +0 -0
- /package/dist/{app → lib}/components/context/PluginSystem.js +0 -0
- /package/dist/{app → lib}/components/context/ViewportAnchorContext.d.ts +0 -0
- /package/dist/{app → lib}/components/context/ViewportAnchorContext.js +0 -0
- /package/dist/{app → lib}/oas/graphql/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/index.js +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/resolveRef.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/resolveRef.js +0 -0
- /package/dist/{app → lib}/oas/parser/upgrade/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/upgrade/index.js +0 -0
- /package/dist/{app → lib}/plugins/markdown/Toc.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationList.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationListItem.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ParameterListItem.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.d.ts +0 -0
- /package/dist/{app/plugins/openapi/worker → lib/plugins/openapi/client}/worker.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/index.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/urql.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/urql.js +0 -0
- /package/dist/{app → lib}/ui/Callout.d.ts +0 -0
- /package/dist/{app → lib}/ui/Card.d.ts +0 -0
- /package/dist/{app/components → lib/ui}/Input.d.ts +0 -0
- /package/dist/{app/components → lib/ui}/Input.js +0 -0
- /package/dist/{app → lib}/ui/Note.d.ts +0 -0
- /package/dist/{app → lib}/ui/Note.js +0 -0
- /package/dist/{app → lib}/util/cn.d.ts +0 -0
- /package/dist/{app → lib}/util/cn.js +0 -0
- /package/dist/{app → lib}/util/createWaitForNotify.d.ts +0 -0
- /package/dist/{app → lib}/util/createWaitForNotify.js +0 -0
- /package/dist/{app → lib}/util/joinPath.d.ts +0 -0
- /package/dist/{app/oas/graphql/server.d.ts → lib/util/logInit.d.ts} +0 -0
- /package/dist/{app → lib}/util/pastellize.d.ts +0 -0
- /package/dist/{app → lib}/util/pastellize.js +0 -0
- /package/dist/{app → lib}/util/slugify.d.ts +0 -0
- /package/dist/{app → lib}/util/slugify.js +0 -0
- /package/dist/{app → lib}/util/useScrollToAnchor.d.ts +0 -0
- /package/dist/{app → lib}/util/useScrollToTop.d.ts +0 -0
- /package/dist/{app → lib}/util/useScrollToTop.js +0 -0
- /package/src/{app → lib}/components/AnchorLink.tsx +0 -0
- /package/src/{app → lib}/components/Markdown.tsx +0 -0
- /package/src/{app → lib}/components/context/ComponentsContext.tsx +0 -0
- /package/src/{app → lib}/components/context/PluginSystem.ts +0 -0
- /package/src/{app → lib}/components/context/ViewportAnchorContext.tsx +0 -0
- /package/src/{app → lib}/oas/parser/dereference/index.ts +0 -0
- /package/src/{app → lib}/oas/parser/dereference/resolveRef.ts +0 -0
- /package/src/{app → lib}/oas/parser/schemas/v3.0.json +0 -0
- /package/src/{app → lib}/oas/parser/schemas/v3.1.json +0 -0
- /package/src/{app → lib}/oas/parser/upgrade/index.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/graphql/index.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/util/urql.ts +0 -0
- /package/src/{app/components → lib/ui}/Input.tsx +0 -0
- /package/src/{app → lib}/ui/Note.tsx +0 -0
- /package/src/{app → lib}/util/cn.ts +0 -0
- /package/src/{app → lib}/util/createWaitForNotify.ts +0 -0
- /package/src/{app → lib}/util/pastellize.ts +0 -0
- /package/src/{app → lib}/util/slugify.ts +0 -0
- /package/src/{app → lib}/util/useScrollToTop.ts +0 -0
|
@@ -0,0 +1,1081 @@
|
|
|
1
|
+
var Ee = Object.defineProperty;
|
|
2
|
+
var Re = (t, e, n) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var g = (t, e, n) => Re(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { j as Pe } from "./jsx-runtime-B6kdoens.js";
|
|
5
|
+
import { c as Ue, a as xe } from "./_commonjsHelpers-BVfed4GL.js";
|
|
6
|
+
import { A as Le } from "./AuthenticationPlugin-CH5NSVOu.js";
|
|
7
|
+
import { u as ne } from "./state-DsXXkBLH.js";
|
|
8
|
+
var de = { exports: {} };
|
|
9
|
+
(function(t) {
|
|
10
|
+
(function(e, n) {
|
|
11
|
+
t.exports ? t.exports = n() : e.log = n();
|
|
12
|
+
})(Ue, function() {
|
|
13
|
+
var e = function() {
|
|
14
|
+
}, n = "undefined", r = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
|
|
15
|
+
"trace",
|
|
16
|
+
"debug",
|
|
17
|
+
"info",
|
|
18
|
+
"warn",
|
|
19
|
+
"error"
|
|
20
|
+
], o = {}, i = null;
|
|
21
|
+
function u(l, p) {
|
|
22
|
+
var c = l[p];
|
|
23
|
+
if (typeof c.bind == "function")
|
|
24
|
+
return c.bind(l);
|
|
25
|
+
try {
|
|
26
|
+
return Function.prototype.bind.call(c, l);
|
|
27
|
+
} catch {
|
|
28
|
+
return function() {
|
|
29
|
+
return Function.prototype.apply.apply(c, [l, arguments]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function f() {
|
|
34
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
35
|
+
}
|
|
36
|
+
function y(l) {
|
|
37
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && r ? f : console[l] !== void 0 ? u(console, l) : console.log !== void 0 ? u(console, "log") : e;
|
|
38
|
+
}
|
|
39
|
+
function _() {
|
|
40
|
+
for (var l = this.getLevel(), p = 0; p < s.length; p++) {
|
|
41
|
+
var c = s[p];
|
|
42
|
+
this[c] = p < l ? e : this.methodFactory(c, l, this.name);
|
|
43
|
+
}
|
|
44
|
+
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
45
|
+
return "No console available for logging";
|
|
46
|
+
}
|
|
47
|
+
function b(l) {
|
|
48
|
+
return function() {
|
|
49
|
+
typeof console !== n && (_.call(this), this[l].apply(this, arguments));
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function h(l, p, c) {
|
|
53
|
+
return y(l) || b.apply(this, arguments);
|
|
54
|
+
}
|
|
55
|
+
function P(l, p) {
|
|
56
|
+
var c = this, I, H, R, v = "loglevel";
|
|
57
|
+
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
58
|
+
function Te(d) {
|
|
59
|
+
var w = (s[d] || "silent").toUpperCase();
|
|
60
|
+
if (!(typeof window === n || !v)) {
|
|
61
|
+
try {
|
|
62
|
+
window.localStorage[v] = w;
|
|
63
|
+
return;
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
window.document.cookie = encodeURIComponent(v) + "=" + w + ";";
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function X() {
|
|
73
|
+
var d;
|
|
74
|
+
if (!(typeof window === n || !v)) {
|
|
75
|
+
try {
|
|
76
|
+
d = window.localStorage[v];
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
if (typeof d === n)
|
|
80
|
+
try {
|
|
81
|
+
var w = window.document.cookie, j = encodeURIComponent(v), te = w.indexOf(j + "=");
|
|
82
|
+
te !== -1 && (d = /^([^;]+)/.exec(
|
|
83
|
+
w.slice(te + j.length + 1)
|
|
84
|
+
)[1]);
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
return c.levels[d] === void 0 && (d = void 0), d;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function Ae() {
|
|
91
|
+
if (!(typeof window === n || !v)) {
|
|
92
|
+
try {
|
|
93
|
+
window.localStorage.removeItem(v);
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
98
|
+
} catch {
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function U(d) {
|
|
103
|
+
var w = d;
|
|
104
|
+
if (typeof w == "string" && c.levels[w.toUpperCase()] !== void 0 && (w = c.levels[w.toUpperCase()]), typeof w == "number" && w >= 0 && w <= c.levels.SILENT)
|
|
105
|
+
return w;
|
|
106
|
+
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
107
|
+
}
|
|
108
|
+
c.name = l, c.levels = {
|
|
109
|
+
TRACE: 0,
|
|
110
|
+
DEBUG: 1,
|
|
111
|
+
INFO: 2,
|
|
112
|
+
WARN: 3,
|
|
113
|
+
ERROR: 4,
|
|
114
|
+
SILENT: 5
|
|
115
|
+
}, c.methodFactory = p || h, c.getLevel = function() {
|
|
116
|
+
return R ?? H ?? I;
|
|
117
|
+
}, c.setLevel = function(d, w) {
|
|
118
|
+
return R = U(d), w !== !1 && Te(R), _.call(c);
|
|
119
|
+
}, c.setDefaultLevel = function(d) {
|
|
120
|
+
H = U(d), X() || c.setLevel(d, !1);
|
|
121
|
+
}, c.resetLevel = function() {
|
|
122
|
+
R = null, Ae(), _.call(c);
|
|
123
|
+
}, c.enableAll = function(d) {
|
|
124
|
+
c.setLevel(c.levels.TRACE, d);
|
|
125
|
+
}, c.disableAll = function(d) {
|
|
126
|
+
c.setLevel(c.levels.SILENT, d);
|
|
127
|
+
}, c.rebuild = function() {
|
|
128
|
+
if (i !== c && (I = U(i.getLevel())), _.call(c), i === c)
|
|
129
|
+
for (var d in o)
|
|
130
|
+
o[d].rebuild();
|
|
131
|
+
}, I = U(
|
|
132
|
+
i ? i.getLevel() : "WARN"
|
|
133
|
+
);
|
|
134
|
+
var ee = X();
|
|
135
|
+
ee != null && (R = U(ee)), _.call(c);
|
|
136
|
+
}
|
|
137
|
+
i = new P(), i.getLogger = function(p) {
|
|
138
|
+
if (typeof p != "symbol" && typeof p != "string" || p === "")
|
|
139
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
140
|
+
var c = o[p];
|
|
141
|
+
return c || (c = o[p] = new P(
|
|
142
|
+
p,
|
|
143
|
+
i.methodFactory
|
|
144
|
+
)), c;
|
|
145
|
+
};
|
|
146
|
+
var E = typeof window !== n ? window.log : void 0;
|
|
147
|
+
return i.noConflict = function() {
|
|
148
|
+
return typeof window !== n && window.log === i && (window.log = E), i;
|
|
149
|
+
}, i.getLoggers = function() {
|
|
150
|
+
return o;
|
|
151
|
+
}, i.default = i, i;
|
|
152
|
+
});
|
|
153
|
+
})(de);
|
|
154
|
+
var Ce = de.exports;
|
|
155
|
+
const re = /* @__PURE__ */ xe(Ce);
|
|
156
|
+
let M;
|
|
157
|
+
var z, le;
|
|
158
|
+
(typeof navigator > "u" || !((le = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && le.call(z, "Mozilla/5.0 "))) && (M = "oauth4webapi/v2.11.1");
|
|
159
|
+
function G(t, e) {
|
|
160
|
+
if (t == null)
|
|
161
|
+
return !1;
|
|
162
|
+
try {
|
|
163
|
+
return t instanceof e || Object.getPrototypeOf(t)[Symbol.toStringTag] === e.prototype[Symbol.toStringTag];
|
|
164
|
+
} catch {
|
|
165
|
+
return !1;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const N = Symbol(), Ie = Symbol(), q = Symbol(), je = new TextEncoder(), ze = new TextDecoder();
|
|
169
|
+
function k(t) {
|
|
170
|
+
return typeof t == "string" ? je.encode(t) : ze.decode(t);
|
|
171
|
+
}
|
|
172
|
+
const oe = 32768;
|
|
173
|
+
function Je(t) {
|
|
174
|
+
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
175
|
+
const e = [];
|
|
176
|
+
for (let n = 0; n < t.byteLength; n += oe)
|
|
177
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + oe)));
|
|
178
|
+
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
179
|
+
}
|
|
180
|
+
function Oe(t) {
|
|
181
|
+
try {
|
|
182
|
+
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
183
|
+
for (let r = 0; r < e.length; r++)
|
|
184
|
+
n[r] = e.charCodeAt(r);
|
|
185
|
+
return n;
|
|
186
|
+
} catch (e) {
|
|
187
|
+
throw new a("The input to be decoded is not correctly encoded.", { cause: e });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function A(t) {
|
|
191
|
+
return typeof t == "string" ? Oe(t) : Je(t);
|
|
192
|
+
}
|
|
193
|
+
class Ne {
|
|
194
|
+
constructor(e) {
|
|
195
|
+
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
196
|
+
}
|
|
197
|
+
get(e) {
|
|
198
|
+
let n = this.cache.get(e);
|
|
199
|
+
if (n)
|
|
200
|
+
return n;
|
|
201
|
+
if (n = this._cache.get(e))
|
|
202
|
+
return this.update(e, n), n;
|
|
203
|
+
}
|
|
204
|
+
has(e) {
|
|
205
|
+
return this.cache.has(e) || this._cache.has(e);
|
|
206
|
+
}
|
|
207
|
+
set(e, n) {
|
|
208
|
+
return this.cache.has(e) ? this.cache.set(e, n) : this.update(e, n), this;
|
|
209
|
+
}
|
|
210
|
+
delete(e) {
|
|
211
|
+
return this.cache.has(e) ? this.cache.delete(e) : this._cache.has(e) ? this._cache.delete(e) : !1;
|
|
212
|
+
}
|
|
213
|
+
update(e, n) {
|
|
214
|
+
this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
class S extends Error {
|
|
218
|
+
constructor(e) {
|
|
219
|
+
var n;
|
|
220
|
+
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class Ke extends Error {
|
|
224
|
+
constructor(e, n) {
|
|
225
|
+
var r;
|
|
226
|
+
super(e, n), this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
const a = Ke, he = new Ne(100);
|
|
230
|
+
function fe(t) {
|
|
231
|
+
return t instanceof CryptoKey;
|
|
232
|
+
}
|
|
233
|
+
function pe(t) {
|
|
234
|
+
return fe(t) && t.type === "private";
|
|
235
|
+
}
|
|
236
|
+
function We(t) {
|
|
237
|
+
return fe(t) && t.type === "public";
|
|
238
|
+
}
|
|
239
|
+
function V(t) {
|
|
240
|
+
try {
|
|
241
|
+
const e = t.headers.get("dpop-nonce");
|
|
242
|
+
e && he.set(new URL(t.url).origin, e);
|
|
243
|
+
} catch {
|
|
244
|
+
}
|
|
245
|
+
return t;
|
|
246
|
+
}
|
|
247
|
+
function x(t) {
|
|
248
|
+
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
249
|
+
}
|
|
250
|
+
function K(t) {
|
|
251
|
+
G(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
252
|
+
const e = new Headers(t);
|
|
253
|
+
if (M && !e.has("user-agent") && e.set("user-agent", M), e.has("authorization"))
|
|
254
|
+
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
255
|
+
if (e.has("dpop"))
|
|
256
|
+
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
257
|
+
return e;
|
|
258
|
+
}
|
|
259
|
+
function Y(t) {
|
|
260
|
+
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
261
|
+
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
262
|
+
return t;
|
|
263
|
+
}
|
|
264
|
+
async function De(t, e) {
|
|
265
|
+
if (!(t instanceof URL))
|
|
266
|
+
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
267
|
+
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
268
|
+
throw new TypeError('"issuer.protocol" must be "https:" or "http:"');
|
|
269
|
+
const n = new URL(t.href);
|
|
270
|
+
switch (e == null ? void 0 : e.algorithm) {
|
|
271
|
+
case void 0:
|
|
272
|
+
case "oidc":
|
|
273
|
+
n.pathname = `${n.pathname}/.well-known/openid-configuration`.replace("//", "/");
|
|
274
|
+
break;
|
|
275
|
+
case "oauth2":
|
|
276
|
+
n.pathname === "/" ? n.pathname = ".well-known/oauth-authorization-server" : n.pathname = `.well-known/oauth-authorization-server/${n.pathname}`.replace("//", "/");
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
280
|
+
}
|
|
281
|
+
const r = K(e == null ? void 0 : e.headers);
|
|
282
|
+
return r.set("accept", "application/json"), ((e == null ? void 0 : e[q]) || fetch)(n.href, {
|
|
283
|
+
headers: Object.fromEntries(r.entries()),
|
|
284
|
+
method: "GET",
|
|
285
|
+
redirect: "manual",
|
|
286
|
+
signal: e != null && e.signal ? Y(e.signal) : null
|
|
287
|
+
}).then(V);
|
|
288
|
+
}
|
|
289
|
+
function m(t) {
|
|
290
|
+
return typeof t == "string" && t.length !== 0;
|
|
291
|
+
}
|
|
292
|
+
async function He(t, e) {
|
|
293
|
+
if (!(t instanceof URL))
|
|
294
|
+
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
295
|
+
if (!G(e, Response))
|
|
296
|
+
throw new TypeError('"response" must be an instance of Response');
|
|
297
|
+
if (e.status !== 200)
|
|
298
|
+
throw new a('"response" is not a conform Authorization Server Metadata response');
|
|
299
|
+
Q(e);
|
|
300
|
+
let n;
|
|
301
|
+
try {
|
|
302
|
+
n = await e.json();
|
|
303
|
+
} catch (r) {
|
|
304
|
+
throw new a('failed to parse "response" body as JSON', { cause: r });
|
|
305
|
+
}
|
|
306
|
+
if (!x(n))
|
|
307
|
+
throw new a('"response" body must be a top level object');
|
|
308
|
+
if (!m(n.issuer))
|
|
309
|
+
throw new a('"response" body "issuer" property must be a non-empty string');
|
|
310
|
+
if (new URL(n.issuer).href !== t.href)
|
|
311
|
+
throw new a('"response" body "issuer" does not match "expectedIssuer"');
|
|
312
|
+
return n;
|
|
313
|
+
}
|
|
314
|
+
function W() {
|
|
315
|
+
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
316
|
+
}
|
|
317
|
+
function $e() {
|
|
318
|
+
return W();
|
|
319
|
+
}
|
|
320
|
+
function Fe() {
|
|
321
|
+
return W();
|
|
322
|
+
}
|
|
323
|
+
async function Me(t) {
|
|
324
|
+
if (!m(t))
|
|
325
|
+
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
326
|
+
return A(await crypto.subtle.digest("SHA-256", k(t)));
|
|
327
|
+
}
|
|
328
|
+
function Be(t) {
|
|
329
|
+
if (t instanceof CryptoKey)
|
|
330
|
+
return { key: t };
|
|
331
|
+
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
332
|
+
return {};
|
|
333
|
+
if (t.kid !== void 0 && !m(t.kid))
|
|
334
|
+
throw new TypeError('"kid" must be a non-empty string');
|
|
335
|
+
return { key: t.key, kid: t.kid };
|
|
336
|
+
}
|
|
337
|
+
function ie(t) {
|
|
338
|
+
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
339
|
+
}
|
|
340
|
+
function Ge(t, e) {
|
|
341
|
+
const n = ie(t), r = ie(e);
|
|
342
|
+
return `Basic ${btoa(`${n}:${r}`)}`;
|
|
343
|
+
}
|
|
344
|
+
function qe(t) {
|
|
345
|
+
switch (t.algorithm.hash.name) {
|
|
346
|
+
case "SHA-256":
|
|
347
|
+
return "PS256";
|
|
348
|
+
case "SHA-384":
|
|
349
|
+
return "PS384";
|
|
350
|
+
case "SHA-512":
|
|
351
|
+
return "PS512";
|
|
352
|
+
default:
|
|
353
|
+
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function Ve(t) {
|
|
357
|
+
switch (t.algorithm.hash.name) {
|
|
358
|
+
case "SHA-256":
|
|
359
|
+
return "RS256";
|
|
360
|
+
case "SHA-384":
|
|
361
|
+
return "RS384";
|
|
362
|
+
case "SHA-512":
|
|
363
|
+
return "RS512";
|
|
364
|
+
default:
|
|
365
|
+
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function Ye(t) {
|
|
369
|
+
switch (t.algorithm.namedCurve) {
|
|
370
|
+
case "P-256":
|
|
371
|
+
return "ES256";
|
|
372
|
+
case "P-384":
|
|
373
|
+
return "ES384";
|
|
374
|
+
case "P-521":
|
|
375
|
+
return "ES512";
|
|
376
|
+
default:
|
|
377
|
+
throw new S("unsupported EcKeyAlgorithm namedCurve");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function we(t) {
|
|
381
|
+
switch (t.algorithm.name) {
|
|
382
|
+
case "RSA-PSS":
|
|
383
|
+
return qe(t);
|
|
384
|
+
case "RSASSA-PKCS1-v1_5":
|
|
385
|
+
return Ve(t);
|
|
386
|
+
case "ECDSA":
|
|
387
|
+
return Ye(t);
|
|
388
|
+
case "Ed25519":
|
|
389
|
+
case "Ed448":
|
|
390
|
+
return "EdDSA";
|
|
391
|
+
default:
|
|
392
|
+
throw new S("unsupported CryptoKey algorithm name");
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function D(t) {
|
|
396
|
+
const e = t == null ? void 0 : t[N];
|
|
397
|
+
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
398
|
+
}
|
|
399
|
+
function Ze(t) {
|
|
400
|
+
const e = t == null ? void 0 : t[Ie];
|
|
401
|
+
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
402
|
+
}
|
|
403
|
+
function Z() {
|
|
404
|
+
return Math.floor(Date.now() / 1e3);
|
|
405
|
+
}
|
|
406
|
+
function Qe(t, e) {
|
|
407
|
+
const n = Z() + D(e);
|
|
408
|
+
return {
|
|
409
|
+
jti: W(),
|
|
410
|
+
aud: [t.issuer, t.token_endpoint],
|
|
411
|
+
exp: n + 60,
|
|
412
|
+
iat: n,
|
|
413
|
+
nbf: n,
|
|
414
|
+
iss: e.client_id,
|
|
415
|
+
sub: e.client_id
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
async function Xe(t, e, n, r) {
|
|
419
|
+
return ge({
|
|
420
|
+
alg: we(n),
|
|
421
|
+
kid: r
|
|
422
|
+
}, Qe(t, e), n);
|
|
423
|
+
}
|
|
424
|
+
function L(t) {
|
|
425
|
+
if (typeof t != "object" || t === null)
|
|
426
|
+
throw new TypeError('"as" must be an object');
|
|
427
|
+
if (!m(t.issuer))
|
|
428
|
+
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
429
|
+
return !0;
|
|
430
|
+
}
|
|
431
|
+
function C(t) {
|
|
432
|
+
if (typeof t != "object" || t === null)
|
|
433
|
+
throw new TypeError('"client" must be an object');
|
|
434
|
+
if (!m(t.client_id))
|
|
435
|
+
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
436
|
+
return !0;
|
|
437
|
+
}
|
|
438
|
+
function se(t) {
|
|
439
|
+
if (!m(t))
|
|
440
|
+
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
441
|
+
return t;
|
|
442
|
+
}
|
|
443
|
+
function $(t, e) {
|
|
444
|
+
if (e !== void 0)
|
|
445
|
+
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
446
|
+
}
|
|
447
|
+
function ae(t, e) {
|
|
448
|
+
if (e !== void 0)
|
|
449
|
+
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
450
|
+
}
|
|
451
|
+
async function et(t, e, n, r, s) {
|
|
452
|
+
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
453
|
+
case void 0:
|
|
454
|
+
case "client_secret_basic": {
|
|
455
|
+
$("client_secret_basic", s), r.set("authorization", Ge(e.client_id, se(e.client_secret)));
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
case "client_secret_post": {
|
|
459
|
+
$("client_secret_post", s), n.set("client_id", e.client_id), n.set("client_secret", se(e.client_secret));
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
case "private_key_jwt": {
|
|
463
|
+
if (ae("private_key_jwt", e.client_secret), s === void 0)
|
|
464
|
+
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
465
|
+
const { key: o, kid: i } = Be(s);
|
|
466
|
+
if (!pe(o))
|
|
467
|
+
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
468
|
+
n.set("client_id", e.client_id), n.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.set("client_assertion", await Xe(t, e, o, i));
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
case "tls_client_auth":
|
|
472
|
+
case "self_signed_tls_client_auth":
|
|
473
|
+
case "none": {
|
|
474
|
+
ae(e.token_endpoint_auth_method, e.client_secret), $(e.token_endpoint_auth_method, s), n.set("client_id", e.client_id);
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
default:
|
|
478
|
+
throw new S("unsupported client token_endpoint_auth_method");
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
async function ge(t, e, n) {
|
|
482
|
+
if (!n.usages.includes("sign"))
|
|
483
|
+
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
484
|
+
const r = `${A(k(JSON.stringify(t)))}.${A(k(JSON.stringify(e)))}`, s = A(await crypto.subtle.sign(ve(n), n, k(r)));
|
|
485
|
+
return `${r}.${s}`;
|
|
486
|
+
}
|
|
487
|
+
async function tt(t, e, n, r, s, o) {
|
|
488
|
+
const { privateKey: i, publicKey: u, nonce: f = he.get(n.origin) } = e;
|
|
489
|
+
if (!pe(i))
|
|
490
|
+
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
491
|
+
if (!We(u))
|
|
492
|
+
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
493
|
+
if (f !== void 0 && !m(f))
|
|
494
|
+
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
495
|
+
if (!u.extractable)
|
|
496
|
+
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
497
|
+
const y = Z() + s, _ = await ge({
|
|
498
|
+
alg: we(i),
|
|
499
|
+
typ: "dpop+jwt",
|
|
500
|
+
jwk: await rt(u)
|
|
501
|
+
}, {
|
|
502
|
+
iat: y,
|
|
503
|
+
jti: W(),
|
|
504
|
+
htm: r,
|
|
505
|
+
nonce: f,
|
|
506
|
+
htu: `${n.origin}${n.pathname}`,
|
|
507
|
+
ath: o ? A(await crypto.subtle.digest("SHA-256", k(o))) : void 0
|
|
508
|
+
}, i);
|
|
509
|
+
t.set("dpop", _);
|
|
510
|
+
}
|
|
511
|
+
let J;
|
|
512
|
+
async function nt(t) {
|
|
513
|
+
const { kty: e, e: n, n: r, x: s, y: o, crv: i } = await crypto.subtle.exportKey("jwk", t), u = { kty: e, e: n, n: r, x: s, y: o, crv: i };
|
|
514
|
+
return J.set(t, u), u;
|
|
515
|
+
}
|
|
516
|
+
async function rt(t) {
|
|
517
|
+
return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || nt(t);
|
|
518
|
+
}
|
|
519
|
+
function ot(t, e, n) {
|
|
520
|
+
if (typeof t != "string")
|
|
521
|
+
throw new TypeError(`"as.${e}" must be a string`);
|
|
522
|
+
return new URL(t);
|
|
523
|
+
}
|
|
524
|
+
function me(t, e, n) {
|
|
525
|
+
return ot(t[e], e);
|
|
526
|
+
}
|
|
527
|
+
function B(t) {
|
|
528
|
+
const e = t;
|
|
529
|
+
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
530
|
+
}
|
|
531
|
+
async function it(t, e, n, r, s, o) {
|
|
532
|
+
if (!m(t))
|
|
533
|
+
throw new TypeError('"accessToken" must be a non-empty string');
|
|
534
|
+
if (!(n instanceof URL))
|
|
535
|
+
throw new TypeError('"url" must be an instance of URL');
|
|
536
|
+
return r = K(r), (o == null ? void 0 : o.DPoP) === void 0 ? r.set("authorization", `Bearer ${t}`) : (await tt(r, o.DPoP, n, "GET", D({ [N]: o == null ? void 0 : o[N] }), t), r.set("authorization", `DPoP ${t}`)), ((o == null ? void 0 : o[q]) || fetch)(n.href, {
|
|
537
|
+
body: s,
|
|
538
|
+
headers: Object.fromEntries(r.entries()),
|
|
539
|
+
method: e,
|
|
540
|
+
redirect: "manual",
|
|
541
|
+
signal: o != null && o.signal ? Y(o.signal) : null
|
|
542
|
+
}).then(V);
|
|
543
|
+
}
|
|
544
|
+
async function st(t, e, n, r) {
|
|
545
|
+
L(t), C(e);
|
|
546
|
+
const s = me(t, "userinfo_endpoint"), o = K(r == null ? void 0 : r.headers);
|
|
547
|
+
return e.userinfo_signed_response_alg ? o.set("accept", "application/jwt") : (o.set("accept", "application/json"), o.append("accept", "application/jwt")), it(n, "GET", s, o, null, {
|
|
548
|
+
...r,
|
|
549
|
+
[N]: D(e)
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
async function at(t, e, n, r, s, o, i) {
|
|
553
|
+
return await et(t, e, s, o, i == null ? void 0 : i.clientPrivateKey), o.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[q]) || fetch)(r.href, {
|
|
554
|
+
body: s,
|
|
555
|
+
headers: Object.fromEntries(o.entries()),
|
|
556
|
+
method: n,
|
|
557
|
+
redirect: "manual",
|
|
558
|
+
signal: i != null && i.signal ? Y(i.signal) : null
|
|
559
|
+
}).then(V);
|
|
560
|
+
}
|
|
561
|
+
async function ye(t, e, n, r, s) {
|
|
562
|
+
const o = me(t, "token_endpoint");
|
|
563
|
+
r.set("grant_type", n);
|
|
564
|
+
const i = K(s == null ? void 0 : s.headers);
|
|
565
|
+
return i.set("accept", "application/json"), at(t, e, "POST", o, r, i, s);
|
|
566
|
+
}
|
|
567
|
+
async function ct(t, e, n, r) {
|
|
568
|
+
if (L(t), C(e), !m(n))
|
|
569
|
+
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
570
|
+
const s = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
|
|
571
|
+
return s.set("refresh_token", n), ye(t, e, "refresh_token", s, r);
|
|
572
|
+
}
|
|
573
|
+
const ut = /* @__PURE__ */ new WeakMap();
|
|
574
|
+
async function _e(t, e, n, r = !1, s = !1) {
|
|
575
|
+
if (L(t), C(e), !G(n, Response))
|
|
576
|
+
throw new TypeError('"response" must be an instance of Response');
|
|
577
|
+
if (n.status !== 200) {
|
|
578
|
+
let i;
|
|
579
|
+
if (i = await yt(n))
|
|
580
|
+
return i;
|
|
581
|
+
throw new a('"response" is not a conform Token Endpoint response');
|
|
582
|
+
}
|
|
583
|
+
Q(n);
|
|
584
|
+
let o;
|
|
585
|
+
try {
|
|
586
|
+
o = await n.json();
|
|
587
|
+
} catch (i) {
|
|
588
|
+
throw new a('failed to parse "response" body as JSON', { cause: i });
|
|
589
|
+
}
|
|
590
|
+
if (!x(o))
|
|
591
|
+
throw new a('"response" body must be a top level object');
|
|
592
|
+
if (!m(o.access_token))
|
|
593
|
+
throw new a('"response" body "access_token" property must be a non-empty string');
|
|
594
|
+
if (!m(o.token_type))
|
|
595
|
+
throw new a('"response" body "token_type" property must be a non-empty string');
|
|
596
|
+
if (o.token_type = o.token_type.toLowerCase(), o.token_type !== "dpop" && o.token_type !== "bearer")
|
|
597
|
+
throw new S("unsupported `token_type` value");
|
|
598
|
+
if (o.expires_in !== void 0 && (typeof o.expires_in != "number" || o.expires_in <= 0))
|
|
599
|
+
throw new a('"response" body "expires_in" property must be a positive number');
|
|
600
|
+
if (!s && o.refresh_token !== void 0 && !m(o.refresh_token))
|
|
601
|
+
throw new a('"response" body "refresh_token" property must be a non-empty string');
|
|
602
|
+
if (o.scope !== void 0 && typeof o.scope != "string")
|
|
603
|
+
throw new a('"response" body "scope" property must be a string');
|
|
604
|
+
if (!r) {
|
|
605
|
+
if (o.id_token !== void 0 && !m(o.id_token))
|
|
606
|
+
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
607
|
+
if (o.id_token) {
|
|
608
|
+
const { claims: i } = await bt(o.id_token, vt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Se, D(e), Ze(e)).then(gt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(ht.bind(void 0, t.issuer)).then(dt.bind(void 0, e.client_id));
|
|
609
|
+
if (Array.isArray(i.aud) && i.aud.length !== 1 && i.azp !== e.client_id)
|
|
610
|
+
throw new a('unexpected ID Token "azp" (authorized party) claim value');
|
|
611
|
+
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
612
|
+
throw new a('ID Token "auth_time" (authentication time) must be a positive number');
|
|
613
|
+
ut.set(o, i);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return o;
|
|
617
|
+
}
|
|
618
|
+
async function lt(t, e, n) {
|
|
619
|
+
return _e(t, e, n);
|
|
620
|
+
}
|
|
621
|
+
function dt(t, e) {
|
|
622
|
+
if (Array.isArray(e.claims.aud)) {
|
|
623
|
+
if (!e.claims.aud.includes(t))
|
|
624
|
+
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
625
|
+
} else if (e.claims.aud !== t)
|
|
626
|
+
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
627
|
+
return e;
|
|
628
|
+
}
|
|
629
|
+
function ht(t, e) {
|
|
630
|
+
if (e.claims.iss !== t)
|
|
631
|
+
throw new a('unexpected JWT "iss" (issuer) claim value');
|
|
632
|
+
return e;
|
|
633
|
+
}
|
|
634
|
+
const be = /* @__PURE__ */ new WeakSet();
|
|
635
|
+
function ft(t) {
|
|
636
|
+
return be.add(t), t;
|
|
637
|
+
}
|
|
638
|
+
async function pt(t, e, n, r, s, o) {
|
|
639
|
+
if (L(t), C(e), !be.has(n))
|
|
640
|
+
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
641
|
+
if (!m(r))
|
|
642
|
+
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
643
|
+
if (!m(s))
|
|
644
|
+
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
645
|
+
const i = T(n, "code");
|
|
646
|
+
if (!i)
|
|
647
|
+
throw new a('no authorization code in "callbackParameters"');
|
|
648
|
+
const u = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
649
|
+
return u.set("redirect_uri", r), u.set("code_verifier", s), u.set("code", i), ye(t, e, "authorization_code", u, o);
|
|
650
|
+
}
|
|
651
|
+
const wt = {
|
|
652
|
+
aud: "audience",
|
|
653
|
+
c_hash: "code hash",
|
|
654
|
+
client_id: "client id",
|
|
655
|
+
exp: "expiration time",
|
|
656
|
+
iat: "issued at",
|
|
657
|
+
iss: "issuer",
|
|
658
|
+
jti: "jwt id",
|
|
659
|
+
nonce: "nonce",
|
|
660
|
+
s_hash: "state hash",
|
|
661
|
+
sub: "subject",
|
|
662
|
+
ath: "access token hash",
|
|
663
|
+
htm: "http method",
|
|
664
|
+
htu: "http uri",
|
|
665
|
+
cnf: "confirmation"
|
|
666
|
+
};
|
|
667
|
+
function gt(t, e) {
|
|
668
|
+
for (const n of t)
|
|
669
|
+
if (e.claims[n] === void 0)
|
|
670
|
+
throw new a(`JWT "${n}" (${wt[n]}) claim missing`);
|
|
671
|
+
return e;
|
|
672
|
+
}
|
|
673
|
+
async function mt(t, e, n) {
|
|
674
|
+
const r = await _e(t, e, n, !0);
|
|
675
|
+
if (B(r))
|
|
676
|
+
return r;
|
|
677
|
+
if (r.id_token !== void 0) {
|
|
678
|
+
if (typeof r.id_token == "string" && r.id_token.length)
|
|
679
|
+
throw new a("Unexpected ID Token returned, use processAuthorizationCodeOpenIDResponse() for OpenID Connect callback processing");
|
|
680
|
+
delete r.id_token;
|
|
681
|
+
}
|
|
682
|
+
return r;
|
|
683
|
+
}
|
|
684
|
+
function Q(t) {
|
|
685
|
+
if (t.bodyUsed)
|
|
686
|
+
throw new TypeError('"response" body has been used already');
|
|
687
|
+
}
|
|
688
|
+
async function yt(t) {
|
|
689
|
+
if (t.status > 399 && t.status < 500) {
|
|
690
|
+
Q(t);
|
|
691
|
+
try {
|
|
692
|
+
const e = await t.json();
|
|
693
|
+
if (x(e) && typeof e.error == "string" && e.error.length)
|
|
694
|
+
return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
|
|
695
|
+
} catch {
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
function ce(t) {
|
|
700
|
+
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
701
|
+
throw new a(`${t.name} modulusLength must be at least 2048 bits`);
|
|
702
|
+
}
|
|
703
|
+
function _t(t) {
|
|
704
|
+
switch (t) {
|
|
705
|
+
case "P-256":
|
|
706
|
+
return "SHA-256";
|
|
707
|
+
case "P-384":
|
|
708
|
+
return "SHA-384";
|
|
709
|
+
case "P-521":
|
|
710
|
+
return "SHA-512";
|
|
711
|
+
default:
|
|
712
|
+
throw new S();
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function ve(t) {
|
|
716
|
+
switch (t.algorithm.name) {
|
|
717
|
+
case "ECDSA":
|
|
718
|
+
return {
|
|
719
|
+
name: t.algorithm.name,
|
|
720
|
+
hash: _t(t.algorithm.namedCurve)
|
|
721
|
+
};
|
|
722
|
+
case "RSA-PSS":
|
|
723
|
+
switch (ce(t.algorithm), t.algorithm.hash.name) {
|
|
724
|
+
case "SHA-256":
|
|
725
|
+
case "SHA-384":
|
|
726
|
+
case "SHA-512":
|
|
727
|
+
return {
|
|
728
|
+
name: t.algorithm.name,
|
|
729
|
+
saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
|
|
730
|
+
};
|
|
731
|
+
default:
|
|
732
|
+
throw new S();
|
|
733
|
+
}
|
|
734
|
+
case "RSASSA-PKCS1-v1_5":
|
|
735
|
+
return ce(t.algorithm), t.algorithm.name;
|
|
736
|
+
case "Ed448":
|
|
737
|
+
case "Ed25519":
|
|
738
|
+
return t.algorithm.name;
|
|
739
|
+
}
|
|
740
|
+
throw new S();
|
|
741
|
+
}
|
|
742
|
+
const Se = Symbol();
|
|
743
|
+
async function bt(t, e, n, r, s) {
|
|
744
|
+
const { 0: o, 1: i, 2: u, length: f } = t.split(".");
|
|
745
|
+
if (f === 5)
|
|
746
|
+
throw new S("JWE structure JWTs are not supported");
|
|
747
|
+
if (f !== 3)
|
|
748
|
+
throw new a("Invalid JWT");
|
|
749
|
+
let y;
|
|
750
|
+
try {
|
|
751
|
+
y = JSON.parse(k(A(o)));
|
|
752
|
+
} catch (E) {
|
|
753
|
+
throw new a("failed to parse JWT Header body as base64url encoded JSON", { cause: E });
|
|
754
|
+
}
|
|
755
|
+
if (!x(y))
|
|
756
|
+
throw new a("JWT Header must be a top level object");
|
|
757
|
+
if (e(y), y.crit !== void 0)
|
|
758
|
+
throw new a('unexpected JWT "crit" header parameter');
|
|
759
|
+
const _ = A(u);
|
|
760
|
+
let b;
|
|
761
|
+
if (n !== Se) {
|
|
762
|
+
b = await n(y);
|
|
763
|
+
const E = `${o}.${i}`;
|
|
764
|
+
if (!await crypto.subtle.verify(ve(b), b, _, k(E)))
|
|
765
|
+
throw new a("JWT signature verification failed");
|
|
766
|
+
}
|
|
767
|
+
let h;
|
|
768
|
+
try {
|
|
769
|
+
h = JSON.parse(k(A(i)));
|
|
770
|
+
} catch (E) {
|
|
771
|
+
throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: E });
|
|
772
|
+
}
|
|
773
|
+
if (!x(h))
|
|
774
|
+
throw new a("JWT Payload must be a top level object");
|
|
775
|
+
const P = Z() + r;
|
|
776
|
+
if (h.exp !== void 0) {
|
|
777
|
+
if (typeof h.exp != "number")
|
|
778
|
+
throw new a('unexpected JWT "exp" (expiration time) claim type');
|
|
779
|
+
if (h.exp <= P - s)
|
|
780
|
+
throw new a('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
781
|
+
}
|
|
782
|
+
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
783
|
+
throw new a('unexpected JWT "iat" (issued at) claim type');
|
|
784
|
+
if (h.iss !== void 0 && typeof h.iss != "string")
|
|
785
|
+
throw new a('unexpected JWT "iss" (issuer) claim type');
|
|
786
|
+
if (h.nbf !== void 0) {
|
|
787
|
+
if (typeof h.nbf != "number")
|
|
788
|
+
throw new a('unexpected JWT "nbf" (not before) claim type');
|
|
789
|
+
if (h.nbf > P + s)
|
|
790
|
+
throw new a('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
791
|
+
}
|
|
792
|
+
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
793
|
+
throw new a('unexpected JWT "aud" (audience) claim type');
|
|
794
|
+
return { header: y, claims: h, signature: _, key: b };
|
|
795
|
+
}
|
|
796
|
+
function vt(t, e, n) {
|
|
797
|
+
if (t !== void 0) {
|
|
798
|
+
if (n.alg !== t)
|
|
799
|
+
throw new a('unexpected JWT "alg" header parameter');
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
if (Array.isArray(e)) {
|
|
803
|
+
if (!e.includes(n.alg))
|
|
804
|
+
throw new a('unexpected JWT "alg" header parameter');
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
if (n.alg !== "RS256")
|
|
808
|
+
throw new a('unexpected JWT "alg" header parameter');
|
|
809
|
+
}
|
|
810
|
+
function T(t, e) {
|
|
811
|
+
const { 0: n, length: r } = t.getAll(e);
|
|
812
|
+
if (r > 1)
|
|
813
|
+
throw new a(`"${e}" parameter must be provided only once`);
|
|
814
|
+
return n;
|
|
815
|
+
}
|
|
816
|
+
const St = Symbol(), Tt = Symbol();
|
|
817
|
+
function At(t, e, n, r) {
|
|
818
|
+
if (L(t), C(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
819
|
+
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
820
|
+
if (T(n, "response"))
|
|
821
|
+
throw new a('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
822
|
+
const s = T(n, "iss"), o = T(n, "state");
|
|
823
|
+
if (!s && t.authorization_response_iss_parameter_supported)
|
|
824
|
+
throw new a('response parameter "iss" (issuer) missing');
|
|
825
|
+
if (s && s !== t.issuer)
|
|
826
|
+
throw new a('unexpected "iss" (issuer) response parameter value');
|
|
827
|
+
switch (r) {
|
|
828
|
+
case void 0:
|
|
829
|
+
case Tt:
|
|
830
|
+
if (o !== void 0)
|
|
831
|
+
throw new a('unexpected "state" response parameter encountered');
|
|
832
|
+
break;
|
|
833
|
+
case St:
|
|
834
|
+
break;
|
|
835
|
+
default:
|
|
836
|
+
if (!m(r))
|
|
837
|
+
throw new a('"expectedState" must be a non-empty string');
|
|
838
|
+
if (o === void 0)
|
|
839
|
+
throw new a('response parameter "state" missing');
|
|
840
|
+
if (o !== r)
|
|
841
|
+
throw new a('unexpected "state" response parameter value');
|
|
842
|
+
}
|
|
843
|
+
const i = T(n, "error");
|
|
844
|
+
if (i)
|
|
845
|
+
return {
|
|
846
|
+
error: i,
|
|
847
|
+
error_description: T(n, "error_description"),
|
|
848
|
+
error_uri: T(n, "error_uri")
|
|
849
|
+
};
|
|
850
|
+
const u = T(n, "id_token"), f = T(n, "token");
|
|
851
|
+
if (u !== void 0 || f !== void 0)
|
|
852
|
+
throw new S("implicit and hybrid flows are not supported");
|
|
853
|
+
return ft(new URLSearchParams(n));
|
|
854
|
+
}
|
|
855
|
+
class O extends Error {
|
|
856
|
+
}
|
|
857
|
+
class ue extends O {
|
|
858
|
+
constructor(e, n, r) {
|
|
859
|
+
super(e, r), this.error = n;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
const F = "code-verifier";
|
|
863
|
+
class kt extends Le {
|
|
864
|
+
constructor(e, n) {
|
|
865
|
+
super(), this.callbackUrlPath = e, this.initialize = n;
|
|
866
|
+
}
|
|
867
|
+
getRoutes() {
|
|
868
|
+
return [
|
|
869
|
+
...super.getRoutes(),
|
|
870
|
+
{
|
|
871
|
+
path: this.callbackUrlPath,
|
|
872
|
+
element: /* @__PURE__ */ Pe.jsx("div", {})
|
|
873
|
+
}
|
|
874
|
+
];
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
class Et {
|
|
878
|
+
constructor({
|
|
879
|
+
issuer: e,
|
|
880
|
+
audience: n,
|
|
881
|
+
authorizationEndpoint: r,
|
|
882
|
+
tokenEndpoint: s,
|
|
883
|
+
clientId: o,
|
|
884
|
+
redirectToAfterSignUp: i,
|
|
885
|
+
redirectToAfterSignIn: u,
|
|
886
|
+
redirectToAfterSignOut: f
|
|
887
|
+
}) {
|
|
888
|
+
g(this, "client");
|
|
889
|
+
g(this, "issuer");
|
|
890
|
+
g(this, "authorizationEndpoint");
|
|
891
|
+
g(this, "tokenEndpoint");
|
|
892
|
+
g(this, "authorizationServer");
|
|
893
|
+
g(this, "tokens");
|
|
894
|
+
g(this, "callbackUrlPath", "/oauth/callback");
|
|
895
|
+
g(this, "logoutRedirectUrlPath", "/");
|
|
896
|
+
g(this, "onAuthorizationUrl");
|
|
897
|
+
g(this, "redirectToAfterSignUp");
|
|
898
|
+
g(this, "redirectToAfterSignIn");
|
|
899
|
+
g(this, "redirectToAfterSignOut");
|
|
900
|
+
g(this, "audience");
|
|
901
|
+
g(this, "signOut", async () => {
|
|
902
|
+
ne.setState({
|
|
903
|
+
isAuthenticated: !1,
|
|
904
|
+
isPending: !1,
|
|
905
|
+
profile: void 0
|
|
906
|
+
}), localStorage.removeItem("auto-login");
|
|
907
|
+
const e = await this.getAuthServer(), n = new URL(
|
|
908
|
+
window.location.origin + this.redirectToAfterSignOut
|
|
909
|
+
);
|
|
910
|
+
n.pathname = this.logoutRedirectUrlPath;
|
|
911
|
+
let r;
|
|
912
|
+
e.end_session_endpoint ? (r = new URL(e.end_session_endpoint), r.searchParams.set(
|
|
913
|
+
"post_logout_redirect_uri",
|
|
914
|
+
n.toString()
|
|
915
|
+
)) : r = n;
|
|
916
|
+
});
|
|
917
|
+
g(this, "handleCallback", async () => {
|
|
918
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), r = sessionStorage.getItem(F);
|
|
919
|
+
if (sessionStorage.removeItem(F), !r)
|
|
920
|
+
return "/";
|
|
921
|
+
const s = await this.getAuthServer(), o = At(
|
|
922
|
+
s,
|
|
923
|
+
this.client,
|
|
924
|
+
e.searchParams,
|
|
925
|
+
n ?? void 0
|
|
926
|
+
);
|
|
927
|
+
if (B(o))
|
|
928
|
+
throw re.error("Error validating OAuth response", o), new ue(
|
|
929
|
+
"Error validating OAuth response",
|
|
930
|
+
o
|
|
931
|
+
);
|
|
932
|
+
const i = new URL(e);
|
|
933
|
+
i.pathname = this.redirectToAfterSignIn, i.search = "";
|
|
934
|
+
const u = await pt(
|
|
935
|
+
s,
|
|
936
|
+
this.client,
|
|
937
|
+
o,
|
|
938
|
+
i.toString(),
|
|
939
|
+
r
|
|
940
|
+
), f = await mt(
|
|
941
|
+
s,
|
|
942
|
+
this.client,
|
|
943
|
+
u
|
|
944
|
+
);
|
|
945
|
+
this.setTokensFromResponse(f);
|
|
946
|
+
const y = await this.getAccessToken(), b = await (await st(
|
|
947
|
+
s,
|
|
948
|
+
this.client,
|
|
949
|
+
y
|
|
950
|
+
)).json(), h = {
|
|
951
|
+
sub: b.sub,
|
|
952
|
+
email: b.email,
|
|
953
|
+
name: b.name,
|
|
954
|
+
emailVerified: b.email_verified ?? !1,
|
|
955
|
+
pictureUrl: b.picture
|
|
956
|
+
};
|
|
957
|
+
return ne.setState({
|
|
958
|
+
isAuthenticated: !0,
|
|
959
|
+
isPending: !1,
|
|
960
|
+
profile: h
|
|
961
|
+
}), localStorage.setItem("auto-login", "1"), sessionStorage.getItem("redirect-to") ?? "/";
|
|
962
|
+
});
|
|
963
|
+
this.client = {
|
|
964
|
+
client_id: o,
|
|
965
|
+
token_endpoint_auth_method: "none"
|
|
966
|
+
}, this.audience = n, this.issuer = e, this.authorizationEndpoint = r, this.tokenEndpoint = s, this.redirectToAfterSignUp = i ?? "/", this.redirectToAfterSignIn = u ?? "/", this.redirectToAfterSignOut = f ?? "/";
|
|
967
|
+
}
|
|
968
|
+
async getAuthServer() {
|
|
969
|
+
if (!this.authorizationServer)
|
|
970
|
+
if (this.tokenEndpoint && this.authorizationEndpoint)
|
|
971
|
+
this.authorizationServer = {
|
|
972
|
+
issuer: new URL(this.authorizationEndpoint).origin,
|
|
973
|
+
authorization_endpoint: this.authorizationEndpoint,
|
|
974
|
+
token_endpoint: this.tokenEndpoint,
|
|
975
|
+
code_challenge_methods_supported: []
|
|
976
|
+
};
|
|
977
|
+
else {
|
|
978
|
+
const e = new URL(this.issuer), n = await De(e);
|
|
979
|
+
this.authorizationServer = await He(
|
|
980
|
+
e,
|
|
981
|
+
n
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
return this.authorizationServer;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Sets the tokens from various OAuth responses
|
|
988
|
+
* @param response
|
|
989
|
+
*/
|
|
990
|
+
setTokensFromResponse(e) {
|
|
991
|
+
if (B(e))
|
|
992
|
+
throw re.error("Bad Token Response", e), new ue("Bad Token Response", e);
|
|
993
|
+
if (!e.expires_in)
|
|
994
|
+
throw new O("No expires_in in response");
|
|
995
|
+
this.tokens = {
|
|
996
|
+
accessToken: e.access_token,
|
|
997
|
+
refreshToken: e.refresh_token,
|
|
998
|
+
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
999
|
+
tokenType: e.token_type
|
|
1000
|
+
}, sessionStorage.setItem("openid-token", JSON.stringify(this.tokens));
|
|
1001
|
+
}
|
|
1002
|
+
async signUp({ redirectTo: e } = {}) {
|
|
1003
|
+
return this.authorize({
|
|
1004
|
+
redirectTo: e ?? this.redirectToAfterSignUp,
|
|
1005
|
+
isSignUp: !0
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
async signIn({ redirectTo: e } = {}) {
|
|
1009
|
+
return this.authorize({
|
|
1010
|
+
redirectTo: e ?? this.redirectToAfterSignIn
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
async authorize({
|
|
1014
|
+
redirectTo: e,
|
|
1015
|
+
isSignUp: n = !1
|
|
1016
|
+
}) {
|
|
1017
|
+
var y, _;
|
|
1018
|
+
const r = "S256", s = await this.getAuthServer();
|
|
1019
|
+
if (!s.authorization_endpoint)
|
|
1020
|
+
throw new O("No authorization endpoint");
|
|
1021
|
+
const o = $e(), i = await Me(o);
|
|
1022
|
+
sessionStorage.setItem(F, o);
|
|
1023
|
+
const u = new URL(
|
|
1024
|
+
s.authorization_endpoint
|
|
1025
|
+
);
|
|
1026
|
+
sessionStorage.setItem("redirect-to", e);
|
|
1027
|
+
const f = new URL(window.location.origin);
|
|
1028
|
+
if (f.pathname = this.callbackUrlPath, f.search = "", u.searchParams.set("client_id", this.client.client_id), u.searchParams.set("redirect_uri", f.toString()), u.searchParams.set("response_type", "code"), u.searchParams.set("scope", "openid+profile+email"), u.searchParams.set("code_challenge", i), u.searchParams.set(
|
|
1029
|
+
"code_challenge_method",
|
|
1030
|
+
r
|
|
1031
|
+
), this.audience && u.searchParams.set("audience", this.audience), (y = this.onAuthorizationUrl) == null || y.call(this, u, {
|
|
1032
|
+
isSignIn: !n,
|
|
1033
|
+
isSignUp: n
|
|
1034
|
+
}), ((_ = s.code_challenge_methods_supported) == null ? void 0 : _.includes("S256")) !== !0) {
|
|
1035
|
+
const b = Fe();
|
|
1036
|
+
u.searchParams.set("state", b);
|
|
1037
|
+
}
|
|
1038
|
+
location.href = u.href;
|
|
1039
|
+
}
|
|
1040
|
+
async getAccessToken() {
|
|
1041
|
+
const e = await this.getAuthServer();
|
|
1042
|
+
if (!this.tokens)
|
|
1043
|
+
throw new O("User is not authenticated");
|
|
1044
|
+
if (this.tokens.expiresOn < /* @__PURE__ */ new Date()) {
|
|
1045
|
+
if (!this.tokens.refreshToken)
|
|
1046
|
+
return await this.signIn(), "";
|
|
1047
|
+
const n = await ct(
|
|
1048
|
+
e,
|
|
1049
|
+
this.client,
|
|
1050
|
+
this.tokens.refreshToken
|
|
1051
|
+
), r = await lt(
|
|
1052
|
+
e,
|
|
1053
|
+
this.client,
|
|
1054
|
+
n
|
|
1055
|
+
);
|
|
1056
|
+
this.setTokensFromResponse(r);
|
|
1057
|
+
}
|
|
1058
|
+
return this.tokens.accessToken;
|
|
1059
|
+
}
|
|
1060
|
+
getAuthenticationPlugin() {
|
|
1061
|
+
return new kt(
|
|
1062
|
+
this.callbackUrlPath,
|
|
1063
|
+
async (e, n) => {
|
|
1064
|
+
if (!(typeof window > "u")) {
|
|
1065
|
+
if (localStorage.getItem("auto-login"))
|
|
1066
|
+
localStorage.removeItem("auto-login"), await this.authorize({ redirectTo: window.location.pathname });
|
|
1067
|
+
else if (window.location.pathname === "/oauth/callback") {
|
|
1068
|
+
const r = await this.handleCallback();
|
|
1069
|
+
r && n.navigate(r);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
const Ct = (t) => new Et(t);
|
|
1077
|
+
export {
|
|
1078
|
+
Et as OpenIDAuthenticationProvider,
|
|
1079
|
+
Ct as default
|
|
1080
|
+
};
|
|
1081
|
+
//# sourceMappingURL=zudoku.auth-openid.js.map
|