zudoku 0.0.0-e101786 → 0.0.0-e20b2e4
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/dist/app/entry.server.d.ts +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +18 -8
- package/dist/app/main.js.map +1 -1
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/dev/handler.js +7 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/loader.js +4 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +217 -28
- package/dist/config/validators/common.js +15 -6
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +88 -12
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +10 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +9 -0
- package/dist/lib/authentication/state.js +11 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.js +5 -2
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +13 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Markdown.d.ts +2 -2
- package/dist/lib/components/Markdown.js +3 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +28 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/components/SyntaxHighlight.js +2 -2
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +2 -2
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/cache.d.ts +6 -0
- package/dist/lib/components/cache.js +13 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +10 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +14 -2
- package/dist/lib/components/index.js +10 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +6 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +17 -15
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +32 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +9 -7
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +38 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +8 -0
- package/dist/lib/oas/graphql/index.js +61 -42
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
- package/dist/lib/oas/parser/dereference/index.js +1 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +2 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +8 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +6 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/{Route.d.ts → OpenApiRoute.d.ts} +2 -1
- package/dist/lib/plugins/openapi/{Route.js → OpenApiRoute.js} +3 -4
- package/dist/lib/plugins/openapi/OpenApiRoute.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +4 -1
- package/dist/lib/plugins/openapi/OperationList.js +29 -19
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +3 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +2 -2
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -3
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +11 -16
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +17 -14
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
- package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +126 -61
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +12 -4
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -11
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +22 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +61 -56
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -29
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +1 -0
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +9 -1
- package/dist/lib/ui/Command.js +5 -1
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +27 -28
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +6 -4
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +15 -12
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +5 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -1
- package/dist/vite/plugin-api.js +153 -98
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +4 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +20 -9
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme-css.js +7 -4
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +0 -6
- package/dist/vite/prerender/FileWritingResponse.js +42 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +6 -0
- package/dist/vite/prerender/prerender.js +101 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +11 -0
- package/dist/vite/prerender/worker.js +21 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -1
- package/dist/zuplo/with-zuplo.js +7 -26
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DjnQ5hs7.js} +4 -4
- package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DjnQ5hs7.js.map} +1 -1
- package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
- package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
- package/lib/{Markdown-CZDLNOFc.js → Markdown-8mv9nhGd.js} +3391 -3403
- package/lib/Markdown-8mv9nhGd.js.map +1 -0
- package/lib/{MdxPage-DKMbBROv.js → MdxPage-ZX2oquWw.js} +61 -56
- package/lib/MdxPage-ZX2oquWw.js.map +1 -0
- package/lib/OpenApiRoute-BP9kzG5k.js +36 -0
- package/lib/OpenApiRoute-BP9kzG5k.js.map +1 -0
- package/lib/OperationList-c72qPMtm.js +5180 -0
- package/lib/OperationList-c72qPMtm.js.map +1 -0
- package/lib/Select-NSz0gku6.js +223 -0
- package/lib/Select-NSz0gku6.js.map +1 -0
- package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-D0mFmGJu.js} +53 -53
- package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-D0mFmGJu.js.map} +1 -1
- package/lib/{Button-DeAoTouo.js → Spinner-BlzrEEk1.js} +16 -13
- package/lib/Spinner-BlzrEEk1.js.map +1 -0
- package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-B0L4SC_N.js} +390 -383
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +1 -0
- package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-QijJrSf0.js} +409 -411
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +1 -0
- package/lib/circular-DxaIIlWD.js +15409 -0
- package/lib/circular-DxaIIlWD.js.map +1 -0
- package/lib/context-rwLGh-6_.js +22 -0
- package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
- package/lib/{createServer-BznDkeSA.js → createServer-ZDNGmPfQ.js} +3611 -5736
- package/lib/createServer-ZDNGmPfQ.js.map +1 -0
- package/lib/hook-Dnj3SwPC.js +1455 -0
- package/lib/hook-Dnj3SwPC.js.map +1 -0
- package/lib/index-B7mqiOei.js +509 -0
- package/lib/index-B7mqiOei.js.map +1 -0
- package/lib/index-CZjcfK-H.js +2063 -0
- package/lib/index-CZjcfK-H.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-CjJS0l4l.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-CjJS0l4l.js.map} +1 -1
- package/lib/index-Djenk2Hj.js +36 -0
- package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
- package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
- package/lib/index-Dl3Yl0yb.js.map +1 -0
- package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
- package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
- package/lib/index.esm-CrSoEshU.js +1207 -0
- package/lib/index.esm-CrSoEshU.js.map +1 -0
- package/lib/joinUrl-nLx9pD-Z.js +20 -0
- package/lib/joinUrl-nLx9pD-Z.js.map +1 -0
- package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
- package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
- package/lib/mutation-ByGtmi0-.js +208 -0
- package/lib/mutation-ByGtmi0-.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
- package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
- package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
- package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
- package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
- package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
- package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
- package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
- package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +10 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -2
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +3 -3
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +125 -13
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +520 -519
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +7 -7
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +3 -3
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-Bbf99zic.js} +2 -2
- package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
- package/lib/useScrollToAnchor-DkVfWsxe.js +286 -0
- package/lib/useScrollToAnchor-DkVfWsxe.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +8 -10
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +224 -221
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +828 -940
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +18 -19
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +23 -44
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +53 -49
- package/src/app/demo-cdn.html +31 -31
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +52 -51
- package/src/app/main.tsx +31 -8
- package/src/lib/authentication/providers/auth0.tsx +1 -4
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/authentication/state.ts +18 -0
- package/src/lib/components/AnchorLink.tsx +5 -2
- package/src/lib/components/Autocomplete.tsx +113 -0
- package/src/lib/components/Header.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -15
- package/src/lib/components/PathRenderer.tsx +61 -0
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/SyntaxHighlight.tsx +14 -0
- package/src/lib/components/ThemeSwitch.tsx +2 -2
- package/src/lib/components/cache.ts +15 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
- package/src/lib/components/context/ZudokuContext.ts +16 -3
- package/src/lib/components/index.ts +14 -3
- package/src/lib/components/navigation/Sidebar.tsx +7 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +46 -43
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/core/RouteGuard.tsx +39 -0
- package/src/lib/core/ZudokuContext.ts +9 -8
- package/src/lib/oas/graphql/circular.ts +50 -0
- package/src/lib/oas/graphql/index.ts +95 -69
- package/src/lib/oas/parser/dereference/index.ts +1 -2
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
- package/src/lib/plugins/markdown/resolver.ts +0 -33
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/Endpoint.tsx +11 -9
- package/src/lib/plugins/openapi/{Route.tsx → OpenApiRoute.tsx} +3 -3
- package/src/lib/plugins/openapi/OperationList.tsx +47 -19
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -4
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -6
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +11 -1
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +27 -34
- package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +24 -24
- package/src/lib/plugins/openapi/graphql/gql.ts +12 -4
- package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
- package/src/lib/plugins/openapi/index.tsx +163 -78
- package/src/lib/plugins/openapi/interfaces.ts +16 -12
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +35 -75
- package/src/lib/plugins/openapi/playground/Playground.tsx +251 -213
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +84 -114
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +11 -7
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/ui/Badge.tsx +1 -0
- package/src/lib/ui/Command.tsx +20 -0
- package/src/lib/ui/Input.tsx +1 -2
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -1
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useScrollToAnchor.ts +33 -34
- package/src/lib/util/useScrollToTop.ts +8 -3
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
- package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
- package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/AnchorLink-DFZZbmvr.js +0 -34
- package/lib/AnchorLink-DFZZbmvr.js.map +0 -1
- package/lib/Button-DeAoTouo.js.map +0 -1
- package/lib/Command-9x_kZHr4.js +0 -611
- package/lib/Command-9x_kZHr4.js.map +0 -1
- package/lib/Markdown-CZDLNOFc.js.map +0 -1
- package/lib/MdxPage-DKMbBROv.js.map +0 -1
- package/lib/OperationList-DFa3DqhW.js +0 -5143
- package/lib/OperationList-DFa3DqhW.js.map +0 -1
- package/lib/Route-DYwKZ_c_.js +0 -35
- package/lib/Route-DYwKZ_c_.js.map +0 -1
- package/lib/Select-B_IxRUUC.js +0 -223
- package/lib/Select-B_IxRUUC.js.map +0 -1
- package/lib/Spinner-DuxJLLNE.js +0 -7
- package/lib/Spinner-DuxJLLNE.js.map +0 -1
- package/lib/StaggeredRender-DgsamH_G.js +0 -17
- package/lib/StaggeredRender-DgsamH_G.js.map +0 -1
- package/lib/SyntaxHighlight-Bz-lOJtH.js.map +0 -1
- package/lib/ZudokuContext-hmLMUdf2.js +0 -1217
- package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
- package/lib/context-h_UkBLvr.js +0 -22
- package/lib/createServer-BznDkeSA.js.map +0 -1
- package/lib/hook-CHq7pFyz.js +0 -227
- package/lib/hook-CHq7pFyz.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-CBXSgjaE.js.map +0 -1
- package/lib/index-CPNSgwSb.js +0 -36
- package/lib/index-PqKef_jH.js +0 -1292
- package/lib/index-PqKef_jH.js.map +0 -1
- package/lib/index-TaRXY2w1.js +0 -43
- package/lib/index-TaRXY2w1.js.map +0 -1
- package/lib/index.esm-BnnBRKJX.js +0 -1214
- package/lib/index.esm-BnnBRKJX.js.map +0 -1
- package/lib/state-CFQsUZUP.js +0 -202
- package/lib/state-CFQsUZUP.js.map +0 -1
- package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (t, e, n) =>
|
|
4
|
-
import { j as G } from "./jsx-runtime-
|
|
5
|
-
import { g as
|
|
6
|
-
import { C as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
var N = { exports: {} },
|
|
13
|
-
function
|
|
14
|
-
return
|
|
1
|
+
var Je = Object.defineProperty;
|
|
2
|
+
var Oe = (t, e, n) => e in t ? Je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var b = (t, e, n) => Oe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { j as G } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
5
|
+
import { g as ze } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
+
import { C as De } from "./ClientOnly-E7hGysn1.js";
|
|
7
|
+
import { j as ae } from "./joinUrl-nLx9pD-Z.js";
|
|
8
|
+
import { A as Ne } from "./AuthenticationPlugin-DjnQ5hs7.js";
|
|
9
|
+
import { a as Ke, u as x } from "./hook-Dnj3SwPC.js";
|
|
10
|
+
import { N as We } from "./chunk-SYFQ2XB5-QijJrSf0.js";
|
|
11
|
+
import { Z as He } from "./invariant-Caa8-XvF.js";
|
|
12
|
+
var N = { exports: {} }, $e = N.exports, se;
|
|
13
|
+
function Fe() {
|
|
14
|
+
return se || (se = 1, function(t) {
|
|
15
15
|
(function(e, n) {
|
|
16
16
|
t.exports ? t.exports = n() : e.log = n();
|
|
17
|
-
})(
|
|
17
|
+
})($e, function() {
|
|
18
18
|
var e = function() {
|
|
19
19
|
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
|
|
20
20
|
"trace",
|
|
@@ -35,13 +35,13 @@ function $e() {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function h() {
|
|
39
39
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
40
40
|
}
|
|
41
41
|
function _(l) {
|
|
42
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ?
|
|
42
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? h : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function p() {
|
|
45
45
|
for (var l = this.getLevel(), m = 0; m < a.length; m++) {
|
|
46
46
|
var u = a[m];
|
|
47
47
|
this[u] = m < l ? e : this.methodFactory(u, l, this.name);
|
|
@@ -51,16 +51,16 @@ function $e() {
|
|
|
51
51
|
}
|
|
52
52
|
function y(l) {
|
|
53
53
|
return function() {
|
|
54
|
-
typeof console !== n && (
|
|
54
|
+
typeof console !== n && (p.call(this), this[l].apply(this, arguments));
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function T(l, m, u) {
|
|
58
58
|
return _(l) || y.apply(this, arguments);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function f(l, m) {
|
|
61
61
|
var u = this, O, M, R, v = "loglevel";
|
|
62
62
|
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
63
|
-
function
|
|
63
|
+
function Le(d) {
|
|
64
64
|
var g = (a[d] || "silent").toUpperCase();
|
|
65
65
|
if (!(typeof window === n || !v)) {
|
|
66
66
|
try {
|
|
@@ -92,7 +92,7 @@ function $e() {
|
|
|
92
92
|
return u.levels[d] === void 0 && (d = void 0), d;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function je() {
|
|
96
96
|
if (!(typeof window === n || !v)) {
|
|
97
97
|
try {
|
|
98
98
|
window.localStorage.removeItem(v);
|
|
@@ -120,30 +120,30 @@ function $e() {
|
|
|
120
120
|
}, u.methodFactory = m || T, u.getLevel = function() {
|
|
121
121
|
return R ?? M ?? O;
|
|
122
122
|
}, u.setLevel = function(d, g) {
|
|
123
|
-
return R = U(d), g !== !1 &&
|
|
123
|
+
return R = U(d), g !== !1 && Le(R), p.call(u);
|
|
124
124
|
}, u.setDefaultLevel = function(d) {
|
|
125
125
|
M = U(d), re() || u.setLevel(d, !1);
|
|
126
126
|
}, u.resetLevel = function() {
|
|
127
|
-
R = null,
|
|
127
|
+
R = null, je(), p.call(u);
|
|
128
128
|
}, u.enableAll = function(d) {
|
|
129
129
|
u.setLevel(u.levels.TRACE, d);
|
|
130
130
|
}, u.disableAll = function(d) {
|
|
131
131
|
u.setLevel(u.levels.SILENT, d);
|
|
132
132
|
}, u.rebuild = function() {
|
|
133
|
-
if (i !== u && (O = U(i.getLevel())),
|
|
133
|
+
if (i !== u && (O = U(i.getLevel())), p.call(u), i === u)
|
|
134
134
|
for (var d in r)
|
|
135
135
|
r[d].rebuild();
|
|
136
136
|
}, O = U(
|
|
137
137
|
i ? i.getLevel() : "WARN"
|
|
138
138
|
);
|
|
139
139
|
var oe = re();
|
|
140
|
-
oe != null && (R = U(oe)),
|
|
140
|
+
oe != null && (R = U(oe)), p.call(u);
|
|
141
141
|
}
|
|
142
|
-
i = new
|
|
142
|
+
i = new f(), i.getLogger = function(m) {
|
|
143
143
|
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
144
144
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
145
145
|
var u = r[m];
|
|
146
|
-
return u || (u = r[m] = new
|
|
146
|
+
return u || (u = r[m] = new f(
|
|
147
147
|
m,
|
|
148
148
|
i.methodFactory
|
|
149
149
|
)), u;
|
|
@@ -157,11 +157,11 @@ function $e() {
|
|
|
157
157
|
});
|
|
158
158
|
}(N)), N.exports;
|
|
159
159
|
}
|
|
160
|
-
var
|
|
161
|
-
const
|
|
160
|
+
var Me = Fe();
|
|
161
|
+
const ce = /* @__PURE__ */ ze(Me);
|
|
162
162
|
let Z;
|
|
163
|
-
var D,
|
|
164
|
-
(typeof navigator > "u" || !((
|
|
163
|
+
var D, me;
|
|
164
|
+
(typeof navigator > "u" || !((me = (D = navigator.userAgent) == null ? void 0 : D.startsWith) != null && me.call(D, "Mozilla/5.0 "))) && (Z = "oauth4webapi/v2.17.0");
|
|
165
165
|
function Q(t, e) {
|
|
166
166
|
if (t == null)
|
|
167
167
|
return !1;
|
|
@@ -171,19 +171,19 @@ function Q(t, e) {
|
|
|
171
171
|
return !1;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
const W = Symbol(),
|
|
174
|
+
const W = Symbol(), qe = Symbol(), X = Symbol(), ge = Symbol(), Be = Symbol(), Ve = Symbol(), Ge = new TextEncoder(), Ze = new TextDecoder();
|
|
175
175
|
function E(t) {
|
|
176
|
-
return typeof t == "string" ?
|
|
176
|
+
return typeof t == "string" ? Ge.encode(t) : Ze.decode(t);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
function
|
|
178
|
+
const ue = 32768;
|
|
179
|
+
function Ye(t) {
|
|
180
180
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
181
181
|
const e = [];
|
|
182
|
-
for (let n = 0; n < t.byteLength; n +=
|
|
183
|
-
e.push(String.fromCharCode.apply(null, t.subarray(n, n +
|
|
182
|
+
for (let n = 0; n < t.byteLength; n += ue)
|
|
183
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + ue)));
|
|
184
184
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Qe(t) {
|
|
187
187
|
try {
|
|
188
188
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
189
189
|
for (let o = 0; o < e.length; o++)
|
|
@@ -194,9 +194,9 @@ function Ye(t) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
function A(t) {
|
|
197
|
-
return typeof t == "string" ?
|
|
197
|
+
return typeof t == "string" ? Qe(t) : Ye(t);
|
|
198
198
|
}
|
|
199
|
-
class
|
|
199
|
+
class Xe {
|
|
200
200
|
constructor(e) {
|
|
201
201
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
202
202
|
}
|
|
@@ -226,26 +226,26 @@ class S extends Error {
|
|
|
226
226
|
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
class
|
|
229
|
+
class et extends Error {
|
|
230
230
|
constructor(e, n) {
|
|
231
231
|
var o;
|
|
232
232
|
super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
const s =
|
|
236
|
-
function
|
|
235
|
+
const s = et, ye = new Xe(100);
|
|
236
|
+
function be(t) {
|
|
237
237
|
return t instanceof CryptoKey;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
return
|
|
239
|
+
function _e(t) {
|
|
240
|
+
return be(t) && t.type === "private";
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
return
|
|
242
|
+
function tt(t) {
|
|
243
|
+
return be(t) && t.type === "public";
|
|
244
244
|
}
|
|
245
245
|
function ee(t) {
|
|
246
246
|
try {
|
|
247
247
|
const e = t.headers.get("dpop-nonce");
|
|
248
|
-
e &&
|
|
248
|
+
e && ye.set(new URL(t.url).origin, e);
|
|
249
249
|
} catch {
|
|
250
250
|
}
|
|
251
251
|
return t;
|
|
@@ -267,7 +267,7 @@ function te(t) {
|
|
|
267
267
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
268
268
|
return t;
|
|
269
269
|
}
|
|
270
|
-
async function
|
|
270
|
+
async function nt(t, e) {
|
|
271
271
|
if (!(t instanceof URL))
|
|
272
272
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
273
273
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
@@ -295,7 +295,7 @@ async function tt(t, e) {
|
|
|
295
295
|
function w(t) {
|
|
296
296
|
return typeof t == "string" && t.length !== 0;
|
|
297
297
|
}
|
|
298
|
-
async function
|
|
298
|
+
async function rt(t, e) {
|
|
299
299
|
if (!(t instanceof URL))
|
|
300
300
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
301
301
|
if (!Q(e, Response))
|
|
@@ -320,18 +320,18 @@ async function nt(t, e) {
|
|
|
320
320
|
function $() {
|
|
321
321
|
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ot() {
|
|
324
324
|
return $();
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function it() {
|
|
327
327
|
return $();
|
|
328
328
|
}
|
|
329
|
-
async function
|
|
329
|
+
async function at(t) {
|
|
330
330
|
if (!w(t))
|
|
331
331
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
332
332
|
return A(await crypto.subtle.digest("SHA-256", E(t)));
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function st(t) {
|
|
335
335
|
if (t instanceof CryptoKey)
|
|
336
336
|
return { key: t };
|
|
337
337
|
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
@@ -341,17 +341,17 @@ function at(t) {
|
|
|
341
341
|
return {
|
|
342
342
|
key: t.key,
|
|
343
343
|
kid: t.kid,
|
|
344
|
-
modifyAssertion: t[
|
|
344
|
+
modifyAssertion: t[ge]
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function le(t) {
|
|
348
348
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
const n =
|
|
350
|
+
function ct(t, e) {
|
|
351
|
+
const n = le(t), o = le(e);
|
|
352
352
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function ut(t) {
|
|
355
355
|
switch (t.algorithm.hash.name) {
|
|
356
356
|
case "SHA-256":
|
|
357
357
|
return "PS256";
|
|
@@ -363,7 +363,7 @@ function ct(t) {
|
|
|
363
363
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function lt(t) {
|
|
367
367
|
switch (t.algorithm.hash.name) {
|
|
368
368
|
case "SHA-256":
|
|
369
369
|
return "RS256";
|
|
@@ -375,7 +375,7 @@ function ut(t) {
|
|
|
375
375
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function dt(t) {
|
|
379
379
|
switch (t.algorithm.namedCurve) {
|
|
380
380
|
case "P-256":
|
|
381
381
|
return "ES256";
|
|
@@ -387,14 +387,14 @@ function lt(t) {
|
|
|
387
387
|
throw new S("unsupported EcKeyAlgorithm namedCurve");
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function ve(t) {
|
|
391
391
|
switch (t.algorithm.name) {
|
|
392
392
|
case "RSA-PSS":
|
|
393
|
-
return ct(t);
|
|
394
|
-
case "RSASSA-PKCS1-v1_5":
|
|
395
393
|
return ut(t);
|
|
396
|
-
case "
|
|
394
|
+
case "RSASSA-PKCS1-v1_5":
|
|
397
395
|
return lt(t);
|
|
396
|
+
case "ECDSA":
|
|
397
|
+
return dt(t);
|
|
398
398
|
case "Ed25519":
|
|
399
399
|
case "Ed448":
|
|
400
400
|
return "EdDSA";
|
|
@@ -406,14 +406,14 @@ function L(t) {
|
|
|
406
406
|
const e = t == null ? void 0 : t[W];
|
|
407
407
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
const e = t == null ? void 0 : t[
|
|
409
|
+
function Se(t) {
|
|
410
|
+
const e = t == null ? void 0 : t[qe];
|
|
411
411
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
412
412
|
}
|
|
413
413
|
function F() {
|
|
414
414
|
return Math.floor(Date.now() / 1e3);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function ht(t, e) {
|
|
417
417
|
const n = F() + L(e);
|
|
418
418
|
return {
|
|
419
419
|
jti: $(),
|
|
@@ -425,25 +425,25 @@ function dt(t, e) {
|
|
|
425
425
|
sub: e.client_id
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
429
|
-
const r = { alg:
|
|
430
|
-
return a == null || a(r, i),
|
|
428
|
+
async function ft(t, e, n, o, a) {
|
|
429
|
+
const r = { alg: ve(n), kid: o }, i = ht(t, e);
|
|
430
|
+
return a == null || a(r, i), Te(r, i, n);
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function j(t) {
|
|
433
433
|
if (typeof t != "object" || t === null)
|
|
434
434
|
throw new TypeError('"as" must be an object');
|
|
435
435
|
if (!w(t.issuer))
|
|
436
436
|
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
437
437
|
return !0;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function I(t) {
|
|
440
440
|
if (typeof t != "object" || t === null)
|
|
441
441
|
throw new TypeError('"client" must be an object');
|
|
442
442
|
if (!w(t.client_id))
|
|
443
443
|
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
444
444
|
return !0;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function de(t) {
|
|
447
447
|
if (!w(t))
|
|
448
448
|
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
449
449
|
return t;
|
|
@@ -452,100 +452,100 @@ function q(t, e) {
|
|
|
452
452
|
if (e !== void 0)
|
|
453
453
|
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function he(t, e) {
|
|
456
456
|
if (e !== void 0)
|
|
457
457
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
458
458
|
}
|
|
459
|
-
async function
|
|
459
|
+
async function pt(t, e, n, o, a) {
|
|
460
460
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
461
461
|
case void 0:
|
|
462
462
|
case "client_secret_basic": {
|
|
463
|
-
q("client_secret_basic", a), o.set("authorization",
|
|
463
|
+
q("client_secret_basic", a), o.set("authorization", ct(e.client_id, de(e.client_secret)));
|
|
464
464
|
break;
|
|
465
465
|
}
|
|
466
466
|
case "client_secret_post": {
|
|
467
|
-
q("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret",
|
|
467
|
+
q("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret", de(e.client_secret));
|
|
468
468
|
break;
|
|
469
469
|
}
|
|
470
470
|
case "private_key_jwt": {
|
|
471
|
-
if (
|
|
471
|
+
if (he("private_key_jwt", e.client_secret), a === void 0)
|
|
472
472
|
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
473
|
-
const { key: r, kid: i, modifyAssertion: c } =
|
|
474
|
-
if (!
|
|
473
|
+
const { key: r, kid: i, modifyAssertion: c } = st(a);
|
|
474
|
+
if (!_e(r))
|
|
475
475
|
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
476
|
-
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
|
|
476
|
+
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 ft(t, e, r, i, c));
|
|
477
477
|
break;
|
|
478
478
|
}
|
|
479
479
|
case "tls_client_auth":
|
|
480
480
|
case "self_signed_tls_client_auth":
|
|
481
481
|
case "none": {
|
|
482
|
-
|
|
482
|
+
he(e.token_endpoint_auth_method, e.client_secret), q(e.token_endpoint_auth_method, a), n.set("client_id", e.client_id);
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
485
485
|
default:
|
|
486
486
|
throw new S("unsupported client token_endpoint_auth_method");
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
async function
|
|
489
|
+
async function Te(t, e, n) {
|
|
490
490
|
if (!n.usages.includes("sign"))
|
|
491
491
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
492
|
-
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(
|
|
492
|
+
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(xe(n), n, E(o)));
|
|
493
493
|
return `${o}.${a}`;
|
|
494
494
|
}
|
|
495
|
-
async function
|
|
495
|
+
async function wt(t, e, n, o, a, r) {
|
|
496
496
|
var T;
|
|
497
|
-
const { privateKey: i, publicKey: c, nonce:
|
|
498
|
-
if (!
|
|
497
|
+
const { privateKey: i, publicKey: c, nonce: h = ye.get(n.origin) } = e;
|
|
498
|
+
if (!_e(i))
|
|
499
499
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
500
|
-
if (!
|
|
500
|
+
if (!tt(c))
|
|
501
501
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
502
|
-
if (
|
|
502
|
+
if (h !== void 0 && !w(h))
|
|
503
503
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
504
504
|
if (!c.extractable)
|
|
505
505
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
506
|
-
const _ = F() + a,
|
|
507
|
-
alg:
|
|
506
|
+
const _ = F() + a, p = {
|
|
507
|
+
alg: ve(i),
|
|
508
508
|
typ: "dpop+jwt",
|
|
509
|
-
jwk: await
|
|
509
|
+
jwk: await gt(c)
|
|
510
510
|
}, y = {
|
|
511
511
|
iat: _,
|
|
512
512
|
jti: $(),
|
|
513
513
|
htm: o,
|
|
514
|
-
nonce:
|
|
514
|
+
nonce: h,
|
|
515
515
|
htu: `${n.origin}${n.pathname}`,
|
|
516
516
|
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
517
517
|
};
|
|
518
|
-
(T = e[
|
|
518
|
+
(T = e[ge]) == null || T.call(e, p, y), t.set("dpop", await Te(p, y, i));
|
|
519
519
|
}
|
|
520
520
|
let K;
|
|
521
|
-
async function
|
|
521
|
+
async function mt(t) {
|
|
522
522
|
const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
|
|
523
523
|
return K.set(t, c), c;
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
526
|
-
return K || (K = /* @__PURE__ */ new WeakMap()), K.get(t) ||
|
|
525
|
+
async function gt(t) {
|
|
526
|
+
return K || (K = /* @__PURE__ */ new WeakMap()), K.get(t) || mt(t);
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function fe(t, e, n) {
|
|
529
529
|
if (typeof t != "string")
|
|
530
530
|
throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
|
|
531
531
|
return new URL(t);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ?
|
|
533
|
+
function ke(t, e, n = !1) {
|
|
534
|
+
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? fe(t.mtls_endpoint_aliases[e], e, n) : fe(t[e], e, n);
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
return !!(t.use_mtls_endpoint_aliases || e != null && e[
|
|
536
|
+
function Ae(t, e) {
|
|
537
|
+
return !!(t.use_mtls_endpoint_aliases || e != null && e[Ve]);
|
|
538
538
|
}
|
|
539
539
|
function Y(t) {
|
|
540
540
|
const e = t;
|
|
541
541
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
542
542
|
}
|
|
543
|
-
async function
|
|
543
|
+
async function yt(t, e, n, o, a, r) {
|
|
544
544
|
if (!w(t))
|
|
545
545
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
546
546
|
if (!(n instanceof URL))
|
|
547
547
|
throw new TypeError('"url" must be an instance of URL');
|
|
548
|
-
return o = H(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await
|
|
548
|
+
return o = H(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await wt(o, r.DPoP, n, e.toUpperCase(), L({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[X]) || fetch)(n.href, {
|
|
549
549
|
body: a,
|
|
550
550
|
headers: Object.fromEntries(o.entries()),
|
|
551
551
|
method: e,
|
|
@@ -553,16 +553,16 @@ async function gt(t, e, n, o, a, r) {
|
|
|
553
553
|
signal: r != null && r.signal ? te(r.signal) : null
|
|
554
554
|
}).then(ee);
|
|
555
555
|
}
|
|
556
|
-
async function
|
|
557
|
-
|
|
558
|
-
const a =
|
|
559
|
-
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")),
|
|
556
|
+
async function bt(t, e, n, o) {
|
|
557
|
+
j(t), I(e);
|
|
558
|
+
const a = ke(t, "userinfo_endpoint", Ae(e, o)), r = H(o == null ? void 0 : o.headers);
|
|
559
|
+
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), yt(n, "GET", a, r, null, {
|
|
560
560
|
...o,
|
|
561
561
|
[W]: L(e)
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
|
-
async function
|
|
565
|
-
return await
|
|
564
|
+
async function _t(t, e, n, o, a, r, i) {
|
|
565
|
+
return await pt(t, e, a, r, i == null ? void 0 : i.clientPrivateKey), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[X]) || fetch)(o.href, {
|
|
566
566
|
body: a,
|
|
567
567
|
headers: Object.fromEntries(r.entries()),
|
|
568
568
|
method: n,
|
|
@@ -570,33 +570,33 @@ async function bt(t, e, n, o, a, r, i) {
|
|
|
570
570
|
signal: i != null && i.signal ? te(i.signal) : null
|
|
571
571
|
}).then(ee);
|
|
572
572
|
}
|
|
573
|
-
async function
|
|
574
|
-
const r =
|
|
573
|
+
async function Ee(t, e, n, o, a) {
|
|
574
|
+
const r = ke(t, "token_endpoint", Ae(e, a));
|
|
575
575
|
o.set("grant_type", n);
|
|
576
576
|
const i = H(a == null ? void 0 : a.headers);
|
|
577
|
-
return i.set("accept", "application/json"),
|
|
577
|
+
return i.set("accept", "application/json"), _t(t, e, "POST", r, o, i, a);
|
|
578
578
|
}
|
|
579
|
-
async function
|
|
580
|
-
if (
|
|
579
|
+
async function vt(t, e, n, o) {
|
|
580
|
+
if (j(t), I(e), !w(n))
|
|
581
581
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
582
582
|
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
583
|
-
return a.set("refresh_token", n),
|
|
583
|
+
return a.set("refresh_token", n), Ee(t, e, "refresh_token", a, o);
|
|
584
584
|
}
|
|
585
|
-
const
|
|
586
|
-
function
|
|
585
|
+
const Re = /* @__PURE__ */ new WeakMap();
|
|
586
|
+
function St(t) {
|
|
587
587
|
if (!t.id_token)
|
|
588
588
|
return;
|
|
589
|
-
const e =
|
|
589
|
+
const e = Re.get(t);
|
|
590
590
|
if (!e)
|
|
591
591
|
throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
|
|
592
592
|
return e[0];
|
|
593
593
|
}
|
|
594
|
-
async function
|
|
595
|
-
if (
|
|
594
|
+
async function Pe(t, e, n, o = !1, a = !1) {
|
|
595
|
+
if (j(t), I(e), !Q(n, Response))
|
|
596
596
|
throw new TypeError('"response" must be an instance of Response');
|
|
597
597
|
if (n.status !== 200) {
|
|
598
598
|
let i;
|
|
599
|
-
if (i = await
|
|
599
|
+
if (i = await Lt(n))
|
|
600
600
|
return i;
|
|
601
601
|
throw new s('"response" is not a conform Token Endpoint response');
|
|
602
602
|
}
|
|
@@ -625,7 +625,7 @@ async function Re(t, e, n, o = !1, a = !1) {
|
|
|
625
625
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
626
626
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
627
627
|
if (r.id_token) {
|
|
628
|
-
const { claims: i, jwt: c } = await
|
|
628
|
+
const { claims: i, jwt: c } = await Jt(r.id_token, Ot.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ce, L(e), Se(e), e[Be]).then(Ut.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(At.bind(void 0, t.issuer)).then(kt.bind(void 0, e.client_id));
|
|
629
629
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
630
630
|
if (i.azp === void 0)
|
|
631
631
|
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -634,15 +634,15 @@ async function Re(t, e, n, o = !1, a = !1) {
|
|
|
634
634
|
}
|
|
635
635
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
636
636
|
throw new s('ID Token "auth_time" (authentication time) must be a positive number');
|
|
637
|
-
|
|
637
|
+
Re.set(r, [i, c]);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
return r;
|
|
641
641
|
}
|
|
642
|
-
async function
|
|
643
|
-
return
|
|
642
|
+
async function Tt(t, e, n) {
|
|
643
|
+
return Pe(t, e, n);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function kt(t, e) {
|
|
646
646
|
if (Array.isArray(e.claims.aud)) {
|
|
647
647
|
if (!e.claims.aud.includes(t))
|
|
648
648
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
@@ -650,17 +650,17 @@ function Tt(t, e) {
|
|
|
650
650
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
651
651
|
return e;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function At(t, e) {
|
|
654
654
|
if (e.claims.iss !== t)
|
|
655
655
|
throw new s('unexpected JWT "iss" (issuer) claim value');
|
|
656
656
|
return e;
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
return
|
|
658
|
+
const Ue = /* @__PURE__ */ new WeakSet();
|
|
659
|
+
function Et(t) {
|
|
660
|
+
return Ue.add(t), t;
|
|
661
661
|
}
|
|
662
|
-
async function
|
|
663
|
-
if (
|
|
662
|
+
async function Rt(t, e, n, o, a, r) {
|
|
663
|
+
if (j(t), I(e), !Ue.has(n))
|
|
664
664
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
665
665
|
if (!w(o))
|
|
666
666
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
@@ -670,9 +670,9 @@ async function Et(t, e, n, o, a, r) {
|
|
|
670
670
|
if (!i)
|
|
671
671
|
throw new s('no authorization code in "callbackParameters"');
|
|
672
672
|
const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
|
|
673
|
-
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i),
|
|
673
|
+
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), Ee(t, e, "authorization_code", c, r);
|
|
674
674
|
}
|
|
675
|
-
const
|
|
675
|
+
const Pt = {
|
|
676
676
|
aud: "audience",
|
|
677
677
|
c_hash: "code hash",
|
|
678
678
|
client_id: "client id",
|
|
@@ -688,33 +688,33 @@ const Rt = {
|
|
|
688
688
|
htu: "http uri",
|
|
689
689
|
cnf: "confirmation"
|
|
690
690
|
};
|
|
691
|
-
function
|
|
691
|
+
function Ut(t, e) {
|
|
692
692
|
for (const n of t)
|
|
693
693
|
if (e.claims[n] === void 0)
|
|
694
|
-
throw new s(`JWT "${n}" (${
|
|
694
|
+
throw new s(`JWT "${n}" (${Pt[n]}) claim missing`);
|
|
695
695
|
return e;
|
|
696
696
|
}
|
|
697
|
-
const
|
|
698
|
-
async function
|
|
699
|
-
const r = await
|
|
697
|
+
const xt = Symbol(), B = Symbol();
|
|
698
|
+
async function Ct(t, e, n, o, a) {
|
|
699
|
+
const r = await Pe(t, e, n);
|
|
700
700
|
if (Y(r))
|
|
701
701
|
return r;
|
|
702
702
|
if (!w(r.id_token))
|
|
703
703
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
704
704
|
a ?? (a = e.default_max_age ?? B);
|
|
705
|
-
const i =
|
|
705
|
+
const i = St(r);
|
|
706
706
|
if ((e.require_auth_time || a !== B) && i.auth_time === void 0)
|
|
707
707
|
throw new s('ID Token "auth_time" (authentication time) claim missing');
|
|
708
708
|
if (a !== B) {
|
|
709
709
|
if (typeof a != "number" || a < 0)
|
|
710
710
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
711
|
-
const c = F() + L(e),
|
|
712
|
-
if (i.auth_time + a < c -
|
|
711
|
+
const c = F() + L(e), h = Se(e);
|
|
712
|
+
if (i.auth_time + a < c - h)
|
|
713
713
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
714
714
|
}
|
|
715
715
|
switch (o) {
|
|
716
716
|
case void 0:
|
|
717
|
-
case
|
|
717
|
+
case xt:
|
|
718
718
|
if (i.nonce !== void 0)
|
|
719
719
|
throw new s('unexpected ID Token "nonce" claim value');
|
|
720
720
|
break;
|
|
@@ -732,7 +732,7 @@ function ne(t) {
|
|
|
732
732
|
if (t.bodyUsed)
|
|
733
733
|
throw new TypeError('"response" body has been used already');
|
|
734
734
|
}
|
|
735
|
-
async function
|
|
735
|
+
async function Lt(t) {
|
|
736
736
|
if (t.status > 399 && t.status < 500) {
|
|
737
737
|
ne(t);
|
|
738
738
|
try {
|
|
@@ -743,11 +743,11 @@ async function Ct(t) {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function pe(t) {
|
|
747
747
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
748
748
|
throw new s(`${t.name} modulusLength must be at least 2048 bits`);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function jt(t) {
|
|
751
751
|
switch (t) {
|
|
752
752
|
case "P-256":
|
|
753
753
|
return "SHA-256";
|
|
@@ -759,15 +759,15 @@ function Lt(t) {
|
|
|
759
759
|
throw new S();
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function xe(t) {
|
|
763
763
|
switch (t.algorithm.name) {
|
|
764
764
|
case "ECDSA":
|
|
765
765
|
return {
|
|
766
766
|
name: t.algorithm.name,
|
|
767
|
-
hash:
|
|
767
|
+
hash: jt(t.algorithm.namedCurve)
|
|
768
768
|
};
|
|
769
769
|
case "RSA-PSS":
|
|
770
|
-
switch (
|
|
770
|
+
switch (pe(t.algorithm), t.algorithm.hash.name) {
|
|
771
771
|
case "SHA-256":
|
|
772
772
|
case "SHA-384":
|
|
773
773
|
case "SHA-512":
|
|
@@ -779,71 +779,71 @@ function Ue(t) {
|
|
|
779
779
|
throw new S();
|
|
780
780
|
}
|
|
781
781
|
case "RSASSA-PKCS1-v1_5":
|
|
782
|
-
return
|
|
782
|
+
return pe(t.algorithm), t.algorithm.name;
|
|
783
783
|
case "Ed448":
|
|
784
784
|
case "Ed25519":
|
|
785
785
|
return t.algorithm.name;
|
|
786
786
|
}
|
|
787
787
|
throw new S();
|
|
788
788
|
}
|
|
789
|
-
const
|
|
789
|
+
const Ce = Symbol();
|
|
790
790
|
async function It(t, e, n, o) {
|
|
791
791
|
const a = `${t}.${e}`;
|
|
792
|
-
if (!await crypto.subtle.verify(
|
|
792
|
+
if (!await crypto.subtle.verify(xe(n), n, o, E(a)))
|
|
793
793
|
throw new s("JWT signature verification failed");
|
|
794
794
|
}
|
|
795
|
-
async function
|
|
796
|
-
let { 0: i, 1: c, 2:
|
|
795
|
+
async function Jt(t, e, n, o, a, r) {
|
|
796
|
+
let { 0: i, 1: c, 2: h, length: _ } = t.split(".");
|
|
797
797
|
if (_ === 5)
|
|
798
798
|
if (r !== void 0)
|
|
799
|
-
t = await r(t), { 0: i, 1: c, 2:
|
|
799
|
+
t = await r(t), { 0: i, 1: c, 2: h, length: _ } = t.split(".");
|
|
800
800
|
else
|
|
801
801
|
throw new S("JWE structure JWTs are not supported");
|
|
802
802
|
if (_ !== 3)
|
|
803
803
|
throw new s("Invalid JWT");
|
|
804
|
-
let
|
|
804
|
+
let p;
|
|
805
805
|
try {
|
|
806
|
-
|
|
806
|
+
p = JSON.parse(E(A(i)));
|
|
807
807
|
} catch (l) {
|
|
808
808
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
809
809
|
}
|
|
810
|
-
if (!C(
|
|
810
|
+
if (!C(p))
|
|
811
811
|
throw new s("JWT Header must be a top level object");
|
|
812
|
-
if (e(
|
|
812
|
+
if (e(p), p.crit !== void 0)
|
|
813
813
|
throw new s('unexpected JWT "crit" header parameter');
|
|
814
|
-
const y = A(
|
|
814
|
+
const y = A(h);
|
|
815
815
|
let T;
|
|
816
|
-
n !==
|
|
817
|
-
let
|
|
816
|
+
n !== Ce && (T = await n(p), await It(i, c, T, y));
|
|
817
|
+
let f;
|
|
818
818
|
try {
|
|
819
|
-
|
|
819
|
+
f = JSON.parse(E(A(c)));
|
|
820
820
|
} catch (l) {
|
|
821
821
|
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
822
822
|
}
|
|
823
|
-
if (!C(
|
|
823
|
+
if (!C(f))
|
|
824
824
|
throw new s("JWT Payload must be a top level object");
|
|
825
825
|
const J = F() + o;
|
|
826
|
-
if (
|
|
827
|
-
if (typeof
|
|
826
|
+
if (f.exp !== void 0) {
|
|
827
|
+
if (typeof f.exp != "number")
|
|
828
828
|
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
829
|
-
if (
|
|
829
|
+
if (f.exp <= J - a)
|
|
830
830
|
throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
831
831
|
}
|
|
832
|
-
if (
|
|
832
|
+
if (f.iat !== void 0 && typeof f.iat != "number")
|
|
833
833
|
throw new s('unexpected JWT "iat" (issued at) claim type');
|
|
834
|
-
if (
|
|
834
|
+
if (f.iss !== void 0 && typeof f.iss != "string")
|
|
835
835
|
throw new s('unexpected JWT "iss" (issuer) claim type');
|
|
836
|
-
if (
|
|
837
|
-
if (typeof
|
|
836
|
+
if (f.nbf !== void 0) {
|
|
837
|
+
if (typeof f.nbf != "number")
|
|
838
838
|
throw new s('unexpected JWT "nbf" (not before) claim type');
|
|
839
|
-
if (
|
|
839
|
+
if (f.nbf > J + a)
|
|
840
840
|
throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
841
841
|
}
|
|
842
|
-
if (
|
|
842
|
+
if (f.aud !== void 0 && typeof f.aud != "string" && !Array.isArray(f.aud))
|
|
843
843
|
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
844
|
-
return { header:
|
|
844
|
+
return { header: p, claims: f, signature: y, key: T, jwt: t };
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function Ot(t, e, n) {
|
|
847
847
|
if (t !== void 0) {
|
|
848
848
|
if (n.alg !== t)
|
|
849
849
|
throw new s('unexpected JWT "alg" header parameter');
|
|
@@ -863,9 +863,9 @@ function k(t, e) {
|
|
|
863
863
|
throw new s(`"${e}" parameter must be provided only once`);
|
|
864
864
|
return n;
|
|
865
865
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
868
|
-
if (
|
|
866
|
+
const zt = Symbol(), Dt = Symbol();
|
|
867
|
+
function Nt(t, e, n, o) {
|
|
868
|
+
if (j(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
869
869
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
870
870
|
if (k(n, "response"))
|
|
871
871
|
throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
@@ -876,11 +876,11 @@ function Dt(t, e, n, o) {
|
|
|
876
876
|
throw new s('unexpected "iss" (issuer) response parameter value');
|
|
877
877
|
switch (o) {
|
|
878
878
|
case void 0:
|
|
879
|
-
case
|
|
879
|
+
case Dt:
|
|
880
880
|
if (r !== void 0)
|
|
881
881
|
throw new s('unexpected "state" response parameter encountered');
|
|
882
882
|
break;
|
|
883
|
-
case
|
|
883
|
+
case zt:
|
|
884
884
|
break;
|
|
885
885
|
default:
|
|
886
886
|
if (!w(o))
|
|
@@ -897,22 +897,22 @@ function Dt(t, e, n, o) {
|
|
|
897
897
|
error_description: k(n, "error_description"),
|
|
898
898
|
error_uri: k(n, "error_uri")
|
|
899
899
|
};
|
|
900
|
-
const c = k(n, "id_token"),
|
|
901
|
-
if (c !== void 0 ||
|
|
900
|
+
const c = k(n, "id_token"), h = k(n, "token");
|
|
901
|
+
if (c !== void 0 || h !== void 0)
|
|
902
902
|
throw new S("implicit and hybrid flows are not supported");
|
|
903
|
-
return
|
|
903
|
+
return Et(new URLSearchParams(n));
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function Kt({
|
|
906
906
|
handleCallback: t
|
|
907
907
|
}) {
|
|
908
|
-
const e =
|
|
908
|
+
const e = Ke({
|
|
909
909
|
retry: !1,
|
|
910
910
|
queryKey: ["oauth-callback"],
|
|
911
911
|
queryFn: async () => {
|
|
912
912
|
try {
|
|
913
913
|
return await t();
|
|
914
914
|
} catch (n) {
|
|
915
|
-
throw new
|
|
915
|
+
throw new He("Could not validate user", {
|
|
916
916
|
cause: n,
|
|
917
917
|
title: "Authentication Error",
|
|
918
918
|
developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
|
|
@@ -920,17 +920,17 @@ function Nt({
|
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
});
|
|
923
|
-
return /* @__PURE__ */ G.jsx(
|
|
923
|
+
return /* @__PURE__ */ G.jsx(We, { to: e.data });
|
|
924
924
|
}
|
|
925
925
|
class P extends Error {
|
|
926
926
|
}
|
|
927
|
-
class
|
|
927
|
+
class we extends P {
|
|
928
928
|
constructor(e, n, o) {
|
|
929
929
|
super(e, o), this.error = n;
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
const V = "code-verifier";
|
|
933
|
-
class
|
|
933
|
+
class Wt extends Ne {
|
|
934
934
|
constructor(e, n) {
|
|
935
935
|
super(), this.callbackUrlPath = e, this.handleCallback = n;
|
|
936
936
|
}
|
|
@@ -939,25 +939,26 @@ class Kt extends De {
|
|
|
939
939
|
...super.getRoutes(),
|
|
940
940
|
{
|
|
941
941
|
path: this.callbackUrlPath,
|
|
942
|
-
element: /* @__PURE__ */ G.jsx(
|
|
942
|
+
element: /* @__PURE__ */ G.jsx(De, { children: /* @__PURE__ */ G.jsx(Kt, { handleCallback: this.handleCallback }) })
|
|
943
943
|
}
|
|
944
944
|
];
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
-
class
|
|
947
|
+
class Ht {
|
|
948
948
|
constructor({
|
|
949
949
|
issuer: e,
|
|
950
950
|
audience: n,
|
|
951
951
|
clientId: o,
|
|
952
952
|
redirectToAfterSignUp: a,
|
|
953
953
|
redirectToAfterSignIn: r,
|
|
954
|
-
redirectToAfterSignOut: i
|
|
954
|
+
redirectToAfterSignOut: i,
|
|
955
|
+
basePath: c
|
|
955
956
|
}) {
|
|
956
957
|
b(this, "client");
|
|
957
958
|
b(this, "issuer");
|
|
958
959
|
b(this, "authorizationServer");
|
|
959
|
-
b(this, "callbackUrlPath"
|
|
960
|
-
b(this, "logoutRedirectUrlPath"
|
|
960
|
+
b(this, "callbackUrlPath");
|
|
961
|
+
b(this, "logoutRedirectUrlPath");
|
|
961
962
|
b(this, "onAuthorizationUrl");
|
|
962
963
|
b(this, "redirectToAfterSignUp");
|
|
963
964
|
b(this, "redirectToAfterSignIn");
|
|
@@ -984,32 +985,32 @@ class Wt {
|
|
|
984
985
|
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(V);
|
|
985
986
|
if (sessionStorage.removeItem(V), !o)
|
|
986
987
|
throw new P("No code verifier found in state.");
|
|
987
|
-
const a = await this.getAuthServer(), r =
|
|
988
|
+
const a = await this.getAuthServer(), r = Nt(
|
|
988
989
|
a,
|
|
989
990
|
this.client,
|
|
990
991
|
e.searchParams,
|
|
991
992
|
n ?? void 0
|
|
992
993
|
);
|
|
993
994
|
if (Y(r))
|
|
994
|
-
throw
|
|
995
|
+
throw ce.error("Error validating OAuth response", r), new we(
|
|
995
996
|
"Error validating OAuth response",
|
|
996
997
|
r
|
|
997
998
|
);
|
|
998
999
|
const i = new URL(e);
|
|
999
1000
|
i.pathname = this.callbackUrlPath, i.search = "";
|
|
1000
|
-
const c = await
|
|
1001
|
+
const c = await Rt(
|
|
1001
1002
|
a,
|
|
1002
1003
|
this.client,
|
|
1003
1004
|
r,
|
|
1004
1005
|
i.toString(),
|
|
1005
1006
|
o
|
|
1006
|
-
),
|
|
1007
|
+
), h = await Ct(
|
|
1007
1008
|
a,
|
|
1008
1009
|
this.client,
|
|
1009
1010
|
c
|
|
1010
1011
|
);
|
|
1011
|
-
this.setTokensFromResponse(
|
|
1012
|
-
const _ = await this.getAccessToken(), y = await (await
|
|
1012
|
+
this.setTokensFromResponse(h);
|
|
1013
|
+
const _ = await this.getAccessToken(), y = await (await bt(
|
|
1013
1014
|
a,
|
|
1014
1015
|
this.client,
|
|
1015
1016
|
_
|
|
@@ -1025,18 +1026,20 @@ class Wt {
|
|
|
1025
1026
|
isPending: !1,
|
|
1026
1027
|
profile: T
|
|
1027
1028
|
});
|
|
1028
|
-
const
|
|
1029
|
-
return sessionStorage.removeItem("redirect-to"),
|
|
1029
|
+
const f = sessionStorage.getItem("redirect-to") ?? "/";
|
|
1030
|
+
return sessionStorage.removeItem("redirect-to"), f;
|
|
1030
1031
|
});
|
|
1031
1032
|
this.client = {
|
|
1032
1033
|
client_id: o,
|
|
1033
1034
|
token_endpoint_auth_method: "none"
|
|
1034
|
-
}, this.audience = n, this.issuer = e, this.
|
|
1035
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = ae(c, "/oauth/callback");
|
|
1036
|
+
const h = ae(c, "/");
|
|
1037
|
+
this.logoutRedirectUrlPath = h, this.redirectToAfterSignUp = a ?? h, this.redirectToAfterSignIn = r ?? h, this.redirectToAfterSignOut = i ?? h;
|
|
1035
1038
|
}
|
|
1036
1039
|
async getAuthServer() {
|
|
1037
1040
|
if (!this.authorizationServer) {
|
|
1038
|
-
const e = new URL(this.issuer), n = await
|
|
1039
|
-
this.authorizationServer = await
|
|
1041
|
+
const e = new URL(this.issuer), n = await nt(e);
|
|
1042
|
+
this.authorizationServer = await rt(
|
|
1040
1043
|
e,
|
|
1041
1044
|
n
|
|
1042
1045
|
);
|
|
@@ -1049,7 +1052,7 @@ class Wt {
|
|
|
1049
1052
|
*/
|
|
1050
1053
|
setTokensFromResponse(e) {
|
|
1051
1054
|
if (Y(e))
|
|
1052
|
-
throw
|
|
1055
|
+
throw ce.error("Bad Token Response", e), new we("Bad Token Response", e);
|
|
1053
1056
|
if (!e.expires_in)
|
|
1054
1057
|
throw new P("No expires_in in response");
|
|
1055
1058
|
const n = {
|
|
@@ -1078,25 +1081,25 @@ class Wt {
|
|
|
1078
1081
|
redirectTo: e,
|
|
1079
1082
|
isSignUp: n = !1
|
|
1080
1083
|
}) {
|
|
1081
|
-
var _,
|
|
1084
|
+
var _, p;
|
|
1082
1085
|
const o = "S256", a = await this.getAuthServer();
|
|
1083
1086
|
if (!a.authorization_endpoint)
|
|
1084
1087
|
throw new P("No authorization endpoint");
|
|
1085
|
-
const r =
|
|
1088
|
+
const r = ot(), i = await at(r);
|
|
1086
1089
|
sessionStorage.setItem(V, r);
|
|
1087
1090
|
const c = new URL(
|
|
1088
1091
|
a.authorization_endpoint
|
|
1089
1092
|
);
|
|
1090
1093
|
sessionStorage.setItem("redirect-to", e);
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1094
|
+
const h = new URL(window.location.origin);
|
|
1095
|
+
if (h.pathname = this.callbackUrlPath, h.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", h.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", "openid profile email"), c.searchParams.set("code_challenge", i), c.searchParams.set(
|
|
1093
1096
|
"code_challenge_method",
|
|
1094
1097
|
o
|
|
1095
1098
|
), this.audience && c.searchParams.set("audience", this.audience), (_ = this.onAuthorizationUrl) == null || _.call(this, c, {
|
|
1096
1099
|
isSignIn: !n,
|
|
1097
1100
|
isSignUp: n
|
|
1098
|
-
}), ((
|
|
1099
|
-
const y =
|
|
1101
|
+
}), ((p = a.code_challenge_methods_supported) == null ? void 0 : p.includes("S256")) !== !0) {
|
|
1102
|
+
const y = it();
|
|
1100
1103
|
c.searchParams.set("state", y);
|
|
1101
1104
|
}
|
|
1102
1105
|
location.href = c.href;
|
|
@@ -1114,11 +1117,11 @@ class Wt {
|
|
|
1114
1117
|
profile: null,
|
|
1115
1118
|
providerData: null
|
|
1116
1119
|
}), "";
|
|
1117
|
-
const a = await
|
|
1120
|
+
const a = await vt(
|
|
1118
1121
|
e,
|
|
1119
1122
|
this.client,
|
|
1120
1123
|
o.refreshToken
|
|
1121
|
-
), r = await
|
|
1124
|
+
), r = await Tt(
|
|
1122
1125
|
e,
|
|
1123
1126
|
this.client,
|
|
1124
1127
|
a
|
|
@@ -1130,12 +1133,12 @@ class Wt {
|
|
|
1130
1133
|
return o.accessToken;
|
|
1131
1134
|
}
|
|
1132
1135
|
getAuthenticationPlugin() {
|
|
1133
|
-
return new
|
|
1136
|
+
return new Wt(this.callbackUrlPath, this.handleCallback);
|
|
1134
1137
|
}
|
|
1135
1138
|
}
|
|
1136
|
-
const
|
|
1139
|
+
const Qt = (t) => new Ht(t);
|
|
1137
1140
|
export {
|
|
1138
|
-
|
|
1139
|
-
|
|
1141
|
+
Ht as OpenIDAuthenticationProvider,
|
|
1142
|
+
Qt as default
|
|
1140
1143
|
};
|
|
1141
1144
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|