zudoku 0.0.0-f62edde → 0.0.0-f687ed1
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/README.md +2 -2
- package/dist/app/demo.js +17 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +7 -13
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +3 -3
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/loader.js +2 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.js +5 -0
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +152 -5
- package/dist/config/validators/InputNavigationSchema.js +0 -3
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +4 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +38 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +6 -3
- package/dist/config/validators/validate.js +15 -5
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +65 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -0
- package/dist/lib/authentication/components/SignIn.js +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -2
- package/dist/lib/authentication/providers/openid.js +11 -5
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +10 -10
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Main.js +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +8 -5
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +5 -0
- package/dist/lib/components/TopNavigation.js +16 -12
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js +2 -2
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +7 -5
- package/dist/lib/core/ZudokuContext.js +16 -3
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +8 -12
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
- package/dist/lib/plugins/custom-pages/index.js +1 -3
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +5 -5
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +3 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +16 -12
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +50 -35
- 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.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +25 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +1 -1
- package/dist/lib/ui/CodeBlock.js +5 -6
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/vite/api/SchemaManager.js +6 -2
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +8 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +10 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +1 -28
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-docs.js +11 -9
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +2 -3
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +91 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +47 -5
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/lib/Alert-_ISVjPaE.js +161 -0
- package/lib/Alert-_ISVjPaE.js.map +1 -0
- package/lib/{Button-BE9IVkWV.js → Button-B3o-2Xdf.js} +2 -2
- package/lib/{Button-BE9IVkWV.js.map → Button-B3o-2Xdf.js.map} +1 -1
- package/lib/CallbackHandler-CHrZoaQm.js +38 -0
- package/lib/CallbackHandler-CHrZoaQm.js.map +1 -0
- package/lib/{Card-DPhGbYUM.js → Card-CMDQUPM4.js} +2 -2
- package/lib/{Card-DPhGbYUM.js.map → Card-CMDQUPM4.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-B-G0eKtw.js +85 -0
- package/lib/CodeBlock-B-G0eKtw.js.map +1 -0
- package/lib/Command-C9AC5cf-.js +140 -0
- package/lib/Command-C9AC5cf-.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-DMWw1doX.js} +6 -6
- package/lib/Dialog-DMWw1doX.js.map +1 -0
- package/lib/{Drawer-BzkOKwgC.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-BzkOKwgC.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/MdxPage-CO_w2FI6.js +110 -0
- package/lib/MdxPage-CO_w2FI6.js.map +1 -0
- package/lib/{OasProvider-CUXXF3oj.js → OasProvider-BbVO6EgC.js} +3 -3
- package/lib/{OasProvider-CUXXF3oj.js.map → OasProvider-BbVO6EgC.js.map} +1 -1
- package/lib/{OperationList-P_vP7u7f.js → OperationList-Crvmqvd9.js} +726 -714
- package/lib/OperationList-Crvmqvd9.js.map +1 -0
- package/lib/{Pagination-tnJwvuLq.js → Pagination-Ct2YfjYl.js} +10 -9
- package/lib/Pagination-Ct2YfjYl.js.map +1 -0
- package/lib/RouteGuard-Vnlz_t51.js +737 -0
- package/lib/RouteGuard-Vnlz_t51.js.map +1 -0
- package/lib/{SchemaList-6GhTLPZt.js → SchemaList-DOYtqnab.js} +26 -37
- package/lib/SchemaList-DOYtqnab.js.map +1 -0
- package/lib/{SchemaView-DTIMiB_H.js → SchemaView-CyRfElaI.js} +94 -103
- package/lib/SchemaView-CyRfElaI.js.map +1 -0
- package/lib/SignUp-CcP8Tyfs.js +56 -0
- package/lib/SignUp-CcP8Tyfs.js.map +1 -0
- package/lib/{Markdown-BF7mJP8j.js → Slot-DqgTXQwt.js} +3359 -3002
- package/lib/Slot-DqgTXQwt.js.map +1 -0
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-bm761HDo.js} +756 -756
- package/lib/SyntaxHighlight-bm761HDo.js.map +1 -0
- package/lib/{Toc-BxYiZwxz.js → Toc-8NJ4k4Us.js} +3 -3
- package/lib/{Toc-BxYiZwxz.js.map → Toc-8NJ4k4Us.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-BBvOD6jV.js → circular-DZw_Mz7f.js} +2 -2
- package/lib/{circular-BBvOD6jV.js.map → circular-DZw_Mz7f.js.map} +1 -1
- package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/{createServer-CR5sbG6H.js → createServer-CQoCyFC1.js} +3398 -3552
- package/lib/createServer-CQoCyFC1.js.map +1 -0
- package/lib/errors-BfmB7Vsx.js +44 -0
- package/lib/errors-BfmB7Vsx.js.map +1 -0
- package/lib/{hook-CHXroBFt.js → hook-CZjW2buS.js} +423 -416
- package/lib/hook-CZjW2buS.js.map +1 -0
- package/lib/index-B3xY0rUq.js +3471 -0
- package/lib/index-B3xY0rUq.js.map +1 -0
- package/lib/index-BHBXOwle.js +3980 -0
- package/lib/index-BHBXOwle.js.map +1 -0
- package/lib/index-Bm35Tkgf.js +107 -0
- package/lib/index-Bm35Tkgf.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BvvmIczU.js → index-D-Vi7oy2.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-D-Vi7oy2.js.map} +1 -1
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index.esm-Cp4wkyud.js.map +1 -1
- package/lib/invariant-DAFpPywt.js.map +1 -1
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +6 -73
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +24 -24
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +3 -3
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +40 -9885
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +131 -121
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +33 -3534
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +128 -167
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -20
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +211 -117
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +31 -29
- package/src/app/demo.tsx +20 -3
- package/src/app/main.css +26 -5
- package/src/app/main.tsx +10 -18
- package/src/app/standalone.tsx +3 -3
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/providers/openid.tsx +23 -4
- package/src/lib/components/Autocomplete.tsx +2 -1
- package/src/lib/components/Banner.tsx +1 -2
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Header.tsx +20 -19
- package/src/lib/components/Main.tsx +1 -1
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/MobileTopNavigation.tsx +58 -9
- package/src/lib/components/NotFoundPage.tsx +6 -5
- package/src/lib/components/Pagination.tsx +1 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +30 -14
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/NavigationWrapper.tsx +5 -2
- package/src/lib/core/ZudokuContext.ts +27 -5
- package/src/lib/errors/ErrorAlert.tsx +8 -16
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +18 -18
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/custom-pages/index.tsx +2 -6
- package/src/lib/plugins/markdown/MdxPage.tsx +7 -12
- package/src/lib/plugins/openapi/OperationList.tsx +11 -19
- package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -1
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +40 -31
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +5 -6
- package/src/lib/plugins/openapi/playground/Playground.tsx +181 -126
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +103 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -92
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/ui/Alert.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +5 -6
- package/src/lib/ui/Dialog.tsx +2 -2
- package/src/lib/ui/EmbeddedCodeBlock.tsx +2 -2
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-BF7mJP8j.js.map +0 -1
- package/lib/MdxPage-CJs98yjf.js +0 -121
- package/lib/MdxPage-CJs98yjf.js.map +0 -1
- package/lib/OperationList-P_vP7u7f.js.map +0 -1
- package/lib/Pagination-tnJwvuLq.js.map +0 -1
- package/lib/RouteGuard-gV7nvzi7.js +0 -55
- package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
- package/lib/SchemaList-6GhTLPZt.js.map +0 -1
- package/lib/SchemaView-DTIMiB_H.js.map +0 -1
- package/lib/SignUp-B6w5AwHM.js +0 -63
- package/lib/SignUp-B6w5AwHM.js.map +0 -1
- package/lib/Slot-Di32B6gb.js +0 -161
- package/lib/Slot-Di32B6gb.js.map +0 -1
- package/lib/SyntaxHighlight-C5ja40ix.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/cn-wvCW-ho6.js.map +0 -1
- package/lib/createServer-CR5sbG6H.js.map +0 -1
- package/lib/errors-D_5vKvUq.js +0 -78
- package/lib/errors-D_5vKvUq.js.map +0 -1
- package/lib/hook-CHXroBFt.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-DwJ9TXn0.js +0 -3227
- package/lib/index-DwJ9TXn0.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/mutation-BpcyTgWI.js +0 -196
- package/lib/mutation-BpcyTgWI.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-N4ockVKi.js +0 -97
- package/lib/useMutation-N4ockVKi.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { LogOutIcon as g } from "lucide-react";
|
|
3
|
-
import { S as f, a as w, b as p } from "./SignUp-
|
|
4
|
-
import { u as n } from "./hook-
|
|
3
|
+
import { S as f, a as w, b as p } from "./SignUp-CcP8Tyfs.js";
|
|
4
|
+
import { u as n } from "./hook-CZjW2buS.js";
|
|
5
5
|
const y = ({
|
|
6
6
|
clerkPubKey: d,
|
|
7
7
|
redirectToAfterSignOut: c = "/",
|
|
@@ -11,7 +11,7 @@ const y = ({
|
|
|
11
11
|
let s;
|
|
12
12
|
const a = (async () => {
|
|
13
13
|
if (typeof window > "u") return;
|
|
14
|
-
const { Clerk: e } = await import("
|
|
14
|
+
const { Clerk: e } = await import("@clerk/clerk-js");
|
|
15
15
|
if (s = new e(d), await s.load(), s.user) {
|
|
16
16
|
const i = s.user.emailAddresses.find(
|
|
17
17
|
(o) => o.verification.status === "verified"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.auth-clerk.js","sources":["../src/lib/authentication/providers/clerk.tsx"],"sourcesContent":["import type { Clerk } from \"@clerk/clerk-js\";\nimport { LogOutIcon } from \"lucide-react\";\nimport { type ZudokuPlugin } from \"zudoku/plugins\";\nimport { type ClerkAuthenticationConfig } from \"../../../config/config.js\";\nimport {\n type AuthenticationPlugin,\n type AuthenticationProviderInitializer,\n} from \"../authentication.js\";\nimport { SignIn } from \"../components/SignIn.js\";\nimport { SignOut } from \"../components/SignOut.js\";\nimport { SignUp } from \"../components/SignUp.js\";\nimport { useAuthState } from \"../state.js\";\n\nconst clerkAuth: AuthenticationProviderInitializer<\n ClerkAuthenticationConfig\n> = ({\n clerkPubKey,\n redirectToAfterSignOut = \"/\",\n redirectToAfterSignUp,\n redirectToAfterSignIn,\n}): AuthenticationPlugin & ZudokuPlugin => {\n let clerkApi: Clerk | undefined;\n const ensureLoaded = (async () => {\n if (typeof window === \"undefined\") return;\n const { Clerk } = await import(\"@clerk/clerk-js\");\n clerkApi = new Clerk(clerkPubKey);\n\n await clerkApi.load();\n\n if (clerkApi.user) {\n const verifiedEmail = clerkApi.user.emailAddresses.find(\n (email) => email.verification.status === \"verified\",\n );\n useAuthState.getState().setLoggedIn({\n profile: {\n sub: clerkApi.user.id,\n name: clerkApi.user.fullName ?? undefined,\n email:\n verifiedEmail?.emailAddress ??\n clerkApi.user.emailAddresses[0]?.emailAddress,\n emailVerified: verifiedEmail !== undefined,\n pictureUrl: clerkApi.user.imageUrl,\n },\n providerData: {\n user: {\n publicMetadata: clerkApi.user.publicMetadata,\n id: clerkApi.user.id,\n emailAddresses: clerkApi.user.emailAddresses,\n imageUrl: clerkApi.user.imageUrl,\n fullName: clerkApi.user.fullName,\n },\n },\n });\n }\n\n return clerkApi;\n })();\n\n async function getAccessToken() {\n await ensureLoaded;\n if (!clerkApi?.session) {\n throw new Error(\"No session available\");\n }\n const response = await clerkApi.session.getToken();\n if (!response) {\n throw new Error(\"Could not get access token from Clerk\");\n }\n return response;\n }\n\n async function signRequest(request: Request): Promise<Request> {\n const response = await getAccessToken();\n request.headers.set(\"Authorization\", `Bearer ${response}`);\n return request;\n }\n\n return {\n getRoutes: () => {\n return [\n {\n path: \"/signout\",\n element: <SignOut />,\n },\n {\n path: \"/signin\",\n element: <SignIn />,\n },\n {\n path: \"/signup\",\n element: <SignUp />,\n },\n ];\n },\n\n getProfileMenuItems() {\n return [\n {\n label: \"Logout\",\n path: \"/signout\",\n category: \"bottom\",\n icon: LogOutIcon,\n } as const,\n ];\n },\n initialize: async () => {\n const clerk = await ensureLoaded;\n\n if (!clerk) {\n return;\n }\n\n if (clerk.session) {\n const verifiedEmail = clerk.session.user.emailAddresses.find(\n (email) => email.verification.status === \"verified\",\n );\n useAuthState.getState().setLoggedIn({\n profile: {\n sub: clerk.session.user.id,\n name: clerk.session.user.fullName ?? undefined,\n email:\n verifiedEmail?.emailAddress ??\n clerk.session.user.emailAddresses[0]?.emailAddress,\n emailVerified: verifiedEmail !== undefined,\n pictureUrl: clerk.session.user.imageUrl,\n },\n providerData: {\n user: clerk.session.user,\n },\n });\n } else {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n }\n },\n getAccessToken,\n signRequest,\n signOut: async () => {\n await ensureLoaded;\n await clerkApi?.signOut({\n redirectUrl: window.location.origin + redirectToAfterSignOut,\n });\n useAuthState.getState().setLoggedOut();\n },\n signIn: async ({ redirectTo }: { redirectTo?: string } = {}) => {\n await ensureLoaded;\n await clerkApi?.redirectToSignIn({\n signInForceRedirectUrl: redirectToAfterSignIn\n ? window.location.origin + redirectToAfterSignIn\n : redirectTo,\n signUpForceRedirectUrl: redirectToAfterSignUp\n ? window.location.origin + redirectToAfterSignUp\n : redirectTo,\n });\n },\n signUp: async ({ redirectTo }: { redirectTo?: string } = {}) => {\n await ensureLoaded;\n await clerkApi?.redirectToSignUp({\n signInForceRedirectUrl: redirectToAfterSignIn\n ? window.location.origin + redirectToAfterSignIn\n : redirectTo,\n signUpForceRedirectUrl: redirectToAfterSignUp\n ? window.location.origin + redirectToAfterSignUp\n : redirectTo,\n });\n },\n };\n};\n\nexport default clerkAuth;\n"],"names":["clerkAuth","clerkPubKey","redirectToAfterSignOut","redirectToAfterSignUp","redirectToAfterSignIn","clerkApi","ensureLoaded","Clerk","verifiedEmail","email","useAuthState","getAccessToken","response","signRequest","request","SignOut","SignIn","SignUp","LogOutIcon","clerk","redirectTo"],"mappings":";;;;AAaA,MAAMA,IAEF,CAAC;AAAA,EACH,aAAAC;AAAA,EACA,wBAAAC,IAAyB;AAAA,EACzB,uBAAAC;AAAA,EACA,uBAAAC;AACF,MAA2C;
|
|
1
|
+
{"version":3,"file":"zudoku.auth-clerk.js","sources":["../src/lib/authentication/providers/clerk.tsx"],"sourcesContent":["import type { Clerk } from \"@clerk/clerk-js\";\nimport { LogOutIcon } from \"lucide-react\";\nimport { type ZudokuPlugin } from \"zudoku/plugins\";\nimport { type ClerkAuthenticationConfig } from \"../../../config/config.js\";\nimport {\n type AuthenticationPlugin,\n type AuthenticationProviderInitializer,\n} from \"../authentication.js\";\nimport { SignIn } from \"../components/SignIn.js\";\nimport { SignOut } from \"../components/SignOut.js\";\nimport { SignUp } from \"../components/SignUp.js\";\nimport { useAuthState } from \"../state.js\";\n\nconst clerkAuth: AuthenticationProviderInitializer<\n ClerkAuthenticationConfig\n> = ({\n clerkPubKey,\n redirectToAfterSignOut = \"/\",\n redirectToAfterSignUp,\n redirectToAfterSignIn,\n}): AuthenticationPlugin & ZudokuPlugin => {\n let clerkApi: Clerk | undefined;\n const ensureLoaded = (async () => {\n if (typeof window === \"undefined\") return;\n const { Clerk } = await import(\"@clerk/clerk-js\");\n clerkApi = new Clerk(clerkPubKey);\n\n await clerkApi.load();\n\n if (clerkApi.user) {\n const verifiedEmail = clerkApi.user.emailAddresses.find(\n (email) => email.verification.status === \"verified\",\n );\n useAuthState.getState().setLoggedIn({\n profile: {\n sub: clerkApi.user.id,\n name: clerkApi.user.fullName ?? undefined,\n email:\n verifiedEmail?.emailAddress ??\n clerkApi.user.emailAddresses[0]?.emailAddress,\n emailVerified: verifiedEmail !== undefined,\n pictureUrl: clerkApi.user.imageUrl,\n },\n providerData: {\n user: {\n publicMetadata: clerkApi.user.publicMetadata,\n id: clerkApi.user.id,\n emailAddresses: clerkApi.user.emailAddresses,\n imageUrl: clerkApi.user.imageUrl,\n fullName: clerkApi.user.fullName,\n },\n },\n });\n }\n\n return clerkApi;\n })();\n\n async function getAccessToken() {\n await ensureLoaded;\n if (!clerkApi?.session) {\n throw new Error(\"No session available\");\n }\n const response = await clerkApi.session.getToken();\n if (!response) {\n throw new Error(\"Could not get access token from Clerk\");\n }\n return response;\n }\n\n async function signRequest(request: Request): Promise<Request> {\n const response = await getAccessToken();\n request.headers.set(\"Authorization\", `Bearer ${response}`);\n return request;\n }\n\n return {\n getRoutes: () => {\n return [\n {\n path: \"/signout\",\n element: <SignOut />,\n },\n {\n path: \"/signin\",\n element: <SignIn />,\n },\n {\n path: \"/signup\",\n element: <SignUp />,\n },\n ];\n },\n\n getProfileMenuItems() {\n return [\n {\n label: \"Logout\",\n path: \"/signout\",\n category: \"bottom\",\n icon: LogOutIcon,\n } as const,\n ];\n },\n initialize: async () => {\n const clerk = await ensureLoaded;\n\n if (!clerk) {\n return;\n }\n\n if (clerk.session) {\n const verifiedEmail = clerk.session.user.emailAddresses.find(\n (email) => email.verification.status === \"verified\",\n );\n useAuthState.getState().setLoggedIn({\n profile: {\n sub: clerk.session.user.id,\n name: clerk.session.user.fullName ?? undefined,\n email:\n verifiedEmail?.emailAddress ??\n clerk.session.user.emailAddresses[0]?.emailAddress,\n emailVerified: verifiedEmail !== undefined,\n pictureUrl: clerk.session.user.imageUrl,\n },\n providerData: {\n user: clerk.session.user,\n },\n });\n } else {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n }\n },\n getAccessToken,\n signRequest,\n signOut: async () => {\n await ensureLoaded;\n await clerkApi?.signOut({\n redirectUrl: window.location.origin + redirectToAfterSignOut,\n });\n useAuthState.getState().setLoggedOut();\n },\n signIn: async ({ redirectTo }: { redirectTo?: string } = {}) => {\n await ensureLoaded;\n await clerkApi?.redirectToSignIn({\n signInForceRedirectUrl: redirectToAfterSignIn\n ? window.location.origin + redirectToAfterSignIn\n : redirectTo,\n signUpForceRedirectUrl: redirectToAfterSignUp\n ? window.location.origin + redirectToAfterSignUp\n : redirectTo,\n });\n },\n signUp: async ({ redirectTo }: { redirectTo?: string } = {}) => {\n await ensureLoaded;\n await clerkApi?.redirectToSignUp({\n signInForceRedirectUrl: redirectToAfterSignIn\n ? window.location.origin + redirectToAfterSignIn\n : redirectTo,\n signUpForceRedirectUrl: redirectToAfterSignUp\n ? window.location.origin + redirectToAfterSignUp\n : redirectTo,\n });\n },\n };\n};\n\nexport default clerkAuth;\n"],"names":["clerkAuth","clerkPubKey","redirectToAfterSignOut","redirectToAfterSignUp","redirectToAfterSignIn","clerkApi","ensureLoaded","Clerk","verifiedEmail","email","useAuthState","getAccessToken","response","signRequest","request","SignOut","SignIn","SignUp","LogOutIcon","clerk","redirectTo"],"mappings":"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"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { g as Le } from "./invariant-DAFpPywt.js";
|
|
3
3
|
import { C as Ue } from "./ClientOnly-E7hGysn1.js";
|
|
4
|
-
import { j as
|
|
5
|
-
import { C as
|
|
4
|
+
import { j as Ce, u as S } from "./hook-CZjW2buS.js";
|
|
5
|
+
import { C as xe, O as re, A as R } from "./errors-BfmB7Vsx.js";
|
|
6
|
+
import { C as Ie } from "./CallbackHandler-CHrZoaQm.js";
|
|
6
7
|
var O = { exports: {} }, je = O.exports, oe;
|
|
7
8
|
function De() {
|
|
8
9
|
return oe || (oe = 1, function(t) {
|
|
@@ -17,28 +18,28 @@ function De() {
|
|
|
17
18
|
"warn",
|
|
18
19
|
"error"
|
|
19
20
|
], r = {}, i = null;
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
if (typeof
|
|
23
|
-
return
|
|
21
|
+
function u(l, m) {
|
|
22
|
+
var c = l[m];
|
|
23
|
+
if (typeof c.bind == "function")
|
|
24
|
+
return c.bind(l);
|
|
24
25
|
try {
|
|
25
|
-
return Function.prototype.bind.call(
|
|
26
|
+
return Function.prototype.bind.call(c, l);
|
|
26
27
|
} catch {
|
|
27
28
|
return function() {
|
|
28
|
-
return Function.prototype.apply.apply(
|
|
29
|
+
return Function.prototype.apply.apply(c, [l, arguments]);
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function d() {
|
|
33
34
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
34
35
|
}
|
|
35
36
|
function y(l) {
|
|
36
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ?
|
|
37
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? d : console[l] !== void 0 ? u(console, l) : console.log !== void 0 ? u(console, "log") : e;
|
|
37
38
|
}
|
|
38
39
|
function p() {
|
|
39
40
|
for (var l = this.getLevel(), m = 0; m < s.length; m++) {
|
|
40
|
-
var
|
|
41
|
-
this[
|
|
41
|
+
var c = s[m];
|
|
42
|
+
this[c] = m < l ? e : this.methodFactory(c, l, this.name);
|
|
42
43
|
}
|
|
43
44
|
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
44
45
|
return "No console available for logging";
|
|
@@ -48,14 +49,14 @@ function De() {
|
|
|
48
49
|
typeof console !== n && (p.call(this), this[l].apply(this, arguments));
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
function b(l, m,
|
|
52
|
+
function b(l, m, c) {
|
|
52
53
|
return y(l) || k.apply(this, arguments);
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
var
|
|
55
|
+
function f(l, m) {
|
|
56
|
+
var c = this, j, K, L, _ = "loglevel";
|
|
56
57
|
typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
|
|
57
|
-
function Ee(
|
|
58
|
-
var g = (s[
|
|
58
|
+
function Ee(h) {
|
|
59
|
+
var g = (s[h] || "silent").toUpperCase();
|
|
59
60
|
if (!(typeof window === n || !_)) {
|
|
60
61
|
try {
|
|
61
62
|
window.localStorage[_] = g;
|
|
@@ -69,21 +70,21 @@ function De() {
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
function X() {
|
|
72
|
-
var
|
|
73
|
+
var h;
|
|
73
74
|
if (!(typeof window === n || !_)) {
|
|
74
75
|
try {
|
|
75
|
-
|
|
76
|
+
h = window.localStorage[_];
|
|
76
77
|
} catch {
|
|
77
78
|
}
|
|
78
|
-
if (typeof
|
|
79
|
+
if (typeof h === n)
|
|
79
80
|
try {
|
|
80
81
|
var g = window.document.cookie, D = encodeURIComponent(_), te = g.indexOf(D + "=");
|
|
81
|
-
te !== -1 && (
|
|
82
|
+
te !== -1 && (h = /^([^;]+)/.exec(
|
|
82
83
|
g.slice(te + D.length + 1)
|
|
83
84
|
)[1]);
|
|
84
85
|
} catch {
|
|
85
86
|
}
|
|
86
|
-
return
|
|
87
|
+
return c.levels[h] === void 0 && (h = void 0), h;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
function Re() {
|
|
@@ -98,49 +99,49 @@ function De() {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
function U(
|
|
102
|
-
var g =
|
|
103
|
-
if (typeof g == "string" &&
|
|
102
|
+
function U(h) {
|
|
103
|
+
var g = h;
|
|
104
|
+
if (typeof g == "string" && c.levels[g.toUpperCase()] !== void 0 && (g = c.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= c.levels.SILENT)
|
|
104
105
|
return g;
|
|
105
|
-
throw new TypeError("log.setLevel() called with invalid level: " +
|
|
106
|
+
throw new TypeError("log.setLevel() called with invalid level: " + h);
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
+
c.name = l, c.levels = {
|
|
108
109
|
TRACE: 0,
|
|
109
110
|
DEBUG: 1,
|
|
110
111
|
INFO: 2,
|
|
111
112
|
WARN: 3,
|
|
112
113
|
ERROR: 4,
|
|
113
114
|
SILENT: 5
|
|
114
|
-
},
|
|
115
|
+
}, c.methodFactory = m || b, c.getLevel = function() {
|
|
115
116
|
return L ?? K ?? j;
|
|
116
|
-
},
|
|
117
|
-
return L = U(
|
|
118
|
-
},
|
|
119
|
-
K = U(
|
|
120
|
-
},
|
|
121
|
-
L = null, Re(), p.call(
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
if (i !==
|
|
128
|
-
for (var
|
|
129
|
-
r[
|
|
117
|
+
}, c.setLevel = function(h, g) {
|
|
118
|
+
return L = U(h), g !== !1 && Ee(L), p.call(c);
|
|
119
|
+
}, c.setDefaultLevel = function(h) {
|
|
120
|
+
K = U(h), X() || c.setLevel(h, !1);
|
|
121
|
+
}, c.resetLevel = function() {
|
|
122
|
+
L = null, Re(), p.call(c);
|
|
123
|
+
}, c.enableAll = function(h) {
|
|
124
|
+
c.setLevel(c.levels.TRACE, h);
|
|
125
|
+
}, c.disableAll = function(h) {
|
|
126
|
+
c.setLevel(c.levels.SILENT, h);
|
|
127
|
+
}, c.rebuild = function() {
|
|
128
|
+
if (i !== c && (j = U(i.getLevel())), p.call(c), i === c)
|
|
129
|
+
for (var h in r)
|
|
130
|
+
r[h].rebuild();
|
|
130
131
|
}, j = U(
|
|
131
132
|
i ? i.getLevel() : "WARN"
|
|
132
133
|
);
|
|
133
134
|
var ee = X();
|
|
134
|
-
ee != null && (L = U(ee)), p.call(
|
|
135
|
+
ee != null && (L = U(ee)), p.call(c);
|
|
135
136
|
}
|
|
136
|
-
i = new
|
|
137
|
+
i = new f(), i.getLogger = function(m) {
|
|
137
138
|
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
138
139
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
139
|
-
var
|
|
140
|
-
return
|
|
140
|
+
var c = r[m];
|
|
141
|
+
return c || (c = r[m] = new f(
|
|
141
142
|
m,
|
|
142
143
|
i.methodFactory
|
|
143
|
-
)),
|
|
144
|
+
)), c;
|
|
144
145
|
};
|
|
145
146
|
var P = typeof window !== n ? window.log : void 0;
|
|
146
147
|
return i.noConflict = function() {
|
|
@@ -241,7 +242,7 @@ function G(t) {
|
|
|
241
242
|
}
|
|
242
243
|
return t;
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
+
function C(t) {
|
|
245
246
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
246
247
|
}
|
|
247
248
|
function N(t) {
|
|
@@ -300,7 +301,7 @@ async function Ze(t, e) {
|
|
|
300
301
|
} catch (o) {
|
|
301
302
|
throw new a('failed to parse "response" body as JSON', { cause: o });
|
|
302
303
|
}
|
|
303
|
-
if (!
|
|
304
|
+
if (!C(n))
|
|
304
305
|
throw new a('"response" body must be a top level object');
|
|
305
306
|
if (!w(n.issuer))
|
|
306
307
|
throw new a('"response" body "issuer" property must be a non-empty string');
|
|
@@ -391,7 +392,7 @@ function ge(t) {
|
|
|
391
392
|
function Z() {
|
|
392
393
|
return Math.floor(Date.now() / 1e3);
|
|
393
394
|
}
|
|
394
|
-
function
|
|
395
|
+
function x(t) {
|
|
395
396
|
if (typeof t != "object" || t === null)
|
|
396
397
|
throw new TypeError('"as" must be an object');
|
|
397
398
|
if (!w(t.issuer))
|
|
@@ -444,24 +445,24 @@ async function at(t, e, n) {
|
|
|
444
445
|
return `${o}.${s}`;
|
|
445
446
|
}
|
|
446
447
|
async function ct(t, e, n, o, s, r) {
|
|
447
|
-
const { privateKey: i, publicKey:
|
|
448
|
+
const { privateKey: i, publicKey: u, nonce: d = we.get(n.origin) } = e;
|
|
448
449
|
if (!qe(i))
|
|
449
450
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
450
|
-
if (!Ve(
|
|
451
|
+
if (!Ve(u))
|
|
451
452
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
452
|
-
if (
|
|
453
|
+
if (d !== void 0 && !w(d))
|
|
453
454
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
454
|
-
if (!
|
|
455
|
+
if (!u.extractable)
|
|
455
456
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
456
457
|
const y = Z() + s, p = {
|
|
457
458
|
alg: it(i),
|
|
458
459
|
typ: "dpop+jwt",
|
|
459
|
-
jwk: await lt(
|
|
460
|
+
jwk: await lt(u)
|
|
460
461
|
}, k = {
|
|
461
462
|
iat: y,
|
|
462
463
|
jti: Y(),
|
|
463
464
|
htm: o,
|
|
464
|
-
nonce:
|
|
465
|
+
nonce: d,
|
|
465
466
|
htu: `${n.origin}${n.pathname}`,
|
|
466
467
|
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
467
468
|
};
|
|
@@ -469,8 +470,8 @@ async function ct(t, e, n, o, s, r) {
|
|
|
469
470
|
}
|
|
470
471
|
let J;
|
|
471
472
|
async function ut(t) {
|
|
472
|
-
const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t),
|
|
473
|
-
return J.set(t,
|
|
473
|
+
const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), u = { kty: e, e: n, n: o, x: s, y: r, crv: i };
|
|
474
|
+
return J.set(t, u), u;
|
|
474
475
|
}
|
|
475
476
|
async function lt(t) {
|
|
476
477
|
return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || ut(t);
|
|
@@ -504,7 +505,7 @@ async function dt(t, e, n, o, s, r) {
|
|
|
504
505
|
}).then(G);
|
|
505
506
|
}
|
|
506
507
|
async function ht(t, e, n, o) {
|
|
507
|
-
|
|
508
|
+
x(t), I(e);
|
|
508
509
|
const s = ye(t, "userinfo_endpoint", be(e, o)), r = N(o?.headers);
|
|
509
510
|
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), dt(n, "GET", s, r, null, {
|
|
510
511
|
...o,
|
|
@@ -527,7 +528,7 @@ async function _e(t, e, n, o, s) {
|
|
|
527
528
|
return i.set("accept", "application/json"), ft(t, e, "POST", r, o, i, s);
|
|
528
529
|
}
|
|
529
530
|
async function de(t, e, n, o) {
|
|
530
|
-
if (
|
|
531
|
+
if (x(t), I(e), !w(n))
|
|
531
532
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
532
533
|
const s = new URLSearchParams(o?.additionalParameters);
|
|
533
534
|
return s.set("refresh_token", n), _e(t, e, "refresh_token", s, o);
|
|
@@ -542,7 +543,7 @@ function pt(t) {
|
|
|
542
543
|
return e[0];
|
|
543
544
|
}
|
|
544
545
|
async function Se(t, e, n, o = !1, s = !1) {
|
|
545
|
-
if (
|
|
546
|
+
if (x(t), I(e), !q(n, Response))
|
|
546
547
|
throw new TypeError('"response" must be an instance of Response');
|
|
547
548
|
if (n.status !== 200) {
|
|
548
549
|
let i;
|
|
@@ -557,7 +558,7 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
557
558
|
} catch (i) {
|
|
558
559
|
throw new a('failed to parse "response" body as JSON', { cause: i });
|
|
559
560
|
}
|
|
560
|
-
if (!
|
|
561
|
+
if (!C(r))
|
|
561
562
|
throw new a('"response" body must be a top level object');
|
|
562
563
|
if (!w(r.access_token))
|
|
563
564
|
throw new a('"response" body "access_token" property must be a non-empty string');
|
|
@@ -575,7 +576,7 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
575
576
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
576
577
|
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
577
578
|
if (r.id_token) {
|
|
578
|
-
const { claims: i, jwt:
|
|
579
|
+
const { claims: i, jwt: u } = await Et(r.id_token, Rt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, W(e), ge(e), e[Ne]).then(_t.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(mt.bind(void 0, t.issuer)).then(wt.bind(void 0, e.client_id));
|
|
579
580
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
580
581
|
if (i.azp === void 0)
|
|
581
582
|
throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -584,7 +585,7 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
584
585
|
}
|
|
585
586
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
586
587
|
throw new a('ID Token "auth_time" (authentication time) must be a positive number');
|
|
587
|
-
ve.set(r, [i,
|
|
588
|
+
ve.set(r, [i, u]);
|
|
588
589
|
}
|
|
589
590
|
}
|
|
590
591
|
return r;
|
|
@@ -610,7 +611,7 @@ function gt(t) {
|
|
|
610
611
|
return Te.add(t), t;
|
|
611
612
|
}
|
|
612
613
|
async function yt(t, e, n, o, s, r) {
|
|
613
|
-
if (
|
|
614
|
+
if (x(t), I(e), !Te.has(n))
|
|
614
615
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
615
616
|
if (!w(o))
|
|
616
617
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
@@ -619,8 +620,8 @@ async function yt(t, e, n, o, s, r) {
|
|
|
619
620
|
const i = T(n, "code");
|
|
620
621
|
if (!i)
|
|
621
622
|
throw new a('no authorization code in "callbackParameters"');
|
|
622
|
-
const
|
|
623
|
-
return
|
|
623
|
+
const u = new URLSearchParams(r?.additionalParameters);
|
|
624
|
+
return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i), _e(t, e, "authorization_code", u, r);
|
|
624
625
|
}
|
|
625
626
|
const bt = {
|
|
626
627
|
aud: "audience",
|
|
@@ -658,8 +659,8 @@ async function St(t, e, n, o, s) {
|
|
|
658
659
|
if (s !== H) {
|
|
659
660
|
if (typeof s != "number" || s < 0)
|
|
660
661
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
661
|
-
const
|
|
662
|
-
if (i.auth_time + s <
|
|
662
|
+
const u = Z() + W(e), d = ge(e);
|
|
663
|
+
if (i.auth_time + s < u - d)
|
|
663
664
|
throw new a("too much time has elapsed since the last End-User authentication");
|
|
664
665
|
}
|
|
665
666
|
switch (o) {
|
|
@@ -687,7 +688,7 @@ async function Tt(t) {
|
|
|
687
688
|
Q(t);
|
|
688
689
|
try {
|
|
689
690
|
const e = await t.json();
|
|
690
|
-
if (
|
|
691
|
+
if (C(e) && typeof e.error == "string" && e.error.length)
|
|
691
692
|
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;
|
|
692
693
|
} catch {
|
|
693
694
|
}
|
|
@@ -743,10 +744,10 @@ async function kt(t, e, n, o) {
|
|
|
743
744
|
throw new a("JWT signature verification failed");
|
|
744
745
|
}
|
|
745
746
|
async function Et(t, e, n, o, s, r) {
|
|
746
|
-
let { 0: i, 1:
|
|
747
|
+
let { 0: i, 1: u, 2: d, length: y } = t.split(".");
|
|
747
748
|
if (y === 5)
|
|
748
749
|
if (r !== void 0)
|
|
749
|
-
t = await r(t), { 0: i, 1:
|
|
750
|
+
t = await r(t), { 0: i, 1: u, 2: d, length: y } = t.split(".");
|
|
750
751
|
else
|
|
751
752
|
throw new v("JWE structure JWTs are not supported");
|
|
752
753
|
if (y !== 3)
|
|
@@ -757,41 +758,41 @@ async function Et(t, e, n, o, s, r) {
|
|
|
757
758
|
} catch (l) {
|
|
758
759
|
throw new a("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
759
760
|
}
|
|
760
|
-
if (!
|
|
761
|
+
if (!C(p))
|
|
761
762
|
throw new a("JWT Header must be a top level object");
|
|
762
763
|
if (e(p), p.crit !== void 0)
|
|
763
764
|
throw new a('unexpected JWT "crit" header parameter');
|
|
764
|
-
const k = A(
|
|
765
|
+
const k = A(d);
|
|
765
766
|
let b;
|
|
766
|
-
n !== ke && (b = await n(p), await kt(i,
|
|
767
|
-
let
|
|
767
|
+
n !== ke && (b = await n(p), await kt(i, u, b, k));
|
|
768
|
+
let f;
|
|
768
769
|
try {
|
|
769
|
-
|
|
770
|
+
f = JSON.parse(E(A(u)));
|
|
770
771
|
} catch (l) {
|
|
771
772
|
throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
772
773
|
}
|
|
773
|
-
if (!
|
|
774
|
+
if (!C(f))
|
|
774
775
|
throw new a("JWT Payload must be a top level object");
|
|
775
776
|
const P = Z() + o;
|
|
776
|
-
if (
|
|
777
|
-
if (typeof
|
|
777
|
+
if (f.exp !== void 0) {
|
|
778
|
+
if (typeof f.exp != "number")
|
|
778
779
|
throw new a('unexpected JWT "exp" (expiration time) claim type');
|
|
779
|
-
if (
|
|
780
|
+
if (f.exp <= P - s)
|
|
780
781
|
throw new a('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
781
782
|
}
|
|
782
|
-
if (
|
|
783
|
+
if (f.iat !== void 0 && typeof f.iat != "number")
|
|
783
784
|
throw new a('unexpected JWT "iat" (issued at) claim type');
|
|
784
|
-
if (
|
|
785
|
+
if (f.iss !== void 0 && typeof f.iss != "string")
|
|
785
786
|
throw new a('unexpected JWT "iss" (issuer) claim type');
|
|
786
|
-
if (
|
|
787
|
-
if (typeof
|
|
787
|
+
if (f.nbf !== void 0) {
|
|
788
|
+
if (typeof f.nbf != "number")
|
|
788
789
|
throw new a('unexpected JWT "nbf" (not before) claim type');
|
|
789
|
-
if (
|
|
790
|
+
if (f.nbf > P + s)
|
|
790
791
|
throw new a('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
791
792
|
}
|
|
792
|
-
if (
|
|
793
|
+
if (f.aud !== void 0 && typeof f.aud != "string" && !Array.isArray(f.aud))
|
|
793
794
|
throw new a('unexpected JWT "aud" (audience) claim type');
|
|
794
|
-
return { header: p, claims:
|
|
795
|
+
return { header: p, claims: f, signature: k, key: b, jwt: t };
|
|
795
796
|
}
|
|
796
797
|
function Rt(t, e, n) {
|
|
797
798
|
if (t !== void 0) {
|
|
@@ -815,7 +816,7 @@ function T(t, e) {
|
|
|
815
816
|
}
|
|
816
817
|
const Pt = Symbol(), Lt = Symbol();
|
|
817
818
|
function Ut(t, e, n, o) {
|
|
818
|
-
if (
|
|
819
|
+
if (x(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
819
820
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
820
821
|
if (T(n, "response"))
|
|
821
822
|
throw new a('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
@@ -847,13 +848,13 @@ function Ut(t, e, n, o) {
|
|
|
847
848
|
error_description: T(n, "error_description"),
|
|
848
849
|
error_uri: T(n, "error_uri")
|
|
849
850
|
};
|
|
850
|
-
const
|
|
851
|
-
if (
|
|
851
|
+
const u = T(n, "id_token"), d = T(n, "token");
|
|
852
|
+
if (u !== void 0 || d !== void 0)
|
|
852
853
|
throw new v("implicit and hybrid flows are not supported");
|
|
853
854
|
return gt(new URLSearchParams(n));
|
|
854
855
|
}
|
|
855
856
|
const $ = "code-verifier", F = "oauth-state", pe = "/oauth/callback";
|
|
856
|
-
class
|
|
857
|
+
class Ct extends xe {
|
|
857
858
|
client;
|
|
858
859
|
issuer;
|
|
859
860
|
authorizationServer;
|
|
@@ -871,13 +872,13 @@ class xt extends Ce {
|
|
|
871
872
|
redirectToAfterSignUp: s,
|
|
872
873
|
redirectToAfterSignIn: r,
|
|
873
874
|
redirectToAfterSignOut: i = "/",
|
|
874
|
-
basePath:
|
|
875
|
-
scopes:
|
|
875
|
+
basePath: u,
|
|
876
|
+
scopes: d
|
|
876
877
|
}) {
|
|
877
878
|
super(), this.client = {
|
|
878
879
|
client_id: o,
|
|
879
880
|
token_endpoint_auth_method: "none"
|
|
880
|
-
}, this.audience = n, this.issuer = e, this.callbackUrlPath =
|
|
881
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = Ce(u, pe), this.scopes = d ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
|
|
881
882
|
}
|
|
882
883
|
async getAuthServer() {
|
|
883
884
|
if (!this.authorizationServer) {
|
|
@@ -909,40 +910,49 @@ class xt extends Ce {
|
|
|
909
910
|
providerData: n
|
|
910
911
|
});
|
|
911
912
|
}
|
|
912
|
-
async signUp({
|
|
913
|
+
async signUp({
|
|
914
|
+
redirectTo: e,
|
|
915
|
+
replace: n = !1
|
|
916
|
+
} = {}) {
|
|
913
917
|
return this.authorize({
|
|
914
918
|
redirectTo: this.redirectToAfterSignUp ?? e ?? "/",
|
|
919
|
+
replace: n,
|
|
915
920
|
isSignUp: !0
|
|
916
921
|
});
|
|
917
922
|
}
|
|
918
|
-
async signIn({
|
|
923
|
+
async signIn({
|
|
924
|
+
redirectTo: e,
|
|
925
|
+
replace: n = !1
|
|
926
|
+
} = {}) {
|
|
919
927
|
return this.authorize({
|
|
920
|
-
redirectTo: this.redirectToAfterSignIn ?? e ?? "/"
|
|
928
|
+
redirectTo: this.redirectToAfterSignIn ?? e ?? "/",
|
|
929
|
+
replace: n
|
|
921
930
|
});
|
|
922
931
|
}
|
|
923
932
|
async authorize({
|
|
924
933
|
redirectTo: e,
|
|
925
|
-
isSignUp: n = !1
|
|
934
|
+
isSignUp: n = !1,
|
|
935
|
+
replace: o = !1
|
|
926
936
|
}) {
|
|
927
|
-
const
|
|
928
|
-
if (!
|
|
937
|
+
const s = "S256", r = await this.getAuthServer();
|
|
938
|
+
if (!r.authorization_endpoint)
|
|
929
939
|
throw new R("No authorization endpoint");
|
|
930
|
-
const
|
|
931
|
-
sessionStorage.setItem($,
|
|
932
|
-
const
|
|
933
|
-
|
|
940
|
+
const i = Qe(), u = await et(i);
|
|
941
|
+
sessionStorage.setItem($, i);
|
|
942
|
+
const d = new URL(
|
|
943
|
+
r.authorization_endpoint
|
|
934
944
|
);
|
|
935
945
|
sessionStorage.setItem("redirect-to", e);
|
|
936
|
-
const
|
|
937
|
-
|
|
946
|
+
const y = new URL(window.location.origin);
|
|
947
|
+
y.pathname = this.callbackUrlPath, y.search = "", d.searchParams.set("client_id", this.client.client_id), d.searchParams.set("redirect_uri", y.toString()), d.searchParams.set("response_type", "code"), d.searchParams.set("scope", this.scopes.join(" ")), d.searchParams.set("code_challenge", u), d.searchParams.set(
|
|
938
948
|
"code_challenge_method",
|
|
939
|
-
|
|
940
|
-
), this.audience &&
|
|
949
|
+
s
|
|
950
|
+
), this.audience && d.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(d, {
|
|
941
951
|
isSignIn: !n,
|
|
942
952
|
isSignUp: n
|
|
943
953
|
});
|
|
944
|
-
const
|
|
945
|
-
sessionStorage.setItem(F,
|
|
954
|
+
const p = Xe();
|
|
955
|
+
sessionStorage.setItem(F, p), d.searchParams.set("state", p), o ? location.replace(d.href) : location.href = d.href;
|
|
946
956
|
}
|
|
947
957
|
async getAccessToken() {
|
|
948
958
|
const e = await this.getAuthServer(), { providerData: n } = S.getState();
|
|
@@ -1053,25 +1063,25 @@ class xt extends Ce {
|
|
|
1053
1063
|
"Error validating OAuth response",
|
|
1054
1064
|
i
|
|
1055
1065
|
);
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1066
|
+
const u = new URL(e);
|
|
1067
|
+
u.pathname = this.callbackUrlPath, u.search = "";
|
|
1068
|
+
const d = await yt(
|
|
1059
1069
|
r,
|
|
1060
1070
|
this.client,
|
|
1061
1071
|
i,
|
|
1062
|
-
|
|
1072
|
+
u.toString(),
|
|
1063
1073
|
s
|
|
1064
1074
|
), y = await St(
|
|
1065
1075
|
r,
|
|
1066
1076
|
this.client,
|
|
1067
|
-
|
|
1077
|
+
d
|
|
1068
1078
|
);
|
|
1069
1079
|
this.setTokensFromResponse(y);
|
|
1070
1080
|
const p = await this.getAccessToken(), b = await (await ht(
|
|
1071
1081
|
r,
|
|
1072
1082
|
this.client,
|
|
1073
1083
|
p
|
|
1074
|
-
)).json(),
|
|
1084
|
+
)).json(), f = {
|
|
1075
1085
|
sub: b.sub,
|
|
1076
1086
|
email: b.email,
|
|
1077
1087
|
name: b.name,
|
|
@@ -1081,7 +1091,7 @@ class xt extends Ce {
|
|
|
1081
1091
|
S.setState({
|
|
1082
1092
|
isAuthenticated: !0,
|
|
1083
1093
|
isPending: !1,
|
|
1084
|
-
profile:
|
|
1094
|
+
profile: f
|
|
1085
1095
|
});
|
|
1086
1096
|
const P = sessionStorage.getItem("redirect-to") ?? "/";
|
|
1087
1097
|
return sessionStorage.removeItem("redirect-to"), P;
|
|
@@ -1096,10 +1106,10 @@ class xt extends Ce {
|
|
|
1096
1106
|
];
|
|
1097
1107
|
}
|
|
1098
1108
|
}
|
|
1099
|
-
const
|
|
1109
|
+
const zt = (t) => new Ct(t);
|
|
1100
1110
|
export {
|
|
1101
1111
|
pe as OPENID_CALLBACK_PATH,
|
|
1102
|
-
|
|
1103
|
-
|
|
1112
|
+
Ct as OpenIDAuthenticationProvider,
|
|
1113
|
+
zt as default
|
|
1104
1114
|
};
|
|
1105
1115
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|