zudoku 0.51.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/validators/InputNavigationSchema.d.ts +152 -0
- package/dist/config/validators/NavigationSchema.js +1 -1
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +38 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +10 -0
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
- package/dist/lib/plugins/custom-pages/index.js +1 -3
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +22 -6
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +8 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +5 -6
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/vite/api/SchemaManager.js +6 -2
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +56 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-frontmatter.js +4 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +11 -33
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +21 -9
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +22 -1
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/lib/Alert-CT_ViLrJ.js +161 -0
- package/lib/Alert-CT_ViLrJ.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-CPtGTZAL.js +140 -0
- package/lib/Command-CPtGTZAL.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
- package/lib/Dialog-DGlrUTCS.js.map +1 -0
- package/lib/MdxPage-D-QSUlMf.js +110 -0
- package/lib/MdxPage-D-QSUlMf.js.map +1 -0
- package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DKB2uJU-.js} +3 -3
- package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DKB2uJU-.js.map} +1 -1
- package/lib/{OperationList-Dpip6ozi.js → OperationList-CccIt45w.js} +579 -567
- package/lib/OperationList-CccIt45w.js.map +1 -0
- package/lib/Pagination-ClHXydm9.js +36 -0
- package/lib/Pagination-ClHXydm9.js.map +1 -0
- package/lib/RouteGuard-Bd-ppFbi.js +737 -0
- package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
- package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-DY3FBF2U.js} +26 -37
- package/lib/SchemaList-DY3FBF2U.js.map +1 -0
- package/lib/{SchemaView-CLxthVcA.js → SchemaView-matL2maR.js} +94 -103
- package/lib/SchemaView-matL2maR.js.map +1 -0
- package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
- package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
- package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
- package/lib/Slot-DwZlQ-vX.js.map +1 -0
- package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
- package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
- package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
- package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-DfOaDE_x.js → circular-CqHpo7-e.js} +2 -2
- package/lib/{circular-DfOaDE_x.js.map → circular-CqHpo7-e.js.map} +1 -1
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/{createServer-DjOMygls.js → createServer-ByKo3XCG.js} +4 -4
- package/lib/{createServer-DjOMygls.js.map → createServer-ByKo3XCG.js.map} +1 -1
- package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
- package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
- package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
- package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
- package/lib/index-BIbCx5Fh.js +3919 -0
- package/lib/index-BIbCx5Fh.js.map +1 -0
- package/lib/index-CEfpz8vY.js +3458 -0
- package/lib/index-CEfpz8vY.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/ui/CodeBlock.js +6 -73
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +2 -2
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +33 -3534
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +268 -321
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -20
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +4 -5
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +201 -111
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +5 -4
- package/src/lib/components/Autocomplete.tsx +1 -0
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/Pagination.tsx +4 -4
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
- package/src/lib/plugins/custom-pages/index.tsx +2 -6
- package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
- package/src/lib/plugins/markdown/index.tsx +10 -2
- package/src/lib/plugins/openapi/OperationList.tsx +7 -17
- package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
- package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/ui/CodeBlock.tsx +5 -6
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/dist/flat-config.d.ts +0 -320
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-BQ8YqLsz.js.map +0 -1
- package/lib/MdxPage-DJvKmI-r.js +0 -84
- package/lib/MdxPage-DJvKmI-r.js.map +0 -1
- package/lib/OperationList-Dpip6ozi.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-gV7nvzi7.js +0 -55
- package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
- package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
- package/lib/SchemaView-CLxthVcA.js.map +0 -1
- package/lib/Slot-CSEIvwwO.js +0 -161
- package/lib/Slot-CSEIvwwO.js.map +0 -1
- package/lib/clerk-yAKDC3Qz.js +0 -24812
- package/lib/clerk-yAKDC3Qz.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-DW2qmCJa.js +0 -3227
- package/lib/index-DW2qmCJa.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/mutation-BpcyTgWI.js +0 -196
- package/lib/mutation-BpcyTgWI.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-N4ockVKi.js +0 -97
- package/lib/useMutation-N4ockVKi.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
package/lib/index-DW2qmCJa.js
DELETED
|
@@ -1,3227 +0,0 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { ChevronDown as xt, ChevronUp as pn, Check as gt, ChevronRightIcon as Q, CheckIcon as hn, DotIcon as fn, ChevronDownIcon as xn, XIcon as gn, Circle as yn, DownloadIcon as vn, LogInIcon as bn, CirclePlayIcon as jn } from "lucide-react";
|
|
3
|
-
import { r as Nn, c as wn, u as Cn, N as Sn, h as Tn, m as Ke } from "./chunk-DQRVZFIR-BblmKnHy.js";
|
|
4
|
-
import { M as Ce, O as Se, P as yt, l as An, T as On, j as L, d as Rn, i as $n } from "./hook-CHXroBFt.js";
|
|
5
|
-
import { Button as J } from "./ui/Button.js";
|
|
6
|
-
import { Z as Pn } from "./invariant-DAFpPywt.js";
|
|
7
|
-
import * as N from "react";
|
|
8
|
-
import { createContext as vt, use as Ln, Fragment as D, useRef as W, useEffect as M, useMemo as En, useState as E, useCallback as In, useTransition as kn, useContext as Dn } from "react";
|
|
9
|
-
import { VisuallyHidden as Bn } from "@radix-ui/react-visually-hidden";
|
|
10
|
-
import { D as Te, a as Ae, c as Oe, d as bt, f as jt, e as Fn } from "./Dialog-BxpuVLh9.js";
|
|
11
|
-
import { u as Vn } from "./react-nprogress.esm-C2MPXjiJ.js";
|
|
12
|
-
import { u as qn } from "./useMutation-N4ockVKi.js";
|
|
13
|
-
import { u as Re, a as $e, C as B, b as zn, F as _n } from "./index.esm-Cp4wkyud.js";
|
|
14
|
-
import { B as F } from "./Button-BE9IVkWV.js";
|
|
15
|
-
import * as C from "@radix-ui/react-select";
|
|
16
|
-
import { c as v } from "./cn-wvCW-ho6.js";
|
|
17
|
-
import { u as Un } from "./useLatest-hmRS46UF.js";
|
|
18
|
-
import { z as Mn } from "./index--oeBayMa.js";
|
|
19
|
-
import * as w from "@radix-ui/react-dropdown-menu";
|
|
20
|
-
import { C as ie } from "./Card-DPhGbYUM.js";
|
|
21
|
-
import * as be from "@radix-ui/react-checkbox";
|
|
22
|
-
import * as re from "@radix-ui/react-popover";
|
|
23
|
-
import { PopoverAnchor as Gn } from "@radix-ui/react-popover";
|
|
24
|
-
import { P as Hn } from "./index-CrcNWbel.js";
|
|
25
|
-
import { g as Qn, h as Jn, C as Wn, b as Xn, f as Zn } from "./Callout-CoVxYafP.js";
|
|
26
|
-
import { Input as Pe } from "./ui/Input.js";
|
|
27
|
-
import { Slot as Yn } from "@radix-ui/react-slot";
|
|
28
|
-
import * as Nt from "@radix-ui/react-label";
|
|
29
|
-
import { c as Kn } from "./index-DI5SPFK9.js";
|
|
30
|
-
import * as X from "@radix-ui/react-radio-group";
|
|
31
|
-
import { S as es } from "./Spinner-mNLZ6awP.js";
|
|
32
|
-
import { Callout as ts } from "./ui/Callout.js";
|
|
33
|
-
import { Card as wt, CardHeader as ns, CardTitle as ss, CardContent as rs } from "./ui/Card.js";
|
|
34
|
-
import { Tabs as as, TabsList as os, TabsTrigger as et, TabsContent as tt } from "./ui/Tabs.js";
|
|
35
|
-
import { Collapsible as nt, CollapsibleTrigger as st, CollapsibleContent as rt } from "./ui/Collapsible.js";
|
|
36
|
-
import * as Le from "@radix-ui/react-collapsible";
|
|
37
|
-
import { S as is } from "./SyntaxHighlight-C5ja40ix.js";
|
|
38
|
-
let pe;
|
|
39
|
-
const ls = (e) => {
|
|
40
|
-
if (e.errors?.[0])
|
|
41
|
-
throw new Pn(e.errors[0].message, {
|
|
42
|
-
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
class cs {
|
|
46
|
-
constructor(t) {
|
|
47
|
-
this.config = t;
|
|
48
|
-
}
|
|
49
|
-
#e = async () => (pe || (pe = import("./createServer-DjOMygls.js").then(
|
|
50
|
-
(t) => t.createServer(this.config)
|
|
51
|
-
)), pe);
|
|
52
|
-
#t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
|
|
53
|
-
fetch = async (t, s) => {
|
|
54
|
-
const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
|
|
55
|
-
method: "POST",
|
|
56
|
-
body: JSON.stringify({ query: t, variables: s, operationName: a }),
|
|
57
|
-
headers: { "Content-Type": "application/json" }
|
|
58
|
-
});
|
|
59
|
-
if (!r.ok)
|
|
60
|
-
throw new Error("Network response was not ok");
|
|
61
|
-
const o = await r.json();
|
|
62
|
-
return ls(o), o.data;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function he(e, t) {
|
|
66
|
-
if (!!!e)
|
|
67
|
-
throw new Error(t);
|
|
68
|
-
}
|
|
69
|
-
function ds(e) {
|
|
70
|
-
return typeof e == "object" && e !== null;
|
|
71
|
-
}
|
|
72
|
-
function us(e, t) {
|
|
73
|
-
if (!!!e)
|
|
74
|
-
throw new Error(
|
|
75
|
-
t ?? "Unexpected invariant triggered."
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
const ms = /\r\n|[\n\r]/g;
|
|
79
|
-
function je(e, t) {
|
|
80
|
-
let s = 0, a = 1;
|
|
81
|
-
for (const r of e.body.matchAll(ms)) {
|
|
82
|
-
if (typeof r.index == "number" || us(!1), r.index >= t)
|
|
83
|
-
break;
|
|
84
|
-
s = r.index + r[0].length, a += 1;
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
line: a,
|
|
88
|
-
column: t + 1 - s
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function ps(e) {
|
|
92
|
-
return Ct(
|
|
93
|
-
e.source,
|
|
94
|
-
je(e.source, e.start)
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
function Ct(e, t) {
|
|
98
|
-
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, c = t.line === 1 ? s : 0, l = t.column + c, m = `${e.name}:${i}:${l}
|
|
99
|
-
`, u = a.split(/\r\n|[\n\r]/g), g = u[r];
|
|
100
|
-
if (g.length > 120) {
|
|
101
|
-
const f = Math.floor(l / 80), x = l % 80, p = [];
|
|
102
|
-
for (let y = 0; y < g.length; y += 80)
|
|
103
|
-
p.push(g.slice(y, y + 80));
|
|
104
|
-
return m + at([
|
|
105
|
-
[`${i} |`, p[0]],
|
|
106
|
-
...p.slice(1, f + 1).map((y) => ["|", y]),
|
|
107
|
-
["|", "^".padStart(x)],
|
|
108
|
-
["|", p[f + 1]]
|
|
109
|
-
]);
|
|
110
|
-
}
|
|
111
|
-
return m + at([
|
|
112
|
-
// Lines specified like this: ["prefix", "string"],
|
|
113
|
-
[`${i - 1} |`, u[r - 1]],
|
|
114
|
-
[`${i} |`, g],
|
|
115
|
-
["|", "^".padStart(l)],
|
|
116
|
-
[`${i + 1} |`, u[r + 1]]
|
|
117
|
-
]);
|
|
118
|
-
}
|
|
119
|
-
function at(e) {
|
|
120
|
-
const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
|
|
121
|
-
return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
122
|
-
`);
|
|
123
|
-
}
|
|
124
|
-
function hs(e) {
|
|
125
|
-
const t = e[0];
|
|
126
|
-
return t == null || "kind" in t || "length" in t ? {
|
|
127
|
-
nodes: t,
|
|
128
|
-
source: e[1],
|
|
129
|
-
positions: e[2],
|
|
130
|
-
path: e[3],
|
|
131
|
-
originalError: e[4],
|
|
132
|
-
extensions: e[5]
|
|
133
|
-
} : t;
|
|
134
|
-
}
|
|
135
|
-
class Ee extends Error {
|
|
136
|
-
/**
|
|
137
|
-
* An array of `{ line, column }` locations within the source GraphQL document
|
|
138
|
-
* which correspond to this error.
|
|
139
|
-
*
|
|
140
|
-
* Errors during validation often contain multiple locations, for example to
|
|
141
|
-
* point out two things with the same name. Errors during execution include a
|
|
142
|
-
* single location, the field which produced the error.
|
|
143
|
-
*
|
|
144
|
-
* Enumerable, and appears in the result of JSON.stringify().
|
|
145
|
-
*/
|
|
146
|
-
/**
|
|
147
|
-
* An array describing the JSON-path into the execution response which
|
|
148
|
-
* corresponds to this error. Only included for errors during execution.
|
|
149
|
-
*
|
|
150
|
-
* Enumerable, and appears in the result of JSON.stringify().
|
|
151
|
-
*/
|
|
152
|
-
/**
|
|
153
|
-
* An array of GraphQL AST Nodes corresponding to this error.
|
|
154
|
-
*/
|
|
155
|
-
/**
|
|
156
|
-
* The source GraphQL document for the first location of this error.
|
|
157
|
-
*
|
|
158
|
-
* Note that if this Error represents more than one node, the source may not
|
|
159
|
-
* represent nodes after the first node.
|
|
160
|
-
*/
|
|
161
|
-
/**
|
|
162
|
-
* An array of character offsets within the source GraphQL document
|
|
163
|
-
* which correspond to this error.
|
|
164
|
-
*/
|
|
165
|
-
/**
|
|
166
|
-
* The original error thrown from a field resolver during execution.
|
|
167
|
-
*/
|
|
168
|
-
/**
|
|
169
|
-
* Extension fields to add to the formatted error.
|
|
170
|
-
*/
|
|
171
|
-
/**
|
|
172
|
-
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
173
|
-
*/
|
|
174
|
-
constructor(t, ...s) {
|
|
175
|
-
var a, r, o;
|
|
176
|
-
const { nodes: i, source: c, positions: l, path: m, originalError: u, extensions: g } = hs(s);
|
|
177
|
-
super(t), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = u ?? void 0, this.nodes = ot(
|
|
178
|
-
Array.isArray(i) ? i : i ? [i] : void 0
|
|
179
|
-
);
|
|
180
|
-
const f = ot(
|
|
181
|
-
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((p) => p.loc).filter((p) => p != null)
|
|
182
|
-
);
|
|
183
|
-
this.source = c ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? f?.map((p) => p.start), this.locations = l && c ? l.map((p) => je(c, p)) : f?.map((p) => je(p.source, p.start));
|
|
184
|
-
const x = ds(
|
|
185
|
-
u?.extensions
|
|
186
|
-
) ? u?.extensions : void 0;
|
|
187
|
-
this.extensions = (o = g ?? x) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
188
|
-
message: {
|
|
189
|
-
writable: !0,
|
|
190
|
-
enumerable: !0
|
|
191
|
-
},
|
|
192
|
-
name: {
|
|
193
|
-
enumerable: !1
|
|
194
|
-
},
|
|
195
|
-
nodes: {
|
|
196
|
-
enumerable: !1
|
|
197
|
-
},
|
|
198
|
-
source: {
|
|
199
|
-
enumerable: !1
|
|
200
|
-
},
|
|
201
|
-
positions: {
|
|
202
|
-
enumerable: !1
|
|
203
|
-
},
|
|
204
|
-
originalError: {
|
|
205
|
-
enumerable: !1
|
|
206
|
-
}
|
|
207
|
-
}), u != null && u.stack ? Object.defineProperty(this, "stack", {
|
|
208
|
-
value: u.stack,
|
|
209
|
-
writable: !0,
|
|
210
|
-
configurable: !0
|
|
211
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this, Ee) : Object.defineProperty(this, "stack", {
|
|
212
|
-
value: Error().stack,
|
|
213
|
-
writable: !0,
|
|
214
|
-
configurable: !0
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
get [Symbol.toStringTag]() {
|
|
218
|
-
return "GraphQLError";
|
|
219
|
-
}
|
|
220
|
-
toString() {
|
|
221
|
-
let t = this.message;
|
|
222
|
-
if (this.nodes)
|
|
223
|
-
for (const s of this.nodes)
|
|
224
|
-
s.loc && (t += `
|
|
225
|
-
|
|
226
|
-
` + ps(s.loc));
|
|
227
|
-
else if (this.source && this.locations)
|
|
228
|
-
for (const s of this.locations)
|
|
229
|
-
t += `
|
|
230
|
-
|
|
231
|
-
` + Ct(this.source, s);
|
|
232
|
-
return t;
|
|
233
|
-
}
|
|
234
|
-
toJSON() {
|
|
235
|
-
const t = {
|
|
236
|
-
message: this.message
|
|
237
|
-
};
|
|
238
|
-
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;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
function ot(e) {
|
|
242
|
-
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
243
|
-
}
|
|
244
|
-
function R(e, t, s) {
|
|
245
|
-
return new Ee(`Syntax Error: ${s}`, {
|
|
246
|
-
source: e,
|
|
247
|
-
positions: [t]
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
class Ca {
|
|
251
|
-
/**
|
|
252
|
-
* The character offset at which this Node begins.
|
|
253
|
-
*/
|
|
254
|
-
/**
|
|
255
|
-
* The character offset at which this Node ends.
|
|
256
|
-
*/
|
|
257
|
-
/**
|
|
258
|
-
* The Token at which this Node begins.
|
|
259
|
-
*/
|
|
260
|
-
/**
|
|
261
|
-
* The Token at which this Node ends.
|
|
262
|
-
*/
|
|
263
|
-
/**
|
|
264
|
-
* The Source document the AST represents.
|
|
265
|
-
*/
|
|
266
|
-
constructor(t, s, a) {
|
|
267
|
-
this.start = t.start, this.end = s.end, this.startToken = t, this.endToken = s, this.source = a;
|
|
268
|
-
}
|
|
269
|
-
get [Symbol.toStringTag]() {
|
|
270
|
-
return "Location";
|
|
271
|
-
}
|
|
272
|
-
toJSON() {
|
|
273
|
-
return {
|
|
274
|
-
start: this.start,
|
|
275
|
-
end: this.end
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
class St {
|
|
280
|
-
/**
|
|
281
|
-
* The kind of Token.
|
|
282
|
-
*/
|
|
283
|
-
/**
|
|
284
|
-
* The character offset at which this Node begins.
|
|
285
|
-
*/
|
|
286
|
-
/**
|
|
287
|
-
* The character offset at which this Node ends.
|
|
288
|
-
*/
|
|
289
|
-
/**
|
|
290
|
-
* The 1-indexed line number on which this Token appears.
|
|
291
|
-
*/
|
|
292
|
-
/**
|
|
293
|
-
* The 1-indexed column number at which this Token begins.
|
|
294
|
-
*/
|
|
295
|
-
/**
|
|
296
|
-
* For non-punctuation tokens, represents the interpreted value of the token.
|
|
297
|
-
*
|
|
298
|
-
* Note: is undefined for punctuation tokens, but typed as string for
|
|
299
|
-
* convenience in the parser.
|
|
300
|
-
*/
|
|
301
|
-
/**
|
|
302
|
-
* Tokens exist as nodes in a double-linked-list amongst all tokens
|
|
303
|
-
* including ignored tokens. <SOF> is always the first node and <EOF>
|
|
304
|
-
* the last.
|
|
305
|
-
*/
|
|
306
|
-
constructor(t, s, a, r, o, i) {
|
|
307
|
-
this.kind = t, this.start = s, this.end = a, this.line = r, this.column = o, this.value = i, this.prev = null, this.next = null;
|
|
308
|
-
}
|
|
309
|
-
get [Symbol.toStringTag]() {
|
|
310
|
-
return "Token";
|
|
311
|
-
}
|
|
312
|
-
toJSON() {
|
|
313
|
-
return {
|
|
314
|
-
kind: this.kind,
|
|
315
|
-
value: this.value,
|
|
316
|
-
line: this.line,
|
|
317
|
-
column: this.column
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
const fs = {
|
|
322
|
-
Name: [],
|
|
323
|
-
Document: ["definitions"],
|
|
324
|
-
OperationDefinition: [
|
|
325
|
-
"name",
|
|
326
|
-
"variableDefinitions",
|
|
327
|
-
"directives",
|
|
328
|
-
"selectionSet"
|
|
329
|
-
],
|
|
330
|
-
VariableDefinition: ["variable", "type", "defaultValue", "directives"],
|
|
331
|
-
Variable: ["name"],
|
|
332
|
-
SelectionSet: ["selections"],
|
|
333
|
-
Field: ["alias", "name", "arguments", "directives", "selectionSet"],
|
|
334
|
-
Argument: ["name", "value"],
|
|
335
|
-
FragmentSpread: ["name", "directives"],
|
|
336
|
-
InlineFragment: ["typeCondition", "directives", "selectionSet"],
|
|
337
|
-
FragmentDefinition: [
|
|
338
|
-
"name",
|
|
339
|
-
// Note: fragment variable definitions are deprecated and will removed in v17.0.0
|
|
340
|
-
"variableDefinitions",
|
|
341
|
-
"typeCondition",
|
|
342
|
-
"directives",
|
|
343
|
-
"selectionSet"
|
|
344
|
-
],
|
|
345
|
-
IntValue: [],
|
|
346
|
-
FloatValue: [],
|
|
347
|
-
StringValue: [],
|
|
348
|
-
BooleanValue: [],
|
|
349
|
-
NullValue: [],
|
|
350
|
-
EnumValue: [],
|
|
351
|
-
ListValue: ["values"],
|
|
352
|
-
ObjectValue: ["fields"],
|
|
353
|
-
ObjectField: ["name", "value"],
|
|
354
|
-
Directive: ["name", "arguments"],
|
|
355
|
-
NamedType: ["name"],
|
|
356
|
-
ListType: ["type"],
|
|
357
|
-
NonNullType: ["type"],
|
|
358
|
-
SchemaDefinition: ["description", "directives", "operationTypes"],
|
|
359
|
-
OperationTypeDefinition: ["type"],
|
|
360
|
-
ScalarTypeDefinition: ["description", "name", "directives"],
|
|
361
|
-
ObjectTypeDefinition: [
|
|
362
|
-
"description",
|
|
363
|
-
"name",
|
|
364
|
-
"interfaces",
|
|
365
|
-
"directives",
|
|
366
|
-
"fields"
|
|
367
|
-
],
|
|
368
|
-
FieldDefinition: ["description", "name", "arguments", "type", "directives"],
|
|
369
|
-
InputValueDefinition: [
|
|
370
|
-
"description",
|
|
371
|
-
"name",
|
|
372
|
-
"type",
|
|
373
|
-
"defaultValue",
|
|
374
|
-
"directives"
|
|
375
|
-
],
|
|
376
|
-
InterfaceTypeDefinition: [
|
|
377
|
-
"description",
|
|
378
|
-
"name",
|
|
379
|
-
"interfaces",
|
|
380
|
-
"directives",
|
|
381
|
-
"fields"
|
|
382
|
-
],
|
|
383
|
-
UnionTypeDefinition: ["description", "name", "directives", "types"],
|
|
384
|
-
EnumTypeDefinition: ["description", "name", "directives", "values"],
|
|
385
|
-
EnumValueDefinition: ["description", "name", "directives"],
|
|
386
|
-
InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
|
|
387
|
-
DirectiveDefinition: ["description", "name", "arguments", "locations"],
|
|
388
|
-
SchemaExtension: ["directives", "operationTypes"],
|
|
389
|
-
ScalarTypeExtension: ["name", "directives"],
|
|
390
|
-
ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
|
|
391
|
-
InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
|
|
392
|
-
UnionTypeExtension: ["name", "directives", "types"],
|
|
393
|
-
EnumTypeExtension: ["name", "directives", "values"],
|
|
394
|
-
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
395
|
-
}, xs = new Set(Object.keys(fs));
|
|
396
|
-
function Sa(e) {
|
|
397
|
-
const t = e?.kind;
|
|
398
|
-
return typeof t == "string" && xs.has(t);
|
|
399
|
-
}
|
|
400
|
-
var it;
|
|
401
|
-
(function(e) {
|
|
402
|
-
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
403
|
-
})(it || (it = {}));
|
|
404
|
-
function Ne(e) {
|
|
405
|
-
return e === 9 || e === 32;
|
|
406
|
-
}
|
|
407
|
-
function Z(e) {
|
|
408
|
-
return e >= 48 && e <= 57;
|
|
409
|
-
}
|
|
410
|
-
function Tt(e) {
|
|
411
|
-
return e >= 97 && e <= 122 || // A-Z
|
|
412
|
-
e >= 65 && e <= 90;
|
|
413
|
-
}
|
|
414
|
-
function At(e) {
|
|
415
|
-
return Tt(e) || e === 95;
|
|
416
|
-
}
|
|
417
|
-
function gs(e) {
|
|
418
|
-
return Tt(e) || Z(e) || e === 95;
|
|
419
|
-
}
|
|
420
|
-
function ys(e) {
|
|
421
|
-
var t;
|
|
422
|
-
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
423
|
-
for (let i = 0; i < e.length; ++i) {
|
|
424
|
-
var o;
|
|
425
|
-
const c = e[i], l = vs(c);
|
|
426
|
-
l !== c.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && l < s && (s = l));
|
|
427
|
-
}
|
|
428
|
-
return e.map((i, c) => c === 0 ? i : i.slice(s)).slice(
|
|
429
|
-
(t = a) !== null && t !== void 0 ? t : 0,
|
|
430
|
-
r + 1
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
function vs(e) {
|
|
434
|
-
let t = 0;
|
|
435
|
-
for (; t < e.length && Ne(e.charCodeAt(t)); )
|
|
436
|
-
++t;
|
|
437
|
-
return t;
|
|
438
|
-
}
|
|
439
|
-
function bs(e, t) {
|
|
440
|
-
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((x) => x.length === 0 || Ne(x.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), m = c || l, u = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
441
|
-
(!r || e.length > 70 || m || o || i);
|
|
442
|
-
let g = "";
|
|
443
|
-
const f = r && Ne(e.charCodeAt(0));
|
|
444
|
-
return (u && !f || o) && (g += `
|
|
445
|
-
`), g += s, (u || m) && (g += `
|
|
446
|
-
`), '"""' + g + '"""';
|
|
447
|
-
}
|
|
448
|
-
var h;
|
|
449
|
-
(function(e) {
|
|
450
|
-
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";
|
|
451
|
-
})(h || (h = {}));
|
|
452
|
-
class js {
|
|
453
|
-
/**
|
|
454
|
-
* The previously focused non-ignored token.
|
|
455
|
-
*/
|
|
456
|
-
/**
|
|
457
|
-
* The currently focused non-ignored token.
|
|
458
|
-
*/
|
|
459
|
-
/**
|
|
460
|
-
* The (1-indexed) line containing the current token.
|
|
461
|
-
*/
|
|
462
|
-
/**
|
|
463
|
-
* The character offset at which the current line begins.
|
|
464
|
-
*/
|
|
465
|
-
constructor(t) {
|
|
466
|
-
const s = new St(h.SOF, 0, 0, 0, 0);
|
|
467
|
-
this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
468
|
-
}
|
|
469
|
-
get [Symbol.toStringTag]() {
|
|
470
|
-
return "Lexer";
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* Advances the token stream to the next non-ignored token.
|
|
474
|
-
*/
|
|
475
|
-
advance() {
|
|
476
|
-
return this.lastToken = this.token, this.token = this.lookahead();
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Looks ahead and returns the next non-ignored token, but does not change
|
|
480
|
-
* the state of Lexer.
|
|
481
|
-
*/
|
|
482
|
-
lookahead() {
|
|
483
|
-
let t = this.token;
|
|
484
|
-
if (t.kind !== h.EOF)
|
|
485
|
-
do
|
|
486
|
-
if (t.next)
|
|
487
|
-
t = t.next;
|
|
488
|
-
else {
|
|
489
|
-
const s = ws(this, t.end);
|
|
490
|
-
t.next = s, s.prev = t, t = s;
|
|
491
|
-
}
|
|
492
|
-
while (t.kind === h.COMMENT);
|
|
493
|
-
return t;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
function Ns(e) {
|
|
497
|
-
return e === h.BANG || e === h.DOLLAR || e === h.AMP || e === h.PAREN_L || e === h.PAREN_R || e === h.SPREAD || e === h.COLON || e === h.EQUALS || e === h.AT || e === h.BRACKET_L || e === h.BRACKET_R || e === h.BRACE_L || e === h.PIPE || e === h.BRACE_R;
|
|
498
|
-
}
|
|
499
|
-
function z(e) {
|
|
500
|
-
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
501
|
-
}
|
|
502
|
-
function le(e, t) {
|
|
503
|
-
return Ot(e.charCodeAt(t)) && Rt(e.charCodeAt(t + 1));
|
|
504
|
-
}
|
|
505
|
-
function Ot(e) {
|
|
506
|
-
return e >= 55296 && e <= 56319;
|
|
507
|
-
}
|
|
508
|
-
function Rt(e) {
|
|
509
|
-
return e >= 56320 && e <= 57343;
|
|
510
|
-
}
|
|
511
|
-
function V(e, t) {
|
|
512
|
-
const s = e.source.body.codePointAt(t);
|
|
513
|
-
if (s === void 0)
|
|
514
|
-
return h.EOF;
|
|
515
|
-
if (s >= 32 && s <= 126) {
|
|
516
|
-
const a = String.fromCodePoint(s);
|
|
517
|
-
return a === '"' ? `'"'` : `"${a}"`;
|
|
518
|
-
}
|
|
519
|
-
return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
|
|
520
|
-
}
|
|
521
|
-
function S(e, t, s, a, r) {
|
|
522
|
-
const o = e.line, i = 1 + s - e.lineStart;
|
|
523
|
-
return new St(t, s, a, o, i, r);
|
|
524
|
-
}
|
|
525
|
-
function ws(e, t) {
|
|
526
|
-
const s = e.source.body, a = s.length;
|
|
527
|
-
let r = t;
|
|
528
|
-
for (; r < a; ) {
|
|
529
|
-
const o = s.charCodeAt(r);
|
|
530
|
-
switch (o) {
|
|
531
|
-
// Ignored ::
|
|
532
|
-
// - UnicodeBOM
|
|
533
|
-
// - WhiteSpace
|
|
534
|
-
// - LineTerminator
|
|
535
|
-
// - Comment
|
|
536
|
-
// - Comma
|
|
537
|
-
//
|
|
538
|
-
// UnicodeBOM :: "Byte Order Mark (U+FEFF)"
|
|
539
|
-
//
|
|
540
|
-
// WhiteSpace ::
|
|
541
|
-
// - "Horizontal Tab (U+0009)"
|
|
542
|
-
// - "Space (U+0020)"
|
|
543
|
-
//
|
|
544
|
-
// Comma :: ,
|
|
545
|
-
case 65279:
|
|
546
|
-
// <BOM>
|
|
547
|
-
case 9:
|
|
548
|
-
// \t
|
|
549
|
-
case 32:
|
|
550
|
-
// <space>
|
|
551
|
-
case 44:
|
|
552
|
-
++r;
|
|
553
|
-
continue;
|
|
554
|
-
// LineTerminator ::
|
|
555
|
-
// - "New Line (U+000A)"
|
|
556
|
-
// - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
|
|
557
|
-
// - "Carriage Return (U+000D)" "New Line (U+000A)"
|
|
558
|
-
case 10:
|
|
559
|
-
++r, ++e.line, e.lineStart = r;
|
|
560
|
-
continue;
|
|
561
|
-
case 13:
|
|
562
|
-
s.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
563
|
-
continue;
|
|
564
|
-
// Comment
|
|
565
|
-
case 35:
|
|
566
|
-
return Cs(e, r);
|
|
567
|
-
// Token ::
|
|
568
|
-
// - Punctuator
|
|
569
|
-
// - Name
|
|
570
|
-
// - IntValue
|
|
571
|
-
// - FloatValue
|
|
572
|
-
// - StringValue
|
|
573
|
-
//
|
|
574
|
-
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
575
|
-
case 33:
|
|
576
|
-
return S(e, h.BANG, r, r + 1);
|
|
577
|
-
case 36:
|
|
578
|
-
return S(e, h.DOLLAR, r, r + 1);
|
|
579
|
-
case 38:
|
|
580
|
-
return S(e, h.AMP, r, r + 1);
|
|
581
|
-
case 40:
|
|
582
|
-
return S(e, h.PAREN_L, r, r + 1);
|
|
583
|
-
case 41:
|
|
584
|
-
return S(e, h.PAREN_R, r, r + 1);
|
|
585
|
-
case 46:
|
|
586
|
-
if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
|
|
587
|
-
return S(e, h.SPREAD, r, r + 3);
|
|
588
|
-
break;
|
|
589
|
-
case 58:
|
|
590
|
-
return S(e, h.COLON, r, r + 1);
|
|
591
|
-
case 61:
|
|
592
|
-
return S(e, h.EQUALS, r, r + 1);
|
|
593
|
-
case 64:
|
|
594
|
-
return S(e, h.AT, r, r + 1);
|
|
595
|
-
case 91:
|
|
596
|
-
return S(e, h.BRACKET_L, r, r + 1);
|
|
597
|
-
case 93:
|
|
598
|
-
return S(e, h.BRACKET_R, r, r + 1);
|
|
599
|
-
case 123:
|
|
600
|
-
return S(e, h.BRACE_L, r, r + 1);
|
|
601
|
-
case 124:
|
|
602
|
-
return S(e, h.PIPE, r, r + 1);
|
|
603
|
-
case 125:
|
|
604
|
-
return S(e, h.BRACE_R, r, r + 1);
|
|
605
|
-
// StringValue
|
|
606
|
-
case 34:
|
|
607
|
-
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? $s(e, r) : Ts(e, r);
|
|
608
|
-
}
|
|
609
|
-
if (Z(o) || o === 45)
|
|
610
|
-
return Ss(e, r, o);
|
|
611
|
-
if (At(o))
|
|
612
|
-
return Ps(e, r);
|
|
613
|
-
throw R(
|
|
614
|
-
e.source,
|
|
615
|
-
r,
|
|
616
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : z(o) || le(s, r) ? `Unexpected character: ${V(e, r)}.` : `Invalid character: ${V(e, r)}.`
|
|
617
|
-
);
|
|
618
|
-
}
|
|
619
|
-
return S(e, h.EOF, a, a);
|
|
620
|
-
}
|
|
621
|
-
function Cs(e, t) {
|
|
622
|
-
const s = e.source.body, a = s.length;
|
|
623
|
-
let r = t + 1;
|
|
624
|
-
for (; r < a; ) {
|
|
625
|
-
const o = s.charCodeAt(r);
|
|
626
|
-
if (o === 10 || o === 13)
|
|
627
|
-
break;
|
|
628
|
-
if (z(o))
|
|
629
|
-
++r;
|
|
630
|
-
else if (le(s, r))
|
|
631
|
-
r += 2;
|
|
632
|
-
else
|
|
633
|
-
break;
|
|
634
|
-
}
|
|
635
|
-
return S(
|
|
636
|
-
e,
|
|
637
|
-
h.COMMENT,
|
|
638
|
-
t,
|
|
639
|
-
r,
|
|
640
|
-
s.slice(t + 1, r)
|
|
641
|
-
);
|
|
642
|
-
}
|
|
643
|
-
function Ss(e, t, s) {
|
|
644
|
-
const a = e.source.body;
|
|
645
|
-
let r = t, o = s, i = !1;
|
|
646
|
-
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
647
|
-
if (o = a.charCodeAt(++r), Z(o))
|
|
648
|
-
throw R(
|
|
649
|
-
e.source,
|
|
650
|
-
r,
|
|
651
|
-
`Invalid number, unexpected digit after 0: ${V(
|
|
652
|
-
e,
|
|
653
|
-
r
|
|
654
|
-
)}.`
|
|
655
|
-
);
|
|
656
|
-
} else
|
|
657
|
-
r = fe(e, r, o), o = a.charCodeAt(r);
|
|
658
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = fe(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 = fe(e, r, o), o = a.charCodeAt(r)), o === 46 || At(o))
|
|
659
|
-
throw R(
|
|
660
|
-
e.source,
|
|
661
|
-
r,
|
|
662
|
-
`Invalid number, expected digit but got: ${V(
|
|
663
|
-
e,
|
|
664
|
-
r
|
|
665
|
-
)}.`
|
|
666
|
-
);
|
|
667
|
-
return S(
|
|
668
|
-
e,
|
|
669
|
-
i ? h.FLOAT : h.INT,
|
|
670
|
-
t,
|
|
671
|
-
r,
|
|
672
|
-
a.slice(t, r)
|
|
673
|
-
);
|
|
674
|
-
}
|
|
675
|
-
function fe(e, t, s) {
|
|
676
|
-
if (!Z(s))
|
|
677
|
-
throw R(
|
|
678
|
-
e.source,
|
|
679
|
-
t,
|
|
680
|
-
`Invalid number, expected digit but got: ${V(
|
|
681
|
-
e,
|
|
682
|
-
t
|
|
683
|
-
)}.`
|
|
684
|
-
);
|
|
685
|
-
const a = e.source.body;
|
|
686
|
-
let r = t + 1;
|
|
687
|
-
for (; Z(a.charCodeAt(r)); )
|
|
688
|
-
++r;
|
|
689
|
-
return r;
|
|
690
|
-
}
|
|
691
|
-
function Ts(e, t) {
|
|
692
|
-
const s = e.source.body, a = s.length;
|
|
693
|
-
let r = t + 1, o = r, i = "";
|
|
694
|
-
for (; r < a; ) {
|
|
695
|
-
const c = s.charCodeAt(r);
|
|
696
|
-
if (c === 34)
|
|
697
|
-
return i += s.slice(o, r), S(e, h.STRING, t, r + 1, i);
|
|
698
|
-
if (c === 92) {
|
|
699
|
-
i += s.slice(o, r);
|
|
700
|
-
const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? As(e, r) : Os(e, r) : Rs(e, r);
|
|
701
|
-
i += l.value, r += l.size, o = r;
|
|
702
|
-
continue;
|
|
703
|
-
}
|
|
704
|
-
if (c === 10 || c === 13)
|
|
705
|
-
break;
|
|
706
|
-
if (z(c))
|
|
707
|
-
++r;
|
|
708
|
-
else if (le(s, r))
|
|
709
|
-
r += 2;
|
|
710
|
-
else
|
|
711
|
-
throw R(
|
|
712
|
-
e.source,
|
|
713
|
-
r,
|
|
714
|
-
`Invalid character within String: ${V(
|
|
715
|
-
e,
|
|
716
|
-
r
|
|
717
|
-
)}.`
|
|
718
|
-
);
|
|
719
|
-
}
|
|
720
|
-
throw R(e.source, r, "Unterminated string.");
|
|
721
|
-
}
|
|
722
|
-
function As(e, t) {
|
|
723
|
-
const s = e.source.body;
|
|
724
|
-
let a = 0, r = 3;
|
|
725
|
-
for (; r < 12; ) {
|
|
726
|
-
const o = s.charCodeAt(t + r++);
|
|
727
|
-
if (o === 125) {
|
|
728
|
-
if (r < 5 || !z(a))
|
|
729
|
-
break;
|
|
730
|
-
return {
|
|
731
|
-
value: String.fromCodePoint(a),
|
|
732
|
-
size: r
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
if (a = a << 4 | U(o), a < 0)
|
|
736
|
-
break;
|
|
737
|
-
}
|
|
738
|
-
throw R(
|
|
739
|
-
e.source,
|
|
740
|
-
t,
|
|
741
|
-
`Invalid Unicode escape sequence: "${s.slice(
|
|
742
|
-
t,
|
|
743
|
-
t + r
|
|
744
|
-
)}".`
|
|
745
|
-
);
|
|
746
|
-
}
|
|
747
|
-
function Os(e, t) {
|
|
748
|
-
const s = e.source.body, a = lt(s, t + 2);
|
|
749
|
-
if (z(a))
|
|
750
|
-
return {
|
|
751
|
-
value: String.fromCodePoint(a),
|
|
752
|
-
size: 6
|
|
753
|
-
};
|
|
754
|
-
if (Ot(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
|
|
755
|
-
const r = lt(s, t + 8);
|
|
756
|
-
if (Rt(r))
|
|
757
|
-
return {
|
|
758
|
-
value: String.fromCodePoint(a, r),
|
|
759
|
-
size: 12
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
throw R(
|
|
763
|
-
e.source,
|
|
764
|
-
t,
|
|
765
|
-
`Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
|
|
766
|
-
);
|
|
767
|
-
}
|
|
768
|
-
function lt(e, t) {
|
|
769
|
-
return U(e.charCodeAt(t)) << 12 | U(e.charCodeAt(t + 1)) << 8 | U(e.charCodeAt(t + 2)) << 4 | U(e.charCodeAt(t + 3));
|
|
770
|
-
}
|
|
771
|
-
function U(e) {
|
|
772
|
-
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
773
|
-
}
|
|
774
|
-
function Rs(e, t) {
|
|
775
|
-
const s = e.source.body;
|
|
776
|
-
switch (s.charCodeAt(t + 1)) {
|
|
777
|
-
case 34:
|
|
778
|
-
return {
|
|
779
|
-
value: '"',
|
|
780
|
-
size: 2
|
|
781
|
-
};
|
|
782
|
-
case 92:
|
|
783
|
-
return {
|
|
784
|
-
value: "\\",
|
|
785
|
-
size: 2
|
|
786
|
-
};
|
|
787
|
-
case 47:
|
|
788
|
-
return {
|
|
789
|
-
value: "/",
|
|
790
|
-
size: 2
|
|
791
|
-
};
|
|
792
|
-
case 98:
|
|
793
|
-
return {
|
|
794
|
-
value: "\b",
|
|
795
|
-
size: 2
|
|
796
|
-
};
|
|
797
|
-
case 102:
|
|
798
|
-
return {
|
|
799
|
-
value: "\f",
|
|
800
|
-
size: 2
|
|
801
|
-
};
|
|
802
|
-
case 110:
|
|
803
|
-
return {
|
|
804
|
-
value: `
|
|
805
|
-
`,
|
|
806
|
-
size: 2
|
|
807
|
-
};
|
|
808
|
-
case 114:
|
|
809
|
-
return {
|
|
810
|
-
value: "\r",
|
|
811
|
-
size: 2
|
|
812
|
-
};
|
|
813
|
-
case 116:
|
|
814
|
-
return {
|
|
815
|
-
value: " ",
|
|
816
|
-
size: 2
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
throw R(
|
|
820
|
-
e.source,
|
|
821
|
-
t,
|
|
822
|
-
`Invalid character escape sequence: "${s.slice(
|
|
823
|
-
t,
|
|
824
|
-
t + 2
|
|
825
|
-
)}".`
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
function $s(e, t) {
|
|
829
|
-
const s = e.source.body, a = s.length;
|
|
830
|
-
let r = e.lineStart, o = t + 3, i = o, c = "";
|
|
831
|
-
const l = [];
|
|
832
|
-
for (; o < a; ) {
|
|
833
|
-
const m = s.charCodeAt(o);
|
|
834
|
-
if (m === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
|
|
835
|
-
c += s.slice(i, o), l.push(c);
|
|
836
|
-
const u = S(
|
|
837
|
-
e,
|
|
838
|
-
h.BLOCK_STRING,
|
|
839
|
-
t,
|
|
840
|
-
o + 3,
|
|
841
|
-
// Return a string of the lines joined with U+000A.
|
|
842
|
-
ys(l).join(`
|
|
843
|
-
`)
|
|
844
|
-
);
|
|
845
|
-
return e.line += l.length - 1, e.lineStart = r, u;
|
|
846
|
-
}
|
|
847
|
-
if (m === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
|
|
848
|
-
c += s.slice(i, o), i = o + 1, o += 4;
|
|
849
|
-
continue;
|
|
850
|
-
}
|
|
851
|
-
if (m === 10 || m === 13) {
|
|
852
|
-
c += s.slice(i, o), l.push(c), m === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, c = "", i = o, r = o;
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
if (z(m))
|
|
856
|
-
++o;
|
|
857
|
-
else if (le(s, o))
|
|
858
|
-
o += 2;
|
|
859
|
-
else
|
|
860
|
-
throw R(
|
|
861
|
-
e.source,
|
|
862
|
-
o,
|
|
863
|
-
`Invalid character within String: ${V(
|
|
864
|
-
e,
|
|
865
|
-
o
|
|
866
|
-
)}.`
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
throw R(e.source, o, "Unterminated string.");
|
|
870
|
-
}
|
|
871
|
-
function Ps(e, t) {
|
|
872
|
-
const s = e.source.body, a = s.length;
|
|
873
|
-
let r = t + 1;
|
|
874
|
-
for (; r < a; ) {
|
|
875
|
-
const o = s.charCodeAt(r);
|
|
876
|
-
if (gs(o))
|
|
877
|
-
++r;
|
|
878
|
-
else
|
|
879
|
-
break;
|
|
880
|
-
}
|
|
881
|
-
return S(
|
|
882
|
-
e,
|
|
883
|
-
h.NAME,
|
|
884
|
-
t,
|
|
885
|
-
r,
|
|
886
|
-
s.slice(t, r)
|
|
887
|
-
);
|
|
888
|
-
}
|
|
889
|
-
const Ls = 10, $t = 2;
|
|
890
|
-
function Pt(e) {
|
|
891
|
-
return ce(e, []);
|
|
892
|
-
}
|
|
893
|
-
function ce(e, t) {
|
|
894
|
-
switch (typeof e) {
|
|
895
|
-
case "string":
|
|
896
|
-
return JSON.stringify(e);
|
|
897
|
-
case "function":
|
|
898
|
-
return e.name ? `[function ${e.name}]` : "[function]";
|
|
899
|
-
case "object":
|
|
900
|
-
return Es(e, t);
|
|
901
|
-
default:
|
|
902
|
-
return String(e);
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
function Es(e, t) {
|
|
906
|
-
if (e === null)
|
|
907
|
-
return "null";
|
|
908
|
-
if (t.includes(e))
|
|
909
|
-
return "[Circular]";
|
|
910
|
-
const s = [...t, e];
|
|
911
|
-
if (Is(e)) {
|
|
912
|
-
const a = e.toJSON();
|
|
913
|
-
if (a !== e)
|
|
914
|
-
return typeof a == "string" ? a : ce(a, s);
|
|
915
|
-
} else if (Array.isArray(e))
|
|
916
|
-
return Ds(e, s);
|
|
917
|
-
return ks(e, s);
|
|
918
|
-
}
|
|
919
|
-
function Is(e) {
|
|
920
|
-
return typeof e.toJSON == "function";
|
|
921
|
-
}
|
|
922
|
-
function ks(e, t) {
|
|
923
|
-
const s = Object.entries(e);
|
|
924
|
-
return s.length === 0 ? "{}" : t.length > $t ? "[" + Bs(e) + "]" : "{ " + s.map(
|
|
925
|
-
([r, o]) => r + ": " + ce(o, t)
|
|
926
|
-
).join(", ") + " }";
|
|
927
|
-
}
|
|
928
|
-
function Ds(e, t) {
|
|
929
|
-
if (e.length === 0)
|
|
930
|
-
return "[]";
|
|
931
|
-
if (t.length > $t)
|
|
932
|
-
return "[Array]";
|
|
933
|
-
const s = Math.min(Ls, e.length), a = e.length - s, r = [];
|
|
934
|
-
for (let o = 0; o < s; ++o)
|
|
935
|
-
r.push(ce(e[o], t));
|
|
936
|
-
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
937
|
-
}
|
|
938
|
-
function Bs(e) {
|
|
939
|
-
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
940
|
-
if (t === "Object" && typeof e.constructor == "function") {
|
|
941
|
-
const s = e.constructor.name;
|
|
942
|
-
if (typeof s == "string" && s !== "")
|
|
943
|
-
return s;
|
|
944
|
-
}
|
|
945
|
-
return t;
|
|
946
|
-
}
|
|
947
|
-
const Fs = globalThis.process && // eslint-disable-next-line no-undef
|
|
948
|
-
process.env.NODE_ENV === "production", Vs = (
|
|
949
|
-
/* c8 ignore next 6 */
|
|
950
|
-
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
951
|
-
Fs ? function(t, s) {
|
|
952
|
-
return t instanceof s;
|
|
953
|
-
} : function(t, s) {
|
|
954
|
-
if (t instanceof s)
|
|
955
|
-
return !0;
|
|
956
|
-
if (typeof t == "object" && t !== null) {
|
|
957
|
-
var a;
|
|
958
|
-
const r = s.prototype[Symbol.toStringTag], o = (
|
|
959
|
-
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
960
|
-
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
|
|
961
|
-
);
|
|
962
|
-
if (r === o) {
|
|
963
|
-
const i = Pt(t);
|
|
964
|
-
throw new Error(`Cannot use ${r} "${i}" from another module or realm.
|
|
965
|
-
|
|
966
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
|
967
|
-
directory. If different versions of "graphql" are the dependencies of other
|
|
968
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
969
|
-
|
|
970
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
971
|
-
|
|
972
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
|
973
|
-
versions may have different capabilities and behavior. The data from one
|
|
974
|
-
version used in the function from another could produce confusing and
|
|
975
|
-
spurious results.`);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
return !1;
|
|
979
|
-
}
|
|
980
|
-
);
|
|
981
|
-
class Lt {
|
|
982
|
-
constructor(t, s = "GraphQL request", a = {
|
|
983
|
-
line: 1,
|
|
984
|
-
column: 1
|
|
985
|
-
}) {
|
|
986
|
-
typeof t == "string" || he(!1, `Body must be a string. Received: ${Pt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || he(
|
|
987
|
-
!1,
|
|
988
|
-
"line in locationOffset is 1-indexed and must be positive."
|
|
989
|
-
), this.locationOffset.column > 0 || he(
|
|
990
|
-
!1,
|
|
991
|
-
"column in locationOffset is 1-indexed and must be positive."
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
get [Symbol.toStringTag]() {
|
|
995
|
-
return "Source";
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
function qs(e) {
|
|
999
|
-
return Vs(e, Lt);
|
|
1000
|
-
}
|
|
1001
|
-
function zs(e) {
|
|
1002
|
-
const t = qs(e) ? e : new Lt(e), s = t.body, a = new js(t);
|
|
1003
|
-
let r = "", o = !1;
|
|
1004
|
-
for (; a.advance().kind !== h.EOF; ) {
|
|
1005
|
-
const i = a.token, c = i.kind, l = !Ns(i.kind);
|
|
1006
|
-
o && (l || i.kind === h.SPREAD) && (r += " ");
|
|
1007
|
-
const m = s.slice(i.start, i.end);
|
|
1008
|
-
c === h.BLOCK_STRING ? r += bs(i.value, {
|
|
1009
|
-
minimize: !0
|
|
1010
|
-
}) : r += m, o = l;
|
|
1011
|
-
}
|
|
1012
|
-
return r;
|
|
1013
|
-
}
|
|
1014
|
-
const Et = vt(
|
|
1015
|
-
void 0
|
|
1016
|
-
), Ta = ({
|
|
1017
|
-
children: e,
|
|
1018
|
-
client: t
|
|
1019
|
-
}) => /* @__PURE__ */ n.jsx(Et.Provider, { value: t, children: e }), It = (e, t, ...[s]) => ({
|
|
1020
|
-
queryFn: () => e.fetch(t, s),
|
|
1021
|
-
queryKey: [zs(t.toString()), s]
|
|
1022
|
-
}), _s = (e, ...[t]) => {
|
|
1023
|
-
const s = Ln(Et);
|
|
1024
|
-
if (s === void 0)
|
|
1025
|
-
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1026
|
-
return It(s, e, ...t === void 0 ? [] : [t]);
|
|
1027
|
-
};
|
|
1028
|
-
class q extends String {
|
|
1029
|
-
__apiType;
|
|
1030
|
-
value;
|
|
1031
|
-
__meta__;
|
|
1032
|
-
constructor(t, s) {
|
|
1033
|
-
super(t), this.value = t, this.__meta__ = s;
|
|
1034
|
-
}
|
|
1035
|
-
toString() {
|
|
1036
|
-
return this.value;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
const Us = new q(
|
|
1040
|
-
`
|
|
1041
|
-
fragment OperationsFragment on OperationItem {
|
|
1042
|
-
slug
|
|
1043
|
-
summary
|
|
1044
|
-
method
|
|
1045
|
-
description
|
|
1046
|
-
operationId
|
|
1047
|
-
contentTypes
|
|
1048
|
-
path
|
|
1049
|
-
deprecated
|
|
1050
|
-
extensions
|
|
1051
|
-
parameters {
|
|
1052
|
-
name
|
|
1053
|
-
in
|
|
1054
|
-
description
|
|
1055
|
-
required
|
|
1056
|
-
schema
|
|
1057
|
-
style
|
|
1058
|
-
explode
|
|
1059
|
-
examples {
|
|
1060
|
-
name
|
|
1061
|
-
description
|
|
1062
|
-
externalValue
|
|
1063
|
-
value
|
|
1064
|
-
summary
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
requestBody {
|
|
1068
|
-
content {
|
|
1069
|
-
mediaType
|
|
1070
|
-
encoding {
|
|
1071
|
-
name
|
|
1072
|
-
}
|
|
1073
|
-
examples {
|
|
1074
|
-
name
|
|
1075
|
-
description
|
|
1076
|
-
externalValue
|
|
1077
|
-
value
|
|
1078
|
-
summary
|
|
1079
|
-
}
|
|
1080
|
-
schema
|
|
1081
|
-
}
|
|
1082
|
-
description
|
|
1083
|
-
required
|
|
1084
|
-
}
|
|
1085
|
-
responses {
|
|
1086
|
-
statusCode
|
|
1087
|
-
links
|
|
1088
|
-
description
|
|
1089
|
-
content {
|
|
1090
|
-
examples {
|
|
1091
|
-
name
|
|
1092
|
-
description
|
|
1093
|
-
externalValue
|
|
1094
|
-
value
|
|
1095
|
-
summary
|
|
1096
|
-
}
|
|
1097
|
-
mediaType
|
|
1098
|
-
encoding {
|
|
1099
|
-
name
|
|
1100
|
-
}
|
|
1101
|
-
schema
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
`,
|
|
1106
|
-
{ fragmentName: "OperationsFragment" }
|
|
1107
|
-
), Ms = new q(`
|
|
1108
|
-
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1109
|
-
schema(input: $input, type: $type) {
|
|
1110
|
-
url
|
|
1111
|
-
servers {
|
|
1112
|
-
url
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
`), Gs = new q(`
|
|
1117
|
-
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1118
|
-
schema(input: $input, type: $type) {
|
|
1119
|
-
openapi
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
`), Hs = new q(`
|
|
1123
|
-
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1124
|
-
schema(input: $input, type: $type) {
|
|
1125
|
-
servers {
|
|
1126
|
-
url
|
|
1127
|
-
}
|
|
1128
|
-
description
|
|
1129
|
-
summary
|
|
1130
|
-
title
|
|
1131
|
-
url
|
|
1132
|
-
version
|
|
1133
|
-
tag(slug: $tag, untagged: $untagged) {
|
|
1134
|
-
name
|
|
1135
|
-
description
|
|
1136
|
-
operations {
|
|
1137
|
-
slug
|
|
1138
|
-
...OperationsFragment
|
|
1139
|
-
}
|
|
1140
|
-
next {
|
|
1141
|
-
name
|
|
1142
|
-
slug
|
|
1143
|
-
}
|
|
1144
|
-
prev {
|
|
1145
|
-
name
|
|
1146
|
-
slug
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
fragment OperationsFragment on OperationItem {
|
|
1152
|
-
slug
|
|
1153
|
-
summary
|
|
1154
|
-
method
|
|
1155
|
-
description
|
|
1156
|
-
operationId
|
|
1157
|
-
contentTypes
|
|
1158
|
-
path
|
|
1159
|
-
deprecated
|
|
1160
|
-
extensions
|
|
1161
|
-
parameters {
|
|
1162
|
-
name
|
|
1163
|
-
in
|
|
1164
|
-
description
|
|
1165
|
-
required
|
|
1166
|
-
schema
|
|
1167
|
-
style
|
|
1168
|
-
explode
|
|
1169
|
-
examples {
|
|
1170
|
-
name
|
|
1171
|
-
description
|
|
1172
|
-
externalValue
|
|
1173
|
-
value
|
|
1174
|
-
summary
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
requestBody {
|
|
1178
|
-
content {
|
|
1179
|
-
mediaType
|
|
1180
|
-
encoding {
|
|
1181
|
-
name
|
|
1182
|
-
}
|
|
1183
|
-
examples {
|
|
1184
|
-
name
|
|
1185
|
-
description
|
|
1186
|
-
externalValue
|
|
1187
|
-
value
|
|
1188
|
-
summary
|
|
1189
|
-
}
|
|
1190
|
-
schema
|
|
1191
|
-
}
|
|
1192
|
-
description
|
|
1193
|
-
required
|
|
1194
|
-
}
|
|
1195
|
-
responses {
|
|
1196
|
-
statusCode
|
|
1197
|
-
links
|
|
1198
|
-
description
|
|
1199
|
-
content {
|
|
1200
|
-
examples {
|
|
1201
|
-
name
|
|
1202
|
-
description
|
|
1203
|
-
externalValue
|
|
1204
|
-
value
|
|
1205
|
-
summary
|
|
1206
|
-
}
|
|
1207
|
-
mediaType
|
|
1208
|
-
encoding {
|
|
1209
|
-
name
|
|
1210
|
-
}
|
|
1211
|
-
schema
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
}`), Qs = new q(`
|
|
1215
|
-
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1216
|
-
schema(input: $input, type: $type) {
|
|
1217
|
-
title
|
|
1218
|
-
description
|
|
1219
|
-
summary
|
|
1220
|
-
components {
|
|
1221
|
-
schemas {
|
|
1222
|
-
name
|
|
1223
|
-
schema
|
|
1224
|
-
extensions
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
`), Js = new q(`
|
|
1230
|
-
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1231
|
-
schema(input: $input, type: $type) {
|
|
1232
|
-
url
|
|
1233
|
-
servers {
|
|
1234
|
-
url
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
`), Ws = new q(`
|
|
1239
|
-
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1240
|
-
schema(input: $input, type: $type) {
|
|
1241
|
-
tags {
|
|
1242
|
-
slug
|
|
1243
|
-
name
|
|
1244
|
-
extensions
|
|
1245
|
-
operations {
|
|
1246
|
-
summary
|
|
1247
|
-
slug
|
|
1248
|
-
method
|
|
1249
|
-
operationId
|
|
1250
|
-
path
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
components {
|
|
1254
|
-
schemas {
|
|
1255
|
-
__typename
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
`), Xs = {
|
|
1261
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Ms,
|
|
1262
|
-
"\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": Us,
|
|
1263
|
-
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": Gs,
|
|
1264
|
-
"\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": Hs,
|
|
1265
|
-
"\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": Qs,
|
|
1266
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Js,
|
|
1267
|
-
"\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": Ws
|
|
1268
|
-
};
|
|
1269
|
-
function Zs(e) {
|
|
1270
|
-
return Xs[e] ?? {};
|
|
1271
|
-
}
|
|
1272
|
-
const kt = C.Root, Dt = C.Value, Ie = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1273
|
-
C.Trigger,
|
|
1274
|
-
{
|
|
1275
|
-
ref: a,
|
|
1276
|
-
className: v(
|
|
1277
|
-
"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-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1278
|
-
e
|
|
1279
|
-
),
|
|
1280
|
-
...s,
|
|
1281
|
-
children: [
|
|
1282
|
-
/* @__PURE__ */ n.jsx("span", { className: "truncate", children: t }),
|
|
1283
|
-
/* @__PURE__ */ n.jsx(C.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(xt, { className: "shrink-0 h-4 w-4 opacity-50" }) })
|
|
1284
|
-
]
|
|
1285
|
-
}
|
|
1286
|
-
));
|
|
1287
|
-
Ie.displayName = C.Trigger.displayName;
|
|
1288
|
-
const Bt = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1289
|
-
C.ScrollUpButton,
|
|
1290
|
-
{
|
|
1291
|
-
ref: s,
|
|
1292
|
-
className: v(
|
|
1293
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1294
|
-
e
|
|
1295
|
-
),
|
|
1296
|
-
...t,
|
|
1297
|
-
children: /* @__PURE__ */ n.jsx(pn, { className: "h-4 w-4" })
|
|
1298
|
-
}
|
|
1299
|
-
));
|
|
1300
|
-
Bt.displayName = C.ScrollUpButton.displayName;
|
|
1301
|
-
const Ft = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1302
|
-
C.ScrollDownButton,
|
|
1303
|
-
{
|
|
1304
|
-
ref: s,
|
|
1305
|
-
className: v(
|
|
1306
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1307
|
-
e
|
|
1308
|
-
),
|
|
1309
|
-
...t,
|
|
1310
|
-
children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" })
|
|
1311
|
-
}
|
|
1312
|
-
));
|
|
1313
|
-
Ft.displayName = C.ScrollDownButton.displayName;
|
|
1314
|
-
const ke = N.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(C.Portal, { children: /* @__PURE__ */ n.jsxs(
|
|
1315
|
-
C.Content,
|
|
1316
|
-
{
|
|
1317
|
-
ref: r,
|
|
1318
|
-
className: v(
|
|
1319
|
-
"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",
|
|
1320
|
-
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",
|
|
1321
|
-
e
|
|
1322
|
-
),
|
|
1323
|
-
position: s,
|
|
1324
|
-
...a,
|
|
1325
|
-
children: [
|
|
1326
|
-
/* @__PURE__ */ n.jsx(Bt, {}),
|
|
1327
|
-
/* @__PURE__ */ n.jsx(
|
|
1328
|
-
C.Viewport,
|
|
1329
|
-
{
|
|
1330
|
-
className: v(
|
|
1331
|
-
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
1332
|
-
"divide-y"
|
|
1333
|
-
),
|
|
1334
|
-
children: t
|
|
1335
|
-
}
|
|
1336
|
-
),
|
|
1337
|
-
/* @__PURE__ */ n.jsx(Ft, {})
|
|
1338
|
-
]
|
|
1339
|
-
}
|
|
1340
|
-
) }));
|
|
1341
|
-
ke.displayName = C.Content.displayName;
|
|
1342
|
-
const Ys = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1343
|
-
C.Label,
|
|
1344
|
-
{
|
|
1345
|
-
ref: s,
|
|
1346
|
-
className: v("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
|
|
1347
|
-
...t
|
|
1348
|
-
}
|
|
1349
|
-
));
|
|
1350
|
-
Ys.displayName = C.Label.displayName;
|
|
1351
|
-
const G = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1352
|
-
C.Item,
|
|
1353
|
-
{
|
|
1354
|
-
ref: a,
|
|
1355
|
-
className: v(
|
|
1356
|
-
"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",
|
|
1357
|
-
e
|
|
1358
|
-
),
|
|
1359
|
-
...s,
|
|
1360
|
-
children: [
|
|
1361
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(C.ItemIndicator, { children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" }) }) }),
|
|
1362
|
-
/* @__PURE__ */ n.jsx(C.ItemText, { children: t })
|
|
1363
|
-
]
|
|
1364
|
-
}
|
|
1365
|
-
));
|
|
1366
|
-
G.displayName = C.Item.displayName;
|
|
1367
|
-
const Ks = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1368
|
-
C.Separator,
|
|
1369
|
-
{
|
|
1370
|
-
ref: s,
|
|
1371
|
-
className: v("-mx-1 my-1 h-px bg-muted", e),
|
|
1372
|
-
...t
|
|
1373
|
-
}
|
|
1374
|
-
));
|
|
1375
|
-
Ks.displayName = C.Separator.displayName;
|
|
1376
|
-
const er = ({
|
|
1377
|
-
path: e,
|
|
1378
|
-
renderParam: t
|
|
1379
|
-
}) => {
|
|
1380
|
-
let s = 0;
|
|
1381
|
-
return e.split("/").map((a, r, o) => {
|
|
1382
|
-
const i = Array.from(a.matchAll(/{([^}]+)}/g)), c = [];
|
|
1383
|
-
let l = 0;
|
|
1384
|
-
return i.forEach((m) => {
|
|
1385
|
-
const [u, g] = m;
|
|
1386
|
-
if (!g) return;
|
|
1387
|
-
const f = m.index;
|
|
1388
|
-
f > l && c.push(
|
|
1389
|
-
/* @__PURE__ */ n.jsx(D, { children: a.slice(l, f) }, `text-${l}-${f}`)
|
|
1390
|
-
), c.push(
|
|
1391
|
-
/* @__PURE__ */ n.jsx(D, { children: t({ name: g, originalValue: u, index: s++ }) }, `param-${g}`)
|
|
1392
|
-
), l = f + u.length;
|
|
1393
|
-
}), l < a.length && c.push(
|
|
1394
|
-
/* @__PURE__ */ n.jsx(D, { children: a.slice(l) }, `text-${l}-${a.length}`)
|
|
1395
|
-
), // eslint-disable-next-line react/no-array-index-key
|
|
1396
|
-
/* @__PURE__ */ n.jsxs(D, { children: [
|
|
1397
|
-
c,
|
|
1398
|
-
r < o.length - 1 && "/",
|
|
1399
|
-
/* @__PURE__ */ n.jsx("wbr", {})
|
|
1400
|
-
] }, `${a}-${r}`);
|
|
1401
|
-
});
|
|
1402
|
-
}, xe = (e) => Math.abs(
|
|
1403
|
-
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
1404
|
-
), ge = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${xe(t) + xe(s)}`)) : xe(e), ct = (e, t = {}) => {
|
|
1405
|
-
const s = (3 * ge(e) + 2 * ge(e) + ge(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
|
|
1406
|
-
return `${s}deg ${a}% ${r}%`;
|
|
1407
|
-
}, ye = "data-linked-param", tr = (e) => {
|
|
1408
|
-
const { resolvedTheme: t } = Mn();
|
|
1409
|
-
return {
|
|
1410
|
-
text: ct(
|
|
1411
|
-
e,
|
|
1412
|
-
t === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
1413
|
-
),
|
|
1414
|
-
background: ct(
|
|
1415
|
-
e,
|
|
1416
|
-
t === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
1417
|
-
)
|
|
1418
|
-
};
|
|
1419
|
-
}, Vt = ({
|
|
1420
|
-
name: e,
|
|
1421
|
-
className: t,
|
|
1422
|
-
slug: s,
|
|
1423
|
-
title: a,
|
|
1424
|
-
children: r,
|
|
1425
|
-
onClick: o
|
|
1426
|
-
}) => {
|
|
1427
|
-
const i = W(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: u } = tr(l), g = `hsl(${m} / 100%)`, f = `hsl(${u} / 10%)`, x = `hsl(${u} / 50%)`;
|
|
1428
|
-
return M(() => {
|
|
1429
|
-
if (!c || !i.current) return;
|
|
1430
|
-
const p = () => {
|
|
1431
|
-
document.querySelectorAll(`[${ye}="${c}"]`).forEach((b) => {
|
|
1432
|
-
b instanceof HTMLElement && (b.dataset.active = "true");
|
|
1433
|
-
});
|
|
1434
|
-
}, y = () => {
|
|
1435
|
-
document.querySelectorAll(`[${ye}="${c}"]`).forEach((b) => {
|
|
1436
|
-
b instanceof HTMLElement && (b.dataset.active = "false");
|
|
1437
|
-
});
|
|
1438
|
-
}, j = i.current;
|
|
1439
|
-
return j.addEventListener("mouseenter", p), j.addEventListener("mouseleave", y), () => {
|
|
1440
|
-
j.removeEventListener("mouseenter", p), j.removeEventListener("mouseleave", y);
|
|
1441
|
-
};
|
|
1442
|
-
}, [c]), /* @__PURE__ */ n.jsx(
|
|
1443
|
-
"span",
|
|
1444
|
-
{
|
|
1445
|
-
[ye]: c,
|
|
1446
|
-
className: v(
|
|
1447
|
-
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
1448
|
-
"relative transition-all duration-100 rounded-lg",
|
|
1449
|
-
"border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
|
|
1450
|
-
"data-[active=true]:border-(--param-color) data-[active=true]:shadow-sm data-[active=true]:bottom-px",
|
|
1451
|
-
t
|
|
1452
|
-
),
|
|
1453
|
-
title: a,
|
|
1454
|
-
suppressHydrationWarning: !0,
|
|
1455
|
-
ref: i,
|
|
1456
|
-
onClick: o,
|
|
1457
|
-
style: {
|
|
1458
|
-
"--param-color": g,
|
|
1459
|
-
"--border-color": x,
|
|
1460
|
-
"--background-color": f
|
|
1461
|
-
},
|
|
1462
|
-
children: r ?? e
|
|
1463
|
-
}
|
|
1464
|
-
);
|
|
1465
|
-
}, nr = Ce()(
|
|
1466
|
-
Se(
|
|
1467
|
-
(e) => ({
|
|
1468
|
-
selectedServer: void 0,
|
|
1469
|
-
setSelectedServer: (t) => e({ selectedServer: t })
|
|
1470
|
-
}),
|
|
1471
|
-
{ name: "zudoku-selected-server" }
|
|
1472
|
-
)
|
|
1473
|
-
), sr = (e) => {
|
|
1474
|
-
const { selectedServer: t, setSelectedServer: s } = nr();
|
|
1475
|
-
return { selectedServer: En(
|
|
1476
|
-
() => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
|
|
1477
|
-
[t, e]
|
|
1478
|
-
), setSelectedServer: s };
|
|
1479
|
-
}, qt = N.forwardRef(
|
|
1480
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1481
|
-
"textarea",
|
|
1482
|
-
{
|
|
1483
|
-
className: v(
|
|
1484
|
-
"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",
|
|
1485
|
-
e
|
|
1486
|
-
),
|
|
1487
|
-
ref: s,
|
|
1488
|
-
...t
|
|
1489
|
-
}
|
|
1490
|
-
)
|
|
1491
|
-
);
|
|
1492
|
-
qt.displayName = "Textarea";
|
|
1493
|
-
const rr = w.Root, ar = w.Trigger, or = w.Group, ir = N.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1494
|
-
w.SubTrigger,
|
|
1495
|
-
{
|
|
1496
|
-
ref: r,
|
|
1497
|
-
className: v(
|
|
1498
|
-
"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",
|
|
1499
|
-
t && "pl-8",
|
|
1500
|
-
e
|
|
1501
|
-
),
|
|
1502
|
-
...a,
|
|
1503
|
-
children: [
|
|
1504
|
-
s,
|
|
1505
|
-
/* @__PURE__ */ n.jsx(Q, { className: "ml-auto h-4 w-4" })
|
|
1506
|
-
]
|
|
1507
|
-
}
|
|
1508
|
-
));
|
|
1509
|
-
ir.displayName = w.SubTrigger.displayName;
|
|
1510
|
-
const lr = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1511
|
-
w.SubContent,
|
|
1512
|
-
{
|
|
1513
|
-
ref: s,
|
|
1514
|
-
className: v(
|
|
1515
|
-
"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",
|
|
1516
|
-
e
|
|
1517
|
-
),
|
|
1518
|
-
...t
|
|
1519
|
-
}
|
|
1520
|
-
));
|
|
1521
|
-
lr.displayName = w.SubContent.displayName;
|
|
1522
|
-
const zt = N.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(w.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1523
|
-
w.Content,
|
|
1524
|
-
{
|
|
1525
|
-
ref: a,
|
|
1526
|
-
sideOffset: t,
|
|
1527
|
-
className: v(
|
|
1528
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1529
|
-
"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",
|
|
1530
|
-
e
|
|
1531
|
-
),
|
|
1532
|
-
...s
|
|
1533
|
-
}
|
|
1534
|
-
) }));
|
|
1535
|
-
zt.displayName = w.Content.displayName;
|
|
1536
|
-
const _t = N.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1537
|
-
w.Item,
|
|
1538
|
-
{
|
|
1539
|
-
ref: a,
|
|
1540
|
-
className: v(
|
|
1541
|
-
"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",
|
|
1542
|
-
t && "pl-8",
|
|
1543
|
-
e
|
|
1544
|
-
),
|
|
1545
|
-
...s
|
|
1546
|
-
}
|
|
1547
|
-
));
|
|
1548
|
-
_t.displayName = w.Item.displayName;
|
|
1549
|
-
const cr = N.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1550
|
-
w.CheckboxItem,
|
|
1551
|
-
{
|
|
1552
|
-
ref: r,
|
|
1553
|
-
className: v(
|
|
1554
|
-
"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",
|
|
1555
|
-
e
|
|
1556
|
-
),
|
|
1557
|
-
checked: s,
|
|
1558
|
-
...a,
|
|
1559
|
-
children: [
|
|
1560
|
-
/* @__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(hn, { className: "h-4 w-4" }) }) }),
|
|
1561
|
-
t
|
|
1562
|
-
]
|
|
1563
|
-
}
|
|
1564
|
-
));
|
|
1565
|
-
cr.displayName = w.CheckboxItem.displayName;
|
|
1566
|
-
const dr = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1567
|
-
w.RadioItem,
|
|
1568
|
-
{
|
|
1569
|
-
ref: a,
|
|
1570
|
-
className: v(
|
|
1571
|
-
"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",
|
|
1572
|
-
e
|
|
1573
|
-
),
|
|
1574
|
-
...s,
|
|
1575
|
-
children: [
|
|
1576
|
-
/* @__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(fn, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1577
|
-
t
|
|
1578
|
-
]
|
|
1579
|
-
}
|
|
1580
|
-
));
|
|
1581
|
-
dr.displayName = w.RadioItem.displayName;
|
|
1582
|
-
const Ut = N.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1583
|
-
w.Label,
|
|
1584
|
-
{
|
|
1585
|
-
ref: a,
|
|
1586
|
-
className: v(
|
|
1587
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
1588
|
-
t && "pl-8",
|
|
1589
|
-
e
|
|
1590
|
-
),
|
|
1591
|
-
...s
|
|
1592
|
-
}
|
|
1593
|
-
));
|
|
1594
|
-
Ut.displayName = w.Label.displayName;
|
|
1595
|
-
const Mt = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1596
|
-
w.Separator,
|
|
1597
|
-
{
|
|
1598
|
-
ref: s,
|
|
1599
|
-
className: v("-mx-1 my-1 h-px bg-muted", e),
|
|
1600
|
-
...t
|
|
1601
|
-
}
|
|
1602
|
-
));
|
|
1603
|
-
Mt.displayName = w.Separator.displayName;
|
|
1604
|
-
const ur = ({
|
|
1605
|
-
examples: e,
|
|
1606
|
-
onSelect: t
|
|
1607
|
-
}) => /* @__PURE__ */ n.jsxs(rr, { children: [
|
|
1608
|
-
/* @__PURE__ */ n.jsx(ar, { asChild: !0, children: /* @__PURE__ */ n.jsxs(F, { variant: "ghost", size: "sm", children: [
|
|
1609
|
-
"Use Example ",
|
|
1610
|
-
/* @__PURE__ */ n.jsx(xn, { className: "w-4 h-4" })
|
|
1611
|
-
] }) }),
|
|
1612
|
-
/* @__PURE__ */ n.jsx(zt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
1613
|
-
/* @__PURE__ */ n.jsx(Ut, { children: s.mediaType }),
|
|
1614
|
-
/* @__PURE__ */ n.jsx(Mt, {}),
|
|
1615
|
-
/* @__PURE__ */ n.jsx(or, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
|
|
1616
|
-
_t,
|
|
1617
|
-
{
|
|
1618
|
-
onSelect: () => t(a, s.mediaType),
|
|
1619
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1620
|
-
"span",
|
|
1621
|
-
{
|
|
1622
|
-
className: "line-clamp-1",
|
|
1623
|
-
title: a.summary ?? a.name,
|
|
1624
|
-
children: a.summary ?? a.name
|
|
1625
|
-
}
|
|
1626
|
-
)
|
|
1627
|
-
},
|
|
1628
|
-
a.name
|
|
1629
|
-
)) })
|
|
1630
|
-
] }, s.mediaType)) })
|
|
1631
|
-
] }), mr = ({ examples: e }) => {
|
|
1632
|
-
const { register: t, setValue: s, watch: a } = Re(), r = a("headers");
|
|
1633
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 ", children: [
|
|
1634
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex justify-between gap-2", children: [
|
|
1635
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Body" }),
|
|
1636
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: e && e.length > 0 && /* @__PURE__ */ n.jsx(
|
|
1637
|
-
ur,
|
|
1638
|
-
{
|
|
1639
|
-
examples: e,
|
|
1640
|
-
onSelect: (o, i) => {
|
|
1641
|
-
s("body", JSON.stringify(o.value, null, 2)), s("headers", [
|
|
1642
|
-
...r.filter((c) => c.name !== "Content-Type"),
|
|
1643
|
-
{
|
|
1644
|
-
name: "Content-Type",
|
|
1645
|
-
value: i,
|
|
1646
|
-
active: !0
|
|
1647
|
-
}
|
|
1648
|
-
]);
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
) })
|
|
1652
|
-
] }),
|
|
1653
|
-
/* @__PURE__ */ n.jsx(
|
|
1654
|
-
qt,
|
|
1655
|
-
{
|
|
1656
|
-
...t("body"),
|
|
1657
|
-
className: v(
|
|
1658
|
-
"border w-full rounded-lg bg-muted/40 p-2 h-64 font-mono text-[13px]"
|
|
1659
|
-
)
|
|
1660
|
-
}
|
|
1661
|
-
)
|
|
1662
|
-
] });
|
|
1663
|
-
}, pr = (e, t, s) => {
|
|
1664
|
-
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1665
|
-
const i = o.replace(/[:{}]/g, "");
|
|
1666
|
-
return s.pathParams.find((l) => l.name === i)?.value ?? o;
|
|
1667
|
-
}), r = new URL(
|
|
1668
|
-
a.replace(/^\//, ""),
|
|
1669
|
-
e.endsWith("/") ? e : `${e}/`
|
|
1670
|
-
);
|
|
1671
|
-
return s.queryParams.filter((o) => o.active).forEach((o) => {
|
|
1672
|
-
r.searchParams.set(o.name, o.value);
|
|
1673
|
-
}), r;
|
|
1674
|
-
};
|
|
1675
|
-
function hr(e) {
|
|
1676
|
-
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1677
|
-
e
|
|
1678
|
-
);
|
|
1679
|
-
}
|
|
1680
|
-
const fr = (e, t) => {
|
|
1681
|
-
const s = e.find(
|
|
1682
|
-
([a]) => a.toLowerCase() === "content-disposition"
|
|
1683
|
-
)?.[1];
|
|
1684
|
-
if (s) {
|
|
1685
|
-
const a = s.match(
|
|
1686
|
-
/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
|
|
1687
|
-
);
|
|
1688
|
-
if (a?.[1])
|
|
1689
|
-
return a[1].replace(/['"]/g, "");
|
|
1690
|
-
}
|
|
1691
|
-
try {
|
|
1692
|
-
const r = new URL(t).pathname.split("/").pop() || "download";
|
|
1693
|
-
return r.includes(".") ? r : "download";
|
|
1694
|
-
} catch {
|
|
1695
|
-
return "download";
|
|
1696
|
-
}
|
|
1697
|
-
}, de = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1698
|
-
be.Root,
|
|
1699
|
-
{
|
|
1700
|
-
ref: s,
|
|
1701
|
-
className: v(
|
|
1702
|
-
"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",
|
|
1703
|
-
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
1704
|
-
e
|
|
1705
|
-
),
|
|
1706
|
-
...t,
|
|
1707
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1708
|
-
be.Indicator,
|
|
1709
|
-
{
|
|
1710
|
-
className: v("flex items-center justify-center text-current"),
|
|
1711
|
-
children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" })
|
|
1712
|
-
}
|
|
1713
|
-
)
|
|
1714
|
-
}
|
|
1715
|
-
));
|
|
1716
|
-
de.displayName = be.Root.displayName;
|
|
1717
|
-
const xr = re.Root, Gt = N.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(re.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1718
|
-
re.Content,
|
|
1719
|
-
{
|
|
1720
|
-
ref: r,
|
|
1721
|
-
align: t,
|
|
1722
|
-
sideOffset: s,
|
|
1723
|
-
className: v(
|
|
1724
|
-
"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",
|
|
1725
|
-
e
|
|
1726
|
-
),
|
|
1727
|
-
...a
|
|
1728
|
-
}
|
|
1729
|
-
) }));
|
|
1730
|
-
Gt.displayName = re.Content.displayName;
|
|
1731
|
-
const gr = ({
|
|
1732
|
-
value: e,
|
|
1733
|
-
options: t,
|
|
1734
|
-
onChange: s,
|
|
1735
|
-
className: a,
|
|
1736
|
-
placeholder: r = "Enter value",
|
|
1737
|
-
onEnterPress: o,
|
|
1738
|
-
ref: i
|
|
1739
|
-
}) => {
|
|
1740
|
-
const [c, l] = E(!1), [m, u] = E(!1), g = Hn((x) => x.filtered.count), f = W(null);
|
|
1741
|
-
return /* @__PURE__ */ n.jsxs(xr, { open: c, children: [
|
|
1742
|
-
/* @__PURE__ */ n.jsx(Gn, { children: /* @__PURE__ */ n.jsx(
|
|
1743
|
-
Jn,
|
|
1744
|
-
{
|
|
1745
|
-
ref: (x) => {
|
|
1746
|
-
f.current = x, typeof i == "function" ? i(x) : i && (i.current = x);
|
|
1747
|
-
},
|
|
1748
|
-
value: e,
|
|
1749
|
-
placeholder: r,
|
|
1750
|
-
className: v("h-9 bg-transparent", a),
|
|
1751
|
-
onFocus: () => l(!0),
|
|
1752
|
-
onBlur: () => {
|
|
1753
|
-
m || l(!1);
|
|
1754
|
-
},
|
|
1755
|
-
onKeyDown: (x) => {
|
|
1756
|
-
x.key === "Enter" && (l(!1), f.current?.blur(), o?.(x));
|
|
1757
|
-
},
|
|
1758
|
-
onValueChange: (x) => s(x)
|
|
1759
|
-
}
|
|
1760
|
-
) }),
|
|
1761
|
-
/* @__PURE__ */ n.jsx(
|
|
1762
|
-
Gt,
|
|
1763
|
-
{
|
|
1764
|
-
onMouseEnter: () => u(!0),
|
|
1765
|
-
onMouseLeave: () => u(!1),
|
|
1766
|
-
onOpenAutoFocus: (x) => x.preventDefault(),
|
|
1767
|
-
className: v("p-0 w-(--radix-popover-trigger-width)", {
|
|
1768
|
-
"border-0": g === 0
|
|
1769
|
-
}),
|
|
1770
|
-
align: "start",
|
|
1771
|
-
side: "bottom",
|
|
1772
|
-
onWheel: (x) => {
|
|
1773
|
-
x.stopPropagation();
|
|
1774
|
-
},
|
|
1775
|
-
onTouchMove: (x) => {
|
|
1776
|
-
x.stopPropagation();
|
|
1777
|
-
},
|
|
1778
|
-
children: /* @__PURE__ */ n.jsx(Wn, { className: "max-h-[140px]", children: t.map((x) => /* @__PURE__ */ n.jsx(
|
|
1779
|
-
Xn,
|
|
1780
|
-
{
|
|
1781
|
-
value: x,
|
|
1782
|
-
onSelect: (p) => {
|
|
1783
|
-
s(p), l(!1);
|
|
1784
|
-
},
|
|
1785
|
-
className: "cursor-pointer",
|
|
1786
|
-
children: x
|
|
1787
|
-
},
|
|
1788
|
-
x
|
|
1789
|
-
)) })
|
|
1790
|
-
}
|
|
1791
|
-
)
|
|
1792
|
-
] });
|
|
1793
|
-
}, ae = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(Qn, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(gr, { ...t }) }), De = (e, t) => {
|
|
1794
|
-
const s = N.forwardRef(({ className: a, asChild: r, ...o }, i) => {
|
|
1795
|
-
const c = r ? Yn : e;
|
|
1796
|
-
return N.createElement(c, {
|
|
1797
|
-
...o,
|
|
1798
|
-
ref: i,
|
|
1799
|
-
className: typeof t == "function" ? t({ className: a }) : v(t, a)
|
|
1800
|
-
});
|
|
1801
|
-
});
|
|
1802
|
-
return s.displayName = `VariantComponent(${e})`, s;
|
|
1803
|
-
}, Be = De(
|
|
1804
|
-
"div",
|
|
1805
|
-
"grid grid-cols-[2fr_3fr] items-center"
|
|
1806
|
-
), Fe = De(
|
|
1807
|
-
"div",
|
|
1808
|
-
"group hover:bg-accent px-4 py-1 grid col-span-full grid-cols-subgrid"
|
|
1809
|
-
), yr = Object.freeze([
|
|
1810
|
-
"Accept",
|
|
1811
|
-
"Accept-Encoding",
|
|
1812
|
-
"Accept-Language",
|
|
1813
|
-
"Authorization",
|
|
1814
|
-
"Cache-Control",
|
|
1815
|
-
"Connection",
|
|
1816
|
-
"Content-Disposition",
|
|
1817
|
-
"Content-Encoding",
|
|
1818
|
-
"Content-Language",
|
|
1819
|
-
"Content-Length",
|
|
1820
|
-
"Content-Range",
|
|
1821
|
-
"Content-Security-Policy",
|
|
1822
|
-
"Content-Type",
|
|
1823
|
-
"Cookie",
|
|
1824
|
-
"Date",
|
|
1825
|
-
"ETag",
|
|
1826
|
-
"Expires",
|
|
1827
|
-
"Host",
|
|
1828
|
-
"If-Modified-Since",
|
|
1829
|
-
"Location",
|
|
1830
|
-
"Origin",
|
|
1831
|
-
"Pragma",
|
|
1832
|
-
"Referer",
|
|
1833
|
-
"Set-Cookie",
|
|
1834
|
-
"User-Agent",
|
|
1835
|
-
"X-Requested-With"
|
|
1836
|
-
]), vr = ({
|
|
1837
|
-
control: e,
|
|
1838
|
-
headers: t
|
|
1839
|
-
}) => {
|
|
1840
|
-
const { fields: s, append: a, remove: r } = $e({
|
|
1841
|
-
control: e,
|
|
1842
|
-
name: "headers"
|
|
1843
|
-
}), { setValue: o, watch: i } = Re(), c = W([]), l = W([]), m = i("headers"), u = In(() => {
|
|
1844
|
-
a({ name: "", value: "", active: !1 });
|
|
1845
|
-
}, [a]);
|
|
1846
|
-
M(() => {
|
|
1847
|
-
m.length === 0 && u();
|
|
1848
|
-
}, [m, u]);
|
|
1849
|
-
const g = (p) => {
|
|
1850
|
-
c.current[p]?.focus();
|
|
1851
|
-
}, f = (p) => {
|
|
1852
|
-
u(), requestAnimationFrame(() => l.current[p + 1]?.focus());
|
|
1853
|
-
}, x = t.filter((p) => !m.some((y) => y.name === p.name)).map(({ name: p }) => p);
|
|
1854
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 ", children: [
|
|
1855
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1856
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" }),
|
|
1857
|
-
/* @__PURE__ */ n.jsx(
|
|
1858
|
-
J,
|
|
1859
|
-
{
|
|
1860
|
-
className: "",
|
|
1861
|
-
onClick: u,
|
|
1862
|
-
type: "button",
|
|
1863
|
-
size: "sm",
|
|
1864
|
-
variant: "ghost",
|
|
1865
|
-
children: "+ Add header"
|
|
1866
|
-
}
|
|
1867
|
-
)
|
|
1868
|
-
] }),
|
|
1869
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx(ie, { className: "overflow-hidden rounded-lg", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((p, y) => {
|
|
1870
|
-
const j = t.find(
|
|
1871
|
-
(b) => b.name === i(`headers.${y}.name`)
|
|
1872
|
-
);
|
|
1873
|
-
return /* @__PURE__ */ n.jsxs(Fe, { children: [
|
|
1874
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
1875
|
-
/* @__PURE__ */ n.jsx(
|
|
1876
|
-
B,
|
|
1877
|
-
{
|
|
1878
|
-
control: e,
|
|
1879
|
-
name: `headers.${y}.active`,
|
|
1880
|
-
render: ({ field: b }) => /* @__PURE__ */ n.jsx(
|
|
1881
|
-
de,
|
|
1882
|
-
{
|
|
1883
|
-
id: `headers.${y}.active`,
|
|
1884
|
-
checked: b.value,
|
|
1885
|
-
onCheckedChange: (T) => {
|
|
1886
|
-
b.onChange(T);
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
)
|
|
1890
|
-
}
|
|
1891
|
-
),
|
|
1892
|
-
/* @__PURE__ */ n.jsx(
|
|
1893
|
-
B,
|
|
1894
|
-
{
|
|
1895
|
-
control: e,
|
|
1896
|
-
name: `headers.${y}.name`,
|
|
1897
|
-
render: ({ field: b }) => /* @__PURE__ */ n.jsx(
|
|
1898
|
-
ae,
|
|
1899
|
-
{
|
|
1900
|
-
...b,
|
|
1901
|
-
placeholder: "Name",
|
|
1902
|
-
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
|
|
1903
|
-
options: [...x, ...yr],
|
|
1904
|
-
onEnterPress: () => g(y),
|
|
1905
|
-
onChange: (T) => {
|
|
1906
|
-
b.onChange(T), o(`headers.${y}.active`, !0);
|
|
1907
|
-
},
|
|
1908
|
-
ref: (T) => {
|
|
1909
|
-
l.current[y] = T;
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
)
|
|
1913
|
-
}
|
|
1914
|
-
)
|
|
1915
|
-
] }),
|
|
1916
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1917
|
-
/* @__PURE__ */ n.jsx(
|
|
1918
|
-
B,
|
|
1919
|
-
{
|
|
1920
|
-
control: e,
|
|
1921
|
-
name: `headers.${y}.value`,
|
|
1922
|
-
render: ({ field: b }) => j?.enum && j.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1923
|
-
ae,
|
|
1924
|
-
{
|
|
1925
|
-
shouldFilter: !1,
|
|
1926
|
-
value: b.value,
|
|
1927
|
-
options: j.enum ?? [],
|
|
1928
|
-
onChange: (A) => {
|
|
1929
|
-
b.onChange(A), o(`headers.${y}.active`, !0);
|
|
1930
|
-
},
|
|
1931
|
-
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
1932
|
-
}
|
|
1933
|
-
) : /* @__PURE__ */ n.jsx(
|
|
1934
|
-
Pe,
|
|
1935
|
-
{
|
|
1936
|
-
placeholder: "Value",
|
|
1937
|
-
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
1938
|
-
...b,
|
|
1939
|
-
ref: (A) => {
|
|
1940
|
-
c.current[y] = A;
|
|
1941
|
-
},
|
|
1942
|
-
onKeyDown: (A) => {
|
|
1943
|
-
A.key === "Enter" && A.currentTarget.value.trim() && f(y);
|
|
1944
|
-
},
|
|
1945
|
-
autoComplete: "off"
|
|
1946
|
-
}
|
|
1947
|
-
)
|
|
1948
|
-
}
|
|
1949
|
-
),
|
|
1950
|
-
/* @__PURE__ */ n.jsx(
|
|
1951
|
-
J,
|
|
1952
|
-
{
|
|
1953
|
-
size: "icon",
|
|
1954
|
-
variant: "ghost",
|
|
1955
|
-
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
1956
|
-
onClick: () => r(y),
|
|
1957
|
-
type: "button",
|
|
1958
|
-
children: /* @__PURE__ */ n.jsx(gn, { size: 16 })
|
|
1959
|
-
}
|
|
1960
|
-
)
|
|
1961
|
-
] })
|
|
1962
|
-
] }, p.id);
|
|
1963
|
-
}) }) }) })
|
|
1964
|
-
] });
|
|
1965
|
-
}, br = Kn(
|
|
1966
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1967
|
-
), oe = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1968
|
-
Nt.Root,
|
|
1969
|
-
{
|
|
1970
|
-
ref: s,
|
|
1971
|
-
className: v(br(), e),
|
|
1972
|
-
...t
|
|
1973
|
-
}
|
|
1974
|
-
));
|
|
1975
|
-
oe.displayName = Nt.Root.displayName;
|
|
1976
|
-
const Ht = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1977
|
-
X.Root,
|
|
1978
|
-
{
|
|
1979
|
-
className: v("grid gap-2", e),
|
|
1980
|
-
...t,
|
|
1981
|
-
ref: s
|
|
1982
|
-
}
|
|
1983
|
-
));
|
|
1984
|
-
Ht.displayName = X.Root.displayName;
|
|
1985
|
-
const we = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1986
|
-
X.Item,
|
|
1987
|
-
{
|
|
1988
|
-
ref: s,
|
|
1989
|
-
className: v(
|
|
1990
|
-
"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",
|
|
1991
|
-
e
|
|
1992
|
-
),
|
|
1993
|
-
...t,
|
|
1994
|
-
children: /* @__PURE__ */ n.jsx(X.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(yn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1995
|
-
}
|
|
1996
|
-
));
|
|
1997
|
-
we.displayName = X.Item.displayName;
|
|
1998
|
-
const Qt = ({
|
|
1999
|
-
identities: e,
|
|
2000
|
-
setValue: t,
|
|
2001
|
-
value: s
|
|
2002
|
-
}) => /* @__PURE__ */ n.jsx(ie, { className: "w-full overflow-hidden rounded-lg", children: /* @__PURE__ */ n.jsxs(
|
|
2003
|
-
Ht,
|
|
2004
|
-
{
|
|
2005
|
-
onValueChange: (a) => t(a),
|
|
2006
|
-
value: s,
|
|
2007
|
-
defaultValue: H,
|
|
2008
|
-
className: "gap-0",
|
|
2009
|
-
disabled: e?.length === 0,
|
|
2010
|
-
children: [
|
|
2011
|
-
/* @__PURE__ */ n.jsxs(oe, { className: "h-10 border-b items-center flex gap-2 p-4 cursor-pointer hover:bg-accent", children: [
|
|
2012
|
-
/* @__PURE__ */ n.jsx(we, { value: H, id: "none" }),
|
|
2013
|
-
/* @__PURE__ */ n.jsx("span", { children: "None" })
|
|
2014
|
-
] }),
|
|
2015
|
-
/* @__PURE__ */ n.jsx("div", { className: "divide-y", children: e?.map((a) => /* @__PURE__ */ n.jsxs(
|
|
2016
|
-
oe,
|
|
2017
|
-
{
|
|
2018
|
-
className: "h-10 items-center flex gap-2 p-4 cursor-pointer hover:bg-accent",
|
|
2019
|
-
children: [
|
|
2020
|
-
/* @__PURE__ */ n.jsx(we, { value: a.id, id: a.id }),
|
|
2021
|
-
/* @__PURE__ */ n.jsx("span", { children: a.label })
|
|
2022
|
-
]
|
|
2023
|
-
},
|
|
2024
|
-
a.id
|
|
2025
|
-
)) })
|
|
2026
|
-
]
|
|
2027
|
-
}
|
|
2028
|
-
) }), jr = ({
|
|
2029
|
-
onSubmit: e,
|
|
2030
|
-
identities: t,
|
|
2031
|
-
open: s,
|
|
2032
|
-
onOpenChange: a
|
|
2033
|
-
}) => {
|
|
2034
|
-
const [r, o] = E(void 0), [i, c] = E(!1);
|
|
2035
|
-
return /* @__PURE__ */ n.jsx(Te, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(Ae, { children: [
|
|
2036
|
-
/* @__PURE__ */ n.jsx(Oe, { children: "Select an auth identity" }),
|
|
2037
|
-
/* @__PURE__ */ n.jsx(bt, { children: "Please select an identity for this request." }),
|
|
2038
|
-
/* @__PURE__ */ n.jsx("div", { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
|
|
2039
|
-
Qt,
|
|
2040
|
-
{
|
|
2041
|
-
identities: t,
|
|
2042
|
-
setValue: o,
|
|
2043
|
-
value: r
|
|
2044
|
-
}
|
|
2045
|
-
) }),
|
|
2046
|
-
/* @__PURE__ */ n.jsxs(jt, { className: "flex flex-col gap-2", children: [
|
|
2047
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2048
|
-
/* @__PURE__ */ n.jsx(
|
|
2049
|
-
de,
|
|
2050
|
-
{
|
|
2051
|
-
id: "remember",
|
|
2052
|
-
checked: i,
|
|
2053
|
-
onCheckedChange: (l) => c(
|
|
2054
|
-
l === "indeterminate" ? !1 : !!l
|
|
2055
|
-
)
|
|
2056
|
-
}
|
|
2057
|
-
),
|
|
2058
|
-
/* @__PURE__ */ n.jsx(oe, { htmlFor: "remember", children: "Remember my choice" })
|
|
2059
|
-
] }),
|
|
2060
|
-
/* @__PURE__ */ n.jsx(
|
|
2061
|
-
F,
|
|
2062
|
-
{
|
|
2063
|
-
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
2064
|
-
children: "Send"
|
|
2065
|
-
}
|
|
2066
|
-
)
|
|
2067
|
-
] })
|
|
2068
|
-
] }) });
|
|
2069
|
-
}, Nr = ({
|
|
2070
|
-
control: e,
|
|
2071
|
-
url: t
|
|
2072
|
-
}) => {
|
|
2073
|
-
const { fields: s } = $e({
|
|
2074
|
-
control: e,
|
|
2075
|
-
name: "pathParams"
|
|
2076
|
-
}), a = [...s].sort(
|
|
2077
|
-
(r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
|
|
2078
|
-
);
|
|
2079
|
-
return /* @__PURE__ */ n.jsx(ie, { className: "rounded-lg overflow-hidden", children: /* @__PURE__ */ n.jsx(Be, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(Fe, { children: [
|
|
2080
|
-
/* @__PURE__ */ n.jsx(
|
|
2081
|
-
B,
|
|
2082
|
-
{
|
|
2083
|
-
control: e,
|
|
2084
|
-
name: `pathParams.${o}.name`,
|
|
2085
|
-
render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
|
|
2086
|
-
Vt,
|
|
2087
|
-
{
|
|
2088
|
-
slug: r.name,
|
|
2089
|
-
name: r.name,
|
|
2090
|
-
className: "font-mono text-xs px-2"
|
|
2091
|
-
}
|
|
2092
|
-
) })
|
|
2093
|
-
}
|
|
2094
|
-
),
|
|
2095
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
|
|
2096
|
-
B,
|
|
2097
|
-
{
|
|
2098
|
-
control: e,
|
|
2099
|
-
name: `pathParams.${o}.value`,
|
|
2100
|
-
render: ({ field: i }) => /* @__PURE__ */ n.jsx(
|
|
2101
|
-
Pe,
|
|
2102
|
-
{
|
|
2103
|
-
...i,
|
|
2104
|
-
required: !0,
|
|
2105
|
-
placeholder: "Enter value",
|
|
2106
|
-
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
|
|
2107
|
-
}
|
|
2108
|
-
)
|
|
2109
|
-
}
|
|
2110
|
-
) })
|
|
2111
|
-
] }, r.id)) }) });
|
|
2112
|
-
}, wr = De(
|
|
2113
|
-
"input",
|
|
2114
|
-
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
2115
|
-
), Cr = ({
|
|
2116
|
-
control: e,
|
|
2117
|
-
queryParams: t
|
|
2118
|
-
}) => {
|
|
2119
|
-
const { fields: s } = $e({
|
|
2120
|
-
control: e,
|
|
2121
|
-
name: "queryParams"
|
|
2122
|
-
}), a = Re(), r = t.map((o) => !!o.isRequired);
|
|
2123
|
-
return /* @__PURE__ */ n.jsx(ie, { className: "rounded-lg overflow-hidden", children: /* @__PURE__ */ n.jsx("div", { className: "w-full ", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((o, i) => {
|
|
2124
|
-
const c = t.find(
|
|
2125
|
-
(l) => l.name === a.watch(`queryParams.${i}.name`)
|
|
2126
|
-
);
|
|
2127
|
-
return /* @__PURE__ */ n.jsxs(Fe, { children: [
|
|
2128
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2129
|
-
/* @__PURE__ */ n.jsx(
|
|
2130
|
-
B,
|
|
2131
|
-
{
|
|
2132
|
-
control: e,
|
|
2133
|
-
name: `queryParams.${i}.active`,
|
|
2134
|
-
render: ({ field: l }) => /* @__PURE__ */ n.jsx(
|
|
2135
|
-
de,
|
|
2136
|
-
{
|
|
2137
|
-
id: `queryParams.${i}.active`,
|
|
2138
|
-
className: "me-2",
|
|
2139
|
-
checked: l.value,
|
|
2140
|
-
onCheckedChange: l.onChange
|
|
2141
|
-
}
|
|
2142
|
-
)
|
|
2143
|
-
}
|
|
2144
|
-
),
|
|
2145
|
-
/* @__PURE__ */ n.jsx(
|
|
2146
|
-
B,
|
|
2147
|
-
{
|
|
2148
|
-
control: e,
|
|
2149
|
-
render: ({ field: l }) => r[i] ? /* @__PURE__ */ n.jsx(wr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
2150
|
-
"label",
|
|
2151
|
-
{
|
|
2152
|
-
className: "flex items-center cursor-pointer gap-1",
|
|
2153
|
-
htmlFor: `queryParams.${i}.active`,
|
|
2154
|
-
title: r[i] ? "Required field" : void 0,
|
|
2155
|
-
children: [
|
|
2156
|
-
l.value,
|
|
2157
|
-
r[i] && /* @__PURE__ */ n.jsx("sup", { children: " *" })
|
|
2158
|
-
]
|
|
2159
|
-
}
|
|
2160
|
-
) }) : /* @__PURE__ */ n.jsx(
|
|
2161
|
-
ae,
|
|
2162
|
-
{
|
|
2163
|
-
value: l.value,
|
|
2164
|
-
options: t.map((m) => m.name),
|
|
2165
|
-
onChange: (m) => {
|
|
2166
|
-
l.onChange(m);
|
|
2167
|
-
},
|
|
2168
|
-
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2169
|
-
}
|
|
2170
|
-
),
|
|
2171
|
-
name: `queryParams.${i}.name`
|
|
2172
|
-
}
|
|
2173
|
-
)
|
|
2174
|
-
] }, o.id),
|
|
2175
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
|
|
2176
|
-
B,
|
|
2177
|
-
{
|
|
2178
|
-
control: e,
|
|
2179
|
-
render: ({ field: l }) => c?.enum && c.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
2180
|
-
ae,
|
|
2181
|
-
{
|
|
2182
|
-
value: l.value,
|
|
2183
|
-
options: c.enum ?? [],
|
|
2184
|
-
onChange: (u) => {
|
|
2185
|
-
l.onChange(u), a.setValue(`queryParams.${i}.active`, !0);
|
|
2186
|
-
},
|
|
2187
|
-
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2188
|
-
}
|
|
2189
|
-
) : /* @__PURE__ */ n.jsx(
|
|
2190
|
-
Pe,
|
|
2191
|
-
{
|
|
2192
|
-
...l,
|
|
2193
|
-
onChange: (u) => {
|
|
2194
|
-
l.onChange(u.target.value), u.target.value.length > 0 && a.setValue(`queryParams.${i}.active`, !0);
|
|
2195
|
-
},
|
|
2196
|
-
placeholder: "Enter value",
|
|
2197
|
-
className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
2198
|
-
}
|
|
2199
|
-
),
|
|
2200
|
-
name: `queryParams.${i}.value`
|
|
2201
|
-
}
|
|
2202
|
-
) })
|
|
2203
|
-
] }, o.id);
|
|
2204
|
-
}) }) }) });
|
|
2205
|
-
}, Sr = Ce()(
|
|
2206
|
-
Se(
|
|
2207
|
-
(e, t) => ({
|
|
2208
|
-
rememberedIdentity: null,
|
|
2209
|
-
setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
|
|
2210
|
-
getRememberedIdentity: (s) => s.find(
|
|
2211
|
-
(a) => a === t().rememberedIdentity
|
|
2212
|
-
)
|
|
2213
|
-
}),
|
|
2214
|
-
{
|
|
2215
|
-
name: "identity-storage",
|
|
2216
|
-
storage: yt(() => sessionStorage)
|
|
2217
|
-
}
|
|
2218
|
-
)
|
|
2219
|
-
), Tr = ({
|
|
2220
|
-
open: e,
|
|
2221
|
-
setOpen: t,
|
|
2222
|
-
onSignUp: s,
|
|
2223
|
-
onLogin: a
|
|
2224
|
-
}) => /* @__PURE__ */ n.jsx(Te, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(Ae, { children: [
|
|
2225
|
-
/* @__PURE__ */ n.jsx(Oe, { children: "Welcome to the Playground!" }),
|
|
2226
|
-
/* @__PURE__ */ n.jsx(bt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2227
|
-
/* @__PURE__ */ n.jsxs(jt, { className: "flex gap-2 sm:justify-between", children: [
|
|
2228
|
-
/* @__PURE__ */ n.jsx(F, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
|
|
2229
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2230
|
-
s && /* @__PURE__ */ n.jsx(F, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2231
|
-
a && /* @__PURE__ */ n.jsx(F, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2232
|
-
] })
|
|
2233
|
-
] })
|
|
2234
|
-
] }) }), P = {
|
|
2235
|
-
green: "text-green-600",
|
|
2236
|
-
blue: "text-sky-600",
|
|
2237
|
-
yellow: "text-yellow-600",
|
|
2238
|
-
red: "text-red-600",
|
|
2239
|
-
purple: "text-purple-600",
|
|
2240
|
-
indigo: "text-indigo-600",
|
|
2241
|
-
gray: "text-gray-600"
|
|
2242
|
-
}, Ar = {
|
|
2243
|
-
get: P.green,
|
|
2244
|
-
post: P.blue,
|
|
2245
|
-
put: P.yellow,
|
|
2246
|
-
delete: P.red,
|
|
2247
|
-
patch: P.purple,
|
|
2248
|
-
options: P.indigo,
|
|
2249
|
-
head: P.gray,
|
|
2250
|
-
trace: P.gray
|
|
2251
|
-
}, Or = (e) => Ar[e.toLocaleLowerCase()] ?? P.gray, Rr = ({
|
|
2252
|
-
method: e,
|
|
2253
|
-
url: t,
|
|
2254
|
-
headers: s,
|
|
2255
|
-
body: a
|
|
2256
|
-
}) => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
2257
|
-
/* @__PURE__ */ n.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
2258
|
-
/* @__PURE__ */ n.jsx("span", { className: v(Or(e), "font-semibold"), children: e }),
|
|
2259
|
-
" ",
|
|
2260
|
-
/* @__PURE__ */ n.jsx("span", { className: "break-all", children: t }),
|
|
2261
|
-
" ",
|
|
2262
|
-
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
2263
|
-
] }),
|
|
2264
|
-
/* @__PURE__ */ n.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
2265
|
-
/* @__PURE__ */ n.jsxs(nt, { defaultOpen: !0, children: [
|
|
2266
|
-
/* @__PURE__ */ n.jsxs(st, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2267
|
-
/* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2268
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
2269
|
-
] }),
|
|
2270
|
-
/* @__PURE__ */ n.jsx(rt, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2271
|
-
/* @__PURE__ */ n.jsx("div", { className: "text-primary", children: r }),
|
|
2272
|
-
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: o })
|
|
2273
|
-
] }, r)) }) })
|
|
2274
|
-
] }),
|
|
2275
|
-
/* @__PURE__ */ n.jsxs(nt, { defaultOpen: !0, children: [
|
|
2276
|
-
/* @__PURE__ */ n.jsxs(st, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2277
|
-
/* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2278
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Body" })
|
|
2279
|
-
] }),
|
|
2280
|
-
/* @__PURE__ */ n.jsx(rt, { children: /* @__PURE__ */ n.jsx("div", { className: "ps-0 pt-2", children: /* @__PURE__ */ n.jsx(
|
|
2281
|
-
"div",
|
|
2282
|
-
{
|
|
2283
|
-
className: v(
|
|
2284
|
-
"whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
|
|
2285
|
-
!a && "text-muted-foreground"
|
|
2286
|
-
),
|
|
2287
|
-
children: a ?? "Empty body"
|
|
2288
|
-
}
|
|
2289
|
-
) }) })
|
|
2290
|
-
] })
|
|
2291
|
-
] })
|
|
2292
|
-
] }), dt = Le.Root, ut = Le.CollapsibleTrigger, mt = Le.CollapsibleContent, ve = (e = 0) => {
|
|
2293
|
-
if (e === 0)
|
|
2294
|
-
return "0 B";
|
|
2295
|
-
const t = Math.floor(Math.log(e) / Math.log(1e3));
|
|
2296
|
-
return `${(e / Math.pow(1e3, t)).toFixed(
|
|
2297
|
-
t ? 2 : 0
|
|
2298
|
-
)} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
|
|
2299
|
-
};
|
|
2300
|
-
function Ve(e) {
|
|
2301
|
-
if (e === null) return "null";
|
|
2302
|
-
if (Array.isArray(e)) {
|
|
2303
|
-
if (e.length === 0) return "any[]";
|
|
2304
|
-
const t = e[0];
|
|
2305
|
-
return t === void 0 ? "any[]" : `${Ve(t)}[]`;
|
|
2306
|
-
}
|
|
2307
|
-
return typeof e == "object" ? $r(e) : typeof e;
|
|
2308
|
-
}
|
|
2309
|
-
function $r(e, t = "") {
|
|
2310
|
-
const s = ["{"];
|
|
2311
|
-
for (const [a, r] of Object.entries(e)) {
|
|
2312
|
-
const o = Ve(r);
|
|
2313
|
-
s.push(` ${a}: ${o};`);
|
|
2314
|
-
}
|
|
2315
|
-
return s.push("}"), s.join(`
|
|
2316
|
-
`);
|
|
2317
|
-
}
|
|
2318
|
-
function Pr(e) {
|
|
2319
|
-
return { lines: [`type GeneratedType = ${Ve(e)};`] };
|
|
2320
|
-
}
|
|
2321
|
-
const Lr = {
|
|
2322
|
-
200: "OK",
|
|
2323
|
-
201: "Created",
|
|
2324
|
-
202: "Accepted",
|
|
2325
|
-
204: "No Content",
|
|
2326
|
-
400: "Bad Request",
|
|
2327
|
-
401: "Unauthorized",
|
|
2328
|
-
403: "Forbidden",
|
|
2329
|
-
404: "Not Found",
|
|
2330
|
-
405: "Method Not Allowed",
|
|
2331
|
-
500: "Internal Server Error"
|
|
2332
|
-
}, Er = (e) => Object.entries({
|
|
2333
|
-
"application/json": "json",
|
|
2334
|
-
"text/json": "json",
|
|
2335
|
-
"text/html": "html",
|
|
2336
|
-
"text/css": "css",
|
|
2337
|
-
"text/javascript": "javascript",
|
|
2338
|
-
"application/xml": "xml",
|
|
2339
|
-
"application/xhtml+xml": "xhtml"
|
|
2340
|
-
}).find(
|
|
2341
|
-
([s]) => e.includes(s)
|
|
2342
|
-
)?.[1], Ir = (e) => {
|
|
2343
|
-
const t = e.find(([s, a]) => s === "Content-Type")?.[1] || "";
|
|
2344
|
-
return Er(t);
|
|
2345
|
-
}, kr = (e) => {
|
|
2346
|
-
try {
|
|
2347
|
-
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2348
|
-
} catch {
|
|
2349
|
-
return null;
|
|
2350
|
-
}
|
|
2351
|
-
}, Dr = (e) => {
|
|
2352
|
-
const t = [
|
|
2353
|
-
"Content-Type",
|
|
2354
|
-
"Content-Length",
|
|
2355
|
-
"Authorization",
|
|
2356
|
-
"X-RateLimit-Remaining",
|
|
2357
|
-
"X-RateLimit-Limit",
|
|
2358
|
-
"Cache-Control",
|
|
2359
|
-
"ETag"
|
|
2360
|
-
].map((s) => s.toLowerCase());
|
|
2361
|
-
return [...e].sort(([s], [a]) => {
|
|
2362
|
-
const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
|
|
2363
|
-
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
2364
|
-
});
|
|
2365
|
-
}, pt = 64e3, Br = ({
|
|
2366
|
-
body: e = "",
|
|
2367
|
-
headers: t,
|
|
2368
|
-
status: s,
|
|
2369
|
-
time: a,
|
|
2370
|
-
size: r,
|
|
2371
|
-
url: o,
|
|
2372
|
-
isBinary: i = !1,
|
|
2373
|
-
fileName: c,
|
|
2374
|
-
blob: l
|
|
2375
|
-
}) => {
|
|
2376
|
-
const m = Ir(t), u = kr(e), g = u || e, [f, x] = E(
|
|
2377
|
-
u ? "formatted" : "raw"
|
|
2378
|
-
), p = An({
|
|
2379
|
-
queryKey: ["types", g],
|
|
2380
|
-
queryFn: async () => Pr(JSON.parse(g)),
|
|
2381
|
-
enabled: f === "types" && !i
|
|
2382
|
-
}), y = () => {
|
|
2383
|
-
if (l && c) {
|
|
2384
|
-
const T = URL.createObjectURL(l), A = document.createElement("a");
|
|
2385
|
-
A.href = T, A.download = c, document.body.appendChild(A), A.click(), document.body.removeChild(A), URL.revokeObjectURL(T);
|
|
2386
|
-
}
|
|
2387
|
-
}, j = Dr([...t]), b = r > pt;
|
|
2388
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-auto max-h-[calc(100vh-220px)] ", children: [
|
|
2389
|
-
/* @__PURE__ */ n.jsxs(dt, { defaultOpen: !0, children: [
|
|
2390
|
-
/* @__PURE__ */ n.jsxs(ut, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2391
|
-
/* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2392
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
2393
|
-
] }),
|
|
2394
|
-
/* @__PURE__ */ n.jsx(mt, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2 font-mono text-xs", children: [
|
|
2395
|
-
j.slice(0, 5).map(([T, A]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2396
|
-
/* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: T }),
|
|
2397
|
-
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: A })
|
|
2398
|
-
] }, T)),
|
|
2399
|
-
j.length > 5 && /* @__PURE__ */ n.jsxs(dt, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
2400
|
-
/* @__PURE__ */ n.jsxs(ut, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
2401
|
-
/* @__PURE__ */ n.jsx(Q, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2402
|
-
"Show ",
|
|
2403
|
-
j.length - 5,
|
|
2404
|
-
" more headers"
|
|
2405
|
-
] }),
|
|
2406
|
-
/* @__PURE__ */ n.jsx(mt, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: j.slice(5).map(([T, A]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2407
|
-
/* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: T }),
|
|
2408
|
-
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: A })
|
|
2409
|
-
] }, T)) })
|
|
2410
|
-
] })
|
|
2411
|
-
] }) })
|
|
2412
|
-
] }),
|
|
2413
|
-
/* @__PURE__ */ n.jsx(wt, { className: "shadow-none", children: i ? /* @__PURE__ */ n.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2414
|
-
/* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2415
|
-
/* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2416
|
-
/* @__PURE__ */ n.jsxs(
|
|
2417
|
-
F,
|
|
2418
|
-
{
|
|
2419
|
-
onClick: y,
|
|
2420
|
-
className: "flex items-center gap-2",
|
|
2421
|
-
disabled: !l,
|
|
2422
|
-
children: [
|
|
2423
|
-
/* @__PURE__ */ n.jsx(vn, { className: "h-4 w-4" }),
|
|
2424
|
-
"Download ",
|
|
2425
|
-
c || "file",
|
|
2426
|
-
" (",
|
|
2427
|
-
ve(r),
|
|
2428
|
-
")"
|
|
2429
|
-
]
|
|
2430
|
-
}
|
|
2431
|
-
)
|
|
2432
|
-
] }) }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2433
|
-
b && /* @__PURE__ */ n.jsxs(Zn, { type: "info", className: "my-0 p-2", children: [
|
|
2434
|
-
"Code highlight is disabled for responses larger than",
|
|
2435
|
-
" ",
|
|
2436
|
-
ve(pt)
|
|
2437
|
-
] }),
|
|
2438
|
-
/* @__PURE__ */ n.jsx(
|
|
2439
|
-
is,
|
|
2440
|
-
{
|
|
2441
|
-
language: f === "types" ? "typescript" : f === "raw" ? u ? "plain" : m : "json",
|
|
2442
|
-
showCopy: "always",
|
|
2443
|
-
disabled: b,
|
|
2444
|
-
noBackground: !0,
|
|
2445
|
-
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
2446
|
-
code: (f === "raw" ? e : f === "types" ? p.data?.lines.join(`
|
|
2447
|
-
`) : g) ?? ""
|
|
2448
|
-
}
|
|
2449
|
-
)
|
|
2450
|
-
] }) }),
|
|
2451
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 justify-between items-center", children: [
|
|
2452
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex text-xs gap-5 border bg-muted rounded-md p-2 items-center h-8 font-mono", children: [
|
|
2453
|
-
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2454
|
-
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Status" }),
|
|
2455
|
-
" ",
|
|
2456
|
-
s,
|
|
2457
|
-
" ",
|
|
2458
|
-
Lr[s] ?? ""
|
|
2459
|
-
] }),
|
|
2460
|
-
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2461
|
-
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2462
|
-
" ",
|
|
2463
|
-
a.toFixed(0),
|
|
2464
|
-
"ms"
|
|
2465
|
-
] }),
|
|
2466
|
-
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2467
|
-
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2468
|
-
" ",
|
|
2469
|
-
ve(r)
|
|
2470
|
-
] })
|
|
2471
|
-
] }),
|
|
2472
|
-
u && !i && /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs(
|
|
2473
|
-
kt,
|
|
2474
|
-
{
|
|
2475
|
-
value: f,
|
|
2476
|
-
onValueChange: (T) => x(T),
|
|
2477
|
-
children: [
|
|
2478
|
-
/* @__PURE__ */ n.jsx(Ie, { className: "min-w-32", children: /* @__PURE__ */ n.jsx(Dt, { placeholder: "View" }) }),
|
|
2479
|
-
/* @__PURE__ */ n.jsxs(ke, { children: [
|
|
2480
|
-
/* @__PURE__ */ n.jsx(G, { value: "formatted", children: "Formatted" }),
|
|
2481
|
-
/* @__PURE__ */ n.jsx(G, { value: "raw", children: "Raw" }),
|
|
2482
|
-
/* @__PURE__ */ n.jsx(G, { value: "types", children: "Types" })
|
|
2483
|
-
] })
|
|
2484
|
-
]
|
|
2485
|
-
}
|
|
2486
|
-
) })
|
|
2487
|
-
] })
|
|
2488
|
-
] });
|
|
2489
|
-
}, Fr = ({
|
|
2490
|
-
queryMutation: e,
|
|
2491
|
-
showPathParamsWarning: t,
|
|
2492
|
-
showLongRunningWarning: s,
|
|
2493
|
-
onCancel: a
|
|
2494
|
-
}) => {
|
|
2495
|
-
const r = ((e.data?.status ?? 0) / 100).toFixed(0);
|
|
2496
|
-
return /* @__PURE__ */ n.jsx("div", { className: "min-w-0 p-4 py-4 bg-muted/50", children: e.error ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2497
|
-
t && /* @__PURE__ */ n.jsx(ts, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
2498
|
-
/* @__PURE__ */ n.jsxs(wt, { children: [
|
|
2499
|
-
/* @__PURE__ */ n.jsx(ns, { children: /* @__PURE__ */ n.jsx(ss, { children: "Request failed" }) }),
|
|
2500
|
-
/* @__PURE__ */ n.jsxs(rs, { children: [
|
|
2501
|
-
"Error:",
|
|
2502
|
-
" ",
|
|
2503
|
-
e.error.message || String(e.error) || "Unexpected error"
|
|
2504
|
-
] })
|
|
2505
|
-
] })
|
|
2506
|
-
] }) : e.data ? /* @__PURE__ */ n.jsxs(as, { defaultValue: "response", children: [
|
|
2507
|
-
/* @__PURE__ */ n.jsxs(os, { children: [
|
|
2508
|
-
/* @__PURE__ */ n.jsx(et, { value: "request", children: "Request" }),
|
|
2509
|
-
/* @__PURE__ */ n.jsxs(et, { value: "response", children: [
|
|
2510
|
-
"Response",
|
|
2511
|
-
/* @__PURE__ */ n.jsxs(
|
|
2512
|
-
"span",
|
|
2513
|
-
{
|
|
2514
|
-
className: v(
|
|
2515
|
-
"text-xs font-mono ms-1",
|
|
2516
|
-
r === "2" && "text-green-500",
|
|
2517
|
-
r === "3" && "text-blue-500",
|
|
2518
|
-
r === "4" && "text-yellow-500",
|
|
2519
|
-
r === "5" && "text-red-500"
|
|
2520
|
-
),
|
|
2521
|
-
children: [
|
|
2522
|
-
"(",
|
|
2523
|
-
e.data.status,
|
|
2524
|
-
")"
|
|
2525
|
-
]
|
|
2526
|
-
}
|
|
2527
|
-
)
|
|
2528
|
-
] })
|
|
2529
|
-
] }),
|
|
2530
|
-
/* @__PURE__ */ n.jsx(tt, { value: "request", children: /* @__PURE__ */ n.jsx(Rr, { ...e.data.request }) }),
|
|
2531
|
-
/* @__PURE__ */ n.jsx(tt, { value: "response", children: /* @__PURE__ */ n.jsx(
|
|
2532
|
-
Br,
|
|
2533
|
-
{
|
|
2534
|
-
status: e.data.status,
|
|
2535
|
-
time: e.data.time,
|
|
2536
|
-
size: e.data.size,
|
|
2537
|
-
headers: e.data.headers,
|
|
2538
|
-
body: e.data.body,
|
|
2539
|
-
url: e.data.request.url,
|
|
2540
|
-
isBinary: e.data.isBinary,
|
|
2541
|
-
fileName: e.data.fileName,
|
|
2542
|
-
blob: e.data.blob
|
|
2543
|
-
}
|
|
2544
|
-
) })
|
|
2545
|
-
] }) : /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: e.isPending ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2546
|
-
/* @__PURE__ */ n.jsx(es, { size: 20 }),
|
|
2547
|
-
/* @__PURE__ */ n.jsxs(
|
|
2548
|
-
"div",
|
|
2549
|
-
{
|
|
2550
|
-
className: v(
|
|
2551
|
-
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2552
|
-
s && "opacity-100 pointer-events-auto"
|
|
2553
|
-
),
|
|
2554
|
-
children: [
|
|
2555
|
-
"Looks like the request is taking longer than expected.",
|
|
2556
|
-
/* @__PURE__ */ n.jsx(
|
|
2557
|
-
J,
|
|
2558
|
-
{
|
|
2559
|
-
type: "button",
|
|
2560
|
-
onClick: a,
|
|
2561
|
-
size: "sm",
|
|
2562
|
-
className: "w-fit",
|
|
2563
|
-
variant: "outline",
|
|
2564
|
-
children: "Cancel"
|
|
2565
|
-
}
|
|
2566
|
-
)
|
|
2567
|
-
]
|
|
2568
|
-
}
|
|
2569
|
-
)
|
|
2570
|
-
] }) : /* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send a request first to see the response here" }) }) });
|
|
2571
|
-
}, Vr = Ce()(
|
|
2572
|
-
Se(
|
|
2573
|
-
(e) => ({
|
|
2574
|
-
skipLogin: !1,
|
|
2575
|
-
setSkipLogin: (t) => e({ skipLogin: t })
|
|
2576
|
-
}),
|
|
2577
|
-
{
|
|
2578
|
-
name: "remember-skip-login",
|
|
2579
|
-
storage: yt(() => sessionStorage)
|
|
2580
|
-
}
|
|
2581
|
-
)
|
|
2582
|
-
), H = "__none", qr = ({
|
|
2583
|
-
server: e,
|
|
2584
|
-
servers: t = [],
|
|
2585
|
-
url: s,
|
|
2586
|
-
method: a,
|
|
2587
|
-
headers: r = [],
|
|
2588
|
-
queryParams: o = [],
|
|
2589
|
-
pathParams: i = [],
|
|
2590
|
-
defaultBody: c = "",
|
|
2591
|
-
examples: l,
|
|
2592
|
-
requiresLogin: m = !1,
|
|
2593
|
-
onLogin: u,
|
|
2594
|
-
onSignUp: g
|
|
2595
|
-
}) => {
|
|
2596
|
-
const { selectedServer: f, setSelectedServer: x } = sr(
|
|
2597
|
-
t.map((d) => ({ url: d }))
|
|
2598
|
-
), [p, y] = E(!1), j = On(), { setRememberedIdentity: b, getRememberedIdentity: T } = Sr(), [, A] = kn(), { skipLogin: Kt, setSkipLogin: en } = Vr(), [tn, Y] = E(!1), K = W(void 0), ze = Un(b), { register: nn, control: ee, handleSubmit: _e, watch: Ue, setValue: ue, ...me } = zn({
|
|
2599
|
-
defaultValues: {
|
|
2600
|
-
body: c,
|
|
2601
|
-
queryParams: o.length > 0 ? o.map((d) => ({
|
|
2602
|
-
name: d.name,
|
|
2603
|
-
value: d.defaultValue ?? "",
|
|
2604
|
-
active: d.defaultActive ?? !1,
|
|
2605
|
-
enum: d.enum ?? []
|
|
2606
|
-
})) : [
|
|
2607
|
-
{
|
|
2608
|
-
name: "",
|
|
2609
|
-
value: "",
|
|
2610
|
-
active: !1,
|
|
2611
|
-
enum: []
|
|
2612
|
-
}
|
|
2613
|
-
],
|
|
2614
|
-
pathParams: i.map((d) => ({
|
|
2615
|
-
name: d.name,
|
|
2616
|
-
value: d.defaultValue ?? ""
|
|
2617
|
-
})),
|
|
2618
|
-
headers: r.length > 0 ? r.map((d) => ({
|
|
2619
|
-
name: d.name,
|
|
2620
|
-
value: d.defaultValue ?? "",
|
|
2621
|
-
active: d.defaultActive ?? !1
|
|
2622
|
-
})) : [
|
|
2623
|
-
{
|
|
2624
|
-
name: "",
|
|
2625
|
-
value: "",
|
|
2626
|
-
active: !1
|
|
2627
|
-
}
|
|
2628
|
-
],
|
|
2629
|
-
identity: T([
|
|
2630
|
-
H,
|
|
2631
|
-
...j.data?.map((d) => d.id) ?? []
|
|
2632
|
-
])
|
|
2633
|
-
}
|
|
2634
|
-
}), I = Ue();
|
|
2635
|
-
M(() => {
|
|
2636
|
-
I.identity && ze.current(I.identity);
|
|
2637
|
-
}, [ze, I.identity]);
|
|
2638
|
-
const te = qn({
|
|
2639
|
-
gcTime: 0,
|
|
2640
|
-
mutationFn: async (d) => {
|
|
2641
|
-
const k = performance.now(), _ = Object.fromEntries([
|
|
2642
|
-
...d.headers.filter((O) => O.name && O.active).map((O) => [O.name, O.value])
|
|
2643
|
-
]), $ = new Request(
|
|
2644
|
-
pr(e ?? f, s, d),
|
|
2645
|
-
{
|
|
2646
|
-
method: a.toUpperCase(),
|
|
2647
|
-
headers: _,
|
|
2648
|
-
body: d.body ? d.body : void 0
|
|
2649
|
-
}
|
|
2650
|
-
);
|
|
2651
|
-
d.identity !== H && await j.data?.find((O) => O.id === d.identity)?.authorizeRequest($);
|
|
2652
|
-
const ne = setTimeout(
|
|
2653
|
-
() => Y(!0),
|
|
2654
|
-
3210
|
|
2655
|
-
);
|
|
2656
|
-
K.current = new AbortController();
|
|
2657
|
-
try {
|
|
2658
|
-
const O = await fetch($, {
|
|
2659
|
-
cache: "no-store",
|
|
2660
|
-
signal: K.current.signal
|
|
2661
|
-
});
|
|
2662
|
-
clearTimeout(ne), Y(!1);
|
|
2663
|
-
const un = performance.now() - k, mn = new URL($.url), Qe = Array.from(O.headers.entries()), Je = O.headers.get("content-type") || "", We = hr(Je);
|
|
2664
|
-
let se = "", Xe, Ze;
|
|
2665
|
-
We ? (Xe = await O.blob(), Ze = fr(Qe, $.url), se = `Binary content (${Je})`) : se = await O.text();
|
|
2666
|
-
const Ye = O.headers.get("content-length");
|
|
2667
|
-
return {
|
|
2668
|
-
status: O.status,
|
|
2669
|
-
headers: Qe,
|
|
2670
|
-
size: Ye ? parseInt(Ye) : se.length,
|
|
2671
|
-
body: se,
|
|
2672
|
-
time: un,
|
|
2673
|
-
isBinary: We,
|
|
2674
|
-
fileName: Ze,
|
|
2675
|
-
blob: Xe,
|
|
2676
|
-
request: {
|
|
2677
|
-
method: $.method.toUpperCase(),
|
|
2678
|
-
url: $.url,
|
|
2679
|
-
headers: [
|
|
2680
|
-
["Host", mn.host],
|
|
2681
|
-
["User-Agent", "Zudoku Playground"],
|
|
2682
|
-
...Array.from($.headers.entries())
|
|
2683
|
-
],
|
|
2684
|
-
body: d.body ? d.body : void 0
|
|
2685
|
-
}
|
|
2686
|
-
};
|
|
2687
|
-
} catch (O) {
|
|
2688
|
-
throw clearTimeout(ne), Y(!1), O instanceof TypeError ? new Error(
|
|
2689
|
-
"The request failed, possibly due to network issues or CORS policy."
|
|
2690
|
-
) : O;
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
}), Me = te.isPending, [sn, rn] = E(!1);
|
|
2694
|
-
M(() => {
|
|
2695
|
-
const d = setTimeout(() => rn(Me), 100);
|
|
2696
|
-
return () => clearTimeout(d);
|
|
2697
|
-
}, [Me]);
|
|
2698
|
-
const { isFinished: Ge, progress: an } = Vn({ isAnimating: sn });
|
|
2699
|
-
M(() => () => {
|
|
2700
|
-
K.current?.abort();
|
|
2701
|
-
}, []);
|
|
2702
|
-
const on = /* @__PURE__ */ n.jsx(
|
|
2703
|
-
er,
|
|
2704
|
-
{
|
|
2705
|
-
path: s,
|
|
2706
|
-
renderParam: ({ name: d, originalValue: k, index: _ }) => {
|
|
2707
|
-
const $ = I.pathParams.find(
|
|
2708
|
-
(ne) => ne.name === d
|
|
2709
|
-
)?.value;
|
|
2710
|
-
return /* @__PURE__ */ n.jsx(
|
|
2711
|
-
Vt,
|
|
2712
|
-
{
|
|
2713
|
-
name: d,
|
|
2714
|
-
backgroundOpacity: "0",
|
|
2715
|
-
slug: d,
|
|
2716
|
-
onClick: () => me.setFocus(`pathParams.${_}.value`),
|
|
2717
|
-
children: $ || k
|
|
2718
|
-
}
|
|
2719
|
-
);
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
), He = I.queryParams.filter((d) => d.active).map((d, k, _) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2723
|
-
d.name,
|
|
2724
|
-
"=",
|
|
2725
|
-
encodeURIComponent(d.value).replaceAll("%20", "+"),
|
|
2726
|
-
k < _.length - 1 && "&",
|
|
2727
|
-
/* @__PURE__ */ n.jsx("wbr", {})
|
|
2728
|
-
] }, d.name)), ln = /* @__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(
|
|
2729
|
-
kt,
|
|
2730
|
-
{
|
|
2731
|
-
onValueChange: (d) => {
|
|
2732
|
-
A(() => x(d));
|
|
2733
|
-
},
|
|
2734
|
-
value: f,
|
|
2735
|
-
defaultValue: f,
|
|
2736
|
-
children: [
|
|
2737
|
-
/* @__PURE__ */ n.jsx(Ie, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(Dt, {}) }),
|
|
2738
|
-
/* @__PURE__ */ n.jsx(ke, { children: t.map((d) => /* @__PURE__ */ n.jsx(G, { value: d, children: d.replace(/^https?:\/\//, "").replace(/\/$/, "") }, d)) })
|
|
2739
|
-
]
|
|
2740
|
-
}
|
|
2741
|
-
) }), cn = m && !Kt, dn = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2742
|
-
a.toUpperCase()
|
|
2743
|
-
);
|
|
2744
|
-
return /* @__PURE__ */ n.jsx(
|
|
2745
|
-
_n,
|
|
2746
|
-
{
|
|
2747
|
-
register: nn,
|
|
2748
|
-
control: ee,
|
|
2749
|
-
handleSubmit: _e,
|
|
2750
|
-
watch: Ue,
|
|
2751
|
-
setValue: ue,
|
|
2752
|
-
...me,
|
|
2753
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
2754
|
-
"form",
|
|
2755
|
-
{
|
|
2756
|
-
onSubmit: _e((d) => {
|
|
2757
|
-
j.data?.length === 0 || d.identity ? te.mutate(d) : y(!0);
|
|
2758
|
-
}),
|
|
2759
|
-
className: "relative",
|
|
2760
|
-
children: [
|
|
2761
|
-
/* @__PURE__ */ n.jsx(
|
|
2762
|
-
jr,
|
|
2763
|
-
{
|
|
2764
|
-
identities: j.data ?? [],
|
|
2765
|
-
open: p,
|
|
2766
|
-
onOpenChange: y,
|
|
2767
|
-
onSubmit: ({ rememberedIdentity: d, identity: k }) => {
|
|
2768
|
-
d && ue("identity", k ?? H), y(!1), te.mutate({ ...I, identity: k });
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
),
|
|
2772
|
-
/* @__PURE__ */ n.jsx(
|
|
2773
|
-
Tr,
|
|
2774
|
-
{
|
|
2775
|
-
open: cn,
|
|
2776
|
-
setOpen: (d) => en(!d),
|
|
2777
|
-
onSignUp: g,
|
|
2778
|
-
onLogin: u
|
|
2779
|
-
}
|
|
2780
|
-
),
|
|
2781
|
-
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[1fr_min-content_1fr] text-sm", children: [
|
|
2782
|
-
/* @__PURE__ */ n.jsx("div", { className: "col-span-3 p-4 border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
2783
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
2784
|
-
/* @__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() }),
|
|
2785
|
-
/* @__PURE__ */ n.jsxs("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: [
|
|
2786
|
-
/* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
|
|
2787
|
-
ln,
|
|
2788
|
-
on,
|
|
2789
|
-
He.length > 0 ? "?" : "",
|
|
2790
|
-
He
|
|
2791
|
-
] }),
|
|
2792
|
-
/* @__PURE__ */ n.jsx(
|
|
2793
|
-
"div",
|
|
2794
|
-
{
|
|
2795
|
-
className: "h-[1px] bg-primary absolute left-0 -bottom-0 z-10 transition-all duration-300 ease-in-out",
|
|
2796
|
-
style: {
|
|
2797
|
-
opacity: Ge ? 0 : 1,
|
|
2798
|
-
width: Ge ? 0 : `${an * 100}%`
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
)
|
|
2802
|
-
] })
|
|
2803
|
-
] }),
|
|
2804
|
-
/* @__PURE__ */ n.jsx(
|
|
2805
|
-
F,
|
|
2806
|
-
{
|
|
2807
|
-
type: "submit",
|
|
2808
|
-
disabled: j.isLoading || me.formState.isSubmitting,
|
|
2809
|
-
children: "Send"
|
|
2810
|
-
}
|
|
2811
|
-
)
|
|
2812
|
-
] }) }),
|
|
2813
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-5 p-4 after:bg-muted-foreground/20 relative overflow-y-auto h-[80vh]", children: [
|
|
2814
|
-
j.data?.length !== 0 && /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2815
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Authentication" }),
|
|
2816
|
-
/* @__PURE__ */ n.jsx(
|
|
2817
|
-
Qt,
|
|
2818
|
-
{
|
|
2819
|
-
value: I.identity,
|
|
2820
|
-
identities: j.data ?? [],
|
|
2821
|
-
setValue: (d) => ue("identity", d)
|
|
2822
|
-
}
|
|
2823
|
-
)
|
|
2824
|
-
] }) }),
|
|
2825
|
-
i.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2826
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
2827
|
-
/* @__PURE__ */ n.jsx(Nr, { url: s, control: ee })
|
|
2828
|
-
] }),
|
|
2829
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2830
|
-
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
2831
|
-
/* @__PURE__ */ n.jsx(Cr, { control: ee, queryParams: o })
|
|
2832
|
-
] }),
|
|
2833
|
-
/* @__PURE__ */ n.jsx(vr, { control: ee, headers: r }),
|
|
2834
|
-
dn && /* @__PURE__ */ n.jsx(mr, { examples: l })
|
|
2835
|
-
] }),
|
|
2836
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-px bg-muted-foreground/20" }),
|
|
2837
|
-
/* @__PURE__ */ n.jsx(
|
|
2838
|
-
Fr,
|
|
2839
|
-
{
|
|
2840
|
-
queryMutation: te,
|
|
2841
|
-
showPathParamsWarning: I.pathParams.some(
|
|
2842
|
-
(d) => d.value === ""
|
|
2843
|
-
),
|
|
2844
|
-
showLongRunningWarning: tn,
|
|
2845
|
-
onCancel: () => {
|
|
2846
|
-
K.current?.abort(
|
|
2847
|
-
"Request cancelled by the user"
|
|
2848
|
-
), Y(!1);
|
|
2849
|
-
}
|
|
2850
|
-
}
|
|
2851
|
-
)
|
|
2852
|
-
] })
|
|
2853
|
-
]
|
|
2854
|
-
}
|
|
2855
|
-
)
|
|
2856
|
-
}
|
|
2857
|
-
);
|
|
2858
|
-
}, zr = ({
|
|
2859
|
-
className: e,
|
|
2860
|
-
size: t = 16
|
|
2861
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
2862
|
-
"svg",
|
|
2863
|
-
{
|
|
2864
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2865
|
-
viewBox: "0 0 24 24",
|
|
2866
|
-
fill: "currentColor",
|
|
2867
|
-
className: e,
|
|
2868
|
-
width: t,
|
|
2869
|
-
height: t,
|
|
2870
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2871
|
-
"path",
|
|
2872
|
-
{
|
|
2873
|
-
fillRule: "evenodd",
|
|
2874
|
-
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
|
|
2875
|
-
clipRule: "evenodd"
|
|
2876
|
-
}
|
|
2877
|
-
)
|
|
2878
|
-
}
|
|
2879
|
-
), _r = (e) => {
|
|
2880
|
-
const [t, s] = E(!1);
|
|
2881
|
-
return /* @__PURE__ */ n.jsxs(Te, { onOpenChange: (a) => s(a), children: [
|
|
2882
|
-
/* @__PURE__ */ n.jsx(Fn, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
|
|
2883
|
-
"button",
|
|
2884
|
-
{
|
|
2885
|
-
type: "button",
|
|
2886
|
-
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",
|
|
2887
|
-
children: [
|
|
2888
|
-
"Test",
|
|
2889
|
-
/* @__PURE__ */ n.jsx(zr, { size: 14 })
|
|
2890
|
-
]
|
|
2891
|
-
}
|
|
2892
|
-
) }),
|
|
2893
|
-
/* @__PURE__ */ n.jsxs(
|
|
2894
|
-
Ae,
|
|
2895
|
-
{
|
|
2896
|
-
className: "max-w-screen-xl w-full overflow-hidden p-0",
|
|
2897
|
-
"aria-describedby": void 0,
|
|
2898
|
-
showCloseButton: !1,
|
|
2899
|
-
children: [
|
|
2900
|
-
/* @__PURE__ */ n.jsx(Bn, { children: /* @__PURE__ */ n.jsx(Oe, { children: "Playground" }) }),
|
|
2901
|
-
t && /* @__PURE__ */ n.jsx(qr, { ...e })
|
|
2902
|
-
]
|
|
2903
|
-
}
|
|
2904
|
-
)
|
|
2905
|
-
] });
|
|
2906
|
-
}, Ur = {
|
|
2907
|
-
get: "green",
|
|
2908
|
-
post: "blue",
|
|
2909
|
-
put: "yellow",
|
|
2910
|
-
delete: "red",
|
|
2911
|
-
patch: "purple",
|
|
2912
|
-
options: "gray",
|
|
2913
|
-
head: "gray"
|
|
2914
|
-
}, ht = ({
|
|
2915
|
-
label: e,
|
|
2916
|
-
path: t,
|
|
2917
|
-
operations: s,
|
|
2918
|
-
collapsible: a,
|
|
2919
|
-
collapsed: r
|
|
2920
|
-
}) => ({
|
|
2921
|
-
type: "category",
|
|
2922
|
-
label: e,
|
|
2923
|
-
link: {
|
|
2924
|
-
type: "doc",
|
|
2925
|
-
path: t,
|
|
2926
|
-
file: t,
|
|
2927
|
-
label: e
|
|
2928
|
-
},
|
|
2929
|
-
collapsible: a,
|
|
2930
|
-
collapsed: r,
|
|
2931
|
-
items: s.map((o) => ({
|
|
2932
|
-
type: "link",
|
|
2933
|
-
label: o.summary ?? o.path,
|
|
2934
|
-
to: `${t}#${o.slug}`,
|
|
2935
|
-
badge: {
|
|
2936
|
-
label: o.method,
|
|
2937
|
-
color: Ur[o.method.toLowerCase()],
|
|
2938
|
-
invert: !0
|
|
2939
|
-
}
|
|
2940
|
-
}))
|
|
2941
|
-
}), Jt = vt(
|
|
2942
|
-
void 0
|
|
2943
|
-
), Aa = Jt.Provider, Mr = () => {
|
|
2944
|
-
const e = Dn(Jt);
|
|
2945
|
-
if (!e)
|
|
2946
|
-
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
2947
|
-
return e.config;
|
|
2948
|
-
}, ft = (e) => ({
|
|
2949
|
-
path: e.routePath,
|
|
2950
|
-
async lazy() {
|
|
2951
|
-
const { OasProvider: t } = await import("./OasProvider-BC0q5m3u.js");
|
|
2952
|
-
return {
|
|
2953
|
-
element: /* @__PURE__ */ n.jsx(
|
|
2954
|
-
t,
|
|
2955
|
-
{
|
|
2956
|
-
basePath: e.basePath,
|
|
2957
|
-
version: e.version,
|
|
2958
|
-
client: e.client,
|
|
2959
|
-
config: e.config
|
|
2960
|
-
}
|
|
2961
|
-
)
|
|
2962
|
-
};
|
|
2963
|
-
},
|
|
2964
|
-
children: e.routes
|
|
2965
|
-
}), Wt = ({
|
|
2966
|
-
path: e,
|
|
2967
|
-
tag: t,
|
|
2968
|
-
untagged: s
|
|
2969
|
-
}) => ({
|
|
2970
|
-
path: e,
|
|
2971
|
-
async lazy() {
|
|
2972
|
-
const { OperationList: a } = await import("./OperationList-Dpip6ozi.js");
|
|
2973
|
-
return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
|
|
2974
|
-
}
|
|
2975
|
-
}), Gr = ({
|
|
2976
|
-
render: e,
|
|
2977
|
-
path: t
|
|
2978
|
-
}) => {
|
|
2979
|
-
const { type: s, input: a } = Mr(), { tag: r } = wn(), o = Cn(), i = _s(Yt, { type: s, input: a }), {
|
|
2980
|
-
data: { schema: c }
|
|
2981
|
-
} = Rn(i), l = c.tags.at(0);
|
|
2982
|
-
return !r && l?.slug ? /* @__PURE__ */ n.jsx(
|
|
2983
|
-
Sn,
|
|
2984
|
-
{
|
|
2985
|
-
to: {
|
|
2986
|
-
pathname: Tn(t, { tag: l.slug }),
|
|
2987
|
-
search: o.search
|
|
2988
|
-
}
|
|
2989
|
-
}
|
|
2990
|
-
) : r && c.tags.some((m) => m.slug === r) ? e(r) : null;
|
|
2991
|
-
}, Hr = ({ path: e }) => ({
|
|
2992
|
-
path: e,
|
|
2993
|
-
async lazy() {
|
|
2994
|
-
const { OperationList: t } = await import("./OperationList-Dpip6ozi.js");
|
|
2995
|
-
return {
|
|
2996
|
-
element: /* @__PURE__ */ n.jsx(
|
|
2997
|
-
Gr,
|
|
2998
|
-
{
|
|
2999
|
-
path: e,
|
|
3000
|
-
render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
|
|
3001
|
-
}
|
|
3002
|
-
)
|
|
3003
|
-
};
|
|
3004
|
-
}
|
|
3005
|
-
}), Xt = (e) => [
|
|
3006
|
-
// Category without tagged operations
|
|
3007
|
-
Wt({
|
|
3008
|
-
path: L(e, qe),
|
|
3009
|
-
untagged: !0
|
|
3010
|
-
}),
|
|
3011
|
-
// Schema list route
|
|
3012
|
-
{
|
|
3013
|
-
path: L(e, "~schemas"),
|
|
3014
|
-
lazy: async () => {
|
|
3015
|
-
const { SchemaList: t } = await import("./SchemaList-t4BIfh6Z.js");
|
|
3016
|
-
return { element: /* @__PURE__ */ n.jsx(t, {}) };
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
], Qr = (e, t) => {
|
|
3020
|
-
const s = L(e, t.at(0) ?? qe);
|
|
3021
|
-
return [
|
|
3022
|
-
// Redirect to first tag on the index route
|
|
3023
|
-
{ index: !0, loader: () => Nn(s) },
|
|
3024
|
-
// Create routes for each tag
|
|
3025
|
-
...t.map(
|
|
3026
|
-
(a) => Wt({
|
|
3027
|
-
path: L(e, a),
|
|
3028
|
-
tag: a
|
|
3029
|
-
})
|
|
3030
|
-
),
|
|
3031
|
-
...Xt(e)
|
|
3032
|
-
];
|
|
3033
|
-
}, Zt = (e) => e.type === "file" ? Object.keys(e.input) : [], Jr = ({
|
|
3034
|
-
basePath: e,
|
|
3035
|
-
config: t,
|
|
3036
|
-
client: s
|
|
3037
|
-
}) => {
|
|
3038
|
-
const a = t.tagPages;
|
|
3039
|
-
if (!a)
|
|
3040
|
-
return [
|
|
3041
|
-
ft({
|
|
3042
|
-
basePath: e,
|
|
3043
|
-
routePath: e,
|
|
3044
|
-
routes: [
|
|
3045
|
-
Hr({ path: e + "/:tag?" }),
|
|
3046
|
-
...Xt(e)
|
|
3047
|
-
],
|
|
3048
|
-
client: s,
|
|
3049
|
-
config: t
|
|
3050
|
-
})
|
|
3051
|
-
];
|
|
3052
|
-
const r = Zt(t);
|
|
3053
|
-
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3054
|
-
const c = L(e, i);
|
|
3055
|
-
return ft({
|
|
3056
|
-
basePath: e,
|
|
3057
|
-
version: i,
|
|
3058
|
-
routePath: c,
|
|
3059
|
-
routes: Qr(c, a),
|
|
3060
|
-
client: s,
|
|
3061
|
-
config: t
|
|
3062
|
-
});
|
|
3063
|
-
});
|
|
3064
|
-
}, Yt = Zs(`
|
|
3065
|
-
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3066
|
-
schema(input: $input, type: $type) {
|
|
3067
|
-
tags {
|
|
3068
|
-
slug
|
|
3069
|
-
name
|
|
3070
|
-
extensions
|
|
3071
|
-
operations {
|
|
3072
|
-
summary
|
|
3073
|
-
slug
|
|
3074
|
-
method
|
|
3075
|
-
operationId
|
|
3076
|
-
path
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
components {
|
|
3080
|
-
schemas {
|
|
3081
|
-
__typename
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
`), qe = "~endpoints", Oa = (e) => {
|
|
3087
|
-
const t = L(e.path), s = new cs(e);
|
|
3088
|
-
return {
|
|
3089
|
-
getHead: () => {
|
|
3090
|
-
if (e.type === "url" && !e.skipPreload)
|
|
3091
|
-
return /* @__PURE__ */ n.jsx(
|
|
3092
|
-
"link",
|
|
3093
|
-
{
|
|
3094
|
-
rel: "preload",
|
|
3095
|
-
href: e.input,
|
|
3096
|
-
as: "fetch",
|
|
3097
|
-
crossOrigin: "anonymous"
|
|
3098
|
-
}
|
|
3099
|
-
);
|
|
3100
|
-
if (e.server)
|
|
3101
|
-
return /* @__PURE__ */ n.jsx("link", { rel: "preconnect", href: e.server });
|
|
3102
|
-
},
|
|
3103
|
-
getMdxComponents: () => ({
|
|
3104
|
-
OpenPlaygroundButton: ({
|
|
3105
|
-
requireAuth: a,
|
|
3106
|
-
server: r,
|
|
3107
|
-
method: o,
|
|
3108
|
-
url: i,
|
|
3109
|
-
children: c,
|
|
3110
|
-
...l
|
|
3111
|
-
}) => {
|
|
3112
|
-
const m = $n();
|
|
3113
|
-
if (!r)
|
|
3114
|
-
throw new Error("Server is required");
|
|
3115
|
-
return a && !m.isAuthenticated ? /* @__PURE__ */ n.jsxs(
|
|
3116
|
-
J,
|
|
3117
|
-
{
|
|
3118
|
-
className: "gap-2 items-center",
|
|
3119
|
-
variant: "outline",
|
|
3120
|
-
onClick: m.login,
|
|
3121
|
-
children: [
|
|
3122
|
-
"Login to open in Playground ",
|
|
3123
|
-
/* @__PURE__ */ n.jsx(bn, { size: 16 })
|
|
3124
|
-
]
|
|
3125
|
-
}
|
|
3126
|
-
) : /* @__PURE__ */ n.jsx(
|
|
3127
|
-
_r,
|
|
3128
|
-
{
|
|
3129
|
-
url: i ?? "/",
|
|
3130
|
-
method: o ?? "get",
|
|
3131
|
-
server: r,
|
|
3132
|
-
...l,
|
|
3133
|
-
children: /* @__PURE__ */ n.jsx(J, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3134
|
-
"Open in Playground ",
|
|
3135
|
-
/* @__PURE__ */ n.jsx(jn, { size: 16 })
|
|
3136
|
-
] }) })
|
|
3137
|
-
}
|
|
3138
|
-
);
|
|
3139
|
-
}
|
|
3140
|
-
}),
|
|
3141
|
-
getNavigation: async (a, r) => {
|
|
3142
|
-
if (!Ke({ path: t, end: !1 }, a))
|
|
3143
|
-
return [];
|
|
3144
|
-
const o = Ke(
|
|
3145
|
-
{ path: `${t}/:version?/:tag`, end: !0 },
|
|
3146
|
-
a
|
|
3147
|
-
);
|
|
3148
|
-
try {
|
|
3149
|
-
const i = o?.params.version, c = i ?? Zt(e).at(0), { type: l } = e, m = l === "file" ? e.input[c] : e.input, u = It(s, Yt, {
|
|
3150
|
-
type: l,
|
|
3151
|
-
input: m
|
|
3152
|
-
}), g = await r.queryClient.ensureQueryData(u), f = g.schema.tags.flatMap((p) => {
|
|
3153
|
-
if (!p.name || p.operations.length === 0) return [];
|
|
3154
|
-
const y = L(t, i, p.slug), j = p.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, b = p.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3155
|
-
return ht({
|
|
3156
|
-
label: p.name,
|
|
3157
|
-
path: y,
|
|
3158
|
-
operations: p.operations,
|
|
3159
|
-
collapsed: j,
|
|
3160
|
-
collapsible: b
|
|
3161
|
-
});
|
|
3162
|
-
}), x = g.schema.tags.find(
|
|
3163
|
-
(p) => !p.name
|
|
3164
|
-
)?.operations;
|
|
3165
|
-
return x && f.push(
|
|
3166
|
-
ht({
|
|
3167
|
-
label: "Other endpoints",
|
|
3168
|
-
path: L(t, i, qe),
|
|
3169
|
-
operations: x,
|
|
3170
|
-
collapsed: !e.options?.expandAllTags
|
|
3171
|
-
})
|
|
3172
|
-
), g.schema.components?.schemas?.length && f.push({
|
|
3173
|
-
type: "link",
|
|
3174
|
-
label: "Schemas",
|
|
3175
|
-
to: L(t, i, "~schemas")
|
|
3176
|
-
}), f;
|
|
3177
|
-
} catch {
|
|
3178
|
-
return [];
|
|
3179
|
-
}
|
|
3180
|
-
},
|
|
3181
|
-
getRoutes: () => Jr({ basePath: t, config: e, client: s })
|
|
3182
|
-
};
|
|
3183
|
-
};
|
|
3184
|
-
export {
|
|
3185
|
-
Sa as A,
|
|
3186
|
-
bs as B,
|
|
3187
|
-
dt as C,
|
|
3188
|
-
gs as D,
|
|
3189
|
-
At as E,
|
|
3190
|
-
Yt as F,
|
|
3191
|
-
Ta as G,
|
|
3192
|
-
Oa as H,
|
|
3193
|
-
js as L,
|
|
3194
|
-
Aa as O,
|
|
3195
|
-
_r as P,
|
|
3196
|
-
fs as Q,
|
|
3197
|
-
kt as S,
|
|
3198
|
-
h as T,
|
|
3199
|
-
qe as U,
|
|
3200
|
-
_s as a,
|
|
3201
|
-
ut as b,
|
|
3202
|
-
mt as c,
|
|
3203
|
-
Zt as d,
|
|
3204
|
-
sr as e,
|
|
3205
|
-
Vt as f,
|
|
3206
|
-
Zs as g,
|
|
3207
|
-
er as h,
|
|
3208
|
-
Ie as i,
|
|
3209
|
-
Dt as j,
|
|
3210
|
-
ke as k,
|
|
3211
|
-
G as l,
|
|
3212
|
-
Or as m,
|
|
3213
|
-
qs as n,
|
|
3214
|
-
Lt as o,
|
|
3215
|
-
it as p,
|
|
3216
|
-
Ca as q,
|
|
3217
|
-
Ns as r,
|
|
3218
|
-
R as s,
|
|
3219
|
-
Ee as t,
|
|
3220
|
-
Mr as u,
|
|
3221
|
-
Pt as v,
|
|
3222
|
-
ds as w,
|
|
3223
|
-
Vs as x,
|
|
3224
|
-
he as y,
|
|
3225
|
-
us as z
|
|
3226
|
-
};
|
|
3227
|
-
//# sourceMappingURL=index-DW2qmCJa.js.map
|