zudoku 0.0.0-f40ea27 → 0.0.0-f42e3678
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 +16 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +3 -9
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- 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 +254 -163
- package/dist/config/validators/InputNavigationSchema.js +4 -4
- 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 +3 -2
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +12 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +19 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +36 -20
- package/dist/config/validators/validate.js +18 -4
- 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/flat-config.d.ts +8 -6
- package/dist/lib/authentication/authentication.d.ts +2 -0
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/components/SignIn.js +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -2
- package/dist/lib/authentication/providers/openid.js +14 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- 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/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +11 -6
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- 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 +20 -15
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +21 -13
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +8 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +6 -3
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -2
- package/dist/lib/core/ZudokuContext.js +27 -2
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +6 -4
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +1 -0
- package/dist/lib/plugins/api-keys/index.js +4 -8
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +4 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.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/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +43 -11
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.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/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/build.js +7 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +9 -1
- 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 +20 -13
- 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 +88 -49
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +25 -4
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +8 -8
- 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/{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-DAKxs_Tu.js → CodeBlock-B-G0eKtw.js} +3 -3
- package/lib/{CodeBlock-DAKxs_Tu.js.map → CodeBlock-B-G0eKtw.js.map} +1 -1
- package/lib/{Command-xsbs2uhf.js → Command-BYukybsa.js} +3 -3
- package/lib/{Command-xsbs2uhf.js.map → Command-BYukybsa.js.map} +1 -1
- package/lib/{Dialog-CiIdyz6a.js → Dialog-u9Uz9sTt.js} +5 -5
- package/lib/{Dialog-CiIdyz6a.js.map → Dialog-u9Uz9sTt.js.map} +1 -1
- 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-swXPJ0gf.js → MdxPage-Bsko6_kb.js} +34 -34
- package/lib/MdxPage-Bsko6_kb.js.map +1 -0
- package/lib/OAuthErrorPage-DJzGiIBt.js +150 -0
- package/lib/OAuthErrorPage-DJzGiIBt.js.map +1 -0
- package/lib/{OasProvider-CDAM3TB1.js → OasProvider-DQQRt3oS.js} +3 -3
- package/lib/{OasProvider-CDAM3TB1.js.map → OasProvider-DQQRt3oS.js.map} +1 -1
- package/lib/{OperationList-C9Hb9ql8.js → OperationList-DpmkHf26.js} +212 -210
- package/lib/OperationList-DpmkHf26.js.map +1 -0
- package/lib/{Pagination-VGlgeCmS.js → Pagination-kqFNgtnI.js} +10 -9
- package/lib/Pagination-kqFNgtnI.js.map +1 -0
- package/lib/{RouteGuard-CbKd7_9h.js → RouteGuard-0wPUKdxJ.js} +166 -165
- package/lib/{RouteGuard-CbKd7_9h.js.map → RouteGuard-0wPUKdxJ.js.map} +1 -1
- package/lib/{SchemaList-BAbh1BXO.js → SchemaList-DS-pMd6B.js} +9 -9
- package/lib/{SchemaList-BAbh1BXO.js.map → SchemaList-DS-pMd6B.js.map} +1 -1
- package/lib/{SchemaView-C2Io712T.js → SchemaView-BnN6WHjw.js} +6 -6
- package/lib/{SchemaView-C2Io712T.js.map → SchemaView-BnN6WHjw.js.map} +1 -1
- package/lib/Select-BmTTKNPp.js +273 -0
- package/lib/Select-BmTTKNPp.js.map +1 -0
- package/lib/SignUp-BwOSCD-6.js +56 -0
- package/lib/SignUp-BwOSCD-6.js.map +1 -0
- package/lib/{Slot-DwZlQ-vX.js → Slot-DAyXieeZ.js} +1634 -1643
- package/lib/Slot-DAyXieeZ.js.map +1 -0
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-BMKR4pl6.js} +757 -757
- package/lib/SyntaxHighlight-BMKR4pl6.js.map +1 -0
- package/lib/{Toc-WCmwFkX-.js → Toc-BKDRCQzU.js} +3 -3
- package/lib/{Toc-WCmwFkX-.js.map → Toc-BKDRCQzU.js.map} +1 -1
- package/lib/ZudokuContext-CLl5w57E.js +1278 -0
- package/lib/ZudokuContext-CLl5w57E.js.map +1 -0
- package/lib/{chunk-DQRVZFIR-DHK7_Ilc.js → chunk-QMGIS6GS-CEOk3lro.js} +3 -3
- package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +1 -0
- package/lib/{circular-B42RaanD.js → circular-8GWQDvCW.js} +2 -2
- package/lib/{circular-B42RaanD.js.map → circular-8GWQDvCW.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-BKFsRuuk.js → createServer-BsezSzvV.js} +3398 -3552
- package/lib/createServer-BsezSzvV.js.map +1 -0
- package/lib/errors-Cs7hKmdL.js +45 -0
- package/lib/errors-Cs7hKmdL.js.map +1 -0
- package/lib/hook-DbUCLQNg.js +247 -0
- package/lib/hook-DbUCLQNg.js.map +1 -0
- package/lib/index-A5Qdwj1B.js +4081 -0
- package/lib/index-A5Qdwj1B.js.map +1 -0
- package/lib/{index-B6Re5_cx.js → index-Bg7Js3jB.js} +873 -951
- package/lib/index-Bg7Js3jB.js.map +1 -0
- package/lib/{index-CcV90rin.js → index-BkW9tJ6j.js} +2 -2
- package/lib/{index-CcV90rin.js.map → index-BkW9tJ6j.js.map} +1 -1
- 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-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- 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 +10 -10
- 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 +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- 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 +2 -2
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- 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 +1 -1
- 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 +4 -4
- 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-BIYjecPD.js → useExposedProps-KcgXHKeE.js} +2 -2
- package/lib/{useExposedProps-BIYjecPD.js.map → useExposedProps-KcgXHKeE.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 +46 -9883
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +249 -231
- 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 +30 -29
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +17 -16
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +26 -25
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +428 -299
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- 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 +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- 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 +123 -118
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +34 -33
- package/src/app/demo.tsx +19 -2
- package/src/app/main.css +26 -5
- package/src/app/main.tsx +6 -14
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +30 -5
- package/src/lib/components/Banner.tsx +0 -1
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/Header.tsx +5 -2
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/MobileTopNavigation.tsx +60 -8
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/Pagination.tsx +1 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +34 -18
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +25 -18
- package/src/lib/components/navigation/NavigationItem.tsx +9 -1
- package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
- package/src/lib/components/navigation/utils.ts +9 -3
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +40 -5
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +12 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +37 -13
- package/src/lib/plugins/api-keys/index.tsx +8 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +4 -3
- package/src/lib/plugins/openapi/OperationList.tsx +4 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +67 -17
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -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/ActionButton.tsx +3 -1
- package/src/lib/ui/Alert.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +1 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/lib/Alert-CT_ViLrJ.js +0 -161
- package/lib/Alert-CT_ViLrJ.js.map +0 -1
- package/lib/MdxPage-swXPJ0gf.js.map +0 -1
- package/lib/OperationList-C9Hb9ql8.js.map +0 -1
- package/lib/Pagination-VGlgeCmS.js.map +0 -1
- package/lib/SignUp-5RUdVhnq.js +0 -63
- package/lib/SignUp-5RUdVhnq.js.map +0 -1
- package/lib/Slot-DwZlQ-vX.js.map +0 -1
- package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.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-BKFsRuuk.js.map +0 -1
- package/lib/errors-CF2X_x5o.js +0 -78
- package/lib/errors-CF2X_x5o.js.map +0 -1
- package/lib/hook-Bd0yS8M0.js +0 -1503
- package/lib/hook-Bd0yS8M0.js.map +0 -1
- package/lib/index-B6Re5_cx.js.map +0 -1
- package/lib/index-CLy1XyH0.js +0 -3919
- package/lib/index-CLy1XyH0.js.map +0 -1
- package/lib/index-ClhS5TxS.js +0 -107
- package/lib/index-ClhS5TxS.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
5
|
-
import { Button as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import * as
|
|
17
|
-
import { c as
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import { PopoverAnchor as
|
|
25
|
-
import { P as
|
|
26
|
-
import { f as
|
|
27
|
-
import { Input as
|
|
28
|
-
import { Slot as
|
|
29
|
-
import { C as
|
|
30
|
-
import * as
|
|
31
|
-
import { c as
|
|
32
|
-
import * as
|
|
33
|
-
import { z as
|
|
34
|
-
import { h as
|
|
35
|
-
let
|
|
36
|
-
const
|
|
2
|
+
import { ChevronUpIcon as yn, ChevronRightIcon as vn, CheckIcon as ft, DotIcon as bn, PlusCircleIcon as he, FileInput as jn, Check as Cn, TableOfContentsIcon as wn, LockIcon as Nn, CircleAlertIcon as Sn, XIcon as gt, Circle as Tn, Unlink2Icon as An, CornerDownRightIcon as On, CornerDownLeftIcon as Pn, DownloadIcon as Rn, UnplugIcon as Ln, SendIcon as $n, CopyIcon as En, IdCardLanyardIcon as In, ShapesIcon as kn, LogInIcon as Dn, CirclePlayIcon as zn } from "lucide-react";
|
|
3
|
+
import { r as Fn, c as qn, u as Vn, N as Bn, g as _n, m as st } from "./chunk-QMGIS6GS-CEOk3lro.js";
|
|
4
|
+
import { c as Le, p as $e, b as xt, a as Un } from "./hook-DbUCLQNg.js";
|
|
5
|
+
import { Button as ne } from "./ui/Button.js";
|
|
6
|
+
import { c as Mn, i as Gn, l as Hn, j as I, b as Qn } from "./ZudokuContext-CLl5w57E.js";
|
|
7
|
+
import { Z as Jn, i as Wn } from "./invariant-Bm-FVUQE.js";
|
|
8
|
+
import * as A from "react";
|
|
9
|
+
import { createContext as yt, use as Xn, useRef as R, useEffect as z, useMemo as vt, useState as k, useCallback as bt, Fragment as K, useLayoutEffect as Zn, useTransition as Yn, useContext as Kn } from "react";
|
|
10
|
+
import { VisuallyHidden as es } from "@radix-ui/react-visually-hidden";
|
|
11
|
+
import { D as Ee, a as Ie, b as ke, d as jt, e as Ct, g as ts } from "./Dialog-u9Uz9sTt.js";
|
|
12
|
+
import { S as ns, a as ss } from "./index-A5Qdwj1B.js";
|
|
13
|
+
import { S as wt, c as Nt, d as St, e as Tt, g as le, A as rs, a as as, b as os, u as is } from "./Select-BmTTKNPp.js";
|
|
14
|
+
import { u as ae, b as De, C as F, a as cs, F as ls } from "./index.esm-CdzlRw50.js";
|
|
15
|
+
import { B as E } from "./Button-B3o-2Xdf.js";
|
|
16
|
+
import * as ze from "@radix-ui/react-collapsible";
|
|
17
|
+
import { b as rt, c as at, d as ot, f as ds } from "./Slot-DAyXieeZ.js";
|
|
18
|
+
import { c as C } from "./cn-dYga0KKN.js";
|
|
19
|
+
import { u as us } from "./CodeBlock-B-G0eKtw.js";
|
|
20
|
+
import { u as ms } from "./RouteGuard-0wPUKdxJ.js";
|
|
21
|
+
import * as w from "@radix-ui/react-dropdown-menu";
|
|
22
|
+
import * as Oe from "@radix-ui/react-checkbox";
|
|
23
|
+
import * as de from "@radix-ui/react-popover";
|
|
24
|
+
import { PopoverAnchor as ps } from "@radix-ui/react-popover";
|
|
25
|
+
import { P as hs } from "./index-CrcNWbel.js";
|
|
26
|
+
import { f as fs, g as gs, C as xs, b as ys } from "./Command-BYukybsa.js";
|
|
27
|
+
import { Input as ue } from "./ui/Input.js";
|
|
28
|
+
import { Slot as vs } from "@radix-ui/react-slot";
|
|
29
|
+
import { C as bs } from "./Card-CMDQUPM4.js";
|
|
30
|
+
import * as At from "@radix-ui/react-label";
|
|
31
|
+
import { c as js } from "./index-DI5SPFK9.js";
|
|
32
|
+
import * as se from "@radix-ui/react-radio-group";
|
|
33
|
+
import { z as Cs } from "./index-Bm35Tkgf.js";
|
|
34
|
+
import { h as ws } from "./SyntaxHighlight-BMKR4pl6.js";
|
|
35
|
+
let je;
|
|
36
|
+
const Ns = (e) => {
|
|
37
37
|
if (e.errors?.[0])
|
|
38
|
-
throw new
|
|
38
|
+
throw new Jn(e.errors[0].message, {
|
|
39
39
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
class
|
|
42
|
+
class Ss {
|
|
43
43
|
constructor(t) {
|
|
44
44
|
this.config = t;
|
|
45
45
|
}
|
|
46
|
-
#e = async () => (
|
|
46
|
+
#e = async () => (je || (je = import("./createServer-BsezSzvV.js").then(
|
|
47
47
|
(t) => t.createServer(this.config)
|
|
48
|
-
)),
|
|
48
|
+
)), je);
|
|
49
49
|
#t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
|
|
50
50
|
fetch = async (t, s) => {
|
|
51
51
|
const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
|
|
@@ -56,27 +56,27 @@ class Os {
|
|
|
56
56
|
if (!r.ok)
|
|
57
57
|
throw new Error("Network response was not ok");
|
|
58
58
|
const o = await r.json();
|
|
59
|
-
return
|
|
59
|
+
return Ns(o), o.data;
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Ce(e, t) {
|
|
63
63
|
if (!!!e)
|
|
64
64
|
throw new Error(t);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Ts(e) {
|
|
67
67
|
return typeof e == "object" && e !== null;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function As(e, t) {
|
|
70
70
|
if (!!!e)
|
|
71
71
|
throw new Error(
|
|
72
72
|
t ?? "Unexpected invariant triggered."
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const Os = /\r\n|[\n\r]/g;
|
|
76
76
|
function Pe(e, t) {
|
|
77
77
|
let s = 0, a = 1;
|
|
78
|
-
for (const r of e.body.matchAll(
|
|
79
|
-
if (typeof r.index == "number" ||
|
|
78
|
+
for (const r of e.body.matchAll(Os)) {
|
|
79
|
+
if (typeof r.index == "number" || As(!1), r.index >= t)
|
|
80
80
|
break;
|
|
81
81
|
s = r.index + r[0].length, a += 1;
|
|
82
82
|
}
|
|
@@ -85,40 +85,40 @@ function Pe(e, t) {
|
|
|
85
85
|
column: t + 1 - s
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function Ps(e) {
|
|
89
|
+
return Ot(
|
|
90
90
|
e.source,
|
|
91
91
|
Pe(e.source, e.start)
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Ot(e, t) {
|
|
95
95
|
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, l = t.line === 1 ? s : 0, c = t.column + l, u = `${e.name}:${i}:${c}
|
|
96
|
-
`, d = a.split(/\r\n|[\n\r]/g),
|
|
97
|
-
if (
|
|
98
|
-
const
|
|
99
|
-
for (let
|
|
100
|
-
|
|
101
|
-
return u +
|
|
102
|
-
[`${i} |`,
|
|
103
|
-
...
|
|
96
|
+
`, d = a.split(/\r\n|[\n\r]/g), h = d[r];
|
|
97
|
+
if (h.length > 120) {
|
|
98
|
+
const g = Math.floor(c / 80), m = c % 80, y = [];
|
|
99
|
+
for (let v = 0; v < h.length; v += 80)
|
|
100
|
+
y.push(h.slice(v, v + 80));
|
|
101
|
+
return u + it([
|
|
102
|
+
[`${i} |`, y[0]],
|
|
103
|
+
...y.slice(1, g + 1).map((v) => ["|", v]),
|
|
104
104
|
["|", "^".padStart(m)],
|
|
105
|
-
["|",
|
|
105
|
+
["|", y[g + 1]]
|
|
106
106
|
]);
|
|
107
107
|
}
|
|
108
|
-
return u +
|
|
108
|
+
return u + it([
|
|
109
109
|
// Lines specified like this: ["prefix", "string"],
|
|
110
110
|
[`${i - 1} |`, d[r - 1]],
|
|
111
|
-
[`${i} |`,
|
|
111
|
+
[`${i} |`, h],
|
|
112
112
|
["|", "^".padStart(c)],
|
|
113
113
|
[`${i + 1} |`, d[r + 1]]
|
|
114
114
|
]);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function it(e) {
|
|
117
117
|
const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
|
|
118
118
|
return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
119
119
|
`);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Rs(e) {
|
|
122
122
|
const t = e[0];
|
|
123
123
|
return t == null || "kind" in t || "length" in t ? {
|
|
124
124
|
nodes: t,
|
|
@@ -129,7 +129,7 @@ function Is(e) {
|
|
|
129
129
|
extensions: e[5]
|
|
130
130
|
} : t;
|
|
131
131
|
}
|
|
132
|
-
class
|
|
132
|
+
class Fe extends Error {
|
|
133
133
|
/**
|
|
134
134
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
135
135
|
* which correspond to this error.
|
|
@@ -170,18 +170,18 @@ class qe extends Error {
|
|
|
170
170
|
*/
|
|
171
171
|
constructor(t, ...s) {
|
|
172
172
|
var a, r, o;
|
|
173
|
-
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions:
|
|
174
|
-
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes =
|
|
173
|
+
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: h } = Rs(s);
|
|
174
|
+
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes = ct(
|
|
175
175
|
Array.isArray(i) ? i : i ? [i] : void 0
|
|
176
176
|
);
|
|
177
|
-
const
|
|
178
|
-
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((
|
|
177
|
+
const g = ct(
|
|
178
|
+
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((y) => y.loc).filter((y) => y != null)
|
|
179
179
|
);
|
|
180
|
-
this.source = l ?? (
|
|
181
|
-
const m =
|
|
180
|
+
this.source = l ?? (g == null || (r = g[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? g?.map((y) => y.start), this.locations = c && l ? c.map((y) => Pe(l, y)) : g?.map((y) => Pe(y.source, y.start));
|
|
181
|
+
const m = Ts(
|
|
182
182
|
d?.extensions
|
|
183
183
|
) ? d?.extensions : void 0;
|
|
184
|
-
this.extensions = (o =
|
|
184
|
+
this.extensions = (o = h ?? m) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
185
185
|
message: {
|
|
186
186
|
writable: !0,
|
|
187
187
|
enumerable: !0
|
|
@@ -205,7 +205,7 @@ class qe extends Error {
|
|
|
205
205
|
value: d.stack,
|
|
206
206
|
writable: !0,
|
|
207
207
|
configurable: !0
|
|
208
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
208
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, Fe) : Object.defineProperty(this, "stack", {
|
|
209
209
|
value: Error().stack,
|
|
210
210
|
writable: !0,
|
|
211
211
|
configurable: !0
|
|
@@ -220,12 +220,12 @@ class qe extends Error {
|
|
|
220
220
|
for (const s of this.nodes)
|
|
221
221
|
s.loc && (t += `
|
|
222
222
|
|
|
223
|
-
` +
|
|
223
|
+
` + Ps(s.loc));
|
|
224
224
|
else if (this.source && this.locations)
|
|
225
225
|
for (const s of this.locations)
|
|
226
226
|
t += `
|
|
227
227
|
|
|
228
|
-
` +
|
|
228
|
+
` + Ot(this.source, s);
|
|
229
229
|
return t;
|
|
230
230
|
}
|
|
231
231
|
toJSON() {
|
|
@@ -235,16 +235,16 @@ class qe extends Error {
|
|
|
235
235
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function ct(e) {
|
|
239
239
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return new
|
|
241
|
+
function L(e, t, s) {
|
|
242
|
+
return new Fe(`Syntax Error: ${s}`, {
|
|
243
243
|
source: e,
|
|
244
244
|
positions: [t]
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
class
|
|
247
|
+
class Va {
|
|
248
248
|
/**
|
|
249
249
|
* The character offset at which this Node begins.
|
|
250
250
|
*/
|
|
@@ -273,7 +273,7 @@ class Ma {
|
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
class
|
|
276
|
+
class Pt {
|
|
277
277
|
/**
|
|
278
278
|
* The kind of Token.
|
|
279
279
|
*/
|
|
@@ -315,7 +315,7 @@ class Ot {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const Ls = {
|
|
319
319
|
Name: [],
|
|
320
320
|
Document: ["definitions"],
|
|
321
321
|
OperationDefinition: [
|
|
@@ -389,37 +389,37 @@ const Es = {
|
|
|
389
389
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
390
390
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
391
391
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
392
|
-
},
|
|
393
|
-
function
|
|
392
|
+
}, $s = new Set(Object.keys(Ls));
|
|
393
|
+
function Ba(e) {
|
|
394
394
|
const t = e?.kind;
|
|
395
|
-
return typeof t == "string" &&
|
|
395
|
+
return typeof t == "string" && $s.has(t);
|
|
396
396
|
}
|
|
397
|
-
var
|
|
397
|
+
var lt;
|
|
398
398
|
(function(e) {
|
|
399
399
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
400
|
-
})(
|
|
401
|
-
function
|
|
400
|
+
})(lt || (lt = {}));
|
|
401
|
+
function Re(e) {
|
|
402
402
|
return e === 9 || e === 32;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function re(e) {
|
|
405
405
|
return e >= 48 && e <= 57;
|
|
406
406
|
}
|
|
407
407
|
function Rt(e) {
|
|
408
408
|
return e >= 97 && e <= 122 || // A-Z
|
|
409
409
|
e >= 65 && e <= 90;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function Lt(e) {
|
|
412
412
|
return Rt(e) || e === 95;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
return Rt(e) ||
|
|
414
|
+
function Es(e) {
|
|
415
|
+
return Rt(e) || re(e) || e === 95;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Is(e) {
|
|
418
418
|
var t;
|
|
419
419
|
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
420
420
|
for (let i = 0; i < e.length; ++i) {
|
|
421
421
|
var o;
|
|
422
|
-
const l = e[i], c =
|
|
422
|
+
const l = e[i], c = ks(l);
|
|
423
423
|
c !== l.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && c < s && (s = c));
|
|
424
424
|
}
|
|
425
425
|
return e.map((i, l) => l === 0 ? i : i.slice(s)).slice(
|
|
@@ -427,26 +427,26 @@ function zs(e) {
|
|
|
427
427
|
r + 1
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function ks(e) {
|
|
431
431
|
let t = 0;
|
|
432
|
-
for (; t < e.length &&
|
|
432
|
+
for (; t < e.length && Re(e.charCodeAt(t)); )
|
|
433
433
|
++t;
|
|
434
434
|
return t;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 ||
|
|
436
|
+
function Ds(e, t) {
|
|
437
|
+
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 || Re(m.charCodeAt(0))), i = s.endsWith('\\"""'), l = e.endsWith('"') && !i, c = e.endsWith("\\"), u = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
438
438
|
(!r || e.length > 70 || u || o || i);
|
|
439
|
-
let
|
|
440
|
-
const
|
|
441
|
-
return (d && !
|
|
442
|
-
`),
|
|
443
|
-
`), '"""' +
|
|
439
|
+
let h = "";
|
|
440
|
+
const g = r && Re(e.charCodeAt(0));
|
|
441
|
+
return (d && !g || o) && (h += `
|
|
442
|
+
`), h += s, (d || u) && (h += `
|
|
443
|
+
`), '"""' + h + '"""';
|
|
444
444
|
}
|
|
445
|
-
var
|
|
445
|
+
var x;
|
|
446
446
|
(function(e) {
|
|
447
447
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
448
|
-
})(
|
|
449
|
-
class
|
|
448
|
+
})(x || (x = {}));
|
|
449
|
+
class zs {
|
|
450
450
|
/**
|
|
451
451
|
* The previously focused non-ignored token.
|
|
452
452
|
*/
|
|
@@ -460,7 +460,7 @@ class Vs {
|
|
|
460
460
|
* The character offset at which the current line begins.
|
|
461
461
|
*/
|
|
462
462
|
constructor(t) {
|
|
463
|
-
const s = new
|
|
463
|
+
const s = new Pt(x.SOF, 0, 0, 0, 0);
|
|
464
464
|
this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
465
465
|
}
|
|
466
466
|
get [Symbol.toStringTag]() {
|
|
@@ -478,48 +478,48 @@ class Vs {
|
|
|
478
478
|
*/
|
|
479
479
|
lookahead() {
|
|
480
480
|
let t = this.token;
|
|
481
|
-
if (t.kind !==
|
|
481
|
+
if (t.kind !== x.EOF)
|
|
482
482
|
do
|
|
483
483
|
if (t.next)
|
|
484
484
|
t = t.next;
|
|
485
485
|
else {
|
|
486
|
-
const s =
|
|
486
|
+
const s = qs(this, t.end);
|
|
487
487
|
t.next = s, s.prev = t, t = s;
|
|
488
488
|
}
|
|
489
|
-
while (t.kind ===
|
|
489
|
+
while (t.kind === x.COMMENT);
|
|
490
490
|
return t;
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
return e ===
|
|
493
|
+
function Fs(e) {
|
|
494
|
+
return e === x.BANG || e === x.DOLLAR || e === x.AMP || e === x.PAREN_L || e === x.PAREN_R || e === x.SPREAD || e === x.COLON || e === x.EQUALS || e === x.AT || e === x.BRACKET_L || e === x.BRACKET_R || e === x.BRACE_L || e === x.PIPE || e === x.BRACE_R;
|
|
495
495
|
}
|
|
496
496
|
function Z(e) {
|
|
497
497
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
499
|
+
function fe(e, t) {
|
|
500
|
+
return $t(e.charCodeAt(t)) && Et(e.charCodeAt(t + 1));
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function $t(e) {
|
|
503
503
|
return e >= 55296 && e <= 56319;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Et(e) {
|
|
506
506
|
return e >= 56320 && e <= 57343;
|
|
507
507
|
}
|
|
508
508
|
function U(e, t) {
|
|
509
509
|
const s = e.source.body.codePointAt(t);
|
|
510
510
|
if (s === void 0)
|
|
511
|
-
return
|
|
511
|
+
return x.EOF;
|
|
512
512
|
if (s >= 32 && s <= 126) {
|
|
513
513
|
const a = String.fromCodePoint(s);
|
|
514
514
|
return a === '"' ? `'"'` : `"${a}"`;
|
|
515
515
|
}
|
|
516
516
|
return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function N(e, t, s, a, r) {
|
|
519
519
|
const o = e.line, i = 1 + s - e.lineStart;
|
|
520
|
-
return new
|
|
520
|
+
return new Pt(t, s, a, o, i, r);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function qs(e, t) {
|
|
523
523
|
const s = e.source.body, a = s.length;
|
|
524
524
|
let r = t;
|
|
525
525
|
for (; r < a; ) {
|
|
@@ -560,7 +560,7 @@ function _s(e, t) {
|
|
|
560
560
|
continue;
|
|
561
561
|
// Comment
|
|
562
562
|
case 35:
|
|
563
|
-
return
|
|
563
|
+
return Vs(e, r);
|
|
564
564
|
// Token ::
|
|
565
565
|
// - Punctuator
|
|
566
566
|
// - Name
|
|
@@ -570,52 +570,52 @@ function _s(e, t) {
|
|
|
570
570
|
//
|
|
571
571
|
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
572
572
|
case 33:
|
|
573
|
-
return
|
|
573
|
+
return N(e, x.BANG, r, r + 1);
|
|
574
574
|
case 36:
|
|
575
|
-
return
|
|
575
|
+
return N(e, x.DOLLAR, r, r + 1);
|
|
576
576
|
case 38:
|
|
577
|
-
return
|
|
577
|
+
return N(e, x.AMP, r, r + 1);
|
|
578
578
|
case 40:
|
|
579
|
-
return
|
|
579
|
+
return N(e, x.PAREN_L, r, r + 1);
|
|
580
580
|
case 41:
|
|
581
|
-
return
|
|
581
|
+
return N(e, x.PAREN_R, r, r + 1);
|
|
582
582
|
case 46:
|
|
583
583
|
if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
|
|
584
|
-
return
|
|
584
|
+
return N(e, x.SPREAD, r, r + 3);
|
|
585
585
|
break;
|
|
586
586
|
case 58:
|
|
587
|
-
return
|
|
587
|
+
return N(e, x.COLON, r, r + 1);
|
|
588
588
|
case 61:
|
|
589
|
-
return
|
|
589
|
+
return N(e, x.EQUALS, r, r + 1);
|
|
590
590
|
case 64:
|
|
591
|
-
return
|
|
591
|
+
return N(e, x.AT, r, r + 1);
|
|
592
592
|
case 91:
|
|
593
|
-
return
|
|
593
|
+
return N(e, x.BRACKET_L, r, r + 1);
|
|
594
594
|
case 93:
|
|
595
|
-
return
|
|
595
|
+
return N(e, x.BRACKET_R, r, r + 1);
|
|
596
596
|
case 123:
|
|
597
|
-
return
|
|
597
|
+
return N(e, x.BRACE_L, r, r + 1);
|
|
598
598
|
case 124:
|
|
599
|
-
return
|
|
599
|
+
return N(e, x.PIPE, r, r + 1);
|
|
600
600
|
case 125:
|
|
601
|
-
return
|
|
601
|
+
return N(e, x.BRACE_R, r, r + 1);
|
|
602
602
|
// StringValue
|
|
603
603
|
case 34:
|
|
604
|
-
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ?
|
|
604
|
+
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? Hs(e, r) : _s(e, r);
|
|
605
605
|
}
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
608
|
-
if (
|
|
609
|
-
return
|
|
610
|
-
throw
|
|
606
|
+
if (re(o) || o === 45)
|
|
607
|
+
return Bs(e, r, o);
|
|
608
|
+
if (Lt(o))
|
|
609
|
+
return Qs(e, r);
|
|
610
|
+
throw L(
|
|
611
611
|
e.source,
|
|
612
612
|
r,
|
|
613
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Z(o) ||
|
|
613
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Z(o) || fe(s, r) ? `Unexpected character: ${U(e, r)}.` : `Invalid character: ${U(e, r)}.`
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
return
|
|
616
|
+
return N(e, x.EOF, a, a);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Vs(e, t) {
|
|
619
619
|
const s = e.source.body, a = s.length;
|
|
620
620
|
let r = t + 1;
|
|
621
621
|
for (; r < a; ) {
|
|
@@ -624,25 +624,25 @@ function Us(e, t) {
|
|
|
624
624
|
break;
|
|
625
625
|
if (Z(o))
|
|
626
626
|
++r;
|
|
627
|
-
else if (
|
|
627
|
+
else if (fe(s, r))
|
|
628
628
|
r += 2;
|
|
629
629
|
else
|
|
630
630
|
break;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return N(
|
|
633
633
|
e,
|
|
634
|
-
|
|
634
|
+
x.COMMENT,
|
|
635
635
|
t,
|
|
636
636
|
r,
|
|
637
637
|
s.slice(t + 1, r)
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Bs(e, t, s) {
|
|
641
641
|
const a = e.source.body;
|
|
642
642
|
let r = t, o = s, i = !1;
|
|
643
643
|
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
644
|
-
if (o = a.charCodeAt(++r),
|
|
645
|
-
throw
|
|
644
|
+
if (o = a.charCodeAt(++r), re(o))
|
|
645
|
+
throw L(
|
|
646
646
|
e.source,
|
|
647
647
|
r,
|
|
648
648
|
`Invalid number, unexpected digit after 0: ${U(
|
|
@@ -651,9 +651,9 @@ function Ms(e, t, s) {
|
|
|
651
651
|
)}.`
|
|
652
652
|
);
|
|
653
653
|
} else
|
|
654
|
-
r =
|
|
655
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r =
|
|
656
|
-
throw
|
|
654
|
+
r = we(e, r, o), o = a.charCodeAt(r);
|
|
655
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = we(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = we(e, r, o), o = a.charCodeAt(r)), o === 46 || Lt(o))
|
|
656
|
+
throw L(
|
|
657
657
|
e.source,
|
|
658
658
|
r,
|
|
659
659
|
`Invalid number, expected digit but got: ${U(
|
|
@@ -661,17 +661,17 @@ function Ms(e, t, s) {
|
|
|
661
661
|
r
|
|
662
662
|
)}.`
|
|
663
663
|
);
|
|
664
|
-
return
|
|
664
|
+
return N(
|
|
665
665
|
e,
|
|
666
|
-
i ?
|
|
666
|
+
i ? x.FLOAT : x.INT,
|
|
667
667
|
t,
|
|
668
668
|
r,
|
|
669
669
|
a.slice(t, r)
|
|
670
670
|
);
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
if (!
|
|
674
|
-
throw
|
|
672
|
+
function we(e, t, s) {
|
|
673
|
+
if (!re(s))
|
|
674
|
+
throw L(
|
|
675
675
|
e.source,
|
|
676
676
|
t,
|
|
677
677
|
`Invalid number, expected digit but got: ${U(
|
|
@@ -681,20 +681,20 @@ function Ce(e, t, s) {
|
|
|
681
681
|
);
|
|
682
682
|
const a = e.source.body;
|
|
683
683
|
let r = t + 1;
|
|
684
|
-
for (;
|
|
684
|
+
for (; re(a.charCodeAt(r)); )
|
|
685
685
|
++r;
|
|
686
686
|
return r;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function _s(e, t) {
|
|
689
689
|
const s = e.source.body, a = s.length;
|
|
690
690
|
let r = t + 1, o = r, i = "";
|
|
691
691
|
for (; r < a; ) {
|
|
692
692
|
const l = s.charCodeAt(r);
|
|
693
693
|
if (l === 34)
|
|
694
|
-
return i += s.slice(o, r),
|
|
694
|
+
return i += s.slice(o, r), N(e, x.STRING, t, r + 1, i);
|
|
695
695
|
if (l === 92) {
|
|
696
696
|
i += s.slice(o, r);
|
|
697
|
-
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ?
|
|
697
|
+
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Us(e, r) : Ms(e, r) : Gs(e, r);
|
|
698
698
|
i += c.value, r += c.size, o = r;
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
@@ -702,10 +702,10 @@ function Gs(e, t) {
|
|
|
702
702
|
break;
|
|
703
703
|
if (Z(l))
|
|
704
704
|
++r;
|
|
705
|
-
else if (
|
|
705
|
+
else if (fe(s, r))
|
|
706
706
|
r += 2;
|
|
707
707
|
else
|
|
708
|
-
throw
|
|
708
|
+
throw L(
|
|
709
709
|
e.source,
|
|
710
710
|
r,
|
|
711
711
|
`Invalid character within String: ${U(
|
|
@@ -714,9 +714,9 @@ function Gs(e, t) {
|
|
|
714
714
|
)}.`
|
|
715
715
|
);
|
|
716
716
|
}
|
|
717
|
-
throw
|
|
717
|
+
throw L(e.source, r, "Unterminated string.");
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Us(e, t) {
|
|
720
720
|
const s = e.source.body;
|
|
721
721
|
let a = 0, r = 3;
|
|
722
722
|
for (; r < 12; ) {
|
|
@@ -732,7 +732,7 @@ function Hs(e, t) {
|
|
|
732
732
|
if (a = a << 4 | ee(o), a < 0)
|
|
733
733
|
break;
|
|
734
734
|
}
|
|
735
|
-
throw
|
|
735
|
+
throw L(
|
|
736
736
|
e.source,
|
|
737
737
|
t,
|
|
738
738
|
`Invalid Unicode escape sequence: "${s.slice(
|
|
@@ -741,34 +741,34 @@ function Hs(e, t) {
|
|
|
741
741
|
)}".`
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
const s = e.source.body, a =
|
|
744
|
+
function Ms(e, t) {
|
|
745
|
+
const s = e.source.body, a = dt(s, t + 2);
|
|
746
746
|
if (Z(a))
|
|
747
747
|
return {
|
|
748
748
|
value: String.fromCodePoint(a),
|
|
749
749
|
size: 6
|
|
750
750
|
};
|
|
751
|
-
if (
|
|
752
|
-
const r =
|
|
753
|
-
if (
|
|
751
|
+
if ($t(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
|
|
752
|
+
const r = dt(s, t + 8);
|
|
753
|
+
if (Et(r))
|
|
754
754
|
return {
|
|
755
755
|
value: String.fromCodePoint(a, r),
|
|
756
756
|
size: 12
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
throw
|
|
759
|
+
throw L(
|
|
760
760
|
e.source,
|
|
761
761
|
t,
|
|
762
762
|
`Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function dt(e, t) {
|
|
766
766
|
return ee(e.charCodeAt(t)) << 12 | ee(e.charCodeAt(t + 1)) << 8 | ee(e.charCodeAt(t + 2)) << 4 | ee(e.charCodeAt(t + 3));
|
|
767
767
|
}
|
|
768
768
|
function ee(e) {
|
|
769
769
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function Gs(e, t) {
|
|
772
772
|
const s = e.source.body;
|
|
773
773
|
switch (s.charCodeAt(t + 1)) {
|
|
774
774
|
case 34:
|
|
@@ -813,7 +813,7 @@ function Js(e, t) {
|
|
|
813
813
|
size: 2
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
throw
|
|
816
|
+
throw L(
|
|
817
817
|
e.source,
|
|
818
818
|
t,
|
|
819
819
|
`Invalid character escape sequence: "${s.slice(
|
|
@@ -822,7 +822,7 @@ function Js(e, t) {
|
|
|
822
822
|
)}".`
|
|
823
823
|
);
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Hs(e, t) {
|
|
826
826
|
const s = e.source.body, a = s.length;
|
|
827
827
|
let r = e.lineStart, o = t + 3, i = o, l = "";
|
|
828
828
|
const c = [];
|
|
@@ -830,13 +830,13 @@ function Ws(e, t) {
|
|
|
830
830
|
const u = s.charCodeAt(o);
|
|
831
831
|
if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
|
|
832
832
|
l += s.slice(i, o), c.push(l);
|
|
833
|
-
const d =
|
|
833
|
+
const d = N(
|
|
834
834
|
e,
|
|
835
|
-
|
|
835
|
+
x.BLOCK_STRING,
|
|
836
836
|
t,
|
|
837
837
|
o + 3,
|
|
838
838
|
// Return a string of the lines joined with U+000A.
|
|
839
|
-
|
|
839
|
+
Is(c).join(`
|
|
840
840
|
`)
|
|
841
841
|
);
|
|
842
842
|
return e.line += c.length - 1, e.lineStart = r, d;
|
|
@@ -851,10 +851,10 @@ function Ws(e, t) {
|
|
|
851
851
|
}
|
|
852
852
|
if (Z(u))
|
|
853
853
|
++o;
|
|
854
|
-
else if (
|
|
854
|
+
else if (fe(s, o))
|
|
855
855
|
o += 2;
|
|
856
856
|
else
|
|
857
|
-
throw
|
|
857
|
+
throw L(
|
|
858
858
|
e.source,
|
|
859
859
|
o,
|
|
860
860
|
`Invalid character within String: ${U(
|
|
@@ -863,28 +863,28 @@ function Ws(e, t) {
|
|
|
863
863
|
)}.`
|
|
864
864
|
);
|
|
865
865
|
}
|
|
866
|
-
throw
|
|
866
|
+
throw L(e.source, o, "Unterminated string.");
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Qs(e, t) {
|
|
869
869
|
const s = e.source.body, a = s.length;
|
|
870
870
|
let r = t + 1;
|
|
871
871
|
for (; r < a; ) {
|
|
872
872
|
const o = s.charCodeAt(r);
|
|
873
|
-
if (
|
|
873
|
+
if (Es(o))
|
|
874
874
|
++r;
|
|
875
875
|
else
|
|
876
876
|
break;
|
|
877
877
|
}
|
|
878
|
-
return
|
|
878
|
+
return N(
|
|
879
879
|
e,
|
|
880
|
-
|
|
880
|
+
x.NAME,
|
|
881
881
|
t,
|
|
882
882
|
r,
|
|
883
883
|
s.slice(t, r)
|
|
884
884
|
);
|
|
885
885
|
}
|
|
886
|
-
const
|
|
887
|
-
function
|
|
886
|
+
const Js = 10, It = 2;
|
|
887
|
+
function kt(e) {
|
|
888
888
|
return ge(e, []);
|
|
889
889
|
}
|
|
890
890
|
function ge(e, t) {
|
|
@@ -894,45 +894,45 @@ function ge(e, t) {
|
|
|
894
894
|
case "function":
|
|
895
895
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
896
896
|
case "object":
|
|
897
|
-
return
|
|
897
|
+
return Ws(e, t);
|
|
898
898
|
default:
|
|
899
899
|
return String(e);
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function Ws(e, t) {
|
|
903
903
|
if (e === null)
|
|
904
904
|
return "null";
|
|
905
905
|
if (t.includes(e))
|
|
906
906
|
return "[Circular]";
|
|
907
907
|
const s = [...t, e];
|
|
908
|
-
if (
|
|
908
|
+
if (Xs(e)) {
|
|
909
909
|
const a = e.toJSON();
|
|
910
910
|
if (a !== e)
|
|
911
911
|
return typeof a == "string" ? a : ge(a, s);
|
|
912
912
|
} else if (Array.isArray(e))
|
|
913
|
-
return
|
|
914
|
-
return
|
|
913
|
+
return Ys(e, s);
|
|
914
|
+
return Zs(e, s);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Xs(e) {
|
|
917
917
|
return typeof e.toJSON == "function";
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Zs(e, t) {
|
|
920
920
|
const s = Object.entries(e);
|
|
921
|
-
return s.length === 0 ? "{}" : t.length > It ? "[" +
|
|
921
|
+
return s.length === 0 ? "{}" : t.length > It ? "[" + Ks(e) + "]" : "{ " + s.map(
|
|
922
922
|
([r, o]) => r + ": " + ge(o, t)
|
|
923
923
|
).join(", ") + " }";
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function Ys(e, t) {
|
|
926
926
|
if (e.length === 0)
|
|
927
927
|
return "[]";
|
|
928
928
|
if (t.length > It)
|
|
929
929
|
return "[Array]";
|
|
930
|
-
const s = Math.min(
|
|
930
|
+
const s = Math.min(Js, e.length), a = e.length - s, r = [];
|
|
931
931
|
for (let o = 0; o < s; ++o)
|
|
932
932
|
r.push(ge(e[o], t));
|
|
933
933
|
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Ks(e) {
|
|
936
936
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
937
937
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
938
938
|
const s = e.constructor.name;
|
|
@@ -941,11 +941,11 @@ function nr(e) {
|
|
|
941
941
|
}
|
|
942
942
|
return t;
|
|
943
943
|
}
|
|
944
|
-
const
|
|
945
|
-
process.env.NODE_ENV === "production",
|
|
944
|
+
const er = globalThis.process && // eslint-disable-next-line no-undef
|
|
945
|
+
process.env.NODE_ENV === "production", tr = (
|
|
946
946
|
/* c8 ignore next 6 */
|
|
947
947
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
948
|
-
|
|
948
|
+
er ? function(t, s) {
|
|
949
949
|
return t instanceof s;
|
|
950
950
|
} : function(t, s) {
|
|
951
951
|
if (t instanceof s)
|
|
@@ -957,7 +957,7 @@ process.env.NODE_ENV === "production", rr = (
|
|
|
957
957
|
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
|
|
958
958
|
);
|
|
959
959
|
if (r === o) {
|
|
960
|
-
const i =
|
|
960
|
+
const i = kt(t);
|
|
961
961
|
throw new Error(`Cannot use ${r} "${i}" from another module or realm.
|
|
962
962
|
|
|
963
963
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
@@ -975,15 +975,15 @@ spurious results.`);
|
|
|
975
975
|
return !1;
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
|
-
class
|
|
978
|
+
class Dt {
|
|
979
979
|
constructor(t, s = "GraphQL request", a = {
|
|
980
980
|
line: 1,
|
|
981
981
|
column: 1
|
|
982
982
|
}) {
|
|
983
|
-
typeof t == "string" ||
|
|
983
|
+
typeof t == "string" || Ce(!1, `Body must be a string. Received: ${kt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || Ce(
|
|
984
984
|
!1,
|
|
985
985
|
"line in locationOffset is 1-indexed and must be positive."
|
|
986
|
-
), this.locationOffset.column > 0 ||
|
|
986
|
+
), this.locationOffset.column > 0 || Ce(
|
|
987
987
|
!1,
|
|
988
988
|
"column in locationOffset is 1-indexed and must be positive."
|
|
989
989
|
);
|
|
@@ -992,35 +992,35 @@ class kt {
|
|
|
992
992
|
return "Source";
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
return
|
|
995
|
+
function nr(e) {
|
|
996
|
+
return tr(e, Dt);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
const t =
|
|
998
|
+
function sr(e) {
|
|
999
|
+
const t = nr(e) ? e : new Dt(e), s = t.body, a = new zs(t);
|
|
1000
1000
|
let r = "", o = !1;
|
|
1001
|
-
for (; a.advance().kind !==
|
|
1002
|
-
const i = a.token, l = i.kind, c = !
|
|
1003
|
-
o && (c || i.kind ===
|
|
1001
|
+
for (; a.advance().kind !== x.EOF; ) {
|
|
1002
|
+
const i = a.token, l = i.kind, c = !Fs(i.kind);
|
|
1003
|
+
o && (c || i.kind === x.SPREAD) && (r += " ");
|
|
1004
1004
|
const u = s.slice(i.start, i.end);
|
|
1005
|
-
l ===
|
|
1005
|
+
l === x.BLOCK_STRING ? r += Ds(i.value, {
|
|
1006
1006
|
minimize: !0
|
|
1007
1007
|
}) : r += u, o = c;
|
|
1008
1008
|
}
|
|
1009
1009
|
return r;
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const zt = yt(
|
|
1012
1012
|
void 0
|
|
1013
|
-
),
|
|
1013
|
+
), _a = ({
|
|
1014
1014
|
children: e,
|
|
1015
1015
|
client: t
|
|
1016
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
1016
|
+
}) => /* @__PURE__ */ n.jsx(zt.Provider, { value: t, children: e }), Ft = (e, t, ...[s]) => ({
|
|
1017
1017
|
queryFn: () => e.fetch(t, s),
|
|
1018
|
-
queryKey: [
|
|
1019
|
-
}),
|
|
1020
|
-
const s =
|
|
1018
|
+
queryKey: [sr(t.toString()), s]
|
|
1019
|
+
}), rr = (e, ...[t]) => {
|
|
1020
|
+
const s = Xn(zt);
|
|
1021
1021
|
if (s === void 0)
|
|
1022
1022
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1023
|
-
return
|
|
1023
|
+
return Ft(s, e, ...t === void 0 ? [] : [t]);
|
|
1024
1024
|
};
|
|
1025
1025
|
class H extends String {
|
|
1026
1026
|
__apiType;
|
|
@@ -1033,7 +1033,7 @@ class H extends String {
|
|
|
1033
1033
|
return this.value;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const ar = new H(
|
|
1037
1037
|
`
|
|
1038
1038
|
fragment OperationsFragment on OperationItem {
|
|
1039
1039
|
slug
|
|
@@ -1101,7 +1101,7 @@ const cr = new H(
|
|
|
1101
1101
|
}
|
|
1102
1102
|
`,
|
|
1103
1103
|
{ fragmentName: "OperationsFragment" }
|
|
1104
|
-
),
|
|
1104
|
+
), or = new H(`
|
|
1105
1105
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1106
1106
|
schema(input: $input, type: $type) {
|
|
1107
1107
|
url
|
|
@@ -1110,13 +1110,13 @@ const cr = new H(
|
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
`),
|
|
1113
|
+
`), ir = new H(`
|
|
1114
1114
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1115
1115
|
schema(input: $input, type: $type) {
|
|
1116
1116
|
openapi
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
`),
|
|
1119
|
+
`), cr = new H(`
|
|
1120
1120
|
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1121
1121
|
schema(input: $input, type: $type) {
|
|
1122
1122
|
servers {
|
|
@@ -1208,7 +1208,7 @@ const cr = new H(
|
|
|
1208
1208
|
schema
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
}`),
|
|
1211
|
+
}`), lr = new H(`
|
|
1212
1212
|
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1213
1213
|
schema(input: $input, type: $type) {
|
|
1214
1214
|
title
|
|
@@ -1223,7 +1223,7 @@ const cr = new H(
|
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
`),
|
|
1226
|
+
`), dr = new H(`
|
|
1227
1227
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1228
1228
|
schema(input: $input, type: $type) {
|
|
1229
1229
|
url
|
|
@@ -1232,9 +1232,10 @@ const cr = new H(
|
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
`),
|
|
1235
|
+
`), ur = new H(`
|
|
1236
1236
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1237
1237
|
schema(input: $input, type: $type) {
|
|
1238
|
+
extensions
|
|
1238
1239
|
tags {
|
|
1239
1240
|
slug
|
|
1240
1241
|
name
|
|
@@ -1254,123 +1255,20 @@ const cr = new H(
|
|
|
1254
1255
|
}
|
|
1255
1256
|
}
|
|
1256
1257
|
}
|
|
1257
|
-
`),
|
|
1258
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1259
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
1260
|
-
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n":
|
|
1261
|
-
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n":
|
|
1262
|
-
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n":
|
|
1263
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1264
|
-
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
|
|
1258
|
+
`), mr = {
|
|
1259
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": or,
|
|
1260
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": ar,
|
|
1261
|
+
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": ir,
|
|
1262
|
+
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": cr,
|
|
1263
|
+
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": lr,
|
|
1264
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": dr,
|
|
1265
|
+
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": ur
|
|
1265
1266
|
};
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
1267
|
+
function pr(e) {
|
|
1268
|
+
return mr[e] ?? {};
|
|
1268
1269
|
}
|
|
1269
|
-
const q =
|
|
1270
|
-
|
|
1271
|
-
{
|
|
1272
|
-
ref: a,
|
|
1273
|
-
className: v(
|
|
1274
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1275
|
-
e
|
|
1276
|
-
),
|
|
1277
|
-
...s,
|
|
1278
|
-
children: [
|
|
1279
|
-
/* @__PURE__ */ n.jsx("span", { className: "truncate", children: t }),
|
|
1280
|
-
/* @__PURE__ */ n.jsx(S.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(xt, { className: "shrink-0 h-4 w-4 opacity-50" }) })
|
|
1281
|
-
]
|
|
1282
|
-
}
|
|
1283
|
-
));
|
|
1284
|
-
Ve.displayName = S.Trigger.displayName;
|
|
1285
|
-
const Bt = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1286
|
-
S.ScrollUpButton,
|
|
1287
|
-
{
|
|
1288
|
-
ref: s,
|
|
1289
|
-
className: v(
|
|
1290
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1291
|
-
e
|
|
1292
|
-
),
|
|
1293
|
-
...t,
|
|
1294
|
-
children: /* @__PURE__ */ n.jsx(jn, { className: "h-4 w-4" })
|
|
1295
|
-
}
|
|
1296
|
-
));
|
|
1297
|
-
Bt.displayName = S.ScrollUpButton.displayName;
|
|
1298
|
-
const _t = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1299
|
-
S.ScrollDownButton,
|
|
1300
|
-
{
|
|
1301
|
-
ref: s,
|
|
1302
|
-
className: v(
|
|
1303
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1304
|
-
e
|
|
1305
|
-
),
|
|
1306
|
-
...t,
|
|
1307
|
-
children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" })
|
|
1308
|
-
}
|
|
1309
|
-
));
|
|
1310
|
-
_t.displayName = S.ScrollDownButton.displayName;
|
|
1311
|
-
const Be = w.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(S.Portal, { children: /* @__PURE__ */ n.jsxs(
|
|
1312
|
-
S.Content,
|
|
1313
|
-
{
|
|
1314
|
-
ref: r,
|
|
1315
|
-
className: v(
|
|
1316
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1317
|
-
s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1318
|
-
e
|
|
1319
|
-
),
|
|
1320
|
-
position: s,
|
|
1321
|
-
...a,
|
|
1322
|
-
children: [
|
|
1323
|
-
/* @__PURE__ */ n.jsx(Bt, {}),
|
|
1324
|
-
/* @__PURE__ */ n.jsx(
|
|
1325
|
-
S.Viewport,
|
|
1326
|
-
{
|
|
1327
|
-
className: v(
|
|
1328
|
-
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
1329
|
-
"divide-y"
|
|
1330
|
-
),
|
|
1331
|
-
children: t
|
|
1332
|
-
}
|
|
1333
|
-
),
|
|
1334
|
-
/* @__PURE__ */ n.jsx(_t, {})
|
|
1335
|
-
]
|
|
1336
|
-
}
|
|
1337
|
-
) }));
|
|
1338
|
-
Be.displayName = S.Content.displayName;
|
|
1339
|
-
const gr = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1340
|
-
S.Label,
|
|
1341
|
-
{
|
|
1342
|
-
ref: s,
|
|
1343
|
-
className: v("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
|
|
1344
|
-
...t
|
|
1345
|
-
}
|
|
1346
|
-
));
|
|
1347
|
-
gr.displayName = S.Label.displayName;
|
|
1348
|
-
const te = w.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1349
|
-
S.Item,
|
|
1350
|
-
{
|
|
1351
|
-
ref: a,
|
|
1352
|
-
className: v(
|
|
1353
|
-
"relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1354
|
-
e
|
|
1355
|
-
),
|
|
1356
|
-
...s,
|
|
1357
|
-
children: [
|
|
1358
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(S.ItemIndicator, { children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" }) }) }),
|
|
1359
|
-
/* @__PURE__ */ n.jsx(S.ItemText, { children: t })
|
|
1360
|
-
]
|
|
1361
|
-
}
|
|
1362
|
-
));
|
|
1363
|
-
te.displayName = S.Item.displayName;
|
|
1364
|
-
const yr = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1365
|
-
S.Separator,
|
|
1366
|
-
{
|
|
1367
|
-
ref: s,
|
|
1368
|
-
className: v("-mx-1 my-1 h-px bg-muted", e),
|
|
1369
|
-
...t
|
|
1370
|
-
}
|
|
1371
|
-
));
|
|
1372
|
-
yr.displayName = S.Separator.displayName;
|
|
1373
|
-
function vr() {
|
|
1270
|
+
const q = ze.Root, qt = ze.CollapsibleTrigger, V = ze.CollapsibleContent;
|
|
1271
|
+
function hr() {
|
|
1374
1272
|
const t = navigator.userAgent.toLowerCase();
|
|
1375
1273
|
if (t.indexOf("win") !== -1)
|
|
1376
1274
|
return "windows";
|
|
@@ -1381,10 +1279,10 @@ function vr() {
|
|
|
1381
1279
|
if (t.indexOf("x11") !== -1)
|
|
1382
1280
|
return "unix";
|
|
1383
1281
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return
|
|
1282
|
+
function fr() {
|
|
1283
|
+
return hr() === "apple";
|
|
1386
1284
|
}
|
|
1387
|
-
const
|
|
1285
|
+
const gr = {
|
|
1388
1286
|
other: {
|
|
1389
1287
|
alt: "Alt",
|
|
1390
1288
|
meta: "Ctrl",
|
|
@@ -1399,8 +1297,8 @@ const jr = {
|
|
|
1399
1297
|
shift: "⇧",
|
|
1400
1298
|
option: "⌥"
|
|
1401
1299
|
}
|
|
1402
|
-
},
|
|
1403
|
-
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c =
|
|
1300
|
+
}, xr = (e, t) => {
|
|
1301
|
+
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c = R(t);
|
|
1404
1302
|
return z(() => {
|
|
1405
1303
|
c.current = t;
|
|
1406
1304
|
}, [t]), z(() => {
|
|
@@ -1413,28 +1311,28 @@ const jr = {
|
|
|
1413
1311
|
}, [l, a, r, o, i]), {
|
|
1414
1312
|
trigger: () => c.current(),
|
|
1415
1313
|
label: s.map(
|
|
1416
|
-
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ?
|
|
1314
|
+
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? gr[fr() ? "apple" : "other"][u] : u
|
|
1417
1315
|
)
|
|
1418
1316
|
};
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1317
|
+
}, yr = Le()(
|
|
1318
|
+
$e(
|
|
1421
1319
|
(e) => ({
|
|
1422
1320
|
selectedServer: void 0,
|
|
1423
1321
|
setSelectedServer: (t) => e({ selectedServer: t })
|
|
1424
1322
|
}),
|
|
1425
1323
|
{ name: "zudoku-selected-server" }
|
|
1426
1324
|
)
|
|
1427
|
-
),
|
|
1428
|
-
const { selectedServer: t, setSelectedServer: s } =
|
|
1429
|
-
return { selectedServer:
|
|
1325
|
+
), vr = (e) => {
|
|
1326
|
+
const { selectedServer: t, setSelectedServer: s } = yr();
|
|
1327
|
+
return { selectedServer: vt(
|
|
1430
1328
|
() => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
|
|
1431
1329
|
[t, e]
|
|
1432
1330
|
), setSelectedServer: s };
|
|
1433
|
-
},
|
|
1331
|
+
}, Vt = A.forwardRef(
|
|
1434
1332
|
({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1435
1333
|
"textarea",
|
|
1436
1334
|
{
|
|
1437
|
-
className:
|
|
1335
|
+
className: C(
|
|
1438
1336
|
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1439
1337
|
e
|
|
1440
1338
|
),
|
|
@@ -1443,28 +1341,28 @@ const jr = {
|
|
|
1443
1341
|
}
|
|
1444
1342
|
)
|
|
1445
1343
|
);
|
|
1446
|
-
|
|
1344
|
+
Vt.displayName = "Textarea";
|
|
1447
1345
|
const M = ({
|
|
1448
1346
|
children: e,
|
|
1449
1347
|
className: t
|
|
1450
1348
|
}) => /* @__PURE__ */ n.jsxs(
|
|
1451
1349
|
"div",
|
|
1452
1350
|
{
|
|
1453
|
-
className:
|
|
1351
|
+
className: C(
|
|
1454
1352
|
"grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-4 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
1455
1353
|
t
|
|
1456
1354
|
),
|
|
1457
1355
|
children: [
|
|
1458
1356
|
e,
|
|
1459
1357
|
/* @__PURE__ */ n.jsx(
|
|
1460
|
-
|
|
1358
|
+
qt,
|
|
1461
1359
|
{
|
|
1462
|
-
className:
|
|
1360
|
+
className: C(
|
|
1463
1361
|
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
|
|
1464
1362
|
t
|
|
1465
1363
|
),
|
|
1466
1364
|
children: /* @__PURE__ */ n.jsx(
|
|
1467
|
-
|
|
1365
|
+
yn,
|
|
1468
1366
|
{
|
|
1469
1367
|
className: "group-data-[state=open]:rotate-180 transition-transform flex-shrink-0",
|
|
1470
1368
|
size: 16
|
|
@@ -1477,11 +1375,11 @@ const M = ({
|
|
|
1477
1375
|
), G = ({
|
|
1478
1376
|
children: e,
|
|
1479
1377
|
className: t
|
|
1480
|
-
}) => /* @__PURE__ */ n.jsx("span", { className:
|
|
1481
|
-
|
|
1378
|
+
}) => /* @__PURE__ */ n.jsx("span", { className: C("font-semibold w-full text-start", t), children: e }), br = w.Root, jr = w.Trigger, Cr = w.Group, wr = A.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1379
|
+
w.SubTrigger,
|
|
1482
1380
|
{
|
|
1483
1381
|
ref: r,
|
|
1484
|
-
className:
|
|
1382
|
+
className: C(
|
|
1485
1383
|
"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
|
|
1486
1384
|
t && "pl-8",
|
|
1487
1385
|
e
|
|
@@ -1489,29 +1387,29 @@ const M = ({
|
|
|
1489
1387
|
...a,
|
|
1490
1388
|
children: [
|
|
1491
1389
|
s,
|
|
1492
|
-
/* @__PURE__ */ n.jsx(
|
|
1390
|
+
/* @__PURE__ */ n.jsx(vn, { className: "ml-auto h-4 w-4" })
|
|
1493
1391
|
]
|
|
1494
1392
|
}
|
|
1495
1393
|
));
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1394
|
+
wr.displayName = w.SubTrigger.displayName;
|
|
1395
|
+
const Nr = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1396
|
+
w.SubContent,
|
|
1499
1397
|
{
|
|
1500
1398
|
ref: s,
|
|
1501
|
-
className:
|
|
1399
|
+
className: C(
|
|
1502
1400
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1503
1401
|
e
|
|
1504
1402
|
),
|
|
1505
1403
|
...t
|
|
1506
1404
|
}
|
|
1507
1405
|
));
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1406
|
+
Nr.displayName = w.SubContent.displayName;
|
|
1407
|
+
const Bt = A.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(w.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1408
|
+
w.Content,
|
|
1511
1409
|
{
|
|
1512
1410
|
ref: a,
|
|
1513
1411
|
sideOffset: t,
|
|
1514
|
-
className:
|
|
1412
|
+
className: C(
|
|
1515
1413
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1516
1414
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1517
1415
|
e
|
|
@@ -1519,12 +1417,12 @@ const Mt = w.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__
|
|
|
1519
1417
|
...s
|
|
1520
1418
|
}
|
|
1521
1419
|
) }));
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1420
|
+
Bt.displayName = w.Content.displayName;
|
|
1421
|
+
const _t = A.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1422
|
+
w.Item,
|
|
1525
1423
|
{
|
|
1526
1424
|
ref: a,
|
|
1527
|
-
className:
|
|
1425
|
+
className: C(
|
|
1528
1426
|
"relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1529
1427
|
t && "pl-8",
|
|
1530
1428
|
e
|
|
@@ -1532,45 +1430,45 @@ const Gt = w.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
|
|
|
1532
1430
|
...s
|
|
1533
1431
|
}
|
|
1534
1432
|
));
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1433
|
+
_t.displayName = w.Item.displayName;
|
|
1434
|
+
const Sr = A.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1435
|
+
w.CheckboxItem,
|
|
1538
1436
|
{
|
|
1539
1437
|
ref: r,
|
|
1540
|
-
className:
|
|
1438
|
+
className: C(
|
|
1541
1439
|
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1542
1440
|
e
|
|
1543
1441
|
),
|
|
1544
1442
|
checked: s,
|
|
1545
1443
|
...a,
|
|
1546
1444
|
children: [
|
|
1547
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(
|
|
1445
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(ft, { className: "h-4 w-4" }) }) }),
|
|
1548
1446
|
t
|
|
1549
1447
|
]
|
|
1550
1448
|
}
|
|
1551
1449
|
));
|
|
1552
|
-
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1450
|
+
Sr.displayName = w.CheckboxItem.displayName;
|
|
1451
|
+
const Tr = A.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1452
|
+
w.RadioItem,
|
|
1555
1453
|
{
|
|
1556
1454
|
ref: a,
|
|
1557
|
-
className:
|
|
1455
|
+
className: C(
|
|
1558
1456
|
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1559
1457
|
e
|
|
1560
1458
|
),
|
|
1561
1459
|
...s,
|
|
1562
1460
|
children: [
|
|
1563
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(
|
|
1461
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(bn, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1564
1462
|
t
|
|
1565
1463
|
]
|
|
1566
1464
|
}
|
|
1567
1465
|
));
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1466
|
+
Tr.displayName = w.RadioItem.displayName;
|
|
1467
|
+
const Ut = A.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1468
|
+
w.Label,
|
|
1571
1469
|
{
|
|
1572
1470
|
ref: a,
|
|
1573
|
-
className:
|
|
1471
|
+
className: C(
|
|
1574
1472
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1575
1473
|
t && "pl-8",
|
|
1576
1474
|
e
|
|
@@ -1578,37 +1476,37 @@ const Ht = w.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
|
|
|
1578
1476
|
...s
|
|
1579
1477
|
}
|
|
1580
1478
|
));
|
|
1581
|
-
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1479
|
+
Ut.displayName = w.Label.displayName;
|
|
1480
|
+
const Mt = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1481
|
+
w.Separator,
|
|
1584
1482
|
{
|
|
1585
1483
|
ref: s,
|
|
1586
|
-
className:
|
|
1484
|
+
className: C("-mx-1 my-1 h-px bg-muted", e),
|
|
1587
1485
|
...t
|
|
1588
1486
|
}
|
|
1589
1487
|
));
|
|
1590
|
-
|
|
1591
|
-
const
|
|
1488
|
+
Mt.displayName = w.Separator.displayName;
|
|
1489
|
+
const Ar = ({
|
|
1592
1490
|
examples: e,
|
|
1593
1491
|
onSelect: t
|
|
1594
|
-
}) => /* @__PURE__ */ n.jsxs(
|
|
1595
|
-
/* @__PURE__ */ n.jsx(
|
|
1596
|
-
|
|
1492
|
+
}) => /* @__PURE__ */ n.jsxs(br, { children: [
|
|
1493
|
+
/* @__PURE__ */ n.jsx(jr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1494
|
+
E,
|
|
1597
1495
|
{
|
|
1598
1496
|
variant: "ghost",
|
|
1599
1497
|
size: "sm",
|
|
1600
1498
|
className: "hover:bg-accent hover:brightness-95",
|
|
1601
1499
|
children: [
|
|
1602
1500
|
"Use Example ",
|
|
1603
|
-
/* @__PURE__ */ n.jsx(
|
|
1501
|
+
/* @__PURE__ */ n.jsx(he, { size: 16, className: "ml-2" })
|
|
1604
1502
|
]
|
|
1605
1503
|
}
|
|
1606
1504
|
) }),
|
|
1607
|
-
/* @__PURE__ */ n.jsx(
|
|
1608
|
-
/* @__PURE__ */ n.jsx(
|
|
1609
|
-
/* @__PURE__ */ n.jsx(
|
|
1610
|
-
/* @__PURE__ */ n.jsx(
|
|
1611
|
-
|
|
1505
|
+
/* @__PURE__ */ n.jsx(Bt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
1506
|
+
/* @__PURE__ */ n.jsx(Ut, { children: s.mediaType }),
|
|
1507
|
+
/* @__PURE__ */ n.jsx(Mt, {}),
|
|
1508
|
+
/* @__PURE__ */ n.jsx(Cr, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
|
|
1509
|
+
_t,
|
|
1612
1510
|
{
|
|
1613
1511
|
onSelect: () => t(a, s.mediaType),
|
|
1614
1512
|
children: /* @__PURE__ */ n.jsx(
|
|
@@ -1623,14 +1521,14 @@ const $r = ({
|
|
|
1623
1521
|
a.name
|
|
1624
1522
|
)) })
|
|
1625
1523
|
] }, s.mediaType)) })
|
|
1626
|
-
] }),
|
|
1627
|
-
const { register: t, setValue: s, watch: a } =
|
|
1524
|
+
] }), Or = ({ content: e }) => {
|
|
1525
|
+
const { register: t, setValue: s, watch: a } = ae(), r = (e ?? []).flatMap((i) => i.examples), o = a("headers");
|
|
1628
1526
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
1629
1527
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
1630
|
-
/* @__PURE__ */ n.jsx(
|
|
1528
|
+
/* @__PURE__ */ n.jsx(jn, { size: 16 }),
|
|
1631
1529
|
/* @__PURE__ */ n.jsx(G, { children: "Body" }),
|
|
1632
1530
|
e && r.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1633
|
-
|
|
1531
|
+
Ar,
|
|
1634
1532
|
{
|
|
1635
1533
|
examples: e,
|
|
1636
1534
|
onSelect: (i, l) => {
|
|
@@ -1647,17 +1545,17 @@ const $r = ({
|
|
|
1647
1545
|
) : /* @__PURE__ */ n.jsx("div", {})
|
|
1648
1546
|
] }),
|
|
1649
1547
|
/* @__PURE__ */ n.jsx(V, { className: "flex flex-col gap-2 ", children: /* @__PURE__ */ n.jsx(
|
|
1650
|
-
|
|
1548
|
+
Vt,
|
|
1651
1549
|
{
|
|
1652
1550
|
...t("body"),
|
|
1653
|
-
className:
|
|
1551
|
+
className: C(
|
|
1654
1552
|
"w-full p-2 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0"
|
|
1655
1553
|
),
|
|
1656
1554
|
placeholder: "Your body here..."
|
|
1657
1555
|
}
|
|
1658
1556
|
) })
|
|
1659
1557
|
] });
|
|
1660
|
-
},
|
|
1558
|
+
}, ut = (e, t, s) => {
|
|
1661
1559
|
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1662
1560
|
const i = o.replace(/[:{}]/g, "");
|
|
1663
1561
|
return s.pathParams.find((c) => c.name === i)?.value ?? o;
|
|
@@ -1669,12 +1567,12 @@ const $r = ({
|
|
|
1669
1567
|
r.searchParams.set(o.name, o.value);
|
|
1670
1568
|
}), r;
|
|
1671
1569
|
};
|
|
1672
|
-
function
|
|
1570
|
+
function Pr(e) {
|
|
1673
1571
|
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1674
1572
|
e
|
|
1675
1573
|
);
|
|
1676
1574
|
}
|
|
1677
|
-
const
|
|
1575
|
+
const Rr = (e, t) => {
|
|
1678
1576
|
const s = e.find(
|
|
1679
1577
|
([a]) => a.toLowerCase() === "content-disposition"
|
|
1680
1578
|
)?.[1];
|
|
@@ -1691,41 +1589,41 @@ const kr = (e, t) => {
|
|
|
1691
1589
|
} catch {
|
|
1692
1590
|
return "download";
|
|
1693
1591
|
}
|
|
1694
|
-
},
|
|
1695
|
-
|
|
1592
|
+
}, xe = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1593
|
+
Oe.Root,
|
|
1696
1594
|
{
|
|
1697
1595
|
ref: s,
|
|
1698
|
-
className:
|
|
1596
|
+
className: C(
|
|
1699
1597
|
"peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
1700
1598
|
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
1701
1599
|
e
|
|
1702
1600
|
),
|
|
1703
1601
|
...t,
|
|
1704
1602
|
children: /* @__PURE__ */ n.jsx(
|
|
1705
|
-
|
|
1603
|
+
Oe.Indicator,
|
|
1706
1604
|
{
|
|
1707
|
-
className:
|
|
1708
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1605
|
+
className: C("flex items-center justify-center text-current"),
|
|
1606
|
+
children: /* @__PURE__ */ n.jsx(Cn, { className: "h-4 w-4" })
|
|
1709
1607
|
}
|
|
1710
1608
|
)
|
|
1711
1609
|
}
|
|
1712
1610
|
));
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1611
|
+
xe.displayName = Oe.Root.displayName;
|
|
1612
|
+
const Lr = de.Root, Gt = A.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(de.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1613
|
+
de.Content,
|
|
1716
1614
|
{
|
|
1717
1615
|
ref: r,
|
|
1718
1616
|
align: t,
|
|
1719
1617
|
sideOffset: s,
|
|
1720
|
-
className:
|
|
1618
|
+
className: C(
|
|
1721
1619
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1722
1620
|
e
|
|
1723
1621
|
),
|
|
1724
1622
|
...a
|
|
1725
1623
|
}
|
|
1726
1624
|
) }));
|
|
1727
|
-
|
|
1728
|
-
const
|
|
1625
|
+
Gt.displayName = de.Content.displayName;
|
|
1626
|
+
const $r = ({
|
|
1729
1627
|
value: e,
|
|
1730
1628
|
options: t,
|
|
1731
1629
|
onChange: s,
|
|
@@ -1734,36 +1632,36 @@ const zr = ({
|
|
|
1734
1632
|
onEnterPress: o,
|
|
1735
1633
|
ref: i
|
|
1736
1634
|
}) => {
|
|
1737
|
-
const [l, c] = k(!1), [u, d] = k(!1),
|
|
1738
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1739
|
-
/* @__PURE__ */ n.jsx(
|
|
1740
|
-
|
|
1635
|
+
const [l, c] = k(!1), [u, d] = k(!1), h = hs((m) => m.filtered.count), g = R(null);
|
|
1636
|
+
return /* @__PURE__ */ n.jsxs(Lr, { open: l, children: [
|
|
1637
|
+
/* @__PURE__ */ n.jsx(ps, { children: /* @__PURE__ */ n.jsx(
|
|
1638
|
+
gs,
|
|
1741
1639
|
{
|
|
1742
1640
|
autoComplete: "off",
|
|
1743
1641
|
ref: (m) => {
|
|
1744
|
-
|
|
1642
|
+
g.current = m, typeof i == "function" ? i(m) : i && (i.current = m);
|
|
1745
1643
|
},
|
|
1746
1644
|
value: e,
|
|
1747
1645
|
placeholder: r,
|
|
1748
|
-
className:
|
|
1646
|
+
className: C("h-9 bg-transparent", a),
|
|
1749
1647
|
onFocus: () => c(!0),
|
|
1750
1648
|
onBlur: () => {
|
|
1751
1649
|
u || c(!1);
|
|
1752
1650
|
},
|
|
1753
1651
|
onKeyDown: (m) => {
|
|
1754
|
-
m.key === "Enter" && (c(!1),
|
|
1652
|
+
m.key === "Enter" && (c(!1), g.current?.blur(), o?.(m));
|
|
1755
1653
|
},
|
|
1756
1654
|
onValueChange: (m) => s(m)
|
|
1757
1655
|
}
|
|
1758
1656
|
) }),
|
|
1759
1657
|
/* @__PURE__ */ n.jsx(
|
|
1760
|
-
|
|
1658
|
+
Gt,
|
|
1761
1659
|
{
|
|
1762
1660
|
onMouseEnter: () => d(!0),
|
|
1763
1661
|
onMouseLeave: () => d(!1),
|
|
1764
1662
|
onOpenAutoFocus: (m) => m.preventDefault(),
|
|
1765
|
-
className:
|
|
1766
|
-
"border-0":
|
|
1663
|
+
className: C("p-0 w-(--radix-popover-trigger-width)", {
|
|
1664
|
+
"border-0": h === 0
|
|
1767
1665
|
}),
|
|
1768
1666
|
align: "start",
|
|
1769
1667
|
side: "bottom",
|
|
@@ -1773,12 +1671,12 @@ const zr = ({
|
|
|
1773
1671
|
onTouchMove: (m) => {
|
|
1774
1672
|
m.stopPropagation();
|
|
1775
1673
|
},
|
|
1776
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1777
|
-
|
|
1674
|
+
children: /* @__PURE__ */ n.jsx(xs, { className: "max-h-[140px]", children: t.map((m) => /* @__PURE__ */ n.jsx(
|
|
1675
|
+
ys,
|
|
1778
1676
|
{
|
|
1779
1677
|
value: m,
|
|
1780
|
-
onSelect: (
|
|
1781
|
-
s(
|
|
1678
|
+
onSelect: (y) => {
|
|
1679
|
+
s(y), c(!1);
|
|
1782
1680
|
},
|
|
1783
1681
|
className: "cursor-pointer",
|
|
1784
1682
|
children: m
|
|
@@ -1788,23 +1686,23 @@ const zr = ({
|
|
|
1788
1686
|
}
|
|
1789
1687
|
)
|
|
1790
1688
|
] });
|
|
1791
|
-
},
|
|
1792
|
-
const s =
|
|
1793
|
-
const l = r ?
|
|
1794
|
-
return
|
|
1689
|
+
}, me = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(fs, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx($r, { ...t }) }), oe = (e, t) => {
|
|
1690
|
+
const s = A.forwardRef(({ className: a, asChild: r, ...o }, i) => {
|
|
1691
|
+
const l = r ? vs : e;
|
|
1692
|
+
return A.createElement(l, {
|
|
1795
1693
|
...o,
|
|
1796
1694
|
ref: i,
|
|
1797
|
-
className: typeof t == "function" ? t({ className: a }) :
|
|
1695
|
+
className: typeof t == "function" ? t({ className: a }) : C(t, a)
|
|
1798
1696
|
});
|
|
1799
1697
|
});
|
|
1800
1698
|
return s.displayName = `VariantComponent(${e})`, s;
|
|
1801
|
-
},
|
|
1699
|
+
}, qe = oe(
|
|
1802
1700
|
"div",
|
|
1803
1701
|
"grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5"
|
|
1804
|
-
),
|
|
1702
|
+
), pe = oe(
|
|
1805
1703
|
"div",
|
|
1806
1704
|
"group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
|
|
1807
|
-
),
|
|
1705
|
+
), Er = Object.freeze([
|
|
1808
1706
|
"Accept",
|
|
1809
1707
|
"Accept-Encoding",
|
|
1810
1708
|
"Accept-Language",
|
|
@@ -1831,76 +1729,76 @@ const zr = ({
|
|
|
1831
1729
|
"Set-Cookie",
|
|
1832
1730
|
"User-Agent",
|
|
1833
1731
|
"X-Requested-With"
|
|
1834
|
-
]),
|
|
1732
|
+
]), Ir = ({
|
|
1835
1733
|
control: e,
|
|
1836
1734
|
schemaHeaders: t,
|
|
1837
1735
|
lockedHeaders: s
|
|
1838
1736
|
}) => {
|
|
1839
|
-
const { fields: a, append: r, remove: o } =
|
|
1737
|
+
const { fields: a, append: r, remove: o } = De({
|
|
1840
1738
|
control: e,
|
|
1841
1739
|
name: "headers"
|
|
1842
|
-
}), { setValue: i, watch: l, formState: c } =
|
|
1843
|
-
(
|
|
1844
|
-
|
|
1740
|
+
}), { setValue: i, watch: l, formState: c } = ae(), u = R([]), d = R([]), h = l("headers"), g = bt(
|
|
1741
|
+
(f) => {
|
|
1742
|
+
f?.stopPropagation(), r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
1845
1743
|
},
|
|
1846
1744
|
[r]
|
|
1847
1745
|
);
|
|
1848
1746
|
z(() => {
|
|
1849
|
-
|
|
1850
|
-
}, [
|
|
1851
|
-
const m = (
|
|
1852
|
-
u.current[
|
|
1853
|
-
},
|
|
1854
|
-
|
|
1855
|
-
},
|
|
1856
|
-
name:
|
|
1857
|
-
id: `locked-${
|
|
1747
|
+
h.length === 0 && g();
|
|
1748
|
+
}, [h, g]);
|
|
1749
|
+
const m = (f) => {
|
|
1750
|
+
u.current[f]?.focus();
|
|
1751
|
+
}, y = (f) => {
|
|
1752
|
+
g(), requestAnimationFrame(() => d.current[f + 1]?.focus());
|
|
1753
|
+
}, v = t.filter((f) => !h.some((j) => j.name === f.name)).map(({ name: f }) => f), b = a.flatMap((f, j) => !s?.map((S) => S.toLowerCase()).includes(f.name.toLowerCase()) ? [] : [j]), O = s?.map((f) => ({
|
|
1754
|
+
name: f,
|
|
1755
|
+
id: `locked-${f}`,
|
|
1858
1756
|
value: "••••••••••",
|
|
1859
1757
|
active: !0,
|
|
1860
1758
|
locked: !0
|
|
1861
1759
|
})) ?? [];
|
|
1862
1760
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
1863
1761
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
1864
|
-
/* @__PURE__ */ n.jsx(
|
|
1762
|
+
/* @__PURE__ */ n.jsx(wn, { size: 16 }),
|
|
1865
1763
|
/* @__PURE__ */ n.jsx(G, { children: "Headers" }),
|
|
1866
1764
|
/* @__PURE__ */ n.jsxs(
|
|
1867
|
-
|
|
1765
|
+
ne,
|
|
1868
1766
|
{
|
|
1869
|
-
onClick:
|
|
1767
|
+
onClick: g,
|
|
1870
1768
|
type: "button",
|
|
1871
1769
|
size: "sm",
|
|
1872
1770
|
variant: "ghost",
|
|
1873
1771
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
1874
1772
|
children: [
|
|
1875
1773
|
"Add header ",
|
|
1876
|
-
/* @__PURE__ */ n.jsx(
|
|
1774
|
+
/* @__PURE__ */ n.jsx(he, { size: 16 })
|
|
1877
1775
|
]
|
|
1878
1776
|
}
|
|
1879
1777
|
)
|
|
1880
1778
|
] }),
|
|
1881
|
-
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(
|
|
1882
|
-
|
|
1883
|
-
/* @__PURE__ */ n.jsx(
|
|
1884
|
-
|
|
1779
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(qe, { children: [
|
|
1780
|
+
O.map((f) => /* @__PURE__ */ n.jsxs(rt, { children: [
|
|
1781
|
+
/* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1782
|
+
pe,
|
|
1885
1783
|
{
|
|
1886
1784
|
className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
|
|
1887
1785
|
children: [
|
|
1888
|
-
/* @__PURE__ */ n.jsx(
|
|
1786
|
+
/* @__PURE__ */ n.jsx(Nn, { size: 16 }),
|
|
1889
1787
|
/* @__PURE__ */ n.jsx(
|
|
1890
|
-
|
|
1788
|
+
ue,
|
|
1891
1789
|
{
|
|
1892
|
-
value:
|
|
1790
|
+
value: f.name,
|
|
1893
1791
|
disabled: !0,
|
|
1894
1792
|
className: "w-full border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
|
|
1895
1793
|
}
|
|
1896
1794
|
),
|
|
1897
|
-
/* @__PURE__ */ n.jsx("div", { children:
|
|
1795
|
+
/* @__PURE__ */ n.jsx("div", { children: f.value })
|
|
1898
1796
|
]
|
|
1899
1797
|
},
|
|
1900
|
-
|
|
1798
|
+
f.id
|
|
1901
1799
|
) }),
|
|
1902
1800
|
/* @__PURE__ */ n.jsx(
|
|
1903
|
-
|
|
1801
|
+
ot,
|
|
1904
1802
|
{
|
|
1905
1803
|
alignOffset: 10,
|
|
1906
1804
|
side: "bottom",
|
|
@@ -1908,51 +1806,51 @@ const zr = ({
|
|
|
1908
1806
|
children: /* @__PURE__ */ n.jsx("p", { children: "This header is set by the selected authentication." })
|
|
1909
1807
|
}
|
|
1910
1808
|
)
|
|
1911
|
-
] },
|
|
1912
|
-
a.map((
|
|
1913
|
-
const
|
|
1914
|
-
(
|
|
1809
|
+
] }, f.id)),
|
|
1810
|
+
a.map((f, j) => {
|
|
1811
|
+
const $ = t.find(
|
|
1812
|
+
(S) => S.name === h.at(j)?.name
|
|
1915
1813
|
);
|
|
1916
1814
|
return /* @__PURE__ */ n.jsxs(
|
|
1917
|
-
|
|
1815
|
+
pe,
|
|
1918
1816
|
{
|
|
1919
|
-
className:
|
|
1920
|
-
b.includes(
|
|
1921
|
-
b.includes(
|
|
1817
|
+
className: C(
|
|
1818
|
+
b.includes(j) && "text-amber-600",
|
|
1819
|
+
b.includes(j) && !c.dirtyFields.headers?.[j]?.value && "hidden"
|
|
1922
1820
|
),
|
|
1923
1821
|
children: [
|
|
1924
1822
|
/* @__PURE__ */ n.jsx(
|
|
1925
1823
|
F,
|
|
1926
1824
|
{
|
|
1927
1825
|
control: e,
|
|
1928
|
-
name: `headers.${
|
|
1929
|
-
render: ({ field:
|
|
1826
|
+
name: `headers.${j}.active`,
|
|
1827
|
+
render: ({ field: S }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1930
1828
|
/* @__PURE__ */ n.jsx(
|
|
1931
|
-
|
|
1829
|
+
xe,
|
|
1932
1830
|
{
|
|
1933
|
-
id: `headers.${
|
|
1934
|
-
className:
|
|
1935
|
-
b.includes(
|
|
1831
|
+
id: `headers.${j}.active`,
|
|
1832
|
+
className: C(
|
|
1833
|
+
b.includes(j) && "hidden"
|
|
1936
1834
|
),
|
|
1937
|
-
checked:
|
|
1835
|
+
checked: S.value,
|
|
1938
1836
|
onCheckedChange: (D) => {
|
|
1939
|
-
|
|
1837
|
+
S.onChange(D);
|
|
1940
1838
|
}
|
|
1941
1839
|
}
|
|
1942
1840
|
),
|
|
1943
|
-
/* @__PURE__ */ n.jsxs(
|
|
1944
|
-
/* @__PURE__ */ n.jsx(
|
|
1945
|
-
|
|
1841
|
+
/* @__PURE__ */ n.jsxs(rt, { children: [
|
|
1842
|
+
/* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsx(
|
|
1843
|
+
Sn,
|
|
1946
1844
|
{
|
|
1947
|
-
className:
|
|
1845
|
+
className: C(
|
|
1948
1846
|
"text-amber-600",
|
|
1949
|
-
!b.includes(
|
|
1847
|
+
!b.includes(j) && "hidden"
|
|
1950
1848
|
),
|
|
1951
1849
|
size: 16
|
|
1952
1850
|
}
|
|
1953
1851
|
) }),
|
|
1954
1852
|
/* @__PURE__ */ n.jsx(
|
|
1955
|
-
|
|
1853
|
+
ot,
|
|
1956
1854
|
{
|
|
1957
1855
|
alignOffset: 10,
|
|
1958
1856
|
side: "bottom",
|
|
@@ -1968,20 +1866,20 @@ const zr = ({
|
|
|
1968
1866
|
F,
|
|
1969
1867
|
{
|
|
1970
1868
|
control: e,
|
|
1971
|
-
name: `headers.${
|
|
1972
|
-
render: ({ field:
|
|
1973
|
-
|
|
1869
|
+
name: `headers.${j}.name`,
|
|
1870
|
+
render: ({ field: S }) => /* @__PURE__ */ n.jsx(
|
|
1871
|
+
me,
|
|
1974
1872
|
{
|
|
1975
|
-
...
|
|
1873
|
+
...S,
|
|
1976
1874
|
placeholder: "Name",
|
|
1977
1875
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
|
|
1978
|
-
options: [...
|
|
1979
|
-
onEnterPress: () => m(
|
|
1876
|
+
options: [...v, ...Er],
|
|
1877
|
+
onEnterPress: () => m(j),
|
|
1980
1878
|
onChange: (D) => {
|
|
1981
|
-
|
|
1879
|
+
S.onChange(D), i(`headers.${j}.active`, !0);
|
|
1982
1880
|
},
|
|
1983
1881
|
ref: (D) => {
|
|
1984
|
-
d.current[
|
|
1882
|
+
d.current[j] = D;
|
|
1985
1883
|
}
|
|
1986
1884
|
}
|
|
1987
1885
|
)
|
|
@@ -1992,106 +1890,106 @@ const zr = ({
|
|
|
1992
1890
|
F,
|
|
1993
1891
|
{
|
|
1994
1892
|
control: e,
|
|
1995
|
-
name: `headers.${
|
|
1996
|
-
render: ({ field:
|
|
1997
|
-
|
|
1893
|
+
name: `headers.${j}.value`,
|
|
1894
|
+
render: ({ field: S }) => $?.enum && $.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1895
|
+
me,
|
|
1998
1896
|
{
|
|
1999
1897
|
shouldFilter: !1,
|
|
2000
|
-
value:
|
|
2001
|
-
options:
|
|
1898
|
+
value: S.value,
|
|
1899
|
+
options: $.enum ?? [],
|
|
2002
1900
|
onChange: (P) => {
|
|
2003
|
-
|
|
1901
|
+
S.onChange(P), i(`headers.${j}.active`, !0);
|
|
2004
1902
|
},
|
|
2005
1903
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2006
1904
|
}
|
|
2007
1905
|
) : /* @__PURE__ */ n.jsx(
|
|
2008
|
-
|
|
1906
|
+
ue,
|
|
2009
1907
|
{
|
|
2010
1908
|
placeholder: "Value",
|
|
2011
1909
|
className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono",
|
|
2012
1910
|
autoComplete: "off",
|
|
2013
|
-
...
|
|
1911
|
+
...S,
|
|
2014
1912
|
ref: (P) => {
|
|
2015
|
-
u.current[
|
|
1913
|
+
u.current[j] = P;
|
|
2016
1914
|
},
|
|
2017
1915
|
onKeyDown: (P) => {
|
|
2018
|
-
P.key === "Enter" && P.currentTarget.value.trim() &&
|
|
1916
|
+
P.key === "Enter" && P.currentTarget.value.trim() && y(j);
|
|
2019
1917
|
}
|
|
2020
1918
|
}
|
|
2021
1919
|
)
|
|
2022
1920
|
}
|
|
2023
1921
|
),
|
|
2024
1922
|
/* @__PURE__ */ n.jsx(
|
|
2025
|
-
|
|
1923
|
+
ne,
|
|
2026
1924
|
{
|
|
2027
1925
|
size: "icon-xs",
|
|
2028
1926
|
variant: "ghost",
|
|
2029
1927
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
2030
|
-
onClick: () => o(
|
|
1928
|
+
onClick: () => o(j),
|
|
2031
1929
|
type: "button",
|
|
2032
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1930
|
+
children: /* @__PURE__ */ n.jsx(gt, { size: 16 })
|
|
2033
1931
|
}
|
|
2034
1932
|
)
|
|
2035
1933
|
] })
|
|
2036
1934
|
]
|
|
2037
1935
|
},
|
|
2038
|
-
|
|
1936
|
+
f.id
|
|
2039
1937
|
);
|
|
2040
1938
|
})
|
|
2041
1939
|
] }) }) }) })
|
|
2042
1940
|
] });
|
|
2043
|
-
},
|
|
1941
|
+
}, kr = js(
|
|
2044
1942
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2045
|
-
),
|
|
2046
|
-
|
|
1943
|
+
), Ve = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1944
|
+
At.Root,
|
|
2047
1945
|
{
|
|
2048
1946
|
ref: s,
|
|
2049
|
-
className:
|
|
1947
|
+
className: C(kr(), e),
|
|
2050
1948
|
...t
|
|
2051
1949
|
}
|
|
2052
1950
|
));
|
|
2053
|
-
|
|
2054
|
-
const
|
|
2055
|
-
|
|
1951
|
+
Ve.displayName = At.Root.displayName;
|
|
1952
|
+
const Ht = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1953
|
+
se.Root,
|
|
2056
1954
|
{
|
|
2057
|
-
className:
|
|
1955
|
+
className: C("grid gap-2", e),
|
|
2058
1956
|
...t,
|
|
2059
1957
|
ref: s
|
|
2060
1958
|
}
|
|
2061
1959
|
));
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
|
|
1960
|
+
Ht.displayName = se.Root.displayName;
|
|
1961
|
+
const Qt = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1962
|
+
se.Item,
|
|
2065
1963
|
{
|
|
2066
1964
|
ref: s,
|
|
2067
|
-
className:
|
|
1965
|
+
className: C(
|
|
2068
1966
|
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2069
1967
|
e
|
|
2070
1968
|
),
|
|
2071
1969
|
...t,
|
|
2072
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1970
|
+
children: /* @__PURE__ */ n.jsx(se.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(Tn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
2073
1971
|
}
|
|
2074
1972
|
));
|
|
2075
|
-
|
|
2076
|
-
const
|
|
1973
|
+
Qt.displayName = se.Item.displayName;
|
|
1974
|
+
const Jt = ({
|
|
2077
1975
|
identities: e,
|
|
2078
1976
|
setValue: t,
|
|
2079
1977
|
value: s
|
|
2080
1978
|
}) => /* @__PURE__ */ n.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
2081
|
-
|
|
1979
|
+
Ht,
|
|
2082
1980
|
{
|
|
2083
1981
|
onValueChange: (a) => t(a),
|
|
2084
1982
|
value: s,
|
|
2085
|
-
defaultValue:
|
|
1983
|
+
defaultValue: te,
|
|
2086
1984
|
className: "gap-0",
|
|
2087
1985
|
disabled: e?.length === 0,
|
|
2088
|
-
children: [{ id:
|
|
1986
|
+
children: [{ id: te, label: "None" }, ...e ?? []].map(
|
|
2089
1987
|
(a) => /* @__PURE__ */ n.jsxs(
|
|
2090
|
-
|
|
1988
|
+
Ve,
|
|
2091
1989
|
{
|
|
2092
1990
|
className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
|
|
2093
1991
|
children: [
|
|
2094
|
-
/* @__PURE__ */ n.jsx(
|
|
1992
|
+
/* @__PURE__ */ n.jsx(Qt, { value: a.id, id: a.id }),
|
|
2095
1993
|
/* @__PURE__ */ n.jsx("span", { children: a.label })
|
|
2096
1994
|
]
|
|
2097
1995
|
},
|
|
@@ -2099,28 +1997,28 @@ const Zt = ({
|
|
|
2099
1997
|
)
|
|
2100
1998
|
)
|
|
2101
1999
|
}
|
|
2102
|
-
) }),
|
|
2000
|
+
) }), Dr = ({
|
|
2103
2001
|
onSubmit: e,
|
|
2104
2002
|
identities: t,
|
|
2105
2003
|
open: s,
|
|
2106
2004
|
onOpenChange: a
|
|
2107
2005
|
}) => {
|
|
2108
2006
|
const [r, o] = k(void 0), [i, l] = k(!1);
|
|
2109
|
-
return /* @__PURE__ */ n.jsx(Ee, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(
|
|
2110
|
-
/* @__PURE__ */ n.jsx(
|
|
2111
|
-
/* @__PURE__ */ n.jsx(
|
|
2112
|
-
/* @__PURE__ */ n.jsx(
|
|
2113
|
-
|
|
2007
|
+
return /* @__PURE__ */ n.jsx(Ee, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
|
|
2008
|
+
/* @__PURE__ */ n.jsx(ke, { children: "Select an auth identity" }),
|
|
2009
|
+
/* @__PURE__ */ n.jsx(jt, { children: "Please select an identity for this request." }),
|
|
2010
|
+
/* @__PURE__ */ n.jsx(bs, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
|
|
2011
|
+
Jt,
|
|
2114
2012
|
{
|
|
2115
2013
|
identities: t,
|
|
2116
2014
|
setValue: o,
|
|
2117
2015
|
value: r
|
|
2118
2016
|
}
|
|
2119
2017
|
) }),
|
|
2120
|
-
/* @__PURE__ */ n.jsxs(
|
|
2018
|
+
/* @__PURE__ */ n.jsxs(Ct, { className: "flex flex-col gap-2", children: [
|
|
2121
2019
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2122
2020
|
/* @__PURE__ */ n.jsx(
|
|
2123
|
-
|
|
2021
|
+
xe,
|
|
2124
2022
|
{
|
|
2125
2023
|
id: "remember",
|
|
2126
2024
|
checked: i,
|
|
@@ -2129,10 +2027,10 @@ const Zt = ({
|
|
|
2129
2027
|
)
|
|
2130
2028
|
}
|
|
2131
2029
|
),
|
|
2132
|
-
/* @__PURE__ */ n.jsx(
|
|
2030
|
+
/* @__PURE__ */ n.jsx(Ve, { htmlFor: "remember", children: "Remember my choice" })
|
|
2133
2031
|
] }),
|
|
2134
2032
|
/* @__PURE__ */ n.jsx(
|
|
2135
|
-
|
|
2033
|
+
E,
|
|
2136
2034
|
{
|
|
2137
2035
|
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
2138
2036
|
children: "Send"
|
|
@@ -2140,24 +2038,24 @@ const Zt = ({
|
|
|
2140
2038
|
)
|
|
2141
2039
|
] })
|
|
2142
2040
|
] }) });
|
|
2143
|
-
},
|
|
2041
|
+
}, Ne = (e) => Math.abs(
|
|
2144
2042
|
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
2145
|
-
),
|
|
2146
|
-
const s = (3 *
|
|
2043
|
+
), Se = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${Ne(t) + Ne(s)}`)) : Ne(e), mt = (e, t = {}) => {
|
|
2044
|
+
const s = (3 * Se(e) + 2 * Se(e) + Se(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
|
|
2147
2045
|
return `${s}deg ${a}% ${r}%`;
|
|
2148
|
-
},
|
|
2149
|
-
const { resolvedTheme: t } =
|
|
2046
|
+
}, Te = "data-linked-param", zr = (e) => {
|
|
2047
|
+
const { resolvedTheme: t } = Cs();
|
|
2150
2048
|
return {
|
|
2151
|
-
text:
|
|
2049
|
+
text: mt(
|
|
2152
2050
|
e,
|
|
2153
2051
|
t === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
2154
2052
|
),
|
|
2155
|
-
background:
|
|
2053
|
+
background: mt(
|
|
2156
2054
|
e,
|
|
2157
2055
|
t === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
2158
2056
|
)
|
|
2159
2057
|
};
|
|
2160
|
-
},
|
|
2058
|
+
}, Wt = ({
|
|
2161
2059
|
name: e,
|
|
2162
2060
|
className: t,
|
|
2163
2061
|
slug: s,
|
|
@@ -2165,26 +2063,26 @@ const Zt = ({
|
|
|
2165
2063
|
children: r,
|
|
2166
2064
|
onClick: o
|
|
2167
2065
|
}) => {
|
|
2168
|
-
const i =
|
|
2066
|
+
const i = R(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } = zr(c), h = `hsl(${u} / 100%)`, g = `hsl(${d} / 10%)`, m = `hsl(${d} / 50%)`;
|
|
2169
2067
|
return z(() => {
|
|
2170
2068
|
if (!l || !i.current) return;
|
|
2171
|
-
const
|
|
2172
|
-
document.querySelectorAll(`[${
|
|
2173
|
-
|
|
2069
|
+
const y = () => {
|
|
2070
|
+
document.querySelectorAll(`[${Te}="${l}"]`).forEach((O) => {
|
|
2071
|
+
O instanceof HTMLElement && (O.dataset.active = "true");
|
|
2174
2072
|
});
|
|
2175
|
-
},
|
|
2176
|
-
document.querySelectorAll(`[${
|
|
2177
|
-
|
|
2073
|
+
}, v = () => {
|
|
2074
|
+
document.querySelectorAll(`[${Te}="${l}"]`).forEach((O) => {
|
|
2075
|
+
O instanceof HTMLElement && (O.dataset.active = "false");
|
|
2178
2076
|
});
|
|
2179
2077
|
}, b = i.current;
|
|
2180
|
-
return b.addEventListener("mouseenter",
|
|
2181
|
-
b.removeEventListener("mouseenter",
|
|
2078
|
+
return b.addEventListener("mouseenter", y), b.addEventListener("mouseleave", v), () => {
|
|
2079
|
+
b.removeEventListener("mouseenter", y), b.removeEventListener("mouseleave", v);
|
|
2182
2080
|
};
|
|
2183
2081
|
}, [l]), /* @__PURE__ */ n.jsx(
|
|
2184
2082
|
"span",
|
|
2185
2083
|
{
|
|
2186
|
-
[
|
|
2187
|
-
className:
|
|
2084
|
+
[Te]: l,
|
|
2085
|
+
className: C(
|
|
2188
2086
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
2189
2087
|
"relative transition-all duration-100 rounded-lg",
|
|
2190
2088
|
"border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
|
|
@@ -2196,31 +2094,31 @@ const Zt = ({
|
|
|
2196
2094
|
ref: i,
|
|
2197
2095
|
onClick: o,
|
|
2198
2096
|
style: {
|
|
2199
|
-
"--param-color":
|
|
2097
|
+
"--param-color": h,
|
|
2200
2098
|
"--border-color": m,
|
|
2201
|
-
"--background-color":
|
|
2099
|
+
"--background-color": g
|
|
2202
2100
|
},
|
|
2203
2101
|
children: r ?? e
|
|
2204
2102
|
}
|
|
2205
2103
|
);
|
|
2206
|
-
},
|
|
2104
|
+
}, Fr = ({
|
|
2207
2105
|
control: e,
|
|
2208
2106
|
url: t
|
|
2209
2107
|
}) => {
|
|
2210
|
-
const { fields: s } =
|
|
2108
|
+
const { fields: s } = De({
|
|
2211
2109
|
control: e,
|
|
2212
2110
|
name: "pathParams"
|
|
2213
2111
|
}), a = [...s].sort(
|
|
2214
2112
|
(r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
|
|
2215
2113
|
);
|
|
2216
|
-
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
2114
|
+
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(qe, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(pe, { children: [
|
|
2217
2115
|
/* @__PURE__ */ n.jsx(
|
|
2218
2116
|
F,
|
|
2219
2117
|
{
|
|
2220
2118
|
control: e,
|
|
2221
2119
|
name: `pathParams.${o}.name`,
|
|
2222
2120
|
render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
|
|
2223
|
-
|
|
2121
|
+
Wt,
|
|
2224
2122
|
{
|
|
2225
2123
|
slug: r.name,
|
|
2226
2124
|
name: r.name,
|
|
@@ -2229,13 +2127,13 @@ const Zt = ({
|
|
|
2229
2127
|
) })
|
|
2230
2128
|
}
|
|
2231
2129
|
),
|
|
2232
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
|
|
2130
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center col-span-2", children: /* @__PURE__ */ n.jsx(
|
|
2233
2131
|
F,
|
|
2234
2132
|
{
|
|
2235
2133
|
control: e,
|
|
2236
2134
|
name: `pathParams.${o}.value`,
|
|
2237
2135
|
render: ({ field: i }) => /* @__PURE__ */ n.jsx(
|
|
2238
|
-
|
|
2136
|
+
ue,
|
|
2239
2137
|
{
|
|
2240
2138
|
...i,
|
|
2241
2139
|
required: !0,
|
|
@@ -2246,17 +2144,17 @@ const Zt = ({
|
|
|
2246
2144
|
}
|
|
2247
2145
|
) })
|
|
2248
2146
|
] }, r.id)) }) });
|
|
2249
|
-
},
|
|
2147
|
+
}, qr = oe(
|
|
2250
2148
|
"input",
|
|
2251
2149
|
"bg-transparent h-9 font-mono text-xs"
|
|
2252
|
-
),
|
|
2150
|
+
), Vr = ({
|
|
2253
2151
|
control: e,
|
|
2254
2152
|
schemaQueryParams: t
|
|
2255
2153
|
}) => {
|
|
2256
|
-
const { fields: s, remove: a, append: r } =
|
|
2154
|
+
const { fields: s, remove: a, append: r } = De({
|
|
2257
2155
|
control: e,
|
|
2258
2156
|
name: "queryParams"
|
|
2259
|
-
}), { setValue: o, getValues: i, watch: l } =
|
|
2157
|
+
}), { setValue: o, getValues: i, watch: l } = ae(), c = l("queryParams");
|
|
2260
2158
|
z(() => {
|
|
2261
2159
|
c.length === 0 && r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
2262
2160
|
}, [c, r]);
|
|
@@ -2265,10 +2163,10 @@ const Zt = ({
|
|
|
2265
2163
|
);
|
|
2266
2164
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2267
2165
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2268
|
-
/* @__PURE__ */ n.jsx(
|
|
2166
|
+
/* @__PURE__ */ n.jsx(An, { size: 16 }),
|
|
2269
2167
|
/* @__PURE__ */ n.jsx(G, { children: "Query Parameters" }),
|
|
2270
2168
|
/* @__PURE__ */ n.jsxs(
|
|
2271
|
-
|
|
2169
|
+
E,
|
|
2272
2170
|
{
|
|
2273
2171
|
onClick: () => {
|
|
2274
2172
|
o("queryParams", [
|
|
@@ -2282,25 +2180,25 @@ const Zt = ({
|
|
|
2282
2180
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
2283
2181
|
children: [
|
|
2284
2182
|
"Add parameter ",
|
|
2285
|
-
/* @__PURE__ */ n.jsx(
|
|
2183
|
+
/* @__PURE__ */ n.jsx(he, { size: 16 })
|
|
2286
2184
|
]
|
|
2287
2185
|
}
|
|
2288
2186
|
)
|
|
2289
2187
|
] }),
|
|
2290
|
-
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(
|
|
2291
|
-
const
|
|
2292
|
-
(m) => m.name === c.at(
|
|
2188
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(qe, { children: s.map((d, h) => {
|
|
2189
|
+
const g = t.find(
|
|
2190
|
+
(m) => m.name === c.at(h)?.name
|
|
2293
2191
|
);
|
|
2294
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2192
|
+
return /* @__PURE__ */ n.jsxs(pe, { children: [
|
|
2295
2193
|
/* @__PURE__ */ n.jsx(
|
|
2296
2194
|
F,
|
|
2297
2195
|
{
|
|
2298
2196
|
control: e,
|
|
2299
|
-
name: `queryParams.${
|
|
2197
|
+
name: `queryParams.${h}.active`,
|
|
2300
2198
|
render: ({ field: m }) => /* @__PURE__ */ n.jsx(
|
|
2301
|
-
|
|
2199
|
+
xe,
|
|
2302
2200
|
{
|
|
2303
|
-
id: `queryParams.${
|
|
2201
|
+
id: `queryParams.${h}.active`,
|
|
2304
2202
|
checked: m.value,
|
|
2305
2203
|
onCheckedChange: m.onChange
|
|
2306
2204
|
}
|
|
@@ -2311,30 +2209,30 @@ const Zt = ({
|
|
|
2311
2209
|
F,
|
|
2312
2210
|
{
|
|
2313
2211
|
control: e,
|
|
2314
|
-
render: ({ field: m }) => u[
|
|
2212
|
+
render: ({ field: m }) => u[h] ? /* @__PURE__ */ n.jsx(qr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
2315
2213
|
"label",
|
|
2316
2214
|
{
|
|
2317
2215
|
className: "flex items-center cursor-pointer gap-1",
|
|
2318
|
-
htmlFor: `queryParams.${
|
|
2319
|
-
title: u[
|
|
2216
|
+
htmlFor: `queryParams.${h}.active`,
|
|
2217
|
+
title: u[h] ? "Required field" : void 0,
|
|
2320
2218
|
children: [
|
|
2321
2219
|
m.value,
|
|
2322
|
-
u[
|
|
2220
|
+
u[h] && /* @__PURE__ */ n.jsx("sup", { children: " *" })
|
|
2323
2221
|
]
|
|
2324
2222
|
}
|
|
2325
2223
|
) }) : /* @__PURE__ */ n.jsx(
|
|
2326
|
-
|
|
2224
|
+
me,
|
|
2327
2225
|
{
|
|
2328
2226
|
placeholder: "Name",
|
|
2329
2227
|
value: m.value,
|
|
2330
|
-
options: t.map((
|
|
2331
|
-
onChange: (
|
|
2332
|
-
m.onChange(
|
|
2228
|
+
options: t.map((y) => y.name),
|
|
2229
|
+
onChange: (y) => {
|
|
2230
|
+
m.onChange(y);
|
|
2333
2231
|
},
|
|
2334
2232
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2335
2233
|
}
|
|
2336
2234
|
),
|
|
2337
|
-
name: `queryParams.${
|
|
2235
|
+
name: `queryParams.${h}.name`
|
|
2338
2236
|
}
|
|
2339
2237
|
),
|
|
2340
2238
|
/* @__PURE__ */ n.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
@@ -2342,48 +2240,48 @@ const Zt = ({
|
|
|
2342
2240
|
F,
|
|
2343
2241
|
{
|
|
2344
2242
|
control: e,
|
|
2345
|
-
render: ({ field: m }) =>
|
|
2346
|
-
|
|
2243
|
+
render: ({ field: m }) => g?.enum && g.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
2244
|
+
me,
|
|
2347
2245
|
{
|
|
2348
2246
|
value: m.value,
|
|
2349
|
-
options:
|
|
2350
|
-
onChange: (
|
|
2351
|
-
m.onChange(
|
|
2247
|
+
options: g.enum ?? [],
|
|
2248
|
+
onChange: (v) => {
|
|
2249
|
+
m.onChange(v), o(`queryParams.${h}.active`, !0);
|
|
2352
2250
|
},
|
|
2353
2251
|
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2354
2252
|
}
|
|
2355
2253
|
) : /* @__PURE__ */ n.jsx(
|
|
2356
|
-
|
|
2254
|
+
ue,
|
|
2357
2255
|
{
|
|
2358
2256
|
...m,
|
|
2359
|
-
onChange: (
|
|
2360
|
-
m.onChange(
|
|
2257
|
+
onChange: (v) => {
|
|
2258
|
+
m.onChange(v.target.value), v.target.value.length > 0 && o(`queryParams.${h}.active`, !0);
|
|
2361
2259
|
},
|
|
2362
2260
|
placeholder: "Value",
|
|
2363
2261
|
"aria-label": "Query parameter value",
|
|
2364
2262
|
className: "w-full border-0 p-0 m-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
2365
2263
|
}
|
|
2366
2264
|
),
|
|
2367
|
-
name: `queryParams.${
|
|
2265
|
+
name: `queryParams.${h}.value`
|
|
2368
2266
|
}
|
|
2369
2267
|
),
|
|
2370
2268
|
/* @__PURE__ */ n.jsx(
|
|
2371
|
-
|
|
2269
|
+
E,
|
|
2372
2270
|
{
|
|
2373
2271
|
size: "icon-xs",
|
|
2374
2272
|
variant: "ghost",
|
|
2375
2273
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
2376
|
-
onClick: () => a(
|
|
2274
|
+
onClick: () => a(h),
|
|
2377
2275
|
type: "button",
|
|
2378
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2276
|
+
children: /* @__PURE__ */ n.jsx(gt, { size: 16 })
|
|
2379
2277
|
}
|
|
2380
2278
|
)
|
|
2381
2279
|
] })
|
|
2382
2280
|
] }, d.id);
|
|
2383
2281
|
}) }) }) })
|
|
2384
2282
|
] });
|
|
2385
|
-
},
|
|
2386
|
-
|
|
2283
|
+
}, Br = Le()(
|
|
2284
|
+
$e(
|
|
2387
2285
|
(e, t) => ({
|
|
2388
2286
|
rememberedIdentity: null,
|
|
2389
2287
|
setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
|
|
@@ -2393,10 +2291,10 @@ const Zt = ({
|
|
|
2393
2291
|
}),
|
|
2394
2292
|
{
|
|
2395
2293
|
name: "identity-storage",
|
|
2396
|
-
storage:
|
|
2294
|
+
storage: xt(() => sessionStorage)
|
|
2397
2295
|
}
|
|
2398
2296
|
)
|
|
2399
|
-
),
|
|
2297
|
+
), _r = ({
|
|
2400
2298
|
path: e,
|
|
2401
2299
|
renderParam: t
|
|
2402
2300
|
}) => {
|
|
@@ -2405,14 +2303,14 @@ const Zt = ({
|
|
|
2405
2303
|
const i = Array.from(a.matchAll(/{([^}]+)}/g)), l = [];
|
|
2406
2304
|
let c = 0;
|
|
2407
2305
|
return i.forEach((u) => {
|
|
2408
|
-
const [d,
|
|
2409
|
-
if (!
|
|
2410
|
-
const
|
|
2411
|
-
|
|
2412
|
-
/* @__PURE__ */ n.jsx(K, { children: a.slice(c,
|
|
2306
|
+
const [d, h] = u;
|
|
2307
|
+
if (!h) return;
|
|
2308
|
+
const g = u.index;
|
|
2309
|
+
g > c && l.push(
|
|
2310
|
+
/* @__PURE__ */ n.jsx(K, { children: a.slice(c, g) }, `text-${c}-${g}`)
|
|
2413
2311
|
), l.push(
|
|
2414
|
-
/* @__PURE__ */ n.jsx(K, { children: t({ name:
|
|
2415
|
-
), c =
|
|
2312
|
+
/* @__PURE__ */ n.jsx(K, { children: t({ name: h, originalValue: d, index: s++ }) }, `param-${h}`)
|
|
2313
|
+
), c = g + d.length;
|
|
2416
2314
|
}), c < a.length && l.push(
|
|
2417
2315
|
/* @__PURE__ */ n.jsx(K, { children: a.slice(c) }, `text-${c}-${a.length}`)
|
|
2418
2316
|
), // eslint-disable-next-line react/no-array-index-key
|
|
@@ -2422,10 +2320,10 @@ const Zt = ({
|
|
|
2422
2320
|
/* @__PURE__ */ n.jsx("wbr", {})
|
|
2423
2321
|
] }, `${a}-${r}`);
|
|
2424
2322
|
});
|
|
2425
|
-
},
|
|
2426
|
-
const { watch: t, setFocus: s } =
|
|
2323
|
+
}, Ur = ({ url: e }) => {
|
|
2324
|
+
const { watch: t, setFocus: s } = ae(), [a] = t(["pathParams"]);
|
|
2427
2325
|
return /* @__PURE__ */ n.jsx(
|
|
2428
|
-
|
|
2326
|
+
_r,
|
|
2429
2327
|
{
|
|
2430
2328
|
path: e,
|
|
2431
2329
|
renderParam: ({ name: r, originalValue: o, index: i }) => {
|
|
@@ -2433,7 +2331,7 @@ const Zt = ({
|
|
|
2433
2331
|
(c) => c.name === r
|
|
2434
2332
|
)?.value;
|
|
2435
2333
|
return /* @__PURE__ */ n.jsx(
|
|
2436
|
-
|
|
2334
|
+
Wt,
|
|
2437
2335
|
{
|
|
2438
2336
|
name: r,
|
|
2439
2337
|
backgroundOpacity: "0",
|
|
@@ -2445,8 +2343,8 @@ const Zt = ({
|
|
|
2445
2343
|
}
|
|
2446
2344
|
}
|
|
2447
2345
|
);
|
|
2448
|
-
},
|
|
2449
|
-
const { watch: e } =
|
|
2346
|
+
}, Mr = () => {
|
|
2347
|
+
const { watch: e } = ae(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ n.jsxs(K, { children: [
|
|
2450
2348
|
a.name,
|
|
2451
2349
|
"=",
|
|
2452
2350
|
encodeURIComponent(a.value).replaceAll("%20", "+"),
|
|
@@ -2457,29 +2355,29 @@ const Zt = ({
|
|
|
2457
2355
|
s.length > 0 ? "?" : "",
|
|
2458
2356
|
s
|
|
2459
2357
|
] });
|
|
2460
|
-
},
|
|
2358
|
+
}, Gr = ({
|
|
2461
2359
|
open: e,
|
|
2462
2360
|
setOpen: t,
|
|
2463
2361
|
onSignUp: s,
|
|
2464
2362
|
onLogin: a
|
|
2465
|
-
}) => /* @__PURE__ */ n.jsx(Ee, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(
|
|
2466
|
-
/* @__PURE__ */ n.jsx(
|
|
2467
|
-
/* @__PURE__ */ n.jsx(
|
|
2468
|
-
/* @__PURE__ */ n.jsxs(
|
|
2469
|
-
/* @__PURE__ */ n.jsx(
|
|
2363
|
+
}) => /* @__PURE__ */ n.jsx(Ee, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
|
|
2364
|
+
/* @__PURE__ */ n.jsx(ke, { children: "Welcome to the Playground!" }),
|
|
2365
|
+
/* @__PURE__ */ n.jsx(jt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2366
|
+
/* @__PURE__ */ n.jsxs(Ct, { className: "flex gap-2 sm:justify-between", children: [
|
|
2367
|
+
/* @__PURE__ */ n.jsx(E, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
|
|
2470
2368
|
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2471
|
-
s && /* @__PURE__ */ n.jsx(
|
|
2472
|
-
a && /* @__PURE__ */ n.jsx(
|
|
2369
|
+
s && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2370
|
+
a && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2473
2371
|
] })
|
|
2474
2372
|
] })
|
|
2475
|
-
] }) }),
|
|
2373
|
+
] }) }), Xt = (e = 0) => {
|
|
2476
2374
|
if (e === 0)
|
|
2477
2375
|
return "0 B";
|
|
2478
2376
|
const t = Math.floor(Math.log(e) / Math.log(1e3));
|
|
2479
2377
|
return `${(e / Math.pow(1e3, t)).toFixed(
|
|
2480
2378
|
t ? 2 : 0
|
|
2481
2379
|
)} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
|
|
2482
|
-
},
|
|
2380
|
+
}, Hr = ({ status: e }) => {
|
|
2483
2381
|
if (!e) return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2484
2382
|
switch (Number(e.toString().slice(0, 1))) {
|
|
2485
2383
|
case 2:
|
|
@@ -2491,21 +2389,21 @@ const Zt = ({
|
|
|
2491
2389
|
default:
|
|
2492
2390
|
return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2493
2391
|
}
|
|
2494
|
-
},
|
|
2495
|
-
const e =
|
|
2392
|
+
}, Qr = () => {
|
|
2393
|
+
const e = R(null), t = R(null), s = R(Date.now()), a = R(null), r = bt(() => {
|
|
2496
2394
|
if (t.current) {
|
|
2497
2395
|
const o = Date.now() - s.current;
|
|
2498
2396
|
t.current.nodeValue = o.toFixed();
|
|
2499
2397
|
}
|
|
2500
2398
|
a.current = requestAnimationFrame(r);
|
|
2501
2399
|
}, []);
|
|
2502
|
-
return
|
|
2400
|
+
return Zn(() => {
|
|
2503
2401
|
const o = document.createTextNode("0"), i = e.current;
|
|
2504
2402
|
return i.appendChild(o), t.current = o, s.current = Date.now(), a.current = requestAnimationFrame(r), () => {
|
|
2505
2403
|
a.current && cancelAnimationFrame(a.current), t.current && i.contains(o) && i.removeChild(o);
|
|
2506
2404
|
};
|
|
2507
2405
|
}, [r]), /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
|
|
2508
|
-
},
|
|
2406
|
+
}, Jr = ({
|
|
2509
2407
|
status: e,
|
|
2510
2408
|
time: t,
|
|
2511
2409
|
size: s,
|
|
@@ -2526,7 +2424,7 @@ const Zt = ({
|
|
|
2526
2424
|
};
|
|
2527
2425
|
return /* @__PURE__ */ n.jsxs("div", { className: "relative flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2528
2426
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2529
|
-
/* @__PURE__ */ n.jsx(
|
|
2427
|
+
/* @__PURE__ */ n.jsx(Hr, { status: e }),
|
|
2530
2428
|
" ",
|
|
2531
2429
|
e ?? "Sending Request...",
|
|
2532
2430
|
e ? ` ${o[e]}` : ""
|
|
@@ -2535,12 +2433,12 @@ const Zt = ({
|
|
|
2535
2433
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2536
2434
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2537
2435
|
" ",
|
|
2538
|
-
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ?
|
|
2436
|
+
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? Xt(s) : "- B" })
|
|
2539
2437
|
] }),
|
|
2540
2438
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2541
2439
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2542
2440
|
" ",
|
|
2543
|
-
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(
|
|
2441
|
+
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(Qr, {}),
|
|
2544
2442
|
"ms"
|
|
2545
2443
|
] })
|
|
2546
2444
|
] }),
|
|
@@ -2556,42 +2454,42 @@ const Zt = ({
|
|
|
2556
2454
|
)
|
|
2557
2455
|
] });
|
|
2558
2456
|
};
|
|
2559
|
-
function
|
|
2457
|
+
function Be(e) {
|
|
2560
2458
|
if (e === null) return "null";
|
|
2561
2459
|
if (Array.isArray(e)) {
|
|
2562
2460
|
if (e.length === 0) return "any[]";
|
|
2563
2461
|
const t = e[0];
|
|
2564
|
-
return t === void 0 ? "any[]" : `${
|
|
2462
|
+
return t === void 0 ? "any[]" : `${Be(t)}[]`;
|
|
2565
2463
|
}
|
|
2566
|
-
return typeof e == "object" ?
|
|
2464
|
+
return typeof e == "object" ? Wr(e) : typeof e;
|
|
2567
2465
|
}
|
|
2568
|
-
function
|
|
2466
|
+
function Wr(e, t = "") {
|
|
2569
2467
|
const s = ["{"];
|
|
2570
2468
|
for (const [a, r] of Object.entries(e)) {
|
|
2571
|
-
const o =
|
|
2469
|
+
const o = Be(r);
|
|
2572
2470
|
s.push(` ${a}: ${o};`);
|
|
2573
2471
|
}
|
|
2574
2472
|
return s.push("}"), s.join(`
|
|
2575
2473
|
`);
|
|
2576
2474
|
}
|
|
2577
|
-
function
|
|
2578
|
-
return { lines: [`type GeneratedType = ${
|
|
2475
|
+
function Xr(e) {
|
|
2476
|
+
return { lines: [`type GeneratedType = ${Be(e)};`] };
|
|
2579
2477
|
}
|
|
2580
|
-
const
|
|
2478
|
+
const Zt = ({
|
|
2581
2479
|
code: e,
|
|
2582
2480
|
language: t,
|
|
2583
2481
|
children: s
|
|
2584
2482
|
}) => {
|
|
2585
|
-
const { syntaxHighlighting: a } =
|
|
2586
|
-
return
|
|
2483
|
+
const { syntaxHighlighting: a } = Mn().options;
|
|
2484
|
+
return Wn(a?.highlighter, "Highlighter not found"), ws(
|
|
2587
2485
|
a.highlighter,
|
|
2588
2486
|
e ?? s ?? "",
|
|
2589
2487
|
t,
|
|
2590
2488
|
a.themes
|
|
2591
2489
|
);
|
|
2592
2490
|
};
|
|
2593
|
-
|
|
2594
|
-
const
|
|
2491
|
+
Zt.displayName = "Highlight";
|
|
2492
|
+
const Zr = (e) => Object.entries({
|
|
2595
2493
|
"application/json": "json",
|
|
2596
2494
|
"text/json": "json",
|
|
2597
2495
|
"text/html": "html",
|
|
@@ -2601,16 +2499,16 @@ const na = (e) => Object.entries({
|
|
|
2601
2499
|
"application/xhtml+xml": "xhtml"
|
|
2602
2500
|
}).find(
|
|
2603
2501
|
([s]) => e.includes(s)
|
|
2604
|
-
)?.[1],
|
|
2502
|
+
)?.[1], Yr = (e) => {
|
|
2605
2503
|
const t = e.find(([s]) => s.toLowerCase() === "content-type")?.[1] || "";
|
|
2606
|
-
return
|
|
2607
|
-
},
|
|
2504
|
+
return Zr(t);
|
|
2505
|
+
}, Kr = (e) => {
|
|
2608
2506
|
try {
|
|
2609
2507
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2610
2508
|
} catch {
|
|
2611
2509
|
return null;
|
|
2612
2510
|
}
|
|
2613
|
-
},
|
|
2511
|
+
}, ea = (e) => {
|
|
2614
2512
|
const t = [
|
|
2615
2513
|
"Content-Type",
|
|
2616
2514
|
"Content-Length",
|
|
@@ -2624,10 +2522,10 @@ const na = (e) => Object.entries({
|
|
|
2624
2522
|
const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
|
|
2625
2523
|
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
2626
2524
|
});
|
|
2627
|
-
}, Y = 3,
|
|
2525
|
+
}, Y = 3, Ae = oe(
|
|
2628
2526
|
"div",
|
|
2629
2527
|
"grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
|
|
2630
|
-
), X =
|
|
2528
|
+
), X = oe("div", "py-1 break-all"), ta = ({
|
|
2631
2529
|
body: e = "",
|
|
2632
2530
|
headers: t,
|
|
2633
2531
|
request: s,
|
|
@@ -2636,66 +2534,66 @@ const na = (e) => Object.entries({
|
|
|
2636
2534
|
fileName: o,
|
|
2637
2535
|
blob: i
|
|
2638
2536
|
}) => {
|
|
2639
|
-
const l =
|
|
2537
|
+
const l = Yr(t), c = Kr(e), u = c || e, [d, h] = k(
|
|
2640
2538
|
c ? "formatted" : "raw"
|
|
2641
|
-
),
|
|
2539
|
+
), g = Gn({
|
|
2642
2540
|
queryKey: ["types", u],
|
|
2643
|
-
queryFn: async () =>
|
|
2541
|
+
queryFn: async () => Xr(JSON.parse(u)),
|
|
2644
2542
|
enabled: d === "types" && !r
|
|
2645
2543
|
}), m = () => {
|
|
2646
2544
|
if (i && o) {
|
|
2647
|
-
const
|
|
2648
|
-
b.href =
|
|
2545
|
+
const v = URL.createObjectURL(i), b = document.createElement("a");
|
|
2546
|
+
b.href = v, b.download = o, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(v);
|
|
2649
2547
|
}
|
|
2650
|
-
},
|
|
2548
|
+
}, y = ea([...t]);
|
|
2651
2549
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2652
2550
|
/* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2653
2551
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2654
|
-
/* @__PURE__ */ n.jsx(
|
|
2552
|
+
/* @__PURE__ */ n.jsx(On, { size: 16 }),
|
|
2655
2553
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Request" })
|
|
2656
2554
|
] }),
|
|
2657
|
-
/* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: s.headers.slice(0, Y).map(([
|
|
2658
|
-
/* @__PURE__ */ n.jsx(X, { children:
|
|
2555
|
+
/* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: s.headers.slice(0, Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
|
|
2556
|
+
/* @__PURE__ */ n.jsx(X, { children: v }),
|
|
2659
2557
|
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2660
|
-
] },
|
|
2558
|
+
] }, v)) }) })
|
|
2661
2559
|
] }),
|
|
2662
2560
|
/* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2663
2561
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2664
|
-
/* @__PURE__ */ n.jsx(
|
|
2562
|
+
/* @__PURE__ */ n.jsx(Pn, { size: 16 }),
|
|
2665
2563
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Response" })
|
|
2666
2564
|
] }),
|
|
2667
2565
|
/* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: [
|
|
2668
|
-
|
|
2669
|
-
/* @__PURE__ */ n.jsx(X, { children:
|
|
2566
|
+
y.slice(0, Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
|
|
2567
|
+
/* @__PURE__ */ n.jsx(X, { children: v }),
|
|
2670
2568
|
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2671
|
-
] },
|
|
2672
|
-
|
|
2673
|
-
/* @__PURE__ */ n.jsxs(
|
|
2569
|
+
] }, v)),
|
|
2570
|
+
y.length > Y && /* @__PURE__ */ n.jsxs(q, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2571
|
+
/* @__PURE__ */ n.jsxs(qt, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2674
2572
|
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
2675
2573
|
"Show ",
|
|
2676
|
-
|
|
2574
|
+
y.length - Y,
|
|
2677
2575
|
" more headers"
|
|
2678
2576
|
] }),
|
|
2679
|
-
/* @__PURE__ */ n.jsx(
|
|
2577
|
+
/* @__PURE__ */ n.jsx(he, { size: 12, className: "text-muted-foreground" })
|
|
2680
2578
|
] }),
|
|
2681
|
-
/* @__PURE__ */ n.jsx(V, { className: "col-span-full grid grid-cols-subgrid", children:
|
|
2682
|
-
/* @__PURE__ */ n.jsx(X, { children:
|
|
2579
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-full grid grid-cols-subgrid", children: y.slice(Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
|
|
2580
|
+
/* @__PURE__ */ n.jsx(X, { children: v }),
|
|
2683
2581
|
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2684
|
-
] },
|
|
2582
|
+
] }, v)) })
|
|
2685
2583
|
] })
|
|
2686
2584
|
] }) })
|
|
2687
2585
|
] }),
|
|
2688
2586
|
/* @__PURE__ */ n.jsx("div", { className: "flex gap-2 justify-between items-center border-b h-10", children: c && !r && /* @__PURE__ */ n.jsx("div", { className: "px-2", children: /* @__PURE__ */ n.jsxs(
|
|
2689
|
-
|
|
2587
|
+
wt,
|
|
2690
2588
|
{
|
|
2691
2589
|
value: d,
|
|
2692
|
-
onValueChange: (
|
|
2590
|
+
onValueChange: (v) => h(v),
|
|
2693
2591
|
children: [
|
|
2694
|
-
/* @__PURE__ */ n.jsx(
|
|
2695
|
-
/* @__PURE__ */ n.jsxs(
|
|
2696
|
-
/* @__PURE__ */ n.jsx(
|
|
2697
|
-
/* @__PURE__ */ n.jsx(
|
|
2698
|
-
/* @__PURE__ */ n.jsx(
|
|
2592
|
+
/* @__PURE__ */ n.jsx(Nt, { className: "min-w-32 border-none h-8", children: /* @__PURE__ */ n.jsx(St, { placeholder: "View" }) }),
|
|
2593
|
+
/* @__PURE__ */ n.jsxs(Tt, { children: [
|
|
2594
|
+
/* @__PURE__ */ n.jsx(le, { value: "formatted", children: "Formatted" }),
|
|
2595
|
+
/* @__PURE__ */ n.jsx(le, { value: "raw", children: "Raw" }),
|
|
2596
|
+
/* @__PURE__ */ n.jsx(le, { value: "types", children: "Types" })
|
|
2699
2597
|
] })
|
|
2700
2598
|
]
|
|
2701
2599
|
}
|
|
@@ -2704,31 +2602,31 @@ const na = (e) => Object.entries({
|
|
|
2704
2602
|
/* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2705
2603
|
/* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2706
2604
|
/* @__PURE__ */ n.jsxs(
|
|
2707
|
-
|
|
2605
|
+
E,
|
|
2708
2606
|
{
|
|
2709
2607
|
onClick: m,
|
|
2710
2608
|
className: "flex items-center gap-2",
|
|
2711
2609
|
disabled: !i,
|
|
2712
2610
|
children: [
|
|
2713
|
-
/* @__PURE__ */ n.jsx(
|
|
2611
|
+
/* @__PURE__ */ n.jsx(Rn, { className: "h-4 w-4" }),
|
|
2714
2612
|
"Download ",
|
|
2715
2613
|
o || "file",
|
|
2716
2614
|
" (",
|
|
2717
|
-
|
|
2615
|
+
Xt(a),
|
|
2718
2616
|
")"
|
|
2719
2617
|
]
|
|
2720
2618
|
}
|
|
2721
2619
|
)
|
|
2722
2620
|
] }) }) : /* @__PURE__ */ n.jsx("div", { className: "overflow-auto max-w-full p-4 text-xs max-h-[calc(83.333vh-180px)]", children: /* @__PURE__ */ n.jsx(
|
|
2723
|
-
|
|
2621
|
+
Zt,
|
|
2724
2622
|
{
|
|
2725
2623
|
language: d === "types" ? "typescript" : d === "raw" ? c ? "plain" : l : "json",
|
|
2726
|
-
code: (d === "raw" ? e : d === "types" ?
|
|
2624
|
+
code: (d === "raw" ? e : d === "types" ? g.data?.lines.join(`
|
|
2727
2625
|
`) : u) ?? ""
|
|
2728
2626
|
}
|
|
2729
2627
|
) }) })
|
|
2730
2628
|
] });
|
|
2731
|
-
},
|
|
2629
|
+
}, na = ({
|
|
2732
2630
|
queryMutation: e,
|
|
2733
2631
|
showLongRunningWarning: t,
|
|
2734
2632
|
onCancel: s,
|
|
@@ -2737,7 +2635,7 @@ const na = (e) => Object.entries({
|
|
|
2737
2635
|
progress: o
|
|
2738
2636
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2739
2637
|
(e.isPending || e.data) && /* @__PURE__ */ n.jsx(
|
|
2740
|
-
|
|
2638
|
+
Jr,
|
|
2741
2639
|
{
|
|
2742
2640
|
status: e.data?.status,
|
|
2743
2641
|
time: e.data?.time,
|
|
@@ -2746,12 +2644,12 @@ const na = (e) => Object.entries({
|
|
|
2746
2644
|
progress: o
|
|
2747
2645
|
}
|
|
2748
2646
|
),
|
|
2749
|
-
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(
|
|
2750
|
-
/* @__PURE__ */ n.jsx(
|
|
2751
|
-
/* @__PURE__ */ n.jsx(
|
|
2752
|
-
/* @__PURE__ */ n.jsx(
|
|
2647
|
+
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(rs, { children: [
|
|
2648
|
+
/* @__PURE__ */ n.jsx(Ln, { size: 24, strokeWidth: 1.5, className: "me-5" }),
|
|
2649
|
+
/* @__PURE__ */ n.jsx(as, { children: "Request failed" }),
|
|
2650
|
+
/* @__PURE__ */ n.jsx(os, { children: e.error.message || String(e.error) || "Unexpected error" })
|
|
2753
2651
|
] }) }) : e.data ? /* @__PURE__ */ n.jsx(
|
|
2754
|
-
|
|
2652
|
+
ta,
|
|
2755
2653
|
{
|
|
2756
2654
|
request: e.data.request,
|
|
2757
2655
|
size: e.data.size,
|
|
@@ -2762,18 +2660,18 @@ const na = (e) => Object.entries({
|
|
|
2762
2660
|
blob: e.data.blob
|
|
2763
2661
|
}
|
|
2764
2662
|
) : e.isPending ? /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2765
|
-
/* @__PURE__ */ n.jsx(
|
|
2663
|
+
/* @__PURE__ */ n.jsx(ns, {}),
|
|
2766
2664
|
/* @__PURE__ */ n.jsxs(
|
|
2767
2665
|
"div",
|
|
2768
2666
|
{
|
|
2769
|
-
className:
|
|
2667
|
+
className: C(
|
|
2770
2668
|
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2771
2669
|
t && "opacity-100 pointer-events-auto"
|
|
2772
2670
|
),
|
|
2773
2671
|
children: [
|
|
2774
2672
|
"Looks like the request is taking longer than expected.",
|
|
2775
2673
|
/* @__PURE__ */ n.jsx(
|
|
2776
|
-
|
|
2674
|
+
ne,
|
|
2777
2675
|
{
|
|
2778
2676
|
type: "button",
|
|
2779
2677
|
onClick: s,
|
|
@@ -2788,7 +2686,7 @@ const na = (e) => Object.entries({
|
|
|
2788
2686
|
)
|
|
2789
2687
|
] }) }) : /* @__PURE__ */ n.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
|
|
2790
2688
|
/* @__PURE__ */ n.jsx(
|
|
2791
|
-
|
|
2689
|
+
$n,
|
|
2792
2690
|
{
|
|
2793
2691
|
size: 64,
|
|
2794
2692
|
className: "text-muted-foreground",
|
|
@@ -2798,18 +2696,18 @@ const na = (e) => Object.entries({
|
|
|
2798
2696
|
/* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
|
|
2799
2697
|
a
|
|
2800
2698
|
] }) })
|
|
2801
|
-
] }),
|
|
2802
|
-
|
|
2699
|
+
] }), sa = Le()(
|
|
2700
|
+
$e(
|
|
2803
2701
|
(e) => ({
|
|
2804
2702
|
skipLogin: !1,
|
|
2805
2703
|
setSkipLogin: (t) => e({ skipLogin: t })
|
|
2806
2704
|
}),
|
|
2807
2705
|
{
|
|
2808
2706
|
name: "remember-skip-login",
|
|
2809
|
-
storage:
|
|
2707
|
+
storage: xt(() => sessionStorage)
|
|
2810
2708
|
}
|
|
2811
2709
|
)
|
|
2812
|
-
),
|
|
2710
|
+
), te = "__none", ra = ({
|
|
2813
2711
|
server: e,
|
|
2814
2712
|
servers: t = [],
|
|
2815
2713
|
url: s,
|
|
@@ -2821,20 +2719,22 @@ const na = (e) => Object.entries({
|
|
|
2821
2719
|
examples: c,
|
|
2822
2720
|
requiresLogin: u = !1,
|
|
2823
2721
|
onLogin: d,
|
|
2824
|
-
onSignUp:
|
|
2722
|
+
onSignUp: h
|
|
2825
2723
|
}) => {
|
|
2826
|
-
const { selectedServer:
|
|
2827
|
-
t.map((
|
|
2828
|
-
), [
|
|
2829
|
-
|
|
2830
|
-
}),
|
|
2724
|
+
const { selectedServer: g, setSelectedServer: m } = vr(
|
|
2725
|
+
t.map((p) => ({ url: p }))
|
|
2726
|
+
), [y, v] = k(!1), b = Hn(), { setRememberedIdentity: O, getRememberedIdentity: f } = Br(), [, j] = Yn(), { skipLogin: $, setSkipLogin: S } = sa(), [D, P] = k(!1), Q = R(void 0), Ue = ms(O), Me = R(null), { label: sn } = xr("meta+enter", () => {
|
|
2727
|
+
Me.current?.requestSubmit();
|
|
2728
|
+
}), Ge = s.match(/\{([^}]+)\}/g)?.map((p) => p.slice(1, -1)) ?? [], He = [...i].sort(
|
|
2729
|
+
(p, W) => Ge.indexOf(p.name) - Ge.indexOf(W.name)
|
|
2730
|
+
), { register: rn, control: ie, handleSubmit: Qe, watch: Je, setValue: ye, ...ve } = cs({
|
|
2831
2731
|
defaultValues: {
|
|
2832
2732
|
body: l,
|
|
2833
|
-
queryParams: o.length > 0 ? o.map((
|
|
2834
|
-
name:
|
|
2835
|
-
value:
|
|
2836
|
-
active:
|
|
2837
|
-
enum:
|
|
2733
|
+
queryParams: o.length > 0 ? o.map((p) => ({
|
|
2734
|
+
name: p.name,
|
|
2735
|
+
value: p.defaultValue ?? "",
|
|
2736
|
+
active: p.defaultActive ?? !1,
|
|
2737
|
+
enum: p.enum ?? []
|
|
2838
2738
|
})) : [
|
|
2839
2739
|
{
|
|
2840
2740
|
name: "",
|
|
@@ -2843,14 +2743,14 @@ const na = (e) => Object.entries({
|
|
|
2843
2743
|
enum: []
|
|
2844
2744
|
}
|
|
2845
2745
|
],
|
|
2846
|
-
pathParams:
|
|
2847
|
-
name:
|
|
2848
|
-
value:
|
|
2746
|
+
pathParams: He.map((p) => ({
|
|
2747
|
+
name: p.name,
|
|
2748
|
+
value: p.defaultValue ?? ""
|
|
2849
2749
|
})),
|
|
2850
|
-
headers: r.length > 0 ? r.map((
|
|
2851
|
-
name:
|
|
2852
|
-
value:
|
|
2853
|
-
active:
|
|
2750
|
+
headers: r.length > 0 ? r.map((p) => ({
|
|
2751
|
+
name: p.name,
|
|
2752
|
+
value: p.defaultValue ?? "",
|
|
2753
|
+
active: p.defaultActive ?? !1
|
|
2854
2754
|
})) : [
|
|
2855
2755
|
{
|
|
2856
2756
|
name: "",
|
|
@@ -2858,135 +2758,135 @@ const na = (e) => Object.entries({
|
|
|
2858
2758
|
active: !1
|
|
2859
2759
|
}
|
|
2860
2760
|
],
|
|
2861
|
-
identity:
|
|
2862
|
-
|
|
2863
|
-
...b.data?.map((
|
|
2761
|
+
identity: f([
|
|
2762
|
+
te,
|
|
2763
|
+
...b.data?.map((p) => p.id) ?? []
|
|
2864
2764
|
])
|
|
2865
2765
|
}
|
|
2866
|
-
}),
|
|
2867
|
-
() => b.data?.find((
|
|
2868
|
-
[b.data,
|
|
2766
|
+
}), J = Je("identity"), an = vt(
|
|
2767
|
+
() => b.data?.find((p) => p.id === J)?.authorizationFields,
|
|
2768
|
+
[b.data, J]
|
|
2869
2769
|
);
|
|
2870
2770
|
z(() => {
|
|
2871
|
-
|
|
2872
|
-
}, [
|
|
2873
|
-
const B =
|
|
2771
|
+
J && Ue.current(J);
|
|
2772
|
+
}, [Ue, J]);
|
|
2773
|
+
const B = is({
|
|
2874
2774
|
gcTime: 0,
|
|
2875
|
-
mutationFn: async (
|
|
2876
|
-
const
|
|
2877
|
-
...
|
|
2775
|
+
mutationFn: async (p) => {
|
|
2776
|
+
const W = performance.now(), fn = Object.fromEntries([
|
|
2777
|
+
...p.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value])
|
|
2878
2778
|
]), _ = new Request(
|
|
2879
|
-
|
|
2779
|
+
ut(e ?? g, s, p),
|
|
2880
2780
|
{
|
|
2881
2781
|
method: a.toUpperCase(),
|
|
2882
|
-
headers:
|
|
2883
|
-
body:
|
|
2782
|
+
headers: fn,
|
|
2783
|
+
body: p.body ? p.body : void 0
|
|
2884
2784
|
}
|
|
2885
2785
|
);
|
|
2886
|
-
|
|
2887
|
-
const
|
|
2786
|
+
p.identity !== te && await b.data?.find((T) => T.id === p.identity)?.authorizeRequest(_);
|
|
2787
|
+
const be = setTimeout(
|
|
2888
2788
|
() => P(!0),
|
|
2889
2789
|
3210
|
|
2890
2790
|
);
|
|
2891
|
-
|
|
2892
|
-
clearTimeout(
|
|
2791
|
+
Q.current = new AbortController(), Q.current.signal.addEventListener("abort", () => {
|
|
2792
|
+
clearTimeout(be);
|
|
2893
2793
|
});
|
|
2894
2794
|
try {
|
|
2895
|
-
const
|
|
2795
|
+
const T = await fetch(_, {
|
|
2896
2796
|
cache: "no-store",
|
|
2897
|
-
signal:
|
|
2797
|
+
signal: Q.current.signal
|
|
2898
2798
|
});
|
|
2899
|
-
clearTimeout(
|
|
2900
|
-
const
|
|
2901
|
-
let
|
|
2902
|
-
|
|
2903
|
-
const
|
|
2799
|
+
clearTimeout(be), P(!1);
|
|
2800
|
+
const gn = performance.now() - W, xn = new URL(_.url), Ze = Array.from(T.headers.entries()), Ye = T.headers.get("content-type") || "", Ke = Pr(Ye);
|
|
2801
|
+
let ce = "", et, tt;
|
|
2802
|
+
Ke ? (et = await T.blob(), tt = Rr(Ze, _.url), ce = `Binary content (${Ye})`) : ce = await T.text();
|
|
2803
|
+
const nt = T.headers.get("content-length");
|
|
2904
2804
|
return {
|
|
2905
|
-
status:
|
|
2906
|
-
headers:
|
|
2907
|
-
size:
|
|
2908
|
-
body:
|
|
2909
|
-
time:
|
|
2910
|
-
isBinary:
|
|
2911
|
-
fileName:
|
|
2912
|
-
blob:
|
|
2805
|
+
status: T.status,
|
|
2806
|
+
headers: Ze,
|
|
2807
|
+
size: nt ? parseInt(nt) : ce.length,
|
|
2808
|
+
body: ce,
|
|
2809
|
+
time: gn,
|
|
2810
|
+
isBinary: Ke,
|
|
2811
|
+
fileName: tt,
|
|
2812
|
+
blob: et,
|
|
2913
2813
|
request: {
|
|
2914
2814
|
method: _.method.toUpperCase(),
|
|
2915
2815
|
url: _.url,
|
|
2916
2816
|
headers: [
|
|
2917
|
-
["Host",
|
|
2817
|
+
["Host", xn.host],
|
|
2918
2818
|
["User-Agent", "Zudoku Playground"],
|
|
2919
2819
|
...Array.from(_.headers.entries())
|
|
2920
2820
|
],
|
|
2921
|
-
body:
|
|
2821
|
+
body: p.body ? p.body : void 0
|
|
2922
2822
|
}
|
|
2923
2823
|
};
|
|
2924
|
-
} catch (
|
|
2925
|
-
throw clearTimeout(
|
|
2824
|
+
} catch (T) {
|
|
2825
|
+
throw clearTimeout(be), P(!1), T instanceof TypeError ? new Error(
|
|
2926
2826
|
"The request failed, possibly due to network issues or CORS policy."
|
|
2927
|
-
) :
|
|
2827
|
+
) : T;
|
|
2928
2828
|
}
|
|
2929
2829
|
}
|
|
2930
|
-
}),
|
|
2830
|
+
}), We = B.isPending, [on, cn] = k(!1);
|
|
2931
2831
|
z(() => {
|
|
2932
|
-
const
|
|
2933
|
-
return () => clearTimeout(
|
|
2934
|
-
}, [
|
|
2935
|
-
const { isFinished:
|
|
2832
|
+
const p = setTimeout(() => cn(We), 100);
|
|
2833
|
+
return () => clearTimeout(p);
|
|
2834
|
+
}, [We]);
|
|
2835
|
+
const { isFinished: ln, progress: dn } = ss({ isAnimating: on });
|
|
2936
2836
|
z(() => () => {
|
|
2937
|
-
|
|
2837
|
+
Q.current?.abort();
|
|
2938
2838
|
}, []);
|
|
2939
|
-
const
|
|
2940
|
-
|
|
2839
|
+
const un = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
|
|
2840
|
+
wt,
|
|
2941
2841
|
{
|
|
2942
|
-
onValueChange: (
|
|
2943
|
-
|
|
2842
|
+
onValueChange: (p) => {
|
|
2843
|
+
j(() => m(p));
|
|
2944
2844
|
},
|
|
2945
|
-
value:
|
|
2946
|
-
defaultValue:
|
|
2845
|
+
value: g,
|
|
2846
|
+
defaultValue: g,
|
|
2947
2847
|
children: [
|
|
2948
|
-
/* @__PURE__ */ n.jsx(
|
|
2949
|
-
/* @__PURE__ */ n.jsx(
|
|
2848
|
+
/* @__PURE__ */ n.jsx(Nt, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(St, {}) }),
|
|
2849
|
+
/* @__PURE__ */ n.jsx(Tt, { children: t.map((p) => /* @__PURE__ */ n.jsx(le, { value: p, children: p.replace(/^https?:\/\//, "").replace(/\/$/, "") }, p)) })
|
|
2950
2850
|
]
|
|
2951
2851
|
}
|
|
2952
|
-
) }),
|
|
2852
|
+
) }), mn = u && !$, pn = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2953
2853
|
a.toUpperCase()
|
|
2954
|
-
), [
|
|
2854
|
+
), [Xe, hn] = us();
|
|
2955
2855
|
return /* @__PURE__ */ n.jsx(
|
|
2956
|
-
|
|
2856
|
+
ls,
|
|
2957
2857
|
{
|
|
2958
|
-
register:
|
|
2959
|
-
control:
|
|
2960
|
-
handleSubmit:
|
|
2961
|
-
watch:
|
|
2962
|
-
setValue:
|
|
2963
|
-
...
|
|
2964
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2858
|
+
register: rn,
|
|
2859
|
+
control: ie,
|
|
2860
|
+
handleSubmit: Qe,
|
|
2861
|
+
watch: Je,
|
|
2862
|
+
setValue: ye,
|
|
2863
|
+
...ve,
|
|
2864
|
+
children: /* @__PURE__ */ n.jsx(ds, { delayDuration: 150, children: /* @__PURE__ */ n.jsxs(
|
|
2965
2865
|
"form",
|
|
2966
2866
|
{
|
|
2967
|
-
ref:
|
|
2968
|
-
onSubmit:
|
|
2969
|
-
b.data?.length === 0 ||
|
|
2867
|
+
ref: Me,
|
|
2868
|
+
onSubmit: Qe((p) => {
|
|
2869
|
+
b.data?.length === 0 || p.identity ? B.mutate(p) : v(!0);
|
|
2970
2870
|
}),
|
|
2971
2871
|
className: "relative",
|
|
2972
2872
|
children: [
|
|
2973
2873
|
/* @__PURE__ */ n.jsx(
|
|
2974
|
-
|
|
2874
|
+
Dr,
|
|
2975
2875
|
{
|
|
2976
2876
|
identities: b.data ?? [],
|
|
2977
|
-
open:
|
|
2978
|
-
onOpenChange:
|
|
2979
|
-
onSubmit: ({ rememberedIdentity:
|
|
2980
|
-
|
|
2877
|
+
open: y,
|
|
2878
|
+
onOpenChange: v,
|
|
2879
|
+
onSubmit: ({ rememberedIdentity: p, identity: W }) => {
|
|
2880
|
+
p && ye("identity", W ?? te), v(!1), B.mutate({ ...ve.getValues(), identity: W });
|
|
2981
2881
|
}
|
|
2982
2882
|
}
|
|
2983
2883
|
),
|
|
2984
2884
|
/* @__PURE__ */ n.jsx(
|
|
2985
|
-
|
|
2885
|
+
Gr,
|
|
2986
2886
|
{
|
|
2987
|
-
open:
|
|
2988
|
-
setOpen: (
|
|
2989
|
-
onSignUp:
|
|
2887
|
+
open: mn,
|
|
2888
|
+
setOpen: (p) => S(!p),
|
|
2889
|
+
onSignUp: h,
|
|
2990
2890
|
onLogin: d
|
|
2991
2891
|
}
|
|
2992
2892
|
),
|
|
@@ -2995,42 +2895,42 @@ const na = (e) => Object.entries({
|
|
|
2995
2895
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
2996
2896
|
/* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
2997
2897
|
/* @__PURE__ */ n.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
|
|
2998
|
-
|
|
2999
|
-
/* @__PURE__ */ n.jsx(
|
|
3000
|
-
/* @__PURE__ */ n.jsx(
|
|
2898
|
+
un,
|
|
2899
|
+
/* @__PURE__ */ n.jsx(Ur, { url: s }),
|
|
2900
|
+
/* @__PURE__ */ n.jsx(Mr, {})
|
|
3001
2901
|
] }) }),
|
|
3002
2902
|
/* @__PURE__ */ n.jsx("div", { className: "px-1", children: /* @__PURE__ */ n.jsx(
|
|
3003
|
-
|
|
2903
|
+
E,
|
|
3004
2904
|
{
|
|
3005
2905
|
type: "button",
|
|
3006
2906
|
onClick: () => {
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
e ??
|
|
2907
|
+
hn(
|
|
2908
|
+
ut(
|
|
2909
|
+
e ?? g,
|
|
3010
2910
|
s,
|
|
3011
|
-
|
|
2911
|
+
ve.getValues()
|
|
3012
2912
|
).toString()
|
|
3013
2913
|
);
|
|
3014
2914
|
},
|
|
3015
2915
|
variant: "ghost",
|
|
3016
2916
|
size: "icon-xs",
|
|
3017
|
-
className:
|
|
2917
|
+
className: C(
|
|
3018
2918
|
"hover:opacity-100 transition",
|
|
3019
|
-
|
|
2919
|
+
Xe ? "text-emerald-600 opacity-100" : "opacity-50"
|
|
3020
2920
|
),
|
|
3021
|
-
children:
|
|
2921
|
+
children: Xe ? /* @__PURE__ */ n.jsx(ft, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ n.jsx(En, { size: 14 })
|
|
3022
2922
|
}
|
|
3023
2923
|
) })
|
|
3024
2924
|
] }),
|
|
3025
2925
|
/* @__PURE__ */ n.jsx(
|
|
3026
|
-
|
|
2926
|
+
E,
|
|
3027
2927
|
{
|
|
3028
2928
|
type: "submit",
|
|
3029
2929
|
variant: B.isPending ? "destructive" : "default",
|
|
3030
|
-
onClick: (
|
|
3031
|
-
B.isPending && (
|
|
2930
|
+
onClick: (p) => {
|
|
2931
|
+
B.isPending && (Q.current?.abort(
|
|
3032
2932
|
"Request cancelled by user"
|
|
3033
|
-
),
|
|
2933
|
+
), p.preventDefault());
|
|
3034
2934
|
},
|
|
3035
2935
|
className: "w-18",
|
|
3036
2936
|
children: B.isPending ? "Cancel" : "Send"
|
|
@@ -3040,53 +2940,53 @@ const na = (e) => Object.entries({
|
|
|
3040
2940
|
/* @__PURE__ */ n.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
|
|
3041
2941
|
b.data?.length !== 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
3042
2942
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
3043
|
-
/* @__PURE__ */ n.jsx(
|
|
2943
|
+
/* @__PURE__ */ n.jsx(In, { size: 16 }),
|
|
3044
2944
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Authentication" })
|
|
3045
2945
|
] }),
|
|
3046
2946
|
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
|
|
3047
|
-
|
|
2947
|
+
Jt,
|
|
3048
2948
|
{
|
|
3049
|
-
value:
|
|
2949
|
+
value: J,
|
|
3050
2950
|
identities: b.data ?? [],
|
|
3051
|
-
setValue: (
|
|
2951
|
+
setValue: (p) => ye("identity", p)
|
|
3052
2952
|
}
|
|
3053
2953
|
) })
|
|
3054
2954
|
] }),
|
|
3055
|
-
|
|
2955
|
+
He.length > 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
3056
2956
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
3057
|
-
/* @__PURE__ */ n.jsx(
|
|
2957
|
+
/* @__PURE__ */ n.jsx(kn, { size: 16 }),
|
|
3058
2958
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Path Parameters" })
|
|
3059
2959
|
] }),
|
|
3060
|
-
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
|
|
2960
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(Fr, { url: s, control: ie }) })
|
|
3061
2961
|
] }),
|
|
3062
|
-
/* @__PURE__ */ n.jsx(
|
|
2962
|
+
/* @__PURE__ */ n.jsx(Vr, { control: ie, schemaQueryParams: o }),
|
|
3063
2963
|
/* @__PURE__ */ n.jsx(
|
|
3064
|
-
|
|
2964
|
+
Ir,
|
|
3065
2965
|
{
|
|
3066
|
-
control:
|
|
2966
|
+
control: ie,
|
|
3067
2967
|
schemaHeaders: r,
|
|
3068
|
-
lockedHeaders:
|
|
2968
|
+
lockedHeaders: an?.headers
|
|
3069
2969
|
}
|
|
3070
2970
|
),
|
|
3071
|
-
|
|
2971
|
+
pn && /* @__PURE__ */ n.jsx(Or, { content: c })
|
|
3072
2972
|
] }),
|
|
3073
2973
|
/* @__PURE__ */ n.jsx("div", { className: "w-full bg-muted-foreground/20" }),
|
|
3074
2974
|
/* @__PURE__ */ n.jsx(
|
|
3075
|
-
|
|
2975
|
+
na,
|
|
3076
2976
|
{
|
|
3077
2977
|
queryMutation: B,
|
|
3078
2978
|
showLongRunningWarning: D,
|
|
3079
|
-
isFinished:
|
|
3080
|
-
progress:
|
|
2979
|
+
isFinished: ln,
|
|
2980
|
+
progress: dn,
|
|
3081
2981
|
tip: /* @__PURE__ */ n.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ n.jsxs("span", { className: "text-muted-foreground", children: [
|
|
3082
2982
|
"Press",
|
|
3083
2983
|
" ",
|
|
3084
|
-
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children:
|
|
2984
|
+
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children: sn.join(" + ") }),
|
|
3085
2985
|
" ",
|
|
3086
2986
|
"to send a request"
|
|
3087
2987
|
] }) }),
|
|
3088
2988
|
onCancel: () => {
|
|
3089
|
-
|
|
2989
|
+
Q.current?.abort(
|
|
3090
2990
|
"Request cancelled by the user"
|
|
3091
2991
|
), P(!1);
|
|
3092
2992
|
}
|
|
@@ -3098,7 +2998,7 @@ const na = (e) => Object.entries({
|
|
|
3098
2998
|
) })
|
|
3099
2999
|
}
|
|
3100
3000
|
);
|
|
3101
|
-
},
|
|
3001
|
+
}, aa = ({
|
|
3102
3002
|
className: e,
|
|
3103
3003
|
size: t = 16
|
|
3104
3004
|
}) => /* @__PURE__ */ n.jsx(
|
|
@@ -3119,34 +3019,34 @@ const na = (e) => Object.entries({
|
|
|
3119
3019
|
}
|
|
3120
3020
|
)
|
|
3121
3021
|
}
|
|
3122
|
-
),
|
|
3022
|
+
), oa = (e) => {
|
|
3123
3023
|
const [t, s] = k(!1);
|
|
3124
3024
|
return /* @__PURE__ */ n.jsxs(Ee, { onOpenChange: (a) => s(a), children: [
|
|
3125
|
-
/* @__PURE__ */ n.jsx(
|
|
3025
|
+
/* @__PURE__ */ n.jsx(ts, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
|
|
3126
3026
|
"button",
|
|
3127
3027
|
{
|
|
3128
3028
|
type: "button",
|
|
3129
3029
|
className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-xs hover:bg-primary/80",
|
|
3130
3030
|
children: [
|
|
3131
3031
|
"Test",
|
|
3132
|
-
/* @__PURE__ */ n.jsx(
|
|
3032
|
+
/* @__PURE__ */ n.jsx(aa, { size: 14 })
|
|
3133
3033
|
]
|
|
3134
3034
|
}
|
|
3135
3035
|
) }),
|
|
3136
3036
|
/* @__PURE__ */ n.jsxs(
|
|
3137
|
-
|
|
3037
|
+
Ie,
|
|
3138
3038
|
{
|
|
3139
3039
|
className: "max-w-screen-xl w-full overflow-hidden p-0",
|
|
3140
3040
|
"aria-describedby": void 0,
|
|
3141
3041
|
showCloseButton: !0,
|
|
3142
3042
|
children: [
|
|
3143
|
-
/* @__PURE__ */ n.jsx(
|
|
3144
|
-
t && /* @__PURE__ */ n.jsx(
|
|
3043
|
+
/* @__PURE__ */ n.jsx(es, { children: /* @__PURE__ */ n.jsx(ke, { children: "Playground" }) }),
|
|
3044
|
+
t && /* @__PURE__ */ n.jsx(ra, { ...e })
|
|
3145
3045
|
]
|
|
3146
3046
|
}
|
|
3147
3047
|
)
|
|
3148
3048
|
] });
|
|
3149
|
-
},
|
|
3049
|
+
}, ia = {
|
|
3150
3050
|
get: "green",
|
|
3151
3051
|
post: "blue",
|
|
3152
3052
|
put: "yellow",
|
|
@@ -3154,7 +3054,7 @@ const na = (e) => Object.entries({
|
|
|
3154
3054
|
patch: "purple",
|
|
3155
3055
|
options: "gray",
|
|
3156
3056
|
head: "gray"
|
|
3157
|
-
},
|
|
3057
|
+
}, pt = ({
|
|
3158
3058
|
label: e,
|
|
3159
3059
|
path: t,
|
|
3160
3060
|
operations: s,
|
|
@@ -3177,21 +3077,21 @@ const na = (e) => Object.entries({
|
|
|
3177
3077
|
to: `${t}#${o.slug}`,
|
|
3178
3078
|
badge: {
|
|
3179
3079
|
label: o.method,
|
|
3180
|
-
color:
|
|
3080
|
+
color: ia[o.method.toLowerCase()],
|
|
3181
3081
|
invert: !0
|
|
3182
3082
|
}
|
|
3183
3083
|
}))
|
|
3184
|
-
}),
|
|
3084
|
+
}), Yt = yt(
|
|
3185
3085
|
void 0
|
|
3186
|
-
),
|
|
3187
|
-
const e =
|
|
3086
|
+
), Ua = Yt.Provider, ca = () => {
|
|
3087
|
+
const e = Kn(Yt);
|
|
3188
3088
|
if (!e)
|
|
3189
3089
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
3190
3090
|
return e.config;
|
|
3191
|
-
},
|
|
3091
|
+
}, ht = (e) => ({
|
|
3192
3092
|
path: e.routePath,
|
|
3193
3093
|
async lazy() {
|
|
3194
|
-
const { OasProvider: t } = await import("./OasProvider-
|
|
3094
|
+
const { OasProvider: t } = await import("./OasProvider-DQQRt3oS.js");
|
|
3195
3095
|
return {
|
|
3196
3096
|
element: /* @__PURE__ */ n.jsx(
|
|
3197
3097
|
t,
|
|
@@ -3205,39 +3105,39 @@ const na = (e) => Object.entries({
|
|
|
3205
3105
|
};
|
|
3206
3106
|
},
|
|
3207
3107
|
children: e.routes
|
|
3208
|
-
}),
|
|
3108
|
+
}), Kt = ({
|
|
3209
3109
|
path: e,
|
|
3210
3110
|
tag: t,
|
|
3211
3111
|
untagged: s
|
|
3212
3112
|
}) => ({
|
|
3213
3113
|
path: e,
|
|
3214
3114
|
async lazy() {
|
|
3215
|
-
const { OperationList: a } = await import("./OperationList-
|
|
3115
|
+
const { OperationList: a } = await import("./OperationList-DpmkHf26.js");
|
|
3216
3116
|
return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
|
|
3217
3117
|
}
|
|
3218
|
-
}),
|
|
3118
|
+
}), la = ({
|
|
3219
3119
|
render: e,
|
|
3220
3120
|
path: t
|
|
3221
3121
|
}) => {
|
|
3222
|
-
const { type: s, input: a } =
|
|
3122
|
+
const { type: s, input: a } = ca(), { tag: r } = qn(), o = Vn(), i = rr(nn, { type: s, input: a }), {
|
|
3223
3123
|
data: { schema: l }
|
|
3224
|
-
} =
|
|
3124
|
+
} = Qn(i), c = l.tags.at(0);
|
|
3225
3125
|
return !r && c?.slug ? /* @__PURE__ */ n.jsx(
|
|
3226
|
-
|
|
3126
|
+
Bn,
|
|
3227
3127
|
{
|
|
3228
3128
|
to: {
|
|
3229
|
-
pathname:
|
|
3129
|
+
pathname: _n(t, { tag: c.slug }),
|
|
3230
3130
|
search: o.search
|
|
3231
3131
|
}
|
|
3232
3132
|
}
|
|
3233
3133
|
) : r && l.tags.some((u) => u.slug === r) ? e(r) : null;
|
|
3234
|
-
},
|
|
3134
|
+
}, da = ({ path: e }) => ({
|
|
3235
3135
|
path: e,
|
|
3236
3136
|
async lazy() {
|
|
3237
|
-
const { OperationList: t } = await import("./OperationList-
|
|
3137
|
+
const { OperationList: t } = await import("./OperationList-DpmkHf26.js");
|
|
3238
3138
|
return {
|
|
3239
3139
|
element: /* @__PURE__ */ n.jsx(
|
|
3240
|
-
|
|
3140
|
+
la,
|
|
3241
3141
|
{
|
|
3242
3142
|
path: e,
|
|
3243
3143
|
render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
|
|
@@ -3245,35 +3145,35 @@ const na = (e) => Object.entries({
|
|
|
3245
3145
|
)
|
|
3246
3146
|
};
|
|
3247
3147
|
}
|
|
3248
|
-
}),
|
|
3148
|
+
}), en = (e) => [
|
|
3249
3149
|
// Category without tagged operations
|
|
3250
|
-
|
|
3251
|
-
path:
|
|
3150
|
+
Kt({
|
|
3151
|
+
path: I(e, _e),
|
|
3252
3152
|
untagged: !0
|
|
3253
3153
|
}),
|
|
3254
3154
|
// Schema list route
|
|
3255
3155
|
{
|
|
3256
|
-
path:
|
|
3156
|
+
path: I(e, "~schemas"),
|
|
3257
3157
|
lazy: async () => {
|
|
3258
|
-
const { SchemaList: t } = await import("./SchemaList-
|
|
3158
|
+
const { SchemaList: t } = await import("./SchemaList-DS-pMd6B.js");
|
|
3259
3159
|
return { element: /* @__PURE__ */ n.jsx(t, {}) };
|
|
3260
3160
|
}
|
|
3261
3161
|
}
|
|
3262
|
-
],
|
|
3263
|
-
const s =
|
|
3162
|
+
], ua = (e, t) => {
|
|
3163
|
+
const s = I(e, t.at(0) ?? _e);
|
|
3264
3164
|
return [
|
|
3265
3165
|
// Redirect to first tag on the index route
|
|
3266
|
-
{ index: !0, loader: () =>
|
|
3166
|
+
{ index: !0, loader: () => Fn(s) },
|
|
3267
3167
|
// Create routes for each tag
|
|
3268
3168
|
...t.map(
|
|
3269
|
-
(a) =>
|
|
3270
|
-
path:
|
|
3169
|
+
(a) => Kt({
|
|
3170
|
+
path: I(e, a),
|
|
3271
3171
|
tag: a
|
|
3272
3172
|
})
|
|
3273
3173
|
),
|
|
3274
|
-
...
|
|
3174
|
+
...en(e)
|
|
3275
3175
|
];
|
|
3276
|
-
},
|
|
3176
|
+
}, tn = (e) => e.type === "file" ? Object.keys(e.input) : [], ma = ({
|
|
3277
3177
|
basePath: e,
|
|
3278
3178
|
config: t,
|
|
3279
3179
|
client: s
|
|
@@ -3281,32 +3181,33 @@ const na = (e) => Object.entries({
|
|
|
3281
3181
|
const a = t.tagPages;
|
|
3282
3182
|
if (!a)
|
|
3283
3183
|
return [
|
|
3284
|
-
|
|
3184
|
+
ht({
|
|
3285
3185
|
basePath: e,
|
|
3286
3186
|
routePath: e,
|
|
3287
3187
|
routes: [
|
|
3288
|
-
|
|
3289
|
-
...
|
|
3188
|
+
da({ path: e + "/:tag?" }),
|
|
3189
|
+
...en(e)
|
|
3290
3190
|
],
|
|
3291
3191
|
client: s,
|
|
3292
3192
|
config: t
|
|
3293
3193
|
})
|
|
3294
3194
|
];
|
|
3295
|
-
const r =
|
|
3195
|
+
const r = tn(t);
|
|
3296
3196
|
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3297
|
-
const l =
|
|
3298
|
-
return
|
|
3197
|
+
const l = I(e, i);
|
|
3198
|
+
return ht({
|
|
3299
3199
|
basePath: e,
|
|
3300
3200
|
version: i,
|
|
3301
3201
|
routePath: l,
|
|
3302
|
-
routes:
|
|
3202
|
+
routes: ua(l, a),
|
|
3303
3203
|
client: s,
|
|
3304
3204
|
config: t
|
|
3305
3205
|
});
|
|
3306
3206
|
});
|
|
3307
|
-
},
|
|
3207
|
+
}, nn = pr(`
|
|
3308
3208
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3309
3209
|
schema(input: $input, type: $type) {
|
|
3210
|
+
extensions
|
|
3310
3211
|
tags {
|
|
3311
3212
|
slug
|
|
3312
3213
|
name
|
|
@@ -3326,8 +3227,8 @@ const na = (e) => Object.entries({
|
|
|
3326
3227
|
}
|
|
3327
3228
|
}
|
|
3328
3229
|
}
|
|
3329
|
-
`),
|
|
3330
|
-
const t =
|
|
3230
|
+
`), _e = "~endpoints", Ma = (e) => {
|
|
3231
|
+
const t = I(e.path), s = new Ss(e);
|
|
3331
3232
|
return {
|
|
3332
3233
|
getHead: () => {
|
|
3333
3234
|
if (e.type === "url" && !e.skipPreload)
|
|
@@ -3352,118 +3253,139 @@ const na = (e) => Object.entries({
|
|
|
3352
3253
|
children: l,
|
|
3353
3254
|
...c
|
|
3354
3255
|
}) => {
|
|
3355
|
-
const u =
|
|
3256
|
+
const u = Un();
|
|
3356
3257
|
if (!r)
|
|
3357
3258
|
throw new Error("Server is required");
|
|
3358
3259
|
return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
|
|
3359
|
-
|
|
3260
|
+
ne,
|
|
3360
3261
|
{
|
|
3361
3262
|
className: "gap-2 items-center",
|
|
3362
3263
|
variant: "outline",
|
|
3363
3264
|
onClick: u.login,
|
|
3364
3265
|
children: [
|
|
3365
3266
|
"Login to open in Playground ",
|
|
3366
|
-
/* @__PURE__ */ n.jsx(
|
|
3267
|
+
/* @__PURE__ */ n.jsx(Dn, { size: 16 })
|
|
3367
3268
|
]
|
|
3368
3269
|
}
|
|
3369
3270
|
) : /* @__PURE__ */ n.jsx(
|
|
3370
|
-
|
|
3271
|
+
oa,
|
|
3371
3272
|
{
|
|
3372
3273
|
url: i ?? "/",
|
|
3373
3274
|
method: o ?? "get",
|
|
3374
3275
|
server: r,
|
|
3375
3276
|
...c,
|
|
3376
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3277
|
+
children: /* @__PURE__ */ n.jsx(ne, { className: "gap-2 items-center", variant: "outline", children: l ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3377
3278
|
"Open in Playground ",
|
|
3378
|
-
/* @__PURE__ */ n.jsx(
|
|
3279
|
+
/* @__PURE__ */ n.jsx(zn, { size: 16 })
|
|
3379
3280
|
] }) })
|
|
3380
3281
|
}
|
|
3381
3282
|
);
|
|
3382
3283
|
}
|
|
3383
3284
|
}),
|
|
3384
3285
|
getNavigation: async (a, r) => {
|
|
3385
|
-
if (!
|
|
3286
|
+
if (!st({ path: t, end: !1 }, a))
|
|
3386
3287
|
return [];
|
|
3387
|
-
const o =
|
|
3288
|
+
const o = st(
|
|
3388
3289
|
{ path: `${t}/:version?/:tag`, end: !0 },
|
|
3389
3290
|
a
|
|
3390
3291
|
);
|
|
3391
3292
|
try {
|
|
3392
|
-
const i = o?.params.version, l = i ??
|
|
3293
|
+
const i = o?.params.version, l = i ?? tn(e).at(0), { type: c } = e, u = c === "file" ? e.input[l] : e.input, d = Ft(s, nn, {
|
|
3393
3294
|
type: c,
|
|
3394
3295
|
input: u
|
|
3395
|
-
}),
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3296
|
+
}), h = await r.queryClient.ensureQueryData(d), g = new Map(
|
|
3297
|
+
h.schema.tags.filter((f) => f.name && f.operations.length > 0).map((f) => {
|
|
3298
|
+
if (!f.name)
|
|
3299
|
+
throw new Error(`Tag ${f.slug} has no name`);
|
|
3300
|
+
const j = I(t, i, f.slug), $ = f.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, S = f.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3301
|
+
return [
|
|
3302
|
+
f.name,
|
|
3303
|
+
pt({
|
|
3304
|
+
label: f.name,
|
|
3305
|
+
path: j,
|
|
3306
|
+
operations: f.operations,
|
|
3307
|
+
collapsed: $,
|
|
3308
|
+
collapsible: S
|
|
3309
|
+
})
|
|
3310
|
+
];
|
|
3311
|
+
})
|
|
3312
|
+
), m = h.schema.extensions?.["x-tagGroups"] ?? [], y = new Set(
|
|
3313
|
+
m.flatMap(
|
|
3314
|
+
(f) => f.tags.filter((j) => g.has(j))
|
|
3315
|
+
)
|
|
3316
|
+
), b = [
|
|
3317
|
+
...m.flatMap(
|
|
3318
|
+
(f) => {
|
|
3319
|
+
const j = f.tags.map(($) => g.get($)).filter(Boolean);
|
|
3320
|
+
return j.length === 0 ? [] : [
|
|
3321
|
+
{
|
|
3322
|
+
type: "category",
|
|
3323
|
+
label: f.name,
|
|
3324
|
+
items: j,
|
|
3325
|
+
collapsible: !0,
|
|
3326
|
+
collapsed: !e.options?.expandAllTags
|
|
3327
|
+
}
|
|
3328
|
+
];
|
|
3329
|
+
}
|
|
3330
|
+
),
|
|
3331
|
+
...Array.from(g.entries()).filter(([f]) => !y.has(f)).map(([, f]) => f)
|
|
3332
|
+
], O = h.schema.tags.find(
|
|
3333
|
+
(f) => !f.name
|
|
3407
3334
|
)?.operations;
|
|
3408
|
-
return
|
|
3409
|
-
|
|
3410
|
-
label: "Other endpoints",
|
|
3411
|
-
path:
|
|
3412
|
-
operations:
|
|
3335
|
+
return O && b.push(
|
|
3336
|
+
pt({
|
|
3337
|
+
label: b.length === 0 ? "Endpoints" : "Other endpoints",
|
|
3338
|
+
path: I(t, i, _e),
|
|
3339
|
+
operations: O,
|
|
3413
3340
|
collapsed: !e.options?.expandAllTags
|
|
3414
3341
|
})
|
|
3415
|
-
),
|
|
3342
|
+
), h.schema.components?.schemas?.length && b.push({
|
|
3416
3343
|
type: "link",
|
|
3417
3344
|
label: "Schemas",
|
|
3418
|
-
to:
|
|
3419
|
-
}),
|
|
3345
|
+
to: I(t, i, "~schemas")
|
|
3346
|
+
}), b;
|
|
3420
3347
|
} catch {
|
|
3421
3348
|
return [];
|
|
3422
3349
|
}
|
|
3423
3350
|
},
|
|
3424
|
-
getRoutes: () =>
|
|
3351
|
+
getRoutes: () => ma({ basePath: t, config: e, client: s })
|
|
3425
3352
|
};
|
|
3426
3353
|
};
|
|
3427
3354
|
export {
|
|
3428
|
-
qs as A,
|
|
3429
|
-
Ds as B,
|
|
3430
3355
|
q as C,
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
Ge as U,
|
|
3442
|
-
ir as a,
|
|
3443
|
-
Ft as b,
|
|
3356
|
+
_a as G,
|
|
3357
|
+
zs as L,
|
|
3358
|
+
Ua as O,
|
|
3359
|
+
oa as P,
|
|
3360
|
+
Ls as Q,
|
|
3361
|
+
Dt as S,
|
|
3362
|
+
x as T,
|
|
3363
|
+
_e as U,
|
|
3364
|
+
rr as a,
|
|
3365
|
+
qt as b,
|
|
3444
3366
|
V as c,
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3367
|
+
tn as d,
|
|
3368
|
+
vr as e,
|
|
3369
|
+
Wt as f,
|
|
3370
|
+
pr as g,
|
|
3371
|
+
_r as h,
|
|
3372
|
+
nr as i,
|
|
3373
|
+
lt as j,
|
|
3374
|
+
Va as k,
|
|
3375
|
+
Fs as l,
|
|
3376
|
+
Fe as m,
|
|
3455
3377
|
kt as n,
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3378
|
+
Ts as o,
|
|
3379
|
+
tr as p,
|
|
3380
|
+
Ce as q,
|
|
3381
|
+
As as r,
|
|
3382
|
+
L as s,
|
|
3383
|
+
Ba as t,
|
|
3384
|
+
ca as u,
|
|
3385
|
+
Ds as v,
|
|
3386
|
+
Es as w,
|
|
3387
|
+
Lt as x,
|
|
3388
|
+
nn as y,
|
|
3389
|
+
Ma as z
|
|
3468
3390
|
};
|
|
3469
|
-
//# sourceMappingURL=index-
|
|
3391
|
+
//# sourceMappingURL=index-Bg7Js3jB.js.map
|