zudoku 0.0.0-feat-bundled-types.9aa135e → 0.0.0-feat-openapi-docs-redesign.dab3fc6a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -13
- package/cli.js +1 -0
- package/client.d.ts +8 -0
- package/dist/app/ZuploBuildConfig.d.ts +10 -120
- package/dist/app/ZuploBuildConfig.js +7 -7
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +22 -6
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +0 -2
- package/dist/app/entry.client.js +6 -7
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +0 -2
- package/dist/app/entry.server.js +17 -6
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +7 -7
- package/dist/app/env.js +10 -2
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +93 -2
- package/dist/app/main.js +31 -26
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +11 -7
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -0
- package/dist/cli/cli.js +5 -10
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/preview.d.ts +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +0 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js +3 -2
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +2 -3
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/common/validators/lib.js +1 -1
- package/dist/cli/common/validators/lib.js.map +1 -1
- package/dist/cli/common/version-check.d.ts +2 -0
- package/dist/cli/common/version-check.js +58 -0
- package/dist/cli/common/version-check.js.map +1 -0
- package/dist/cli/dev/handler.js +0 -4
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/codegen.js +2 -2
- package/dist/codegen.js.map +1 -1
- package/dist/config/config.d.ts +16 -30
- package/dist/config/loader.js +4 -8
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +30 -46
- package/dist/config/validators/BuildSchema.js +29 -18
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +7646 -0
- package/dist/config/validators/InputNavigationSchema.js +78 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +98 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/auth.d.ts +2 -2
- package/dist/config/validators/auth.js +1 -1
- package/dist/config/validators/auth.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1872 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +672 -5561
- package/dist/config/validators/validate.js +182 -85
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.d.ts +1 -0
- package/dist/config/validators/validate.test.js +140 -0
- package/dist/config/validators/validate.test.js.map +1 -0
- package/dist/flat-config.d.ts +378 -0
- package/dist/index.d.ts +12 -6264
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +1 -1
- package/dist/lib/MissingIcon.js.map +1 -1
- package/dist/lib/assets/language-icons/c.d.ts +3 -0
- package/dist/lib/assets/language-icons/c.js +4 -0
- package/dist/lib/assets/language-icons/c.js.map +1 -0
- package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
- package/dist/lib/assets/language-icons/commonlisp.js +4 -0
- package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
- package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
- package/dist/lib/assets/language-icons/cpp.js +4 -0
- package/dist/lib/assets/language-icons/cpp.js.map +1 -0
- package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
- package/dist/lib/assets/language-icons/csharp.js +4 -0
- package/dist/lib/assets/language-icons/csharp.js.map +1 -0
- package/dist/lib/assets/language-icons/css.d.ts +3 -0
- package/dist/lib/assets/language-icons/css.js +4 -0
- package/dist/lib/assets/language-icons/css.js.map +1 -0
- package/dist/lib/assets/language-icons/dart.d.ts +3 -0
- package/dist/lib/assets/language-icons/dart.js +4 -0
- package/dist/lib/assets/language-icons/dart.js.map +1 -0
- package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
- package/dist/lib/assets/language-icons/elixir.js +4 -0
- package/dist/lib/assets/language-icons/elixir.js.map +1 -0
- package/dist/lib/assets/language-icons/go.d.ts +3 -0
- package/dist/lib/assets/language-icons/go.js +4 -0
- package/dist/lib/assets/language-icons/go.js.map +1 -0
- package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
- package/dist/lib/assets/language-icons/graphql.js +4 -0
- package/dist/lib/assets/language-icons/graphql.js.map +1 -0
- package/dist/lib/assets/language-icons/html.d.ts +3 -0
- package/dist/lib/assets/language-icons/html.js +4 -0
- package/dist/lib/assets/language-icons/html.js.map +1 -0
- package/dist/lib/assets/language-icons/java.d.ts +3 -0
- package/dist/lib/assets/language-icons/java.js +4 -0
- package/dist/lib/assets/language-icons/java.js.map +1 -0
- package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
- package/dist/lib/assets/language-icons/javascript.js +4 -0
- package/dist/lib/assets/language-icons/javascript.js.map +1 -0
- package/dist/lib/assets/language-icons/json.d.ts +3 -0
- package/dist/lib/assets/language-icons/json.js +4 -0
- package/dist/lib/assets/language-icons/json.js.map +1 -0
- package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
- package/dist/lib/assets/language-icons/kotlin.js +4 -0
- package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
- package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
- package/dist/lib/assets/language-icons/markdown.js +4 -0
- package/dist/lib/assets/language-icons/markdown.js.map +1 -0
- package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
- package/dist/lib/assets/language-icons/mdx.js +4 -0
- package/dist/lib/assets/language-icons/mdx.js.map +1 -0
- package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
- package/dist/lib/assets/language-icons/objectivec.js +4 -0
- package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
- package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/ocaml.js +4 -0
- package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
- package/dist/lib/assets/language-icons/php.d.ts +3 -0
- package/dist/lib/assets/language-icons/php.js +4 -0
- package/dist/lib/assets/language-icons/php.js.map +1 -0
- package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
- package/dist/lib/assets/language-icons/powershell.js +4 -0
- package/dist/lib/assets/language-icons/powershell.js.map +1 -0
- package/dist/lib/assets/language-icons/python.d.ts +3 -0
- package/dist/lib/assets/language-icons/python.js +4 -0
- package/dist/lib/assets/language-icons/python.js.map +1 -0
- package/dist/lib/assets/language-icons/react.d.ts +3 -0
- package/dist/lib/assets/language-icons/react.js +4 -0
- package/dist/lib/assets/language-icons/react.js.map +1 -0
- package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
- package/dist/lib/assets/language-icons/ruby.js +4 -0
- package/dist/lib/assets/language-icons/ruby.js.map +1 -0
- package/dist/lib/assets/language-icons/rust.d.ts +3 -0
- package/dist/lib/assets/language-icons/rust.js +4 -0
- package/dist/lib/assets/language-icons/rust.js.map +1 -0
- package/dist/lib/assets/language-icons/scala.d.ts +3 -0
- package/dist/lib/assets/language-icons/scala.js +4 -0
- package/dist/lib/assets/language-icons/scala.js.map +1 -0
- package/dist/lib/assets/language-icons/shell.d.ts +3 -0
- package/dist/lib/assets/language-icons/shell.js +4 -0
- package/dist/lib/assets/language-icons/shell.js.map +1 -0
- package/dist/lib/assets/language-icons/swift.d.ts +3 -0
- package/dist/lib/assets/language-icons/swift.js +4 -0
- package/dist/lib/assets/language-icons/swift.js.map +1 -0
- package/dist/lib/assets/language-icons/toml.d.ts +3 -0
- package/dist/lib/assets/language-icons/toml.js +4 -0
- package/dist/lib/assets/language-icons/toml.js.map +1 -0
- package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
- package/dist/lib/assets/language-icons/typescript.js +4 -0
- package/dist/lib/assets/language-icons/typescript.js.map +1 -0
- package/dist/lib/assets/language-icons/xml.d.ts +3 -0
- package/dist/lib/assets/language-icons/xml.js +4 -0
- package/dist/lib/assets/language-icons/xml.js.map +1 -0
- package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/yaml.js +4 -0
- package/dist/lib/assets/language-icons/yaml.js.map +1 -0
- package/dist/lib/assets/language-icons/zig.d.ts +3 -0
- package/dist/lib/assets/language-icons/zig.js +4 -0
- package/dist/lib/assets/language-icons/zig.js.map +1 -0
- package/dist/lib/auth/issuer.d.ts +2 -0
- package/dist/lib/auth/issuer.js +40 -0
- package/dist/lib/auth/issuer.js.map +1 -0
- package/dist/lib/auth/issuer.test.d.ts +1 -0
- package/dist/lib/auth/issuer.test.js +95 -0
- package/dist/lib/auth/issuer.test.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +19 -11
- package/dist/lib/authentication/components/CallbackHandler.js +12 -10
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/components/SignIn.js +10 -8
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +6 -6
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +5 -5
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +10 -2
- package/dist/lib/authentication/hook.js +12 -8
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +10 -6
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
- package/dist/lib/authentication/providers/azureb2c.js +147 -0
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +9 -16
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/firebase.d.ts +4 -0
- package/dist/lib/authentication/providers/firebase.js +215 -0
- package/dist/lib/authentication/providers/firebase.js.map +1 -0
- package/dist/lib/authentication/providers/openid.d.ts +10 -7
- package/dist/lib/authentication/providers/openid.js +55 -7
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.d.ts +2 -2
- package/dist/lib/authentication/providers/supabase.js +32 -39
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +11 -12
- package/dist/lib/authentication/state.js +21 -20
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Apple.js +4 -0
- package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
- package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Github.js +4 -0
- package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Google.js +4 -0
- package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
- package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/X.js +4 -0
- package/dist/lib/authentication/ui/icons/X.js.map +1 -0
- package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
- package/dist/lib/authentication/use-broadcast/shared.js +3 -3
- package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
- package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
- package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +7 -3
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +2 -2
- package/dist/lib/components/Bootstrap.js +0 -2
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +12 -5
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +20 -21
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +8 -4
- package/dist/lib/components/Heading.js +3 -7
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/LanguageIcon.d.ts +3 -0
- package/dist/lib/components/LanguageIcon.js +163 -0
- package/dist/lib/components/LanguageIcon.js.map +1 -0
- package/dist/lib/components/Layout.js +5 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +4 -4
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +5 -6
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +13 -7
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/PathRenderer.js +1 -1
- package/dist/lib/components/PathRenderer.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.js.map +1 -1
- package/dist/lib/components/Slot.test.js +7 -3
- package/dist/lib/components/Slot.test.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -3
- package/dist/lib/components/TopNavigation.js +51 -45
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/Zudoku.js +5 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +3 -1
- package/dist/lib/components/cache.js +3 -5
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/ComponentsContext.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.js.map +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
- package/dist/lib/components/context/ZudokuContext.js +66 -32
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
- package/dist/lib/components/index.d.ts +74 -726
- package/dist/lib/components/index.js +5 -16
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +2 -2
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +21 -14
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +55 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarWrapper.d.ts → NavigationWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarWrapper.js → NavigationWrapper.js} +5 -5
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
- package/dist/lib/components/navigation/utils.d.ts +11 -11
- package/dist/lib/components/navigation/utils.js +32 -29
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +19 -27
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +17 -13
- package/dist/lib/core/ZudokuContext.js +47 -11
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +4 -3
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +2 -4
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/errors/TopLevelError.d.ts +2 -2
- package/dist/lib/errors/TopLevelError.js +1 -2
- package/dist/lib/errors/TopLevelError.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +28 -637
- package/dist/lib/hooks/useEvent.test.js +5 -3
- package/dist/lib/hooks/useEvent.test.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/oas/graphql/circular.js +2 -2
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +39 -3
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
- package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/lib/oas/parser/index.js +8 -4
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +2 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +7 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
- package/dist/lib/plugins/api-catalog/index.js +10 -10
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +17 -24
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +11 -6
- package/dist/lib/plugins/api-keys/index.js +28 -13
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +18 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -3
- package/dist/lib/plugins/markdown/MdxPage.js +56 -12
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/index.d.ts +13 -3
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +4 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +2 -2
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
- package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
- package/dist/lib/plugins/openapi/OasProvider.js +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +0 -2
- package/dist/lib/plugins/openapi/OperationList.js +33 -9
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js +14 -6
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +11 -9
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
- package/dist/lib/plugins/openapi/ParameterList.js +8 -5
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js +18 -7
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -5
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +11 -4
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +25 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +5 -4
- package/dist/lib/plugins/openapi/Sidecar.js +57 -31
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +11 -6
- package/dist/lib/plugins/openapi/SidecarExamples.js +24 -43
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/createServer.js +1 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -5
- package/dist/lib/plugins/openapi/graphql/graphql.js +14 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +5 -5
- package/dist/lib/plugins/openapi/index.js +57 -29
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +21 -7
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +71 -15
- 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.d.ts +3 -3
- 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 +5 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +42 -80
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +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.d.ts +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/ParamsGrid.d.ts +10 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +9 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -4
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +117 -64
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +5 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -29
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.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/fileUtils.js +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.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/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +71 -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 +40 -33
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- 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/playground/result-panel/convertToTypes.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.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.d.ts +0 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +22 -22
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +3 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +28 -17
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js +33 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js +71 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/utils.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/utils.js +3 -8
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +5 -3
- package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +6 -4
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +10 -13
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +3 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +2 -2
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +2 -2
- package/dist/lib/plugins/search-pagefind/ResultList.js +15 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
- package/dist/lib/shiki.d.ts +7 -6
- package/dist/lib/shiki.js +31 -8
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +6 -5
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +4 -4
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Breadcrumb.js +1 -1
- package/dist/lib/ui/Breadcrumb.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +1 -0
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +5 -5
- package/dist/lib/ui/Callout.js +5 -5
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +2 -4
- package/dist/lib/ui/CodeBlock.js +10 -10
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +5 -5
- package/dist/lib/ui/Command.js +2 -6
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +12 -18
- package/dist/lib/ui/Dialog.js +31 -18
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +16 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +19 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/dist/lib/ui/Form.d.ts +2 -2
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Pagination.d.ts +1 -1
- package/dist/lib/ui/Pagination.js +1 -1
- package/dist/lib/ui/Pagination.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
- package/dist/lib/ui/ReactComponentDoc.js +10 -0
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
- package/dist/lib/ui/Secret.d.ts +18 -0
- package/dist/lib/ui/Secret.js +26 -0
- package/dist/lib/ui/Secret.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Separator.d.ts +4 -0
- package/dist/lib/ui/Separator.js +8 -0
- package/dist/lib/ui/Separator.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +4 -1
- package/dist/lib/ui/SyntaxHighlight.js +3 -2
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/ui/ToggleGroup.d.ts +1 -1
- package/dist/lib/ui/Tooltip.d.ts +7 -7
- package/dist/lib/ui/Tooltip.js +16 -10
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/ui/Value.d.ts +5 -0
- package/dist/lib/ui/Value.js +13 -0
- package/dist/lib/ui/Value.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +11 -2
- package/dist/lib/util/MdxComponents.js +9 -4
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/cn.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +7 -4
- package/dist/lib/util/createVariantComponent.js +5 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/flattenAllOf.d.ts +4 -0
- package/dist/lib/util/flattenAllOf.js +65 -0
- package/dist/lib/util/flattenAllOf.js.map +1 -0
- package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
- package/dist/lib/util/flattenAllOf.test.js +532 -0
- package/dist/lib/util/flattenAllOf.test.js.map +1 -0
- package/dist/lib/util/groupBy.js +1 -0
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/humanFileSize.js +1 -1
- package/dist/lib/util/humanFileSize.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +4 -2
- package/dist/lib/util/invariant.js.map +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/pastellize.js +4 -4
- package/dist/lib/util/pastellize.js.map +1 -1
- package/dist/lib/util/syncZustandState.d.ts +5 -0
- package/dist/lib/util/syncZustandState.js +14 -0
- package/dist/lib/util/syncZustandState.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +1 -0
- package/dist/lib/util/traverse.js +25 -0
- package/dist/lib/util/traverse.js.map +1 -1
- 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/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +5 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/ts.d.ts +6 -0
- package/dist/ts.js +61 -0
- package/dist/ts.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +7 -5
- package/dist/vite/api/SchemaManager.js +62 -47
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +6 -6
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +71 -22
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +156 -1
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +11 -35
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +18 -3
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/css/plugin.js +11 -0
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +12 -4
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +2 -2
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/llms.d.ts +12 -0
- package/dist/vite/llms.js +66 -0
- package/dist/vite/llms.js.map +1 -0
- package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
- package/dist/vite/mdx/remark-inject-filepath.js +6 -0
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +28 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
- package/dist/vite/mdx/remark-link-rewrite.js +20 -0
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
- package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
- package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
- package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
- package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
- package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +2 -2
- package/dist/vite/mdx/remark-static-generation.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/output.d.ts +1 -1
- package/dist/vite/output.js +1 -1
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -1
- package/dist/vite/plugin-api-keys.js +1 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +29 -28
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -1
- package/dist/vite/plugin-auth.js +1 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -1
- package/dist/vite/plugin-config-reload.js +2 -0
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +1 -1
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +9 -0
- package/dist/vite/plugin-docs.js +92 -62
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +7 -3
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.d.ts +21 -0
- package/dist/vite/plugin-markdown-export.js +141 -0
- package/dist/vite/plugin-markdown-export.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +57 -85
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +1 -1
- package/dist/vite/plugin-navigation.d.ts +4 -0
- package/dist/vite/plugin-navigation.js +67 -0
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +1 -1
- package/dist/vite/plugin-redirect.js +1 -1
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -1
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.js +1 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +283 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +314 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -1
- package/dist/vite/plugin.js +8 -8
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.js +5 -3
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.js +3 -1
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
- package/dist/vite/prerender/prerender.js +38 -5
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/reporter.js +2 -2
- package/dist/vite/reporter.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +20 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/dist/vite/sitemap.js +14 -13
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
- package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
- package/dist/zuplo/enrich-with-zuplo.js +4 -4
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/policy-types.js +0 -1
- package/dist/zuplo/policy-types.js.map +1 -1
- package/dist/zuplo/with-zuplo-processors.js +2 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +1 -1
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{Button-BE9IVkWV.js → Button-B3ucvvQw.js} +8 -7
- package/lib/Button-B3ucvvQw.js.map +1 -0
- package/lib/{Card-DPhGbYUM.js → Card-KFniaZn5.js} +3 -3
- package/lib/{Card-DPhGbYUM.js.map → Card-KFniaZn5.js.map} +1 -1
- package/lib/CategoryHeading-DhmodDcq.js +17 -0
- package/lib/CategoryHeading-DhmodDcq.js.map +1 -0
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/Command-CUcrW3qs.js +134 -0
- package/lib/Command-CUcrW3qs.js.map +1 -0
- package/lib/Dialog-BQciPiHN.js +144 -0
- package/lib/Dialog-BQciPiHN.js.map +1 -0
- package/lib/{Drawer-BzkOKwgC.js → Drawer-Ci7XwhqT.js} +87 -87
- package/lib/{Drawer-BzkOKwgC.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
- package/lib/{Markdown-Cm4kj26S.js → ErrorAlert-_1Zmhr68.js} +3145 -3019
- package/lib/ErrorAlert-_1Zmhr68.js.map +1 -0
- package/lib/MdxPage-B2t1EShN.js +240 -0
- package/lib/MdxPage-B2t1EShN.js.map +1 -0
- package/lib/OAuthErrorPage-DnKnq4xK.js +150 -0
- package/lib/OAuthErrorPage-DnKnq4xK.js.map +1 -0
- package/lib/OasProvider-BhuIkD4Z.js +36 -0
- package/lib/OasProvider-BhuIkD4Z.js.map +1 -0
- package/lib/OperationList-D8EDc9v7.js +5688 -0
- package/lib/OperationList-D8EDc9v7.js.map +1 -0
- package/lib/Pagination-hk-llhpw.js +37 -0
- package/lib/Pagination-hk-llhpw.js.map +1 -0
- package/lib/RouteGuard-Brz95MSt.js +77 -0
- package/lib/RouteGuard-Brz95MSt.js.map +1 -0
- package/lib/RouterError-CMaIfdjb.js +42 -0
- package/lib/RouterError-CMaIfdjb.js.map +1 -0
- package/lib/{SchemaList-BWaNlmUJ.js → SchemaList-E6lF7dID.js} +31 -41
- package/lib/SchemaList-E6lF7dID.js.map +1 -0
- package/lib/SchemaView-CIv-OXgv.js +572 -0
- package/lib/SchemaView-CIv-OXgv.js.map +1 -0
- package/lib/Select-DFRCS31-.js +399 -0
- package/lib/Select-DFRCS31-.js.map +1 -0
- package/lib/SignUp-sGYAsj2K.js +50 -0
- package/lib/SignUp-sGYAsj2K.js.map +1 -0
- package/lib/{Spinner-mNLZ6awP.js → Spinner-CI6bRyZw.js} +2 -2
- package/lib/{Spinner-mNLZ6awP.js.map → Spinner-CI6bRyZw.js.map} +1 -1
- package/lib/{SyntaxHighlight-Cz6Me7-F.js → SyntaxHighlight-C19vH0V_.js} +1838 -1765
- package/lib/SyntaxHighlight-C19vH0V_.js.map +1 -0
- package/lib/{Toc-Qe7A4uj_.js → Toc-DbWS75JZ.js} +7 -7
- package/lib/Toc-DbWS75JZ.js.map +1 -0
- package/lib/ZudokuContext-BUZ5hkWB.js +1508 -0
- package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
- package/lib/c-B-NUhs61.js +46 -0
- package/lib/c-B-NUhs61.js.map +1 -0
- package/lib/chunk-PVWAREVJ-BMhpCH5D.js +7965 -0
- package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +1 -0
- package/lib/{circular-w5eL5J8a.js → circular-BoYo7au5.js} +30 -30
- package/lib/{circular-w5eL5J8a.js.map → circular-BoYo7au5.js.map} +1 -1
- package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/commonlisp-De080z23.js +28 -0
- package/lib/commonlisp-De080z23.js.map +1 -0
- package/lib/cpp-79Paht7T.js +53 -0
- package/lib/cpp-79Paht7T.js.map +1 -0
- package/lib/{createServer-p3yUA8Bu.js → createServer-B_BZ7xX8.js} +5108 -4774
- package/lib/createServer-B_BZ7xX8.js.map +1 -0
- package/lib/csharp-D8MIL50B.js +53 -0
- package/lib/csharp-D8MIL50B.js.map +1 -0
- package/lib/css-Bt6hr1td.js +54 -0
- package/lib/css-Bt6hr1td.js.map +1 -0
- package/lib/dart-B0vy1jWB.js +60 -0
- package/lib/dart-B0vy1jWB.js.map +1 -0
- package/lib/elixir-Ds8r0sF8.js +25 -0
- package/lib/elixir-Ds8r0sF8.js.map +1 -0
- package/lib/errors-CD873hrG.js +45 -0
- package/lib/errors-CD873hrG.js.map +1 -0
- package/lib/go-D2VsmIOS.js +25 -0
- package/lib/go-D2VsmIOS.js.map +1 -0
- package/lib/graphql-BtA6M4m5.js +25 -0
- package/lib/graphql-BtA6M4m5.js.map +1 -0
- package/lib/hook-CMeoxziF.js +40 -0
- package/lib/hook-CMeoxziF.js.map +1 -0
- package/lib/html-MGnI2uzP.js +33 -0
- package/lib/html-MGnI2uzP.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-BK0jKRrX.js} +166 -50
- package/lib/index-BK0jKRrX.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-HNVs5cgX.js +3667 -0
- package/lib/index-HNVs5cgX.js.map +1 -0
- package/lib/{index-zddirpDj.js → index-nGbmHh_A.js} +227 -222
- package/lib/index-nGbmHh_A.js.map +1 -0
- package/lib/index-pMMX55GH.js +1059 -0
- package/lib/index-pMMX55GH.js.map +1 -0
- package/lib/index.esm-BYObtETB.js +1294 -0
- package/lib/index.esm-BYObtETB.js.map +1 -0
- package/lib/{index.esm-BFcSKCe-.js → index.esm-BnYHxCYC.js} +2 -2
- package/lib/{index.esm-BFcSKCe-.js.map → index.esm-BnYHxCYC.js.map} +1 -1
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/java-CVLzHfb1.js +53 -0
- package/lib/java-CVLzHfb1.js.map +1 -0
- package/lib/javascript-CcmIpL4G.js +10 -0
- package/lib/javascript-CcmIpL4G.js.map +1 -0
- package/lib/json-4AyP4uiY.js +25 -0
- package/lib/json-4AyP4uiY.js.map +1 -0
- package/lib/{jsx-runtime-C5mzlN2N.js → jsx-runtime-BzflLqGi.js} +110 -112
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
- package/lib/kotlin-v2plddBQ.js +37 -0
- package/lib/kotlin-v2plddBQ.js.map +1 -0
- package/lib/markdown-DYGWCmGQ.js +25 -0
- package/lib/markdown-DYGWCmGQ.js.map +1 -0
- package/lib/mdx-CHwYvXd4.js +32 -0
- package/lib/mdx-CHwYvXd4.js.map +1 -0
- package/lib/{mutation-BSeQ8pEK.js → mutation-BSU0xu4m.js} +2 -2
- package/lib/{mutation-BSeQ8pEK.js.map → mutation-BSU0xu4m.js.map} +1 -1
- package/lib/objectivec-HZY8shkd.js +32 -0
- package/lib/objectivec-HZY8shkd.js.map +1 -0
- package/lib/ocaml-DqsdDdwb.js +52 -0
- package/lib/ocaml-DqsdDdwb.js.map +1 -0
- package/lib/php-rQXzo7K_.js +25 -0
- package/lib/php-rQXzo7K_.js.map +1 -0
- package/lib/powershell-CQje9pm1.js +39 -0
- package/lib/powershell-CQje9pm1.js.map +1 -0
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/python-QIQAE5Ei.js +32 -0
- package/lib/python-QIQAE5Ei.js.map +1 -0
- package/lib/react-DHpVpxRv.js +24 -0
- package/lib/react-DHpVpxRv.js.map +1 -0
- package/lib/ruby-B2dU8Ny5.js +25 -0
- package/lib/ruby-B2dU8Ny5.js.map +1 -0
- package/lib/rust-DYnLHAi2.js +25 -0
- package/lib/rust-DYnLHAi2.js.map +1 -0
- package/lib/scala-CeKInBR8.js +25 -0
- package/lib/scala-CeKInBR8.js.map +1 -0
- package/lib/shell-HUv9oVtp.js +25 -0
- package/lib/shell-HUv9oVtp.js.map +1 -0
- package/lib/swift-B4z6ig1Z.js +25 -0
- package/lib/swift-B4z6ig1Z.js.map +1 -0
- package/lib/toml-Co9mpdct.js +32 -0
- package/lib/toml-Co9mpdct.js.map +1 -0
- package/lib/typescript-C26xdBDC.js +32 -0
- package/lib/typescript-C26xdBDC.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +11 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +55 -39
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +28 -14
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +24 -23
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +7 -6
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +20 -20
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +2 -2
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +2 -2
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +203 -67
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/Command.js +22 -28
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +140 -95
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +3 -3
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +84 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Form.js +3 -3
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Pagination.js +29 -30
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ReactComponentDoc.js +28 -0
- package/lib/ui/ReactComponentDoc.js.map +1 -0
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Secret.js +106 -0
- package/lib/ui/Secret.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Separator.js +27 -0
- package/lib/ui/Separator.js.map +1 -0
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +6 -5
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/ui/Tabs.js +12 -12
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +55 -28
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/Value.js +39 -0
- package/lib/ui/Value.js.map +1 -0
- package/lib/ui/util.js +1 -1
- package/lib/useCopyToClipboard-B_085nfO.js +14 -0
- package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
- package/lib/useExposedProps-U3pmsHaG.js +113 -0
- package/lib/useExposedProps-U3pmsHaG.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -1
- package/lib/xml-BQOOC04j.js +25 -0
- package/lib/xml-BQOOC04j.js.map +1 -0
- package/lib/yaml-BGsJItKv.js +32 -0
- package/lib/yaml-BGsJItKv.js.map +1 -0
- package/lib/zig-CUV2sTct.js +35 -0
- package/lib/zig-CUV2sTct.js.map +1 -0
- package/lib/zudoku.__internal.js +3084 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +23 -22
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +136 -0
- package/lib/zudoku.auth-azureb2c.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +59 -65
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +372 -383
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +154 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +27 -4573
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +13 -14
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +62 -55
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +456 -328
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +15 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +21 -70
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -7
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +213 -119
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +2507 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +140 -110
- package/src/app/ZuploBuildConfig.ts +7 -7
- package/src/app/defaultTheme.css +68 -49
- package/src/app/demo.tsx +25 -7
- package/src/app/entry.client.tsx +7 -8
- package/src/app/entry.server.tsx +20 -12
- package/src/app/env.ts +10 -2
- package/src/app/main.css +59 -33
- package/src/app/main.tsx +46 -36
- package/src/app/standalone.tsx +14 -8
- package/src/lib/MissingIcon.tsx +1 -1
- package/src/lib/assets/language-icons/c.tsx +31 -0
- package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
- package/src/lib/assets/language-icons/cpp.tsx +35 -0
- package/src/lib/assets/language-icons/csharp.tsx +35 -0
- package/src/lib/assets/language-icons/css.tsx +36 -0
- package/src/lib/assets/language-icons/dart.tsx +39 -0
- package/src/lib/assets/language-icons/elixir.tsx +19 -0
- package/src/lib/assets/language-icons/go.tsx +19 -0
- package/src/lib/assets/language-icons/graphql.tsx +19 -0
- package/src/lib/assets/language-icons/html.tsx +24 -0
- package/src/lib/assets/language-icons/java.tsx +35 -0
- package/src/lib/assets/language-icons/javascript.tsx +11 -0
- package/src/lib/assets/language-icons/json.tsx +19 -0
- package/src/lib/assets/language-icons/kotlin.tsx +30 -0
- package/src/lib/assets/language-icons/markdown.tsx +19 -0
- package/src/lib/assets/language-icons/mdx.tsx +23 -0
- package/src/lib/assets/language-icons/objectivec.tsx +23 -0
- package/src/lib/assets/language-icons/ocaml.tsx +34 -0
- package/src/lib/assets/language-icons/php.tsx +19 -0
- package/src/lib/assets/language-icons/powershell.tsx +27 -0
- package/src/lib/assets/language-icons/python.tsx +23 -0
- package/src/lib/assets/language-icons/react.tsx +21 -0
- package/src/lib/assets/language-icons/ruby.tsx +19 -0
- package/src/lib/assets/language-icons/rust.tsx +19 -0
- package/src/lib/assets/language-icons/scala.tsx +19 -0
- package/src/lib/assets/language-icons/shell.tsx +19 -0
- package/src/lib/assets/language-icons/swift.tsx +19 -0
- package/src/lib/assets/language-icons/toml.tsx +23 -0
- package/src/lib/assets/language-icons/typescript.tsx +23 -0
- package/src/lib/assets/language-icons/xml.tsx +19 -0
- package/src/lib/assets/language-icons/yaml.tsx +23 -0
- package/src/lib/assets/language-icons/zig.tsx +32 -0
- package/src/lib/auth/issuer.test.ts +121 -0
- package/src/lib/auth/issuer.ts +44 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +26 -8
- package/src/lib/authentication/components/CallbackHandler.tsx +23 -16
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/components/SignIn.tsx +12 -17
- package/src/lib/authentication/components/SignOut.tsx +7 -6
- package/src/lib/authentication/components/SignUp.tsx +5 -8
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +23 -10
- package/src/lib/authentication/providers/auth0.tsx +15 -10
- package/src/lib/authentication/providers/azureb2c.tsx +208 -0
- package/src/lib/authentication/providers/clerk.tsx +21 -20
- package/src/lib/authentication/providers/firebase.tsx +284 -0
- package/src/lib/authentication/providers/openid.tsx +95 -12
- package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
- package/src/lib/authentication/providers/supabase.tsx +63 -58
- package/src/lib/authentication/state.ts +40 -30
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
- package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
- package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
- package/src/lib/authentication/ui/icons/Github.tsx +16 -0
- package/src/lib/authentication/ui/icons/Google.tsx +16 -0
- package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
- package/src/lib/authentication/ui/icons/X.tsx +10 -0
- package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
- package/src/lib/authentication/use-broadcast/shared.ts +4 -4
- package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Autocomplete.tsx +14 -4
- package/src/lib/components/Banner.tsx +1 -2
- package/src/lib/components/Bootstrap.tsx +3 -4
- package/src/lib/components/BuildCheck.tsx +26 -13
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +28 -25
- package/src/lib/components/Heading.tsx +11 -12
- package/src/lib/components/LanguageIcon.tsx +181 -0
- package/src/lib/components/Layout.tsx +6 -24
- package/src/lib/components/Main.tsx +10 -10
- package/src/lib/components/Markdown.tsx +11 -10
- package/src/lib/components/Meta.tsx +45 -0
- package/src/lib/components/MobileTopNavigation.tsx +70 -15
- package/src/lib/components/NotFoundPage.tsx +6 -5
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +5 -4
- package/src/lib/components/PathRenderer.tsx +2 -2
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +8 -8
- package/src/lib/components/Slot.tsx +2 -2
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +77 -70
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +5 -5
- package/src/lib/components/cache.ts +9 -5
- package/src/lib/components/context/ComponentsContext.tsx +2 -2
- package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
- package/src/lib/components/context/SlotProvider.tsx +4 -4
- package/src/lib/components/context/ViewportAnchorContext.tsx +2 -2
- package/src/lib/components/context/ZudokuContext.ts +77 -43
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/index.ts +5 -19
- package/src/lib/components/navigation/{Sidebar.tsx → Navigation.tsx} +18 -16
- package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +1 -1
- package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +25 -16
- package/src/lib/components/navigation/{SidebarItem.tsx → NavigationItem.tsx} +44 -40
- package/src/lib/components/navigation/{SidebarWrapper.tsx → NavigationWrapper.tsx} +8 -5
- package/src/lib/components/navigation/Toc.tsx +5 -5
- package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +50 -46
- package/src/lib/core/RouteGuard.tsx +52 -32
- package/src/lib/core/ZudokuContext.ts +74 -23
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/plugins.ts +4 -3
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +8 -17
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/errors/TopLevelError.tsx +2 -4
- package/src/lib/hooks/useEvent.test.tsx +9 -7
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/oas/graphql/circular.ts +3 -3
- package/src/lib/oas/graphql/index.ts +39 -3
- package/src/lib/oas/parser/dereference/index.ts +2 -1
- package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
- package/src/lib/oas/parser/index.ts +10 -5
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +8 -1
- package/src/lib/plugins/api-catalog/index.tsx +19 -19
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +18 -4
- package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +65 -71
- package/src/lib/plugins/api-keys/index.tsx +50 -25
- package/src/lib/plugins/custom-pages/index.tsx +24 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +204 -32
- package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
- package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
- package/src/lib/plugins/markdown/index.tsx +27 -42
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
- package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
- package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
- package/src/lib/plugins/openapi/OperationList.tsx +51 -31
- package/src/lib/plugins/openapi/OperationListItem.tsx +106 -79
- package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
- package/src/lib/plugins/openapi/ParameterList.tsx +40 -28
- package/src/lib/plugins/openapi/ParameterListItem.tsx +110 -59
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -13
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +51 -9
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +75 -29
- package/src/lib/plugins/openapi/SchemaList.tsx +5 -11
- package/src/lib/plugins/openapi/Sidecar.tsx +138 -72
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +93 -87
- package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
- package/src/lib/plugins/openapi/client/createServer.ts +1 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +3 -2
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/context.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +11 -11
- package/src/lib/plugins/openapi/graphql/graphql.ts +33 -9
- package/src/lib/plugins/openapi/index.tsx +90 -59
- package/src/lib/plugins/openapi/interfaces.ts +22 -7
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +257 -32
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +51 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +11 -6
- package/src/lib/plugins/openapi/playground/Headers.tsx +158 -176
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +4 -3
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +8 -13
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +34 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -35
- package/src/lib/plugins/openapi/playground/Playground.tsx +263 -159
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +23 -33
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +92 -100
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/fileUtils.ts +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -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/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +117 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +189 -115
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +70 -94
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
- package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +4 -4
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +94 -79
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +89 -55
- package/src/lib/plugins/openapi/schema/UnionView.tsx +132 -0
- package/src/lib/plugins/openapi/schema/union-helpers.ts +123 -0
- package/src/lib/plugins/openapi/schema/utils.ts +3 -13
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
- package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +7 -5
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +14 -15
- package/src/lib/plugins/openapi/util/getRoutes.tsx +4 -4
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +3 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +16 -8
- package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
- package/src/lib/shiki.ts +37 -8
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/Alert.tsx +45 -39
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Breadcrumb.tsx +1 -0
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/ui/Callout.tsx +10 -5
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +37 -61
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/Command.tsx +2 -4
- package/src/lib/ui/Dialog.tsx +113 -99
- package/src/lib/ui/EmbeddedCodeBlock.tsx +99 -0
- package/src/lib/ui/Form.tsx +4 -4
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Pagination.tsx +1 -2
- package/src/lib/ui/ReactComponentDoc.tsx +68 -0
- package/src/lib/ui/Secret.tsx +123 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/ui/Separator.tsx +25 -0
- package/src/lib/ui/SyntaxHighlight.tsx +16 -3
- package/src/lib/ui/ToggleGroup.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +54 -32
- package/src/lib/ui/Value.tsx +42 -0
- package/src/lib/util/MdxComponents.tsx +24 -5
- package/src/lib/util/cn.ts +1 -1
- package/src/lib/util/createVariantComponent.tsx +33 -7
- package/src/lib/util/flattenAllOf.test.ts +637 -0
- package/src/lib/util/flattenAllOf.ts +101 -0
- package/src/lib/util/groupBy.ts +1 -0
- package/src/lib/util/humanFileSize.ts +2 -3
- package/src/lib/util/invariant.ts +8 -5
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/pastellize.ts +4 -4
- package/src/lib/util/syncZustandState.ts +22 -0
- package/src/lib/util/traverse.ts +36 -0
- package/src/lib/util/types.ts +1 -1
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
- package/src/lib/util/useScrollToAnchor.ts +6 -4
- package/src/shiki/langs/hurl.js +1 -0
- package/src/shiki/langs/kdl.js +1 -0
- package/src/shiki/langs/pkl.js +1 -0
- package/src/shiki/langs/rosmsg.js +1 -0
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
- package/dist/config/validators/InputSidebarSchema.js +0 -62
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/lib/components/ReactMarkdown.d.ts +0 -29
- package/dist/lib/components/ReactMarkdown.js +0 -182
- package/dist/lib/components/ReactMarkdown.js.map +0 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
- package/dist/lib/components/navigation/Sidebar.js +0 -10
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -6
- package/dist/lib/components/navigation/SidebarItem.js +0 -45
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- 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/markdown/resolver.d.ts +0 -32
- package/dist/lib/plugins/markdown/resolver.js +0 -46
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.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/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -6
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +0 -2
- package/dist/vite/plugin-configure-tailwind.js +0 -38
- package/dist/vite/plugin-configure-tailwind.js.map +0 -1
- package/dist/vite/plugin-sidebar.d.ts +0 -4
- package/dist/vite/plugin-sidebar.js +0 -63
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -5
- package/dist/vite/plugin-theme-css.js +0 -77
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/Button-BE9IVkWV.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 +0 -99
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-Cm4kj26S.js.map +0 -1
- package/lib/MdxPage-fDGQtB5w.js +0 -84
- package/lib/MdxPage-fDGQtB5w.js.map +0 -1
- package/lib/OasProvider-CFBvfR3r.js +0 -33
- package/lib/OasProvider-CFBvfR3r.js.map +0 -1
- package/lib/OperationList-Xs4KWmsh.js +0 -5153
- package/lib/OperationList-Xs4KWmsh.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-CZ_uLv3g.js +0 -55
- package/lib/RouteGuard-CZ_uLv3g.js.map +0 -1
- package/lib/SchemaList-BWaNlmUJ.js.map +0 -1
- package/lib/SchemaView-DdKJt2ln.js +0 -375
- package/lib/SchemaView-DdKJt2ln.js.map +0 -1
- package/lib/SignUp-B-1Pvc-8.js +0 -63
- package/lib/SignUp-B-1Pvc-8.js.map +0 -1
- package/lib/Slot-B99cbD-q.js +0 -160
- package/lib/Slot-B99cbD-q.js.map +0 -1
- package/lib/SyntaxHighlight-Cz6Me7-F.js.map +0 -1
- package/lib/Toc-Qe7A4uj_.js.map +0 -1
- package/lib/chunk-DQRVZFIR-BblmKnHy.js +0 -1839
- package/lib/chunk-DQRVZFIR-BblmKnHy.js.map +0 -1
- package/lib/cn-wvCW-ho6.js.map +0 -1
- package/lib/createServer-p3yUA8Bu.js.map +0 -1
- package/lib/hook-k7PfUIsj.js +0 -1465
- package/lib/hook-k7PfUIsj.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-BvvmIczU.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index-yqBxBqxF.js +0 -3226
- package/lib/index-yqBxBqxF.js.map +0 -1
- package/lib/index-zddirpDj.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/jsx-runtime-C5mzlN2N.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/useExposedProps-BZQkZneR.js +0 -9
- package/lib/useExposedProps-BZQkZneR.js.map +0 -1
- package/lib/useMutation-CZSmsIGW.js +0 -97
- package/lib/useMutation-CZSmsIGW.js.map +0 -1
- package/src/lib/components/ReactMarkdown.license.txt +0 -21
- package/src/lib/components/ReactMarkdown.tsx +0 -264
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/resolver.ts +0 -59
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +0 -57
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +0 -33
package/lib/zudoku.components.js
CHANGED
|
@@ -1,4576 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { createContext as tt, StrictMode as Dt, useRef as st, useEffect as te, useState as de, useCallback as Ds, Suspense as rt, memo as $t, Component as $s, createElement as ft, useMemo as Fe, useContext as zs } from "react";
|
|
13
|
-
import * as qs from "react-dom";
|
|
14
|
-
import { CircleFadingArrowUpIcon as Ls, LoaderCircleIcon as Bs, ExternalLink as Fs, CircleXIcon as Vs, ChevronRightIcon as Qs, SearchIcon as Us, SunIcon as Hs, MoonIcon as Ws, MenuIcon as Ks, PanelLeftIcon as Ys } from "lucide-react";
|
|
15
|
-
import { C as Le } from "./ClientOnly-E7hGysn1.js";
|
|
16
|
-
import { c as N } from "./cn-wvCW-ho6.js";
|
|
17
|
-
import { A as Js, s as Gs, a as mt, b as Xs, H as er, P as tr, c as sr, V as rr, M as nr } from "./Markdown-Cm4kj26S.js";
|
|
18
|
-
import { S as zt } from "./Spinner-mNLZ6awP.js";
|
|
19
|
-
import { C as ar } from "./CategoryHeading-Cu2RwgjC.js";
|
|
20
|
-
import { isSearchPlugin as ir, isProfileMenuPlugin as or, isNavigationPlugin as pt, isAuthenticationPlugin as cr, isEventConsumerPlugin as dr, needsInitialization as lr, isApiIdentityPlugin as ur, isMdxProviderPlugin as hr, hasHead as fr } from "./zudoku.plugins.js";
|
|
21
|
-
import { j as mr } from "./joinPath-B7kNnUX4.js";
|
|
22
|
-
import { o as pr } from "./objectEntries-yMIkr2mI.js";
|
|
23
|
-
import { B as He } from "./Button-BE9IVkWV.js";
|
|
24
|
-
import { DropdownMenu as gr, DropdownMenuTrigger as vr, DropdownMenuContent as yr, DropdownMenuLabel as xr, DropdownMenuSeparator as Ve, DropdownMenuSub as _r, DropdownMenuSubTrigger as br, DropdownMenuPortal as wr, DropdownMenuSubContent as kr, DropdownMenuItem as jr } from "./ui/DropdownMenu.js";
|
|
25
|
-
import { VisuallyHidden as qt } from "@radix-ui/react-visually-hidden";
|
|
26
|
-
import { D as Tr, a as Nr, b as Lt, c as Bt, d as q } from "./Drawer-BzkOKwgC.js";
|
|
27
|
-
import { u as Cr } from "./react-nprogress.esm-C2MPXjiJ.js";
|
|
28
|
-
import { a as Sr } from "./index-DI5SPFK9.js";
|
|
29
|
-
import { M as Or, u as Ar } from "./index-QzXzw_ra.js";
|
|
30
|
-
var Er = class extends St {
|
|
31
|
-
constructor(t = {}) {
|
|
32
|
-
super(), this.config = t, this.#e = /* @__PURE__ */ new Map();
|
|
33
|
-
}
|
|
34
|
-
#e;
|
|
35
|
-
build(t, e, s) {
|
|
36
|
-
const r = e.queryKey, n = e.queryHash ?? Ot(r, e);
|
|
37
|
-
let a = this.get(n);
|
|
38
|
-
return a || (a = new vs({
|
|
39
|
-
client: t,
|
|
40
|
-
queryKey: r,
|
|
41
|
-
queryHash: n,
|
|
42
|
-
options: t.defaultQueryOptions(e),
|
|
43
|
-
state: s,
|
|
44
|
-
defaultOptions: t.getQueryDefaults(r)
|
|
45
|
-
}), this.add(a)), a;
|
|
46
|
-
}
|
|
47
|
-
add(t) {
|
|
48
|
-
this.#e.has(t.queryHash) || (this.#e.set(t.queryHash, t), this.notify({
|
|
49
|
-
type: "added",
|
|
50
|
-
query: t
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
remove(t) {
|
|
54
|
-
const e = this.#e.get(t.queryHash);
|
|
55
|
-
e && (t.destroy(), e === t && this.#e.delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
56
|
-
}
|
|
57
|
-
clear() {
|
|
58
|
-
A.batch(() => {
|
|
59
|
-
this.getAll().forEach((t) => {
|
|
60
|
-
this.remove(t);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
get(t) {
|
|
65
|
-
return this.#e.get(t);
|
|
66
|
-
}
|
|
67
|
-
getAll() {
|
|
68
|
-
return [...this.#e.values()];
|
|
69
|
-
}
|
|
70
|
-
find(t) {
|
|
71
|
-
const e = { exact: !0, ...t };
|
|
72
|
-
return this.getAll().find(
|
|
73
|
-
(s) => ot(e, s)
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
findAll(t = {}) {
|
|
77
|
-
const e = this.getAll();
|
|
78
|
-
return Object.keys(t).length > 0 ? e.filter((s) => ot(t, s)) : e;
|
|
79
|
-
}
|
|
80
|
-
notify(t) {
|
|
81
|
-
A.batch(() => {
|
|
82
|
-
this.listeners.forEach((e) => {
|
|
83
|
-
e(t);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
onFocus() {
|
|
88
|
-
A.batch(() => {
|
|
89
|
-
this.getAll().forEach((t) => {
|
|
90
|
-
t.onFocus();
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
onOnline() {
|
|
95
|
-
A.batch(() => {
|
|
96
|
-
this.getAll().forEach((t) => {
|
|
97
|
-
t.onOnline();
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}, Pr = class extends St {
|
|
102
|
-
constructor(t = {}) {
|
|
103
|
-
super(), this.config = t, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#s = 0;
|
|
104
|
-
}
|
|
105
|
-
#e;
|
|
106
|
-
#t;
|
|
107
|
-
#s;
|
|
108
|
-
build(t, e, s) {
|
|
109
|
-
const r = new Ms({
|
|
110
|
-
mutationCache: this,
|
|
111
|
-
mutationId: ++this.#s,
|
|
112
|
-
options: t.defaultMutationOptions(e),
|
|
113
|
-
state: s
|
|
114
|
-
});
|
|
115
|
-
return this.add(r), r;
|
|
116
|
-
}
|
|
117
|
-
add(t) {
|
|
118
|
-
this.#e.add(t);
|
|
119
|
-
const e = Se(t);
|
|
120
|
-
if (typeof e == "string") {
|
|
121
|
-
const s = this.#t.get(e);
|
|
122
|
-
s ? s.push(t) : this.#t.set(e, [t]);
|
|
123
|
-
}
|
|
124
|
-
this.notify({ type: "added", mutation: t });
|
|
125
|
-
}
|
|
126
|
-
remove(t) {
|
|
127
|
-
if (this.#e.delete(t)) {
|
|
128
|
-
const e = Se(t);
|
|
129
|
-
if (typeof e == "string") {
|
|
130
|
-
const s = this.#t.get(e);
|
|
131
|
-
if (s)
|
|
132
|
-
if (s.length > 1) {
|
|
133
|
-
const r = s.indexOf(t);
|
|
134
|
-
r !== -1 && s.splice(r, 1);
|
|
135
|
-
} else s[0] === t && this.#t.delete(e);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
this.notify({ type: "removed", mutation: t });
|
|
139
|
-
}
|
|
140
|
-
canRun(t) {
|
|
141
|
-
const e = Se(t);
|
|
142
|
-
if (typeof e == "string") {
|
|
143
|
-
const r = this.#t.get(e)?.find(
|
|
144
|
-
(n) => n.state.status === "pending"
|
|
145
|
-
);
|
|
146
|
-
return !r || r === t;
|
|
147
|
-
} else
|
|
148
|
-
return !0;
|
|
149
|
-
}
|
|
150
|
-
runNext(t) {
|
|
151
|
-
const e = Se(t);
|
|
152
|
-
return typeof e == "string" ? this.#t.get(e)?.find((r) => r !== t && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
|
|
153
|
-
}
|
|
154
|
-
clear() {
|
|
155
|
-
A.batch(() => {
|
|
156
|
-
this.#e.forEach((t) => {
|
|
157
|
-
this.notify({ type: "removed", mutation: t });
|
|
158
|
-
}), this.#e.clear(), this.#t.clear();
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
getAll() {
|
|
162
|
-
return Array.from(this.#e);
|
|
163
|
-
}
|
|
164
|
-
find(t) {
|
|
165
|
-
const e = { exact: !0, ...t };
|
|
166
|
-
return this.getAll().find(
|
|
167
|
-
(s) => ct(e, s)
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
findAll(t = {}) {
|
|
171
|
-
return this.getAll().filter((e) => ct(t, e));
|
|
172
|
-
}
|
|
173
|
-
notify(t) {
|
|
174
|
-
A.batch(() => {
|
|
175
|
-
this.listeners.forEach((e) => {
|
|
176
|
-
e(t);
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
resumePausedMutations() {
|
|
181
|
-
const t = this.getAll().filter((e) => e.state.isPaused);
|
|
182
|
-
return A.batch(
|
|
183
|
-
() => Promise.all(
|
|
184
|
-
t.map((e) => e.continue().catch(B))
|
|
185
|
-
)
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
function Se(t) {
|
|
190
|
-
return t.options.scope?.id;
|
|
191
|
-
}
|
|
192
|
-
function gt(t) {
|
|
193
|
-
return {
|
|
194
|
-
onFetch: (e, s) => {
|
|
195
|
-
const r = e.options, n = e.fetchOptions?.meta?.fetchMore?.direction, a = e.state.data?.pages || [], o = e.state.data?.pageParams || [];
|
|
196
|
-
let c = { pages: [], pageParams: [] }, u = 0;
|
|
197
|
-
const d = async () => {
|
|
198
|
-
let m = !1;
|
|
199
|
-
const k = (T) => {
|
|
200
|
-
Object.defineProperty(T, "signal", {
|
|
201
|
-
enumerable: !0,
|
|
202
|
-
get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
|
|
203
|
-
m = !0;
|
|
204
|
-
}), e.signal)
|
|
205
|
-
});
|
|
206
|
-
}, w = ys(e.options, e.fetchOptions), g = async (T, O, L) => {
|
|
207
|
-
if (m)
|
|
208
|
-
return Promise.reject();
|
|
209
|
-
if (O == null && T.pages.length)
|
|
210
|
-
return Promise.resolve(T);
|
|
211
|
-
const Ce = {
|
|
212
|
-
client: e.client,
|
|
213
|
-
queryKey: e.queryKey,
|
|
214
|
-
pageParam: O,
|
|
215
|
-
direction: L ? "backward" : "forward",
|
|
216
|
-
meta: e.options.meta
|
|
217
|
-
};
|
|
218
|
-
k(Ce);
|
|
219
|
-
const hs = await w(
|
|
220
|
-
Ce
|
|
221
|
-
), { maxPages: at } = e.options, it = L ? xs : _s;
|
|
222
|
-
return {
|
|
223
|
-
pages: it(T.pages, hs, at),
|
|
224
|
-
pageParams: it(T.pageParams, O, at)
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
if (n && a.length) {
|
|
228
|
-
const T = n === "backward", O = T ? Zr : vt, L = {
|
|
229
|
-
pages: a,
|
|
230
|
-
pageParams: o
|
|
231
|
-
}, Ce = O(r, L);
|
|
232
|
-
c = await g(L, Ce, T);
|
|
233
|
-
} else {
|
|
234
|
-
const T = t ?? a.length;
|
|
235
|
-
do {
|
|
236
|
-
const O = u === 0 ? o[0] ?? r.initialPageParam : vt(r, c);
|
|
237
|
-
if (u > 0 && O == null)
|
|
238
|
-
break;
|
|
239
|
-
c = await g(c, O), u++;
|
|
240
|
-
} while (u < T);
|
|
241
|
-
}
|
|
242
|
-
return c;
|
|
243
|
-
};
|
|
244
|
-
e.options.persister ? e.fetchFn = () => e.options.persister?.(
|
|
245
|
-
d,
|
|
246
|
-
{
|
|
247
|
-
client: e.client,
|
|
248
|
-
queryKey: e.queryKey,
|
|
249
|
-
meta: e.options.meta,
|
|
250
|
-
signal: e.signal
|
|
251
|
-
},
|
|
252
|
-
s
|
|
253
|
-
) : e.fetchFn = d;
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function vt(t, { pages: e, pageParams: s }) {
|
|
258
|
-
const r = e.length - 1;
|
|
259
|
-
return e.length > 0 ? t.getNextPageParam(
|
|
260
|
-
e[r],
|
|
261
|
-
e,
|
|
262
|
-
s[r],
|
|
263
|
-
s
|
|
264
|
-
) : void 0;
|
|
265
|
-
}
|
|
266
|
-
function Zr(t, { pages: e, pageParams: s }) {
|
|
267
|
-
return e.length > 0 ? t.getPreviousPageParam?.(e[0], e, s[0], s) : void 0;
|
|
268
|
-
}
|
|
269
|
-
var Rr = class {
|
|
270
|
-
#e;
|
|
271
|
-
#t;
|
|
272
|
-
#s;
|
|
273
|
-
#n;
|
|
274
|
-
#a;
|
|
275
|
-
#r;
|
|
276
|
-
#i;
|
|
277
|
-
#o;
|
|
278
|
-
constructor(t = {}) {
|
|
279
|
-
this.#e = t.queryCache || new Er(), this.#t = t.mutationCache || new Pr(), this.#s = t.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#a = /* @__PURE__ */ new Map(), this.#r = 0;
|
|
280
|
-
}
|
|
281
|
-
mount() {
|
|
282
|
-
this.#r++, this.#r === 1 && (this.#i = bs.subscribe(async (t) => {
|
|
283
|
-
t && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
284
|
-
}), this.#o = dt.subscribe(async (t) => {
|
|
285
|
-
t && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
286
|
-
}));
|
|
287
|
-
}
|
|
288
|
-
unmount() {
|
|
289
|
-
this.#r--, this.#r === 0 && (this.#i?.(), this.#i = void 0, this.#o?.(), this.#o = void 0);
|
|
290
|
-
}
|
|
291
|
-
isFetching(t) {
|
|
292
|
-
return this.#e.findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
293
|
-
}
|
|
294
|
-
isMutating(t) {
|
|
295
|
-
return this.#t.findAll({ ...t, status: "pending" }).length;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
299
|
-
* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
|
|
300
|
-
*
|
|
301
|
-
* Hint: Do not use this function inside a component, because it won't receive updates.
|
|
302
|
-
* Use `useQuery` to create a `QueryObserver` that subscribes to changes.
|
|
303
|
-
*/
|
|
304
|
-
getQueryData(t) {
|
|
305
|
-
const e = this.defaultQueryOptions({ queryKey: t });
|
|
306
|
-
return this.#e.get(e.queryHash)?.state.data;
|
|
307
|
-
}
|
|
308
|
-
ensureQueryData(t) {
|
|
309
|
-
const e = this.defaultQueryOptions(t), s = this.#e.build(this, e), r = s.state.data;
|
|
310
|
-
return r === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && s.isStaleByTime(lt(e.staleTime, s)) && this.prefetchQuery(e), Promise.resolve(r));
|
|
311
|
-
}
|
|
312
|
-
getQueriesData(t) {
|
|
313
|
-
return this.#e.findAll(t).map(({ queryKey: e, state: s }) => {
|
|
314
|
-
const r = s.data;
|
|
315
|
-
return [e, r];
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
setQueryData(t, e, s) {
|
|
319
|
-
const r = this.defaultQueryOptions({ queryKey: t }), a = this.#e.get(
|
|
320
|
-
r.queryHash
|
|
321
|
-
)?.state.data, o = ws(e, a);
|
|
322
|
-
if (o !== void 0)
|
|
323
|
-
return this.#e.build(this, r).setData(o, { ...s, manual: !0 });
|
|
324
|
-
}
|
|
325
|
-
setQueriesData(t, e, s) {
|
|
326
|
-
return A.batch(
|
|
327
|
-
() => this.#e.findAll(t).map(({ queryKey: r }) => [
|
|
328
|
-
r,
|
|
329
|
-
this.setQueryData(r, e, s)
|
|
330
|
-
])
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
|
-
getQueryState(t) {
|
|
334
|
-
const e = this.defaultQueryOptions({ queryKey: t });
|
|
335
|
-
return this.#e.get(
|
|
336
|
-
e.queryHash
|
|
337
|
-
)?.state;
|
|
338
|
-
}
|
|
339
|
-
removeQueries(t) {
|
|
340
|
-
const e = this.#e;
|
|
341
|
-
A.batch(() => {
|
|
342
|
-
e.findAll(t).forEach((s) => {
|
|
343
|
-
e.remove(s);
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
resetQueries(t, e) {
|
|
348
|
-
const s = this.#e;
|
|
349
|
-
return A.batch(() => (s.findAll(t).forEach((r) => {
|
|
350
|
-
r.reset();
|
|
351
|
-
}), this.refetchQueries(
|
|
352
|
-
{
|
|
353
|
-
type: "active",
|
|
354
|
-
...t
|
|
355
|
-
},
|
|
356
|
-
e
|
|
357
|
-
)));
|
|
358
|
-
}
|
|
359
|
-
cancelQueries(t, e = {}) {
|
|
360
|
-
const s = { revert: !0, ...e }, r = A.batch(
|
|
361
|
-
() => this.#e.findAll(t).map((n) => n.cancel(s))
|
|
362
|
-
);
|
|
363
|
-
return Promise.all(r).then(B).catch(B);
|
|
364
|
-
}
|
|
365
|
-
invalidateQueries(t, e = {}) {
|
|
366
|
-
return A.batch(() => (this.#e.findAll(t).forEach((s) => {
|
|
367
|
-
s.invalidate();
|
|
368
|
-
}), t?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
|
|
369
|
-
{
|
|
370
|
-
...t,
|
|
371
|
-
type: t?.refetchType ?? t?.type ?? "active"
|
|
372
|
-
},
|
|
373
|
-
e
|
|
374
|
-
)));
|
|
375
|
-
}
|
|
376
|
-
refetchQueries(t, e = {}) {
|
|
377
|
-
const s = {
|
|
378
|
-
...e,
|
|
379
|
-
cancelRefetch: e.cancelRefetch ?? !0
|
|
380
|
-
}, r = A.batch(
|
|
381
|
-
() => this.#e.findAll(t).filter((n) => !n.isDisabled()).map((n) => {
|
|
382
|
-
let a = n.fetch(void 0, s);
|
|
383
|
-
return s.throwOnError || (a = a.catch(B)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
|
|
384
|
-
})
|
|
385
|
-
);
|
|
386
|
-
return Promise.all(r).then(B);
|
|
387
|
-
}
|
|
388
|
-
fetchQuery(t) {
|
|
389
|
-
const e = this.defaultQueryOptions(t);
|
|
390
|
-
e.retry === void 0 && (e.retry = !1);
|
|
391
|
-
const s = this.#e.build(this, e);
|
|
392
|
-
return s.isStaleByTime(
|
|
393
|
-
lt(e.staleTime, s)
|
|
394
|
-
) ? s.fetch(e) : Promise.resolve(s.state.data);
|
|
395
|
-
}
|
|
396
|
-
prefetchQuery(t) {
|
|
397
|
-
return this.fetchQuery(t).then(B).catch(B);
|
|
398
|
-
}
|
|
399
|
-
fetchInfiniteQuery(t) {
|
|
400
|
-
return t.behavior = gt(t.pages), this.fetchQuery(t);
|
|
401
|
-
}
|
|
402
|
-
prefetchInfiniteQuery(t) {
|
|
403
|
-
return this.fetchInfiniteQuery(t).then(B).catch(B);
|
|
404
|
-
}
|
|
405
|
-
ensureInfiniteQueryData(t) {
|
|
406
|
-
return t.behavior = gt(t.pages), this.ensureQueryData(t);
|
|
407
|
-
}
|
|
408
|
-
resumePausedMutations() {
|
|
409
|
-
return dt.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
410
|
-
}
|
|
411
|
-
getQueryCache() {
|
|
412
|
-
return this.#e;
|
|
413
|
-
}
|
|
414
|
-
getMutationCache() {
|
|
415
|
-
return this.#t;
|
|
416
|
-
}
|
|
417
|
-
getDefaultOptions() {
|
|
418
|
-
return this.#s;
|
|
419
|
-
}
|
|
420
|
-
setDefaultOptions(t) {
|
|
421
|
-
this.#s = t;
|
|
422
|
-
}
|
|
423
|
-
setQueryDefaults(t, e) {
|
|
424
|
-
this.#n.set(ut(t), {
|
|
425
|
-
queryKey: t,
|
|
426
|
-
defaultOptions: e
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
getQueryDefaults(t) {
|
|
430
|
-
const e = [...this.#n.values()], s = {};
|
|
431
|
-
return e.forEach((r) => {
|
|
432
|
-
ht(t, r.queryKey) && Object.assign(s, r.defaultOptions);
|
|
433
|
-
}), s;
|
|
434
|
-
}
|
|
435
|
-
setMutationDefaults(t, e) {
|
|
436
|
-
this.#a.set(ut(t), {
|
|
437
|
-
mutationKey: t,
|
|
438
|
-
defaultOptions: e
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
getMutationDefaults(t) {
|
|
442
|
-
const e = [...this.#a.values()], s = {};
|
|
443
|
-
return e.forEach((r) => {
|
|
444
|
-
ht(t, r.mutationKey) && Object.assign(s, r.defaultOptions);
|
|
445
|
-
}), s;
|
|
446
|
-
}
|
|
447
|
-
defaultQueryOptions(t) {
|
|
448
|
-
if (t._defaulted)
|
|
449
|
-
return t;
|
|
450
|
-
const e = {
|
|
451
|
-
...this.#s.queries,
|
|
452
|
-
...this.getQueryDefaults(t.queryKey),
|
|
453
|
-
...t,
|
|
454
|
-
_defaulted: !0
|
|
455
|
-
};
|
|
456
|
-
return e.queryHash || (e.queryHash = Ot(
|
|
457
|
-
e.queryKey,
|
|
458
|
-
e
|
|
459
|
-
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === ks && (e.enabled = !1), e;
|
|
460
|
-
}
|
|
461
|
-
defaultMutationOptions(t) {
|
|
462
|
-
return t?._defaulted ? t : {
|
|
463
|
-
...this.#s.mutations,
|
|
464
|
-
...t?.mutationKey && this.getMutationDefaults(t.mutationKey),
|
|
465
|
-
...t,
|
|
466
|
-
_defaulted: !0
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
clear() {
|
|
470
|
-
this.#e.clear(), this.#t.clear();
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
function Ir(t) {
|
|
474
|
-
return t;
|
|
475
|
-
}
|
|
476
|
-
function yt(t, e, s) {
|
|
477
|
-
if (typeof e != "object" || e === null)
|
|
478
|
-
return;
|
|
479
|
-
const r = t.getMutationCache(), n = t.getQueryCache(), a = s?.defaultOptions?.deserializeData ?? t.getDefaultOptions().hydrate?.deserializeData ?? Ir, o = e.mutations || [], c = e.queries || [];
|
|
480
|
-
o.forEach(({ state: u, ...d }) => {
|
|
481
|
-
r.build(
|
|
482
|
-
t,
|
|
483
|
-
{
|
|
484
|
-
...t.getDefaultOptions().hydrate?.mutations,
|
|
485
|
-
...s?.defaultOptions?.mutations,
|
|
486
|
-
...d
|
|
487
|
-
},
|
|
488
|
-
u
|
|
489
|
-
);
|
|
490
|
-
}), c.forEach(({ queryKey: u, state: d, queryHash: m, meta: k, promise: w }) => {
|
|
491
|
-
let g = n.get(m);
|
|
492
|
-
const T = d.data === void 0 ? d.data : a(d.data);
|
|
493
|
-
if (g) {
|
|
494
|
-
if (g.state.dataUpdatedAt < d.dataUpdatedAt) {
|
|
495
|
-
const { fetchStatus: O, ...L } = d;
|
|
496
|
-
g.setState({
|
|
497
|
-
...L,
|
|
498
|
-
data: T
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
} else
|
|
502
|
-
g = n.build(
|
|
503
|
-
t,
|
|
504
|
-
{
|
|
505
|
-
...t.getDefaultOptions().hydrate?.queries,
|
|
506
|
-
...s?.defaultOptions?.queries,
|
|
507
|
-
queryKey: u,
|
|
508
|
-
queryHash: m,
|
|
509
|
-
meta: k
|
|
510
|
-
},
|
|
511
|
-
// Reset fetch status to idle to avoid
|
|
512
|
-
// query being stuck in fetching state upon hydration
|
|
513
|
-
{
|
|
514
|
-
...d,
|
|
515
|
-
data: T,
|
|
516
|
-
fetchStatus: "idle"
|
|
517
|
-
}
|
|
518
|
-
);
|
|
519
|
-
if (w) {
|
|
520
|
-
const O = Promise.resolve(w).then(a);
|
|
521
|
-
g.fetch(void 0, { initialPromise: O });
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
var xt = (t, e) => typeof t == "object" && t !== null && e in t, Mr = ({
|
|
526
|
-
children: t,
|
|
527
|
-
options: e = {},
|
|
528
|
-
state: s,
|
|
529
|
-
queryClient: r
|
|
530
|
-
}) => {
|
|
531
|
-
const n = At(r), [a, o] = Q.useState(), c = Q.useRef(e);
|
|
532
|
-
return c.current = e, Q.useMemo(() => {
|
|
533
|
-
if (s) {
|
|
534
|
-
if (typeof s != "object")
|
|
535
|
-
return;
|
|
536
|
-
const u = n.getQueryCache(), d = s.queries || [], m = [], k = [];
|
|
537
|
-
for (const w of d) {
|
|
538
|
-
const g = u.get(w.queryHash);
|
|
539
|
-
if (!g)
|
|
540
|
-
m.push(w);
|
|
541
|
-
else {
|
|
542
|
-
const T = w.state.dataUpdatedAt > g.state.dataUpdatedAt || // RSC special serialized then-able chunks
|
|
543
|
-
xt(w.promise, "status") && xt(g.promise, "status") && w.promise.status !== g.promise.status, O = a?.find(
|
|
544
|
-
(L) => L.queryHash === w.queryHash
|
|
545
|
-
);
|
|
546
|
-
T && (!O || w.state.dataUpdatedAt > O.state.dataUpdatedAt) && k.push(w);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
m.length > 0 && yt(n, { queries: m }, c.current), k.length > 0 && o(
|
|
550
|
-
(w) => w ? [...w, ...k] : k
|
|
551
|
-
);
|
|
552
|
-
}
|
|
553
|
-
}, [n, a, s]), Q.useEffect(() => {
|
|
554
|
-
a && (yt(n, { queries: a }, c.current), o(void 0));
|
|
555
|
-
}, [n, a]), t;
|
|
556
|
-
};
|
|
557
|
-
function Dr({ error: t }) {
|
|
558
|
-
return /* @__PURE__ */ i.jsx(It, { error: t });
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* react-router v7.6.1
|
|
562
|
-
*
|
|
563
|
-
* Copyright (c) Remix Software Inc.
|
|
564
|
-
*
|
|
565
|
-
* This source code is licensed under the MIT license found in the
|
|
566
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
567
|
-
*
|
|
568
|
-
* @license MIT
|
|
569
|
-
*/
|
|
570
|
-
function $r(t) {
|
|
571
|
-
return /* @__PURE__ */ Q.createElement(ms, { flushSync: qs.flushSync, ...t });
|
|
572
|
-
}
|
|
573
|
-
const We = tt({ stagger: !1 }), zr = new Rr({
|
|
574
|
-
defaultOptions: {
|
|
575
|
-
queries: {
|
|
576
|
-
staleTime: 1e3 * 60 * 5
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}), qr = ({
|
|
580
|
-
router: t,
|
|
581
|
-
hydrate: e = !1
|
|
582
|
-
}) => /* @__PURE__ */ i.jsx(Dt, { children: /* @__PURE__ */ i.jsx(Et, { client: zr, children: /* @__PURE__ */ i.jsx(Mr, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ i.jsx(Rt, { value: !1, children: /* @__PURE__ */ i.jsx(Tt, { children: /* @__PURE__ */ i.jsx(We.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ i.jsx($r, { router: t }) }) }) }) }) }) }), Lr = ({
|
|
583
|
-
router: t,
|
|
584
|
-
context: e,
|
|
585
|
-
queryClient: s,
|
|
586
|
-
helmetContext: r,
|
|
587
|
-
bypassProtection: n = !1
|
|
588
|
-
}) => /* @__PURE__ */ i.jsx(Dt, { children: /* @__PURE__ */ i.jsx(Et, { client: s, children: /* @__PURE__ */ i.jsx(Tt, { context: r, children: /* @__PURE__ */ i.jsx(Rt, { value: n, children: /* @__PURE__ */ i.jsx(ps, { router: t, context: e }) }) }) }) });
|
|
589
|
-
var b;
|
|
590
|
-
(function(t) {
|
|
591
|
-
t.assertEqual = (n) => n;
|
|
592
|
-
function e(n) {
|
|
593
|
-
}
|
|
594
|
-
t.assertIs = e;
|
|
595
|
-
function s(n) {
|
|
596
|
-
throw new Error();
|
|
597
|
-
}
|
|
598
|
-
t.assertNever = s, t.arrayToEnum = (n) => {
|
|
599
|
-
const a = {};
|
|
600
|
-
for (const o of n)
|
|
601
|
-
a[o] = o;
|
|
602
|
-
return a;
|
|
603
|
-
}, t.getValidEnumValues = (n) => {
|
|
604
|
-
const a = t.objectKeys(n).filter((c) => typeof n[n[c]] != "number"), o = {};
|
|
605
|
-
for (const c of a)
|
|
606
|
-
o[c] = n[c];
|
|
607
|
-
return t.objectValues(o);
|
|
608
|
-
}, t.objectValues = (n) => t.objectKeys(n).map(function(a) {
|
|
609
|
-
return n[a];
|
|
610
|
-
}), t.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
|
|
611
|
-
const a = [];
|
|
612
|
-
for (const o in n)
|
|
613
|
-
Object.prototype.hasOwnProperty.call(n, o) && a.push(o);
|
|
614
|
-
return a;
|
|
615
|
-
}, t.find = (n, a) => {
|
|
616
|
-
for (const o of n)
|
|
617
|
-
if (a(o))
|
|
618
|
-
return o;
|
|
619
|
-
}, t.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.floor(n) === n;
|
|
620
|
-
function r(n, a = " | ") {
|
|
621
|
-
return n.map((o) => typeof o == "string" ? `'${o}'` : o).join(a);
|
|
622
|
-
}
|
|
623
|
-
t.joinValues = r, t.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
|
|
624
|
-
})(b || (b = {}));
|
|
625
|
-
var Ke;
|
|
626
|
-
(function(t) {
|
|
627
|
-
t.mergeShapes = (e, s) => ({
|
|
628
|
-
...e,
|
|
629
|
-
...s
|
|
630
|
-
// second overwrites first
|
|
631
|
-
});
|
|
632
|
-
})(Ke || (Ke = {}));
|
|
633
|
-
const f = b.arrayToEnum([
|
|
634
|
-
"string",
|
|
635
|
-
"nan",
|
|
636
|
-
"number",
|
|
637
|
-
"integer",
|
|
638
|
-
"float",
|
|
639
|
-
"boolean",
|
|
640
|
-
"date",
|
|
641
|
-
"bigint",
|
|
642
|
-
"symbol",
|
|
643
|
-
"function",
|
|
644
|
-
"undefined",
|
|
645
|
-
"null",
|
|
646
|
-
"array",
|
|
647
|
-
"object",
|
|
648
|
-
"unknown",
|
|
649
|
-
"promise",
|
|
650
|
-
"void",
|
|
651
|
-
"never",
|
|
652
|
-
"map",
|
|
653
|
-
"set"
|
|
654
|
-
]), V = (t) => {
|
|
655
|
-
switch (typeof t) {
|
|
656
|
-
case "undefined":
|
|
657
|
-
return f.undefined;
|
|
658
|
-
case "string":
|
|
659
|
-
return f.string;
|
|
660
|
-
case "number":
|
|
661
|
-
return isNaN(t) ? f.nan : f.number;
|
|
662
|
-
case "boolean":
|
|
663
|
-
return f.boolean;
|
|
664
|
-
case "function":
|
|
665
|
-
return f.function;
|
|
666
|
-
case "bigint":
|
|
667
|
-
return f.bigint;
|
|
668
|
-
case "symbol":
|
|
669
|
-
return f.symbol;
|
|
670
|
-
case "object":
|
|
671
|
-
return Array.isArray(t) ? f.array : t === null ? f.null : t.then && typeof t.then == "function" && t.catch && typeof t.catch == "function" ? f.promise : typeof Map < "u" && t instanceof Map ? f.map : typeof Set < "u" && t instanceof Set ? f.set : typeof Date < "u" && t instanceof Date ? f.date : f.object;
|
|
672
|
-
default:
|
|
673
|
-
return f.unknown;
|
|
674
|
-
}
|
|
675
|
-
}, l = b.arrayToEnum([
|
|
676
|
-
"invalid_type",
|
|
677
|
-
"invalid_literal",
|
|
678
|
-
"custom",
|
|
679
|
-
"invalid_union",
|
|
680
|
-
"invalid_union_discriminator",
|
|
681
|
-
"invalid_enum_value",
|
|
682
|
-
"unrecognized_keys",
|
|
683
|
-
"invalid_arguments",
|
|
684
|
-
"invalid_return_type",
|
|
685
|
-
"invalid_date",
|
|
686
|
-
"invalid_string",
|
|
687
|
-
"too_small",
|
|
688
|
-
"too_big",
|
|
689
|
-
"invalid_intersection_types",
|
|
690
|
-
"not_multiple_of",
|
|
691
|
-
"not_finite"
|
|
692
|
-
]), Br = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
693
|
-
class P extends Error {
|
|
694
|
-
get errors() {
|
|
695
|
-
return this.issues;
|
|
696
|
-
}
|
|
697
|
-
constructor(e) {
|
|
698
|
-
super(), this.issues = [], this.addIssue = (r) => {
|
|
699
|
-
this.issues = [...this.issues, r];
|
|
700
|
-
}, this.addIssues = (r = []) => {
|
|
701
|
-
this.issues = [...this.issues, ...r];
|
|
702
|
-
};
|
|
703
|
-
const s = new.target.prototype;
|
|
704
|
-
Object.setPrototypeOf ? Object.setPrototypeOf(this, s) : this.__proto__ = s, this.name = "ZodError", this.issues = e;
|
|
705
|
-
}
|
|
706
|
-
format(e) {
|
|
707
|
-
const s = e || function(a) {
|
|
708
|
-
return a.message;
|
|
709
|
-
}, r = { _errors: [] }, n = (a) => {
|
|
710
|
-
for (const o of a.issues)
|
|
711
|
-
if (o.code === "invalid_union")
|
|
712
|
-
o.unionErrors.map(n);
|
|
713
|
-
else if (o.code === "invalid_return_type")
|
|
714
|
-
n(o.returnTypeError);
|
|
715
|
-
else if (o.code === "invalid_arguments")
|
|
716
|
-
n(o.argumentsError);
|
|
717
|
-
else if (o.path.length === 0)
|
|
718
|
-
r._errors.push(s(o));
|
|
719
|
-
else {
|
|
720
|
-
let c = r, u = 0;
|
|
721
|
-
for (; u < o.path.length; ) {
|
|
722
|
-
const d = o.path[u];
|
|
723
|
-
u === o.path.length - 1 ? (c[d] = c[d] || { _errors: [] }, c[d]._errors.push(s(o))) : c[d] = c[d] || { _errors: [] }, c = c[d], u++;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
};
|
|
727
|
-
return n(this), r;
|
|
728
|
-
}
|
|
729
|
-
static assert(e) {
|
|
730
|
-
if (!(e instanceof P))
|
|
731
|
-
throw new Error(`Not a ZodError: ${e}`);
|
|
732
|
-
}
|
|
733
|
-
toString() {
|
|
734
|
-
return this.message;
|
|
735
|
-
}
|
|
736
|
-
get message() {
|
|
737
|
-
return JSON.stringify(this.issues, b.jsonStringifyReplacer, 2);
|
|
738
|
-
}
|
|
739
|
-
get isEmpty() {
|
|
740
|
-
return this.issues.length === 0;
|
|
741
|
-
}
|
|
742
|
-
flatten(e = (s) => s.message) {
|
|
743
|
-
const s = {}, r = [];
|
|
744
|
-
for (const n of this.issues)
|
|
745
|
-
n.path.length > 0 ? (s[n.path[0]] = s[n.path[0]] || [], s[n.path[0]].push(e(n))) : r.push(e(n));
|
|
746
|
-
return { formErrors: r, fieldErrors: s };
|
|
747
|
-
}
|
|
748
|
-
get formErrors() {
|
|
749
|
-
return this.flatten();
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
P.create = (t) => new P(t);
|
|
753
|
-
const ie = (t, e) => {
|
|
754
|
-
let s;
|
|
755
|
-
switch (t.code) {
|
|
756
|
-
case l.invalid_type:
|
|
757
|
-
t.received === f.undefined ? s = "Required" : s = `Expected ${t.expected}, received ${t.received}`;
|
|
758
|
-
break;
|
|
759
|
-
case l.invalid_literal:
|
|
760
|
-
s = `Invalid literal value, expected ${JSON.stringify(t.expected, b.jsonStringifyReplacer)}`;
|
|
761
|
-
break;
|
|
762
|
-
case l.unrecognized_keys:
|
|
763
|
-
s = `Unrecognized key(s) in object: ${b.joinValues(t.keys, ", ")}`;
|
|
764
|
-
break;
|
|
765
|
-
case l.invalid_union:
|
|
766
|
-
s = "Invalid input";
|
|
767
|
-
break;
|
|
768
|
-
case l.invalid_union_discriminator:
|
|
769
|
-
s = `Invalid discriminator value. Expected ${b.joinValues(t.options)}`;
|
|
770
|
-
break;
|
|
771
|
-
case l.invalid_enum_value:
|
|
772
|
-
s = `Invalid enum value. Expected ${b.joinValues(t.options)}, received '${t.received}'`;
|
|
773
|
-
break;
|
|
774
|
-
case l.invalid_arguments:
|
|
775
|
-
s = "Invalid function arguments";
|
|
776
|
-
break;
|
|
777
|
-
case l.invalid_return_type:
|
|
778
|
-
s = "Invalid function return type";
|
|
779
|
-
break;
|
|
780
|
-
case l.invalid_date:
|
|
781
|
-
s = "Invalid date";
|
|
782
|
-
break;
|
|
783
|
-
case l.invalid_string:
|
|
784
|
-
typeof t.validation == "object" ? "includes" in t.validation ? (s = `Invalid input: must include "${t.validation.includes}"`, typeof t.validation.position == "number" && (s = `${s} at one or more positions greater than or equal to ${t.validation.position}`)) : "startsWith" in t.validation ? s = `Invalid input: must start with "${t.validation.startsWith}"` : "endsWith" in t.validation ? s = `Invalid input: must end with "${t.validation.endsWith}"` : b.assertNever(t.validation) : t.validation !== "regex" ? s = `Invalid ${t.validation}` : s = "Invalid";
|
|
785
|
-
break;
|
|
786
|
-
case l.too_small:
|
|
787
|
-
t.type === "array" ? s = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)` : t.type === "string" ? s = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)` : t.type === "number" ? s = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}` : t.type === "date" ? s = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}` : s = "Invalid input";
|
|
788
|
-
break;
|
|
789
|
-
case l.too_big:
|
|
790
|
-
t.type === "array" ? s = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)` : t.type === "string" ? s = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)` : t.type === "number" ? s = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}` : t.type === "bigint" ? s = `BigInt must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}` : t.type === "date" ? s = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t.maximum))}` : s = "Invalid input";
|
|
791
|
-
break;
|
|
792
|
-
case l.custom:
|
|
793
|
-
s = "Invalid input";
|
|
794
|
-
break;
|
|
795
|
-
case l.invalid_intersection_types:
|
|
796
|
-
s = "Intersection results could not be merged";
|
|
797
|
-
break;
|
|
798
|
-
case l.not_multiple_of:
|
|
799
|
-
s = `Number must be a multiple of ${t.multipleOf}`;
|
|
800
|
-
break;
|
|
801
|
-
case l.not_finite:
|
|
802
|
-
s = "Number must be finite";
|
|
803
|
-
break;
|
|
804
|
-
default:
|
|
805
|
-
s = e.defaultError, b.assertNever(t);
|
|
806
|
-
}
|
|
807
|
-
return { message: s };
|
|
808
|
-
};
|
|
809
|
-
let Ft = ie;
|
|
810
|
-
function Fr(t) {
|
|
811
|
-
Ft = t;
|
|
812
|
-
}
|
|
813
|
-
function Pe() {
|
|
814
|
-
return Ft;
|
|
815
|
-
}
|
|
816
|
-
const Ze = (t) => {
|
|
817
|
-
const { data: e, path: s, errorMaps: r, issueData: n } = t, a = [...s, ...n.path || []], o = {
|
|
818
|
-
...n,
|
|
819
|
-
path: a
|
|
820
|
-
};
|
|
821
|
-
if (n.message !== void 0)
|
|
822
|
-
return {
|
|
823
|
-
...n,
|
|
824
|
-
path: a,
|
|
825
|
-
message: n.message
|
|
826
|
-
};
|
|
827
|
-
let c = "";
|
|
828
|
-
const u = r.filter((d) => !!d).slice().reverse();
|
|
829
|
-
for (const d of u)
|
|
830
|
-
c = d(o, { data: e, defaultError: c }).message;
|
|
831
|
-
return {
|
|
832
|
-
...n,
|
|
833
|
-
path: a,
|
|
834
|
-
message: c
|
|
835
|
-
};
|
|
836
|
-
}, Vr = [];
|
|
837
|
-
function h(t, e) {
|
|
838
|
-
const s = Pe(), r = Ze({
|
|
839
|
-
issueData: e,
|
|
840
|
-
data: t.data,
|
|
841
|
-
path: t.path,
|
|
842
|
-
errorMaps: [
|
|
843
|
-
t.common.contextualErrorMap,
|
|
844
|
-
// contextual error map is first priority
|
|
845
|
-
t.schemaErrorMap,
|
|
846
|
-
// then schema-bound map if available
|
|
847
|
-
s,
|
|
848
|
-
// then global override map
|
|
849
|
-
s === ie ? void 0 : ie
|
|
850
|
-
// then global default map
|
|
851
|
-
].filter((n) => !!n)
|
|
852
|
-
});
|
|
853
|
-
t.common.issues.push(r);
|
|
854
|
-
}
|
|
855
|
-
class C {
|
|
856
|
-
constructor() {
|
|
857
|
-
this.value = "valid";
|
|
858
|
-
}
|
|
859
|
-
dirty() {
|
|
860
|
-
this.value === "valid" && (this.value = "dirty");
|
|
861
|
-
}
|
|
862
|
-
abort() {
|
|
863
|
-
this.value !== "aborted" && (this.value = "aborted");
|
|
864
|
-
}
|
|
865
|
-
static mergeArray(e, s) {
|
|
866
|
-
const r = [];
|
|
867
|
-
for (const n of s) {
|
|
868
|
-
if (n.status === "aborted")
|
|
869
|
-
return y;
|
|
870
|
-
n.status === "dirty" && e.dirty(), r.push(n.value);
|
|
871
|
-
}
|
|
872
|
-
return { status: e.value, value: r };
|
|
873
|
-
}
|
|
874
|
-
static async mergeObjectAsync(e, s) {
|
|
875
|
-
const r = [];
|
|
876
|
-
for (const n of s) {
|
|
877
|
-
const a = await n.key, o = await n.value;
|
|
878
|
-
r.push({
|
|
879
|
-
key: a,
|
|
880
|
-
value: o
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
return C.mergeObjectSync(e, r);
|
|
884
|
-
}
|
|
885
|
-
static mergeObjectSync(e, s) {
|
|
886
|
-
const r = {};
|
|
887
|
-
for (const n of s) {
|
|
888
|
-
const { key: a, value: o } = n;
|
|
889
|
-
if (a.status === "aborted" || o.status === "aborted")
|
|
890
|
-
return y;
|
|
891
|
-
a.status === "dirty" && e.dirty(), o.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof o.value < "u" || n.alwaysSet) && (r[a.value] = o.value);
|
|
892
|
-
}
|
|
893
|
-
return { status: e.value, value: r };
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
const y = Object.freeze({
|
|
897
|
-
status: "aborted"
|
|
898
|
-
}), re = (t) => ({ status: "dirty", value: t }), S = (t) => ({ status: "valid", value: t }), Ye = (t) => t.status === "aborted", Je = (t) => t.status === "dirty", G = (t) => t.status === "valid", fe = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
899
|
-
function Re(t, e, s, r) {
|
|
900
|
-
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
901
|
-
return e.get(t);
|
|
902
|
-
}
|
|
903
|
-
function Vt(t, e, s, r, n) {
|
|
904
|
-
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
905
|
-
return e.set(t, s), s;
|
|
906
|
-
}
|
|
907
|
-
var p;
|
|
908
|
-
(function(t) {
|
|
909
|
-
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
910
|
-
})(p || (p = {}));
|
|
911
|
-
var le, ue;
|
|
912
|
-
class $ {
|
|
913
|
-
constructor(e, s, r, n) {
|
|
914
|
-
this._cachedPath = [], this.parent = e, this.data = s, this._path = r, this._key = n;
|
|
915
|
-
}
|
|
916
|
-
get path() {
|
|
917
|
-
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
const _t = (t, e) => {
|
|
921
|
-
if (G(e))
|
|
922
|
-
return { success: !0, data: e.value };
|
|
923
|
-
if (!t.common.issues.length)
|
|
924
|
-
throw new Error("Validation failed but no issues detected.");
|
|
925
|
-
return {
|
|
926
|
-
success: !1,
|
|
927
|
-
get error() {
|
|
928
|
-
if (this._error)
|
|
929
|
-
return this._error;
|
|
930
|
-
const s = new P(t.common.issues);
|
|
931
|
-
return this._error = s, this._error;
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
};
|
|
935
|
-
function x(t) {
|
|
936
|
-
if (!t)
|
|
937
|
-
return {};
|
|
938
|
-
const { errorMap: e, invalid_type_error: s, required_error: r, description: n } = t;
|
|
939
|
-
if (e && (s || r))
|
|
940
|
-
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
941
|
-
return e ? { errorMap: e, description: n } : { errorMap: (o, c) => {
|
|
942
|
-
var u, d;
|
|
943
|
-
const { message: m } = t;
|
|
944
|
-
return o.code === "invalid_enum_value" ? { message: m ?? c.defaultError } : typeof c.data > "u" ? { message: (u = m ?? r) !== null && u !== void 0 ? u : c.defaultError } : o.code !== "invalid_type" ? { message: c.defaultError } : { message: (d = m ?? s) !== null && d !== void 0 ? d : c.defaultError };
|
|
945
|
-
}, description: n };
|
|
946
|
-
}
|
|
947
|
-
class _ {
|
|
948
|
-
get description() {
|
|
949
|
-
return this._def.description;
|
|
950
|
-
}
|
|
951
|
-
_getType(e) {
|
|
952
|
-
return V(e.data);
|
|
953
|
-
}
|
|
954
|
-
_getOrReturnCtx(e, s) {
|
|
955
|
-
return s || {
|
|
956
|
-
common: e.parent.common,
|
|
957
|
-
data: e.data,
|
|
958
|
-
parsedType: V(e.data),
|
|
959
|
-
schemaErrorMap: this._def.errorMap,
|
|
960
|
-
path: e.path,
|
|
961
|
-
parent: e.parent
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
_processInputParams(e) {
|
|
965
|
-
return {
|
|
966
|
-
status: new C(),
|
|
967
|
-
ctx: {
|
|
968
|
-
common: e.parent.common,
|
|
969
|
-
data: e.data,
|
|
970
|
-
parsedType: V(e.data),
|
|
971
|
-
schemaErrorMap: this._def.errorMap,
|
|
972
|
-
path: e.path,
|
|
973
|
-
parent: e.parent
|
|
974
|
-
}
|
|
975
|
-
};
|
|
976
|
-
}
|
|
977
|
-
_parseSync(e) {
|
|
978
|
-
const s = this._parse(e);
|
|
979
|
-
if (fe(s))
|
|
980
|
-
throw new Error("Synchronous parse encountered promise.");
|
|
981
|
-
return s;
|
|
982
|
-
}
|
|
983
|
-
_parseAsync(e) {
|
|
984
|
-
const s = this._parse(e);
|
|
985
|
-
return Promise.resolve(s);
|
|
986
|
-
}
|
|
987
|
-
parse(e, s) {
|
|
988
|
-
const r = this.safeParse(e, s);
|
|
989
|
-
if (r.success)
|
|
990
|
-
return r.data;
|
|
991
|
-
throw r.error;
|
|
992
|
-
}
|
|
993
|
-
safeParse(e, s) {
|
|
994
|
-
var r;
|
|
995
|
-
const n = {
|
|
996
|
-
common: {
|
|
997
|
-
issues: [],
|
|
998
|
-
async: (r = s?.async) !== null && r !== void 0 ? r : !1,
|
|
999
|
-
contextualErrorMap: s?.errorMap
|
|
1000
|
-
},
|
|
1001
|
-
path: s?.path || [],
|
|
1002
|
-
schemaErrorMap: this._def.errorMap,
|
|
1003
|
-
parent: null,
|
|
1004
|
-
data: e,
|
|
1005
|
-
parsedType: V(e)
|
|
1006
|
-
}, a = this._parseSync({ data: e, path: n.path, parent: n });
|
|
1007
|
-
return _t(n, a);
|
|
1008
|
-
}
|
|
1009
|
-
"~validate"(e) {
|
|
1010
|
-
var s, r;
|
|
1011
|
-
const n = {
|
|
1012
|
-
common: {
|
|
1013
|
-
issues: [],
|
|
1014
|
-
async: !!this["~standard"].async
|
|
1015
|
-
},
|
|
1016
|
-
path: [],
|
|
1017
|
-
schemaErrorMap: this._def.errorMap,
|
|
1018
|
-
parent: null,
|
|
1019
|
-
data: e,
|
|
1020
|
-
parsedType: V(e)
|
|
1021
|
-
};
|
|
1022
|
-
if (!this["~standard"].async)
|
|
1023
|
-
try {
|
|
1024
|
-
const a = this._parseSync({ data: e, path: [], parent: n });
|
|
1025
|
-
return G(a) ? {
|
|
1026
|
-
value: a.value
|
|
1027
|
-
} : {
|
|
1028
|
-
issues: n.common.issues
|
|
1029
|
-
};
|
|
1030
|
-
} catch (a) {
|
|
1031
|
-
!((r = (s = a?.message) === null || s === void 0 ? void 0 : s.toLowerCase()) === null || r === void 0) && r.includes("encountered") && (this["~standard"].async = !0), n.common = {
|
|
1032
|
-
issues: [],
|
|
1033
|
-
async: !0
|
|
1034
|
-
};
|
|
1035
|
-
}
|
|
1036
|
-
return this._parseAsync({ data: e, path: [], parent: n }).then((a) => G(a) ? {
|
|
1037
|
-
value: a.value
|
|
1038
|
-
} : {
|
|
1039
|
-
issues: n.common.issues
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
async parseAsync(e, s) {
|
|
1043
|
-
const r = await this.safeParseAsync(e, s);
|
|
1044
|
-
if (r.success)
|
|
1045
|
-
return r.data;
|
|
1046
|
-
throw r.error;
|
|
1047
|
-
}
|
|
1048
|
-
async safeParseAsync(e, s) {
|
|
1049
|
-
const r = {
|
|
1050
|
-
common: {
|
|
1051
|
-
issues: [],
|
|
1052
|
-
contextualErrorMap: s?.errorMap,
|
|
1053
|
-
async: !0
|
|
1054
|
-
},
|
|
1055
|
-
path: s?.path || [],
|
|
1056
|
-
schemaErrorMap: this._def.errorMap,
|
|
1057
|
-
parent: null,
|
|
1058
|
-
data: e,
|
|
1059
|
-
parsedType: V(e)
|
|
1060
|
-
}, n = this._parse({ data: e, path: r.path, parent: r }), a = await (fe(n) ? n : Promise.resolve(n));
|
|
1061
|
-
return _t(r, a);
|
|
1062
|
-
}
|
|
1063
|
-
refine(e, s) {
|
|
1064
|
-
const r = (n) => typeof s == "string" || typeof s > "u" ? { message: s } : typeof s == "function" ? s(n) : s;
|
|
1065
|
-
return this._refinement((n, a) => {
|
|
1066
|
-
const o = e(n), c = () => a.addIssue({
|
|
1067
|
-
code: l.custom,
|
|
1068
|
-
...r(n)
|
|
1069
|
-
});
|
|
1070
|
-
return typeof Promise < "u" && o instanceof Promise ? o.then((u) => u ? !0 : (c(), !1)) : o ? !0 : (c(), !1);
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
refinement(e, s) {
|
|
1074
|
-
return this._refinement((r, n) => e(r) ? !0 : (n.addIssue(typeof s == "function" ? s(r, n) : s), !1));
|
|
1075
|
-
}
|
|
1076
|
-
_refinement(e) {
|
|
1077
|
-
return new I({
|
|
1078
|
-
schema: this,
|
|
1079
|
-
typeName: v.ZodEffects,
|
|
1080
|
-
effect: { type: "refinement", refinement: e }
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
superRefine(e) {
|
|
1084
|
-
return this._refinement(e);
|
|
1085
|
-
}
|
|
1086
|
-
constructor(e) {
|
|
1087
|
-
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = {
|
|
1088
|
-
version: 1,
|
|
1089
|
-
vendor: "zod",
|
|
1090
|
-
validate: (s) => this["~validate"](s)
|
|
1091
|
-
};
|
|
1092
|
-
}
|
|
1093
|
-
optional() {
|
|
1094
|
-
return D.create(this, this._def);
|
|
1095
|
-
}
|
|
1096
|
-
nullable() {
|
|
1097
|
-
return Y.create(this, this._def);
|
|
1098
|
-
}
|
|
1099
|
-
nullish() {
|
|
1100
|
-
return this.nullable().optional();
|
|
1101
|
-
}
|
|
1102
|
-
array() {
|
|
1103
|
-
return R.create(this);
|
|
1104
|
-
}
|
|
1105
|
-
promise() {
|
|
1106
|
-
return ce.create(this, this._def);
|
|
1107
|
-
}
|
|
1108
|
-
or(e) {
|
|
1109
|
-
return ve.create([this, e], this._def);
|
|
1110
|
-
}
|
|
1111
|
-
and(e) {
|
|
1112
|
-
return ye.create(this, e, this._def);
|
|
1113
|
-
}
|
|
1114
|
-
transform(e) {
|
|
1115
|
-
return new I({
|
|
1116
|
-
...x(this._def),
|
|
1117
|
-
schema: this,
|
|
1118
|
-
typeName: v.ZodEffects,
|
|
1119
|
-
effect: { type: "transform", transform: e }
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
default(e) {
|
|
1123
|
-
const s = typeof e == "function" ? e : () => e;
|
|
1124
|
-
return new ke({
|
|
1125
|
-
...x(this._def),
|
|
1126
|
-
innerType: this,
|
|
1127
|
-
defaultValue: s,
|
|
1128
|
-
typeName: v.ZodDefault
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
brand() {
|
|
1132
|
-
return new nt({
|
|
1133
|
-
typeName: v.ZodBranded,
|
|
1134
|
-
type: this,
|
|
1135
|
-
...x(this._def)
|
|
1136
|
-
});
|
|
1137
|
-
}
|
|
1138
|
-
catch(e) {
|
|
1139
|
-
const s = typeof e == "function" ? e : () => e;
|
|
1140
|
-
return new je({
|
|
1141
|
-
...x(this._def),
|
|
1142
|
-
innerType: this,
|
|
1143
|
-
catchValue: s,
|
|
1144
|
-
typeName: v.ZodCatch
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1147
|
-
describe(e) {
|
|
1148
|
-
const s = this.constructor;
|
|
1149
|
-
return new s({
|
|
1150
|
-
...this._def,
|
|
1151
|
-
description: e
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
pipe(e) {
|
|
1155
|
-
return Ne.create(this, e);
|
|
1156
|
-
}
|
|
1157
|
-
readonly() {
|
|
1158
|
-
return Te.create(this);
|
|
1159
|
-
}
|
|
1160
|
-
isOptional() {
|
|
1161
|
-
return this.safeParse(void 0).success;
|
|
1162
|
-
}
|
|
1163
|
-
isNullable() {
|
|
1164
|
-
return this.safeParse(null).success;
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
const Qr = /^c[^\s-]{8,}$/i, Ur = /^[0-9a-z]+$/, Hr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Wr = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Kr = /^[a-z0-9_-]{21}$/i, Yr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Jr = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Gr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Xr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1168
|
-
let Qe;
|
|
1169
|
-
const en = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, tn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, sn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, rn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, nn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, an = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Qt = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", on = new RegExp(`^${Qt}$`);
|
|
1170
|
-
function Ut(t) {
|
|
1171
|
-
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
1172
|
-
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
1173
|
-
}
|
|
1174
|
-
function cn(t) {
|
|
1175
|
-
return new RegExp(`^${Ut(t)}$`);
|
|
1176
|
-
}
|
|
1177
|
-
function Ht(t) {
|
|
1178
|
-
let e = `${Qt}T${Ut(t)}`;
|
|
1179
|
-
const s = [];
|
|
1180
|
-
return s.push(t.local ? "Z?" : "Z"), t.offset && s.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${s.join("|")})`, new RegExp(`^${e}$`);
|
|
1181
|
-
}
|
|
1182
|
-
function dn(t, e) {
|
|
1183
|
-
return !!((e === "v4" || !e) && en.test(t) || (e === "v6" || !e) && sn.test(t));
|
|
1184
|
-
}
|
|
1185
|
-
function ln(t, e) {
|
|
1186
|
-
if (!Yr.test(t))
|
|
1187
|
-
return !1;
|
|
1188
|
-
try {
|
|
1189
|
-
const [s] = t.split("."), r = s.replace(/-/g, "+").replace(/_/g, "/").padEnd(s.length + (4 - s.length % 4) % 4, "="), n = JSON.parse(atob(r));
|
|
1190
|
-
return !(typeof n != "object" || n === null || !n.typ || !n.alg || e && n.alg !== e);
|
|
1191
|
-
} catch {
|
|
1192
|
-
return !1;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
function un(t, e) {
|
|
1196
|
-
return !!((e === "v4" || !e) && tn.test(t) || (e === "v6" || !e) && rn.test(t));
|
|
1197
|
-
}
|
|
1198
|
-
class Z extends _ {
|
|
1199
|
-
_parse(e) {
|
|
1200
|
-
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
1201
|
-
const a = this._getOrReturnCtx(e);
|
|
1202
|
-
return h(a, {
|
|
1203
|
-
code: l.invalid_type,
|
|
1204
|
-
expected: f.string,
|
|
1205
|
-
received: a.parsedType
|
|
1206
|
-
}), y;
|
|
1207
|
-
}
|
|
1208
|
-
const r = new C();
|
|
1209
|
-
let n;
|
|
1210
|
-
for (const a of this._def.checks)
|
|
1211
|
-
if (a.kind === "min")
|
|
1212
|
-
e.data.length < a.value && (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1213
|
-
code: l.too_small,
|
|
1214
|
-
minimum: a.value,
|
|
1215
|
-
type: "string",
|
|
1216
|
-
inclusive: !0,
|
|
1217
|
-
exact: !1,
|
|
1218
|
-
message: a.message
|
|
1219
|
-
}), r.dirty());
|
|
1220
|
-
else if (a.kind === "max")
|
|
1221
|
-
e.data.length > a.value && (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1222
|
-
code: l.too_big,
|
|
1223
|
-
maximum: a.value,
|
|
1224
|
-
type: "string",
|
|
1225
|
-
inclusive: !0,
|
|
1226
|
-
exact: !1,
|
|
1227
|
-
message: a.message
|
|
1228
|
-
}), r.dirty());
|
|
1229
|
-
else if (a.kind === "length") {
|
|
1230
|
-
const o = e.data.length > a.value, c = e.data.length < a.value;
|
|
1231
|
-
(o || c) && (n = this._getOrReturnCtx(e, n), o ? h(n, {
|
|
1232
|
-
code: l.too_big,
|
|
1233
|
-
maximum: a.value,
|
|
1234
|
-
type: "string",
|
|
1235
|
-
inclusive: !0,
|
|
1236
|
-
exact: !0,
|
|
1237
|
-
message: a.message
|
|
1238
|
-
}) : c && h(n, {
|
|
1239
|
-
code: l.too_small,
|
|
1240
|
-
minimum: a.value,
|
|
1241
|
-
type: "string",
|
|
1242
|
-
inclusive: !0,
|
|
1243
|
-
exact: !0,
|
|
1244
|
-
message: a.message
|
|
1245
|
-
}), r.dirty());
|
|
1246
|
-
} else if (a.kind === "email")
|
|
1247
|
-
Gr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1248
|
-
validation: "email",
|
|
1249
|
-
code: l.invalid_string,
|
|
1250
|
-
message: a.message
|
|
1251
|
-
}), r.dirty());
|
|
1252
|
-
else if (a.kind === "emoji")
|
|
1253
|
-
Qe || (Qe = new RegExp(Xr, "u")), Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1254
|
-
validation: "emoji",
|
|
1255
|
-
code: l.invalid_string,
|
|
1256
|
-
message: a.message
|
|
1257
|
-
}), r.dirty());
|
|
1258
|
-
else if (a.kind === "uuid")
|
|
1259
|
-
Wr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1260
|
-
validation: "uuid",
|
|
1261
|
-
code: l.invalid_string,
|
|
1262
|
-
message: a.message
|
|
1263
|
-
}), r.dirty());
|
|
1264
|
-
else if (a.kind === "nanoid")
|
|
1265
|
-
Kr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1266
|
-
validation: "nanoid",
|
|
1267
|
-
code: l.invalid_string,
|
|
1268
|
-
message: a.message
|
|
1269
|
-
}), r.dirty());
|
|
1270
|
-
else if (a.kind === "cuid")
|
|
1271
|
-
Qr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1272
|
-
validation: "cuid",
|
|
1273
|
-
code: l.invalid_string,
|
|
1274
|
-
message: a.message
|
|
1275
|
-
}), r.dirty());
|
|
1276
|
-
else if (a.kind === "cuid2")
|
|
1277
|
-
Ur.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1278
|
-
validation: "cuid2",
|
|
1279
|
-
code: l.invalid_string,
|
|
1280
|
-
message: a.message
|
|
1281
|
-
}), r.dirty());
|
|
1282
|
-
else if (a.kind === "ulid")
|
|
1283
|
-
Hr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1284
|
-
validation: "ulid",
|
|
1285
|
-
code: l.invalid_string,
|
|
1286
|
-
message: a.message
|
|
1287
|
-
}), r.dirty());
|
|
1288
|
-
else if (a.kind === "url")
|
|
1289
|
-
try {
|
|
1290
|
-
new URL(e.data);
|
|
1291
|
-
} catch {
|
|
1292
|
-
n = this._getOrReturnCtx(e, n), h(n, {
|
|
1293
|
-
validation: "url",
|
|
1294
|
-
code: l.invalid_string,
|
|
1295
|
-
message: a.message
|
|
1296
|
-
}), r.dirty();
|
|
1297
|
-
}
|
|
1298
|
-
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1299
|
-
validation: "regex",
|
|
1300
|
-
code: l.invalid_string,
|
|
1301
|
-
message: a.message
|
|
1302
|
-
}), r.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1303
|
-
code: l.invalid_string,
|
|
1304
|
-
validation: { includes: a.value, position: a.position },
|
|
1305
|
-
message: a.message
|
|
1306
|
-
}), r.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1307
|
-
code: l.invalid_string,
|
|
1308
|
-
validation: { startsWith: a.value },
|
|
1309
|
-
message: a.message
|
|
1310
|
-
}), r.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1311
|
-
code: l.invalid_string,
|
|
1312
|
-
validation: { endsWith: a.value },
|
|
1313
|
-
message: a.message
|
|
1314
|
-
}), r.dirty()) : a.kind === "datetime" ? Ht(a).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1315
|
-
code: l.invalid_string,
|
|
1316
|
-
validation: "datetime",
|
|
1317
|
-
message: a.message
|
|
1318
|
-
}), r.dirty()) : a.kind === "date" ? on.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1319
|
-
code: l.invalid_string,
|
|
1320
|
-
validation: "date",
|
|
1321
|
-
message: a.message
|
|
1322
|
-
}), r.dirty()) : a.kind === "time" ? cn(a).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1323
|
-
code: l.invalid_string,
|
|
1324
|
-
validation: "time",
|
|
1325
|
-
message: a.message
|
|
1326
|
-
}), r.dirty()) : a.kind === "duration" ? Jr.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1327
|
-
validation: "duration",
|
|
1328
|
-
code: l.invalid_string,
|
|
1329
|
-
message: a.message
|
|
1330
|
-
}), r.dirty()) : a.kind === "ip" ? dn(e.data, a.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1331
|
-
validation: "ip",
|
|
1332
|
-
code: l.invalid_string,
|
|
1333
|
-
message: a.message
|
|
1334
|
-
}), r.dirty()) : a.kind === "jwt" ? ln(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1335
|
-
validation: "jwt",
|
|
1336
|
-
code: l.invalid_string,
|
|
1337
|
-
message: a.message
|
|
1338
|
-
}), r.dirty()) : a.kind === "cidr" ? un(e.data, a.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1339
|
-
validation: "cidr",
|
|
1340
|
-
code: l.invalid_string,
|
|
1341
|
-
message: a.message
|
|
1342
|
-
}), r.dirty()) : a.kind === "base64" ? nn.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1343
|
-
validation: "base64",
|
|
1344
|
-
code: l.invalid_string,
|
|
1345
|
-
message: a.message
|
|
1346
|
-
}), r.dirty()) : a.kind === "base64url" ? an.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1347
|
-
validation: "base64url",
|
|
1348
|
-
code: l.invalid_string,
|
|
1349
|
-
message: a.message
|
|
1350
|
-
}), r.dirty()) : b.assertNever(a);
|
|
1351
|
-
return { status: r.value, value: e.data };
|
|
1352
|
-
}
|
|
1353
|
-
_regex(e, s, r) {
|
|
1354
|
-
return this.refinement((n) => e.test(n), {
|
|
1355
|
-
validation: s,
|
|
1356
|
-
code: l.invalid_string,
|
|
1357
|
-
...p.errToObj(r)
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
_addCheck(e) {
|
|
1361
|
-
return new Z({
|
|
1362
|
-
...this._def,
|
|
1363
|
-
checks: [...this._def.checks, e]
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
email(e) {
|
|
1367
|
-
return this._addCheck({ kind: "email", ...p.errToObj(e) });
|
|
1368
|
-
}
|
|
1369
|
-
url(e) {
|
|
1370
|
-
return this._addCheck({ kind: "url", ...p.errToObj(e) });
|
|
1371
|
-
}
|
|
1372
|
-
emoji(e) {
|
|
1373
|
-
return this._addCheck({ kind: "emoji", ...p.errToObj(e) });
|
|
1374
|
-
}
|
|
1375
|
-
uuid(e) {
|
|
1376
|
-
return this._addCheck({ kind: "uuid", ...p.errToObj(e) });
|
|
1377
|
-
}
|
|
1378
|
-
nanoid(e) {
|
|
1379
|
-
return this._addCheck({ kind: "nanoid", ...p.errToObj(e) });
|
|
1380
|
-
}
|
|
1381
|
-
cuid(e) {
|
|
1382
|
-
return this._addCheck({ kind: "cuid", ...p.errToObj(e) });
|
|
1383
|
-
}
|
|
1384
|
-
cuid2(e) {
|
|
1385
|
-
return this._addCheck({ kind: "cuid2", ...p.errToObj(e) });
|
|
1386
|
-
}
|
|
1387
|
-
ulid(e) {
|
|
1388
|
-
return this._addCheck({ kind: "ulid", ...p.errToObj(e) });
|
|
1389
|
-
}
|
|
1390
|
-
base64(e) {
|
|
1391
|
-
return this._addCheck({ kind: "base64", ...p.errToObj(e) });
|
|
1392
|
-
}
|
|
1393
|
-
base64url(e) {
|
|
1394
|
-
return this._addCheck({
|
|
1395
|
-
kind: "base64url",
|
|
1396
|
-
...p.errToObj(e)
|
|
1397
|
-
});
|
|
1398
|
-
}
|
|
1399
|
-
jwt(e) {
|
|
1400
|
-
return this._addCheck({ kind: "jwt", ...p.errToObj(e) });
|
|
1401
|
-
}
|
|
1402
|
-
ip(e) {
|
|
1403
|
-
return this._addCheck({ kind: "ip", ...p.errToObj(e) });
|
|
1404
|
-
}
|
|
1405
|
-
cidr(e) {
|
|
1406
|
-
return this._addCheck({ kind: "cidr", ...p.errToObj(e) });
|
|
1407
|
-
}
|
|
1408
|
-
datetime(e) {
|
|
1409
|
-
var s, r;
|
|
1410
|
-
return typeof e == "string" ? this._addCheck({
|
|
1411
|
-
kind: "datetime",
|
|
1412
|
-
precision: null,
|
|
1413
|
-
offset: !1,
|
|
1414
|
-
local: !1,
|
|
1415
|
-
message: e
|
|
1416
|
-
}) : this._addCheck({
|
|
1417
|
-
kind: "datetime",
|
|
1418
|
-
precision: typeof e?.precision > "u" ? null : e?.precision,
|
|
1419
|
-
offset: (s = e?.offset) !== null && s !== void 0 ? s : !1,
|
|
1420
|
-
local: (r = e?.local) !== null && r !== void 0 ? r : !1,
|
|
1421
|
-
...p.errToObj(e?.message)
|
|
1422
|
-
});
|
|
1423
|
-
}
|
|
1424
|
-
date(e) {
|
|
1425
|
-
return this._addCheck({ kind: "date", message: e });
|
|
1426
|
-
}
|
|
1427
|
-
time(e) {
|
|
1428
|
-
return typeof e == "string" ? this._addCheck({
|
|
1429
|
-
kind: "time",
|
|
1430
|
-
precision: null,
|
|
1431
|
-
message: e
|
|
1432
|
-
}) : this._addCheck({
|
|
1433
|
-
kind: "time",
|
|
1434
|
-
precision: typeof e?.precision > "u" ? null : e?.precision,
|
|
1435
|
-
...p.errToObj(e?.message)
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
|
-
duration(e) {
|
|
1439
|
-
return this._addCheck({ kind: "duration", ...p.errToObj(e) });
|
|
1440
|
-
}
|
|
1441
|
-
regex(e, s) {
|
|
1442
|
-
return this._addCheck({
|
|
1443
|
-
kind: "regex",
|
|
1444
|
-
regex: e,
|
|
1445
|
-
...p.errToObj(s)
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
includes(e, s) {
|
|
1449
|
-
return this._addCheck({
|
|
1450
|
-
kind: "includes",
|
|
1451
|
-
value: e,
|
|
1452
|
-
position: s?.position,
|
|
1453
|
-
...p.errToObj(s?.message)
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
startsWith(e, s) {
|
|
1457
|
-
return this._addCheck({
|
|
1458
|
-
kind: "startsWith",
|
|
1459
|
-
value: e,
|
|
1460
|
-
...p.errToObj(s)
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
endsWith(e, s) {
|
|
1464
|
-
return this._addCheck({
|
|
1465
|
-
kind: "endsWith",
|
|
1466
|
-
value: e,
|
|
1467
|
-
...p.errToObj(s)
|
|
1468
|
-
});
|
|
1469
|
-
}
|
|
1470
|
-
min(e, s) {
|
|
1471
|
-
return this._addCheck({
|
|
1472
|
-
kind: "min",
|
|
1473
|
-
value: e,
|
|
1474
|
-
...p.errToObj(s)
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
max(e, s) {
|
|
1478
|
-
return this._addCheck({
|
|
1479
|
-
kind: "max",
|
|
1480
|
-
value: e,
|
|
1481
|
-
...p.errToObj(s)
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
length(e, s) {
|
|
1485
|
-
return this._addCheck({
|
|
1486
|
-
kind: "length",
|
|
1487
|
-
value: e,
|
|
1488
|
-
...p.errToObj(s)
|
|
1489
|
-
});
|
|
1490
|
-
}
|
|
1491
|
-
/**
|
|
1492
|
-
* Equivalent to `.min(1)`
|
|
1493
|
-
*/
|
|
1494
|
-
nonempty(e) {
|
|
1495
|
-
return this.min(1, p.errToObj(e));
|
|
1496
|
-
}
|
|
1497
|
-
trim() {
|
|
1498
|
-
return new Z({
|
|
1499
|
-
...this._def,
|
|
1500
|
-
checks: [...this._def.checks, { kind: "trim" }]
|
|
1501
|
-
});
|
|
1502
|
-
}
|
|
1503
|
-
toLowerCase() {
|
|
1504
|
-
return new Z({
|
|
1505
|
-
...this._def,
|
|
1506
|
-
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
toUpperCase() {
|
|
1510
|
-
return new Z({
|
|
1511
|
-
...this._def,
|
|
1512
|
-
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
1513
|
-
});
|
|
1514
|
-
}
|
|
1515
|
-
get isDatetime() {
|
|
1516
|
-
return !!this._def.checks.find((e) => e.kind === "datetime");
|
|
1517
|
-
}
|
|
1518
|
-
get isDate() {
|
|
1519
|
-
return !!this._def.checks.find((e) => e.kind === "date");
|
|
1520
|
-
}
|
|
1521
|
-
get isTime() {
|
|
1522
|
-
return !!this._def.checks.find((e) => e.kind === "time");
|
|
1523
|
-
}
|
|
1524
|
-
get isDuration() {
|
|
1525
|
-
return !!this._def.checks.find((e) => e.kind === "duration");
|
|
1526
|
-
}
|
|
1527
|
-
get isEmail() {
|
|
1528
|
-
return !!this._def.checks.find((e) => e.kind === "email");
|
|
1529
|
-
}
|
|
1530
|
-
get isURL() {
|
|
1531
|
-
return !!this._def.checks.find((e) => e.kind === "url");
|
|
1532
|
-
}
|
|
1533
|
-
get isEmoji() {
|
|
1534
|
-
return !!this._def.checks.find((e) => e.kind === "emoji");
|
|
1535
|
-
}
|
|
1536
|
-
get isUUID() {
|
|
1537
|
-
return !!this._def.checks.find((e) => e.kind === "uuid");
|
|
1538
|
-
}
|
|
1539
|
-
get isNANOID() {
|
|
1540
|
-
return !!this._def.checks.find((e) => e.kind === "nanoid");
|
|
1541
|
-
}
|
|
1542
|
-
get isCUID() {
|
|
1543
|
-
return !!this._def.checks.find((e) => e.kind === "cuid");
|
|
1544
|
-
}
|
|
1545
|
-
get isCUID2() {
|
|
1546
|
-
return !!this._def.checks.find((e) => e.kind === "cuid2");
|
|
1547
|
-
}
|
|
1548
|
-
get isULID() {
|
|
1549
|
-
return !!this._def.checks.find((e) => e.kind === "ulid");
|
|
1550
|
-
}
|
|
1551
|
-
get isIP() {
|
|
1552
|
-
return !!this._def.checks.find((e) => e.kind === "ip");
|
|
1553
|
-
}
|
|
1554
|
-
get isCIDR() {
|
|
1555
|
-
return !!this._def.checks.find((e) => e.kind === "cidr");
|
|
1556
|
-
}
|
|
1557
|
-
get isBase64() {
|
|
1558
|
-
return !!this._def.checks.find((e) => e.kind === "base64");
|
|
1559
|
-
}
|
|
1560
|
-
get isBase64url() {
|
|
1561
|
-
return !!this._def.checks.find((e) => e.kind === "base64url");
|
|
1562
|
-
}
|
|
1563
|
-
get minLength() {
|
|
1564
|
-
let e = null;
|
|
1565
|
-
for (const s of this._def.checks)
|
|
1566
|
-
s.kind === "min" && (e === null || s.value > e) && (e = s.value);
|
|
1567
|
-
return e;
|
|
1568
|
-
}
|
|
1569
|
-
get maxLength() {
|
|
1570
|
-
let e = null;
|
|
1571
|
-
for (const s of this._def.checks)
|
|
1572
|
-
s.kind === "max" && (e === null || s.value < e) && (e = s.value);
|
|
1573
|
-
return e;
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
Z.create = (t) => {
|
|
1577
|
-
var e;
|
|
1578
|
-
return new Z({
|
|
1579
|
-
checks: [],
|
|
1580
|
-
typeName: v.ZodString,
|
|
1581
|
-
coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
|
|
1582
|
-
...x(t)
|
|
1583
|
-
});
|
|
1584
|
-
};
|
|
1585
|
-
function hn(t, e) {
|
|
1586
|
-
const s = (t.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, n = s > r ? s : r, a = parseInt(t.toFixed(n).replace(".", "")), o = parseInt(e.toFixed(n).replace(".", ""));
|
|
1587
|
-
return a % o / Math.pow(10, n);
|
|
1588
|
-
}
|
|
1589
|
-
class H extends _ {
|
|
1590
|
-
constructor() {
|
|
1591
|
-
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1592
|
-
}
|
|
1593
|
-
_parse(e) {
|
|
1594
|
-
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== f.number) {
|
|
1595
|
-
const a = this._getOrReturnCtx(e);
|
|
1596
|
-
return h(a, {
|
|
1597
|
-
code: l.invalid_type,
|
|
1598
|
-
expected: f.number,
|
|
1599
|
-
received: a.parsedType
|
|
1600
|
-
}), y;
|
|
1601
|
-
}
|
|
1602
|
-
let r;
|
|
1603
|
-
const n = new C();
|
|
1604
|
-
for (const a of this._def.checks)
|
|
1605
|
-
a.kind === "int" ? b.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1606
|
-
code: l.invalid_type,
|
|
1607
|
-
expected: "integer",
|
|
1608
|
-
received: "float",
|
|
1609
|
-
message: a.message
|
|
1610
|
-
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1611
|
-
code: l.too_small,
|
|
1612
|
-
minimum: a.value,
|
|
1613
|
-
type: "number",
|
|
1614
|
-
inclusive: a.inclusive,
|
|
1615
|
-
exact: !1,
|
|
1616
|
-
message: a.message
|
|
1617
|
-
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1618
|
-
code: l.too_big,
|
|
1619
|
-
maximum: a.value,
|
|
1620
|
-
type: "number",
|
|
1621
|
-
inclusive: a.inclusive,
|
|
1622
|
-
exact: !1,
|
|
1623
|
-
message: a.message
|
|
1624
|
-
}), n.dirty()) : a.kind === "multipleOf" ? hn(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1625
|
-
code: l.not_multiple_of,
|
|
1626
|
-
multipleOf: a.value,
|
|
1627
|
-
message: a.message
|
|
1628
|
-
}), n.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1629
|
-
code: l.not_finite,
|
|
1630
|
-
message: a.message
|
|
1631
|
-
}), n.dirty()) : b.assertNever(a);
|
|
1632
|
-
return { status: n.value, value: e.data };
|
|
1633
|
-
}
|
|
1634
|
-
gte(e, s) {
|
|
1635
|
-
return this.setLimit("min", e, !0, p.toString(s));
|
|
1636
|
-
}
|
|
1637
|
-
gt(e, s) {
|
|
1638
|
-
return this.setLimit("min", e, !1, p.toString(s));
|
|
1639
|
-
}
|
|
1640
|
-
lte(e, s) {
|
|
1641
|
-
return this.setLimit("max", e, !0, p.toString(s));
|
|
1642
|
-
}
|
|
1643
|
-
lt(e, s) {
|
|
1644
|
-
return this.setLimit("max", e, !1, p.toString(s));
|
|
1645
|
-
}
|
|
1646
|
-
setLimit(e, s, r, n) {
|
|
1647
|
-
return new H({
|
|
1648
|
-
...this._def,
|
|
1649
|
-
checks: [
|
|
1650
|
-
...this._def.checks,
|
|
1651
|
-
{
|
|
1652
|
-
kind: e,
|
|
1653
|
-
value: s,
|
|
1654
|
-
inclusive: r,
|
|
1655
|
-
message: p.toString(n)
|
|
1656
|
-
}
|
|
1657
|
-
]
|
|
1658
|
-
});
|
|
1659
|
-
}
|
|
1660
|
-
_addCheck(e) {
|
|
1661
|
-
return new H({
|
|
1662
|
-
...this._def,
|
|
1663
|
-
checks: [...this._def.checks, e]
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
int(e) {
|
|
1667
|
-
return this._addCheck({
|
|
1668
|
-
kind: "int",
|
|
1669
|
-
message: p.toString(e)
|
|
1670
|
-
});
|
|
1671
|
-
}
|
|
1672
|
-
positive(e) {
|
|
1673
|
-
return this._addCheck({
|
|
1674
|
-
kind: "min",
|
|
1675
|
-
value: 0,
|
|
1676
|
-
inclusive: !1,
|
|
1677
|
-
message: p.toString(e)
|
|
1678
|
-
});
|
|
1679
|
-
}
|
|
1680
|
-
negative(e) {
|
|
1681
|
-
return this._addCheck({
|
|
1682
|
-
kind: "max",
|
|
1683
|
-
value: 0,
|
|
1684
|
-
inclusive: !1,
|
|
1685
|
-
message: p.toString(e)
|
|
1686
|
-
});
|
|
1687
|
-
}
|
|
1688
|
-
nonpositive(e) {
|
|
1689
|
-
return this._addCheck({
|
|
1690
|
-
kind: "max",
|
|
1691
|
-
value: 0,
|
|
1692
|
-
inclusive: !0,
|
|
1693
|
-
message: p.toString(e)
|
|
1694
|
-
});
|
|
1695
|
-
}
|
|
1696
|
-
nonnegative(e) {
|
|
1697
|
-
return this._addCheck({
|
|
1698
|
-
kind: "min",
|
|
1699
|
-
value: 0,
|
|
1700
|
-
inclusive: !0,
|
|
1701
|
-
message: p.toString(e)
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
multipleOf(e, s) {
|
|
1705
|
-
return this._addCheck({
|
|
1706
|
-
kind: "multipleOf",
|
|
1707
|
-
value: e,
|
|
1708
|
-
message: p.toString(s)
|
|
1709
|
-
});
|
|
1710
|
-
}
|
|
1711
|
-
finite(e) {
|
|
1712
|
-
return this._addCheck({
|
|
1713
|
-
kind: "finite",
|
|
1714
|
-
message: p.toString(e)
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
safe(e) {
|
|
1718
|
-
return this._addCheck({
|
|
1719
|
-
kind: "min",
|
|
1720
|
-
inclusive: !0,
|
|
1721
|
-
value: Number.MIN_SAFE_INTEGER,
|
|
1722
|
-
message: p.toString(e)
|
|
1723
|
-
})._addCheck({
|
|
1724
|
-
kind: "max",
|
|
1725
|
-
inclusive: !0,
|
|
1726
|
-
value: Number.MAX_SAFE_INTEGER,
|
|
1727
|
-
message: p.toString(e)
|
|
1728
|
-
});
|
|
1729
|
-
}
|
|
1730
|
-
get minValue() {
|
|
1731
|
-
let e = null;
|
|
1732
|
-
for (const s of this._def.checks)
|
|
1733
|
-
s.kind === "min" && (e === null || s.value > e) && (e = s.value);
|
|
1734
|
-
return e;
|
|
1735
|
-
}
|
|
1736
|
-
get maxValue() {
|
|
1737
|
-
let e = null;
|
|
1738
|
-
for (const s of this._def.checks)
|
|
1739
|
-
s.kind === "max" && (e === null || s.value < e) && (e = s.value);
|
|
1740
|
-
return e;
|
|
1741
|
-
}
|
|
1742
|
-
get isInt() {
|
|
1743
|
-
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && b.isInteger(e.value));
|
|
1744
|
-
}
|
|
1745
|
-
get isFinite() {
|
|
1746
|
-
let e = null, s = null;
|
|
1747
|
-
for (const r of this._def.checks) {
|
|
1748
|
-
if (r.kind === "finite" || r.kind === "int" || r.kind === "multipleOf")
|
|
1749
|
-
return !0;
|
|
1750
|
-
r.kind === "min" ? (s === null || r.value > s) && (s = r.value) : r.kind === "max" && (e === null || r.value < e) && (e = r.value);
|
|
1751
|
-
}
|
|
1752
|
-
return Number.isFinite(s) && Number.isFinite(e);
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
H.create = (t) => new H({
|
|
1756
|
-
checks: [],
|
|
1757
|
-
typeName: v.ZodNumber,
|
|
1758
|
-
coerce: t?.coerce || !1,
|
|
1759
|
-
...x(t)
|
|
1760
|
-
});
|
|
1761
|
-
class W extends _ {
|
|
1762
|
-
constructor() {
|
|
1763
|
-
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1764
|
-
}
|
|
1765
|
-
_parse(e) {
|
|
1766
|
-
if (this._def.coerce)
|
|
1767
|
-
try {
|
|
1768
|
-
e.data = BigInt(e.data);
|
|
1769
|
-
} catch {
|
|
1770
|
-
return this._getInvalidInput(e);
|
|
1771
|
-
}
|
|
1772
|
-
if (this._getType(e) !== f.bigint)
|
|
1773
|
-
return this._getInvalidInput(e);
|
|
1774
|
-
let r;
|
|
1775
|
-
const n = new C();
|
|
1776
|
-
for (const a of this._def.checks)
|
|
1777
|
-
a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1778
|
-
code: l.too_small,
|
|
1779
|
-
type: "bigint",
|
|
1780
|
-
minimum: a.value,
|
|
1781
|
-
inclusive: a.inclusive,
|
|
1782
|
-
message: a.message
|
|
1783
|
-
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1784
|
-
code: l.too_big,
|
|
1785
|
-
type: "bigint",
|
|
1786
|
-
maximum: a.value,
|
|
1787
|
-
inclusive: a.inclusive,
|
|
1788
|
-
message: a.message
|
|
1789
|
-
}), n.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (r = this._getOrReturnCtx(e, r), h(r, {
|
|
1790
|
-
code: l.not_multiple_of,
|
|
1791
|
-
multipleOf: a.value,
|
|
1792
|
-
message: a.message
|
|
1793
|
-
}), n.dirty()) : b.assertNever(a);
|
|
1794
|
-
return { status: n.value, value: e.data };
|
|
1795
|
-
}
|
|
1796
|
-
_getInvalidInput(e) {
|
|
1797
|
-
const s = this._getOrReturnCtx(e);
|
|
1798
|
-
return h(s, {
|
|
1799
|
-
code: l.invalid_type,
|
|
1800
|
-
expected: f.bigint,
|
|
1801
|
-
received: s.parsedType
|
|
1802
|
-
}), y;
|
|
1803
|
-
}
|
|
1804
|
-
gte(e, s) {
|
|
1805
|
-
return this.setLimit("min", e, !0, p.toString(s));
|
|
1806
|
-
}
|
|
1807
|
-
gt(e, s) {
|
|
1808
|
-
return this.setLimit("min", e, !1, p.toString(s));
|
|
1809
|
-
}
|
|
1810
|
-
lte(e, s) {
|
|
1811
|
-
return this.setLimit("max", e, !0, p.toString(s));
|
|
1812
|
-
}
|
|
1813
|
-
lt(e, s) {
|
|
1814
|
-
return this.setLimit("max", e, !1, p.toString(s));
|
|
1815
|
-
}
|
|
1816
|
-
setLimit(e, s, r, n) {
|
|
1817
|
-
return new W({
|
|
1818
|
-
...this._def,
|
|
1819
|
-
checks: [
|
|
1820
|
-
...this._def.checks,
|
|
1821
|
-
{
|
|
1822
|
-
kind: e,
|
|
1823
|
-
value: s,
|
|
1824
|
-
inclusive: r,
|
|
1825
|
-
message: p.toString(n)
|
|
1826
|
-
}
|
|
1827
|
-
]
|
|
1828
|
-
});
|
|
1829
|
-
}
|
|
1830
|
-
_addCheck(e) {
|
|
1831
|
-
return new W({
|
|
1832
|
-
...this._def,
|
|
1833
|
-
checks: [...this._def.checks, e]
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
|
-
positive(e) {
|
|
1837
|
-
return this._addCheck({
|
|
1838
|
-
kind: "min",
|
|
1839
|
-
value: BigInt(0),
|
|
1840
|
-
inclusive: !1,
|
|
1841
|
-
message: p.toString(e)
|
|
1842
|
-
});
|
|
1843
|
-
}
|
|
1844
|
-
negative(e) {
|
|
1845
|
-
return this._addCheck({
|
|
1846
|
-
kind: "max",
|
|
1847
|
-
value: BigInt(0),
|
|
1848
|
-
inclusive: !1,
|
|
1849
|
-
message: p.toString(e)
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
nonpositive(e) {
|
|
1853
|
-
return this._addCheck({
|
|
1854
|
-
kind: "max",
|
|
1855
|
-
value: BigInt(0),
|
|
1856
|
-
inclusive: !0,
|
|
1857
|
-
message: p.toString(e)
|
|
1858
|
-
});
|
|
1859
|
-
}
|
|
1860
|
-
nonnegative(e) {
|
|
1861
|
-
return this._addCheck({
|
|
1862
|
-
kind: "min",
|
|
1863
|
-
value: BigInt(0),
|
|
1864
|
-
inclusive: !0,
|
|
1865
|
-
message: p.toString(e)
|
|
1866
|
-
});
|
|
1867
|
-
}
|
|
1868
|
-
multipleOf(e, s) {
|
|
1869
|
-
return this._addCheck({
|
|
1870
|
-
kind: "multipleOf",
|
|
1871
|
-
value: e,
|
|
1872
|
-
message: p.toString(s)
|
|
1873
|
-
});
|
|
1874
|
-
}
|
|
1875
|
-
get minValue() {
|
|
1876
|
-
let e = null;
|
|
1877
|
-
for (const s of this._def.checks)
|
|
1878
|
-
s.kind === "min" && (e === null || s.value > e) && (e = s.value);
|
|
1879
|
-
return e;
|
|
1880
|
-
}
|
|
1881
|
-
get maxValue() {
|
|
1882
|
-
let e = null;
|
|
1883
|
-
for (const s of this._def.checks)
|
|
1884
|
-
s.kind === "max" && (e === null || s.value < e) && (e = s.value);
|
|
1885
|
-
return e;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
W.create = (t) => {
|
|
1889
|
-
var e;
|
|
1890
|
-
return new W({
|
|
1891
|
-
checks: [],
|
|
1892
|
-
typeName: v.ZodBigInt,
|
|
1893
|
-
coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
|
|
1894
|
-
...x(t)
|
|
1895
|
-
});
|
|
1896
|
-
};
|
|
1897
|
-
class me extends _ {
|
|
1898
|
-
_parse(e) {
|
|
1899
|
-
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
|
|
1900
|
-
const r = this._getOrReturnCtx(e);
|
|
1901
|
-
return h(r, {
|
|
1902
|
-
code: l.invalid_type,
|
|
1903
|
-
expected: f.boolean,
|
|
1904
|
-
received: r.parsedType
|
|
1905
|
-
}), y;
|
|
1906
|
-
}
|
|
1907
|
-
return S(e.data);
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
me.create = (t) => new me({
|
|
1911
|
-
typeName: v.ZodBoolean,
|
|
1912
|
-
coerce: t?.coerce || !1,
|
|
1913
|
-
...x(t)
|
|
1914
|
-
});
|
|
1915
|
-
class X extends _ {
|
|
1916
|
-
_parse(e) {
|
|
1917
|
-
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
1918
|
-
const a = this._getOrReturnCtx(e);
|
|
1919
|
-
return h(a, {
|
|
1920
|
-
code: l.invalid_type,
|
|
1921
|
-
expected: f.date,
|
|
1922
|
-
received: a.parsedType
|
|
1923
|
-
}), y;
|
|
1924
|
-
}
|
|
1925
|
-
if (isNaN(e.data.getTime())) {
|
|
1926
|
-
const a = this._getOrReturnCtx(e);
|
|
1927
|
-
return h(a, {
|
|
1928
|
-
code: l.invalid_date
|
|
1929
|
-
}), y;
|
|
1930
|
-
}
|
|
1931
|
-
const r = new C();
|
|
1932
|
-
let n;
|
|
1933
|
-
for (const a of this._def.checks)
|
|
1934
|
-
a.kind === "min" ? e.data.getTime() < a.value && (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1935
|
-
code: l.too_small,
|
|
1936
|
-
message: a.message,
|
|
1937
|
-
inclusive: !0,
|
|
1938
|
-
exact: !1,
|
|
1939
|
-
minimum: a.value,
|
|
1940
|
-
type: "date"
|
|
1941
|
-
}), r.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1942
|
-
code: l.too_big,
|
|
1943
|
-
message: a.message,
|
|
1944
|
-
inclusive: !0,
|
|
1945
|
-
exact: !1,
|
|
1946
|
-
maximum: a.value,
|
|
1947
|
-
type: "date"
|
|
1948
|
-
}), r.dirty()) : b.assertNever(a);
|
|
1949
|
-
return {
|
|
1950
|
-
status: r.value,
|
|
1951
|
-
value: new Date(e.data.getTime())
|
|
1952
|
-
};
|
|
1953
|
-
}
|
|
1954
|
-
_addCheck(e) {
|
|
1955
|
-
return new X({
|
|
1956
|
-
...this._def,
|
|
1957
|
-
checks: [...this._def.checks, e]
|
|
1958
|
-
});
|
|
1959
|
-
}
|
|
1960
|
-
min(e, s) {
|
|
1961
|
-
return this._addCheck({
|
|
1962
|
-
kind: "min",
|
|
1963
|
-
value: e.getTime(),
|
|
1964
|
-
message: p.toString(s)
|
|
1965
|
-
});
|
|
1966
|
-
}
|
|
1967
|
-
max(e, s) {
|
|
1968
|
-
return this._addCheck({
|
|
1969
|
-
kind: "max",
|
|
1970
|
-
value: e.getTime(),
|
|
1971
|
-
message: p.toString(s)
|
|
1972
|
-
});
|
|
1973
|
-
}
|
|
1974
|
-
get minDate() {
|
|
1975
|
-
let e = null;
|
|
1976
|
-
for (const s of this._def.checks)
|
|
1977
|
-
s.kind === "min" && (e === null || s.value > e) && (e = s.value);
|
|
1978
|
-
return e != null ? new Date(e) : null;
|
|
1979
|
-
}
|
|
1980
|
-
get maxDate() {
|
|
1981
|
-
let e = null;
|
|
1982
|
-
for (const s of this._def.checks)
|
|
1983
|
-
s.kind === "max" && (e === null || s.value < e) && (e = s.value);
|
|
1984
|
-
return e != null ? new Date(e) : null;
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
X.create = (t) => new X({
|
|
1988
|
-
checks: [],
|
|
1989
|
-
coerce: t?.coerce || !1,
|
|
1990
|
-
typeName: v.ZodDate,
|
|
1991
|
-
...x(t)
|
|
1992
|
-
});
|
|
1993
|
-
class Ie extends _ {
|
|
1994
|
-
_parse(e) {
|
|
1995
|
-
if (this._getType(e) !== f.symbol) {
|
|
1996
|
-
const r = this._getOrReturnCtx(e);
|
|
1997
|
-
return h(r, {
|
|
1998
|
-
code: l.invalid_type,
|
|
1999
|
-
expected: f.symbol,
|
|
2000
|
-
received: r.parsedType
|
|
2001
|
-
}), y;
|
|
2002
|
-
}
|
|
2003
|
-
return S(e.data);
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
Ie.create = (t) => new Ie({
|
|
2007
|
-
typeName: v.ZodSymbol,
|
|
2008
|
-
...x(t)
|
|
2009
|
-
});
|
|
2010
|
-
class pe extends _ {
|
|
2011
|
-
_parse(e) {
|
|
2012
|
-
if (this._getType(e) !== f.undefined) {
|
|
2013
|
-
const r = this._getOrReturnCtx(e);
|
|
2014
|
-
return h(r, {
|
|
2015
|
-
code: l.invalid_type,
|
|
2016
|
-
expected: f.undefined,
|
|
2017
|
-
received: r.parsedType
|
|
2018
|
-
}), y;
|
|
2019
|
-
}
|
|
2020
|
-
return S(e.data);
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
pe.create = (t) => new pe({
|
|
2024
|
-
typeName: v.ZodUndefined,
|
|
2025
|
-
...x(t)
|
|
2026
|
-
});
|
|
2027
|
-
class ge extends _ {
|
|
2028
|
-
_parse(e) {
|
|
2029
|
-
if (this._getType(e) !== f.null) {
|
|
2030
|
-
const r = this._getOrReturnCtx(e);
|
|
2031
|
-
return h(r, {
|
|
2032
|
-
code: l.invalid_type,
|
|
2033
|
-
expected: f.null,
|
|
2034
|
-
received: r.parsedType
|
|
2035
|
-
}), y;
|
|
2036
|
-
}
|
|
2037
|
-
return S(e.data);
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
ge.create = (t) => new ge({
|
|
2041
|
-
typeName: v.ZodNull,
|
|
2042
|
-
...x(t)
|
|
2043
|
-
});
|
|
2044
|
-
class oe extends _ {
|
|
2045
|
-
constructor() {
|
|
2046
|
-
super(...arguments), this._any = !0;
|
|
2047
|
-
}
|
|
2048
|
-
_parse(e) {
|
|
2049
|
-
return S(e.data);
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
oe.create = (t) => new oe({
|
|
2053
|
-
typeName: v.ZodAny,
|
|
2054
|
-
...x(t)
|
|
2055
|
-
});
|
|
2056
|
-
class J extends _ {
|
|
2057
|
-
constructor() {
|
|
2058
|
-
super(...arguments), this._unknown = !0;
|
|
2059
|
-
}
|
|
2060
|
-
_parse(e) {
|
|
2061
|
-
return S(e.data);
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
J.create = (t) => new J({
|
|
2065
|
-
typeName: v.ZodUnknown,
|
|
2066
|
-
...x(t)
|
|
2067
|
-
});
|
|
2068
|
-
class U extends _ {
|
|
2069
|
-
_parse(e) {
|
|
2070
|
-
const s = this._getOrReturnCtx(e);
|
|
2071
|
-
return h(s, {
|
|
2072
|
-
code: l.invalid_type,
|
|
2073
|
-
expected: f.never,
|
|
2074
|
-
received: s.parsedType
|
|
2075
|
-
}), y;
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
U.create = (t) => new U({
|
|
2079
|
-
typeName: v.ZodNever,
|
|
2080
|
-
...x(t)
|
|
2081
|
-
});
|
|
2082
|
-
class Me extends _ {
|
|
2083
|
-
_parse(e) {
|
|
2084
|
-
if (this._getType(e) !== f.undefined) {
|
|
2085
|
-
const r = this._getOrReturnCtx(e);
|
|
2086
|
-
return h(r, {
|
|
2087
|
-
code: l.invalid_type,
|
|
2088
|
-
expected: f.void,
|
|
2089
|
-
received: r.parsedType
|
|
2090
|
-
}), y;
|
|
2091
|
-
}
|
|
2092
|
-
return S(e.data);
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
Me.create = (t) => new Me({
|
|
2096
|
-
typeName: v.ZodVoid,
|
|
2097
|
-
...x(t)
|
|
2098
|
-
});
|
|
2099
|
-
class R extends _ {
|
|
2100
|
-
_parse(e) {
|
|
2101
|
-
const { ctx: s, status: r } = this._processInputParams(e), n = this._def;
|
|
2102
|
-
if (s.parsedType !== f.array)
|
|
2103
|
-
return h(s, {
|
|
2104
|
-
code: l.invalid_type,
|
|
2105
|
-
expected: f.array,
|
|
2106
|
-
received: s.parsedType
|
|
2107
|
-
}), y;
|
|
2108
|
-
if (n.exactLength !== null) {
|
|
2109
|
-
const o = s.data.length > n.exactLength.value, c = s.data.length < n.exactLength.value;
|
|
2110
|
-
(o || c) && (h(s, {
|
|
2111
|
-
code: o ? l.too_big : l.too_small,
|
|
2112
|
-
minimum: c ? n.exactLength.value : void 0,
|
|
2113
|
-
maximum: o ? n.exactLength.value : void 0,
|
|
2114
|
-
type: "array",
|
|
2115
|
-
inclusive: !0,
|
|
2116
|
-
exact: !0,
|
|
2117
|
-
message: n.exactLength.message
|
|
2118
|
-
}), r.dirty());
|
|
2119
|
-
}
|
|
2120
|
-
if (n.minLength !== null && s.data.length < n.minLength.value && (h(s, {
|
|
2121
|
-
code: l.too_small,
|
|
2122
|
-
minimum: n.minLength.value,
|
|
2123
|
-
type: "array",
|
|
2124
|
-
inclusive: !0,
|
|
2125
|
-
exact: !1,
|
|
2126
|
-
message: n.minLength.message
|
|
2127
|
-
}), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (h(s, {
|
|
2128
|
-
code: l.too_big,
|
|
2129
|
-
maximum: n.maxLength.value,
|
|
2130
|
-
type: "array",
|
|
2131
|
-
inclusive: !0,
|
|
2132
|
-
exact: !1,
|
|
2133
|
-
message: n.maxLength.message
|
|
2134
|
-
}), r.dirty()), s.common.async)
|
|
2135
|
-
return Promise.all([...s.data].map((o, c) => n.type._parseAsync(new $(s, o, s.path, c)))).then((o) => C.mergeArray(r, o));
|
|
2136
|
-
const a = [...s.data].map((o, c) => n.type._parseSync(new $(s, o, s.path, c)));
|
|
2137
|
-
return C.mergeArray(r, a);
|
|
2138
|
-
}
|
|
2139
|
-
get element() {
|
|
2140
|
-
return this._def.type;
|
|
2141
|
-
}
|
|
2142
|
-
min(e, s) {
|
|
2143
|
-
return new R({
|
|
2144
|
-
...this._def,
|
|
2145
|
-
minLength: { value: e, message: p.toString(s) }
|
|
2146
|
-
});
|
|
2147
|
-
}
|
|
2148
|
-
max(e, s) {
|
|
2149
|
-
return new R({
|
|
2150
|
-
...this._def,
|
|
2151
|
-
maxLength: { value: e, message: p.toString(s) }
|
|
2152
|
-
});
|
|
2153
|
-
}
|
|
2154
|
-
length(e, s) {
|
|
2155
|
-
return new R({
|
|
2156
|
-
...this._def,
|
|
2157
|
-
exactLength: { value: e, message: p.toString(s) }
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
nonempty(e) {
|
|
2161
|
-
return this.min(1, e);
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
R.create = (t, e) => new R({
|
|
2165
|
-
type: t,
|
|
2166
|
-
minLength: null,
|
|
2167
|
-
maxLength: null,
|
|
2168
|
-
exactLength: null,
|
|
2169
|
-
typeName: v.ZodArray,
|
|
2170
|
-
...x(e)
|
|
2171
|
-
});
|
|
2172
|
-
function se(t) {
|
|
2173
|
-
if (t instanceof j) {
|
|
2174
|
-
const e = {};
|
|
2175
|
-
for (const s in t.shape) {
|
|
2176
|
-
const r = t.shape[s];
|
|
2177
|
-
e[s] = D.create(se(r));
|
|
2178
|
-
}
|
|
2179
|
-
return new j({
|
|
2180
|
-
...t._def,
|
|
2181
|
-
shape: () => e
|
|
2182
|
-
});
|
|
2183
|
-
} else return t instanceof R ? new R({
|
|
2184
|
-
...t._def,
|
|
2185
|
-
type: se(t.element)
|
|
2186
|
-
}) : t instanceof D ? D.create(se(t.unwrap())) : t instanceof Y ? Y.create(se(t.unwrap())) : t instanceof z ? z.create(t.items.map((e) => se(e))) : t;
|
|
2187
|
-
}
|
|
2188
|
-
class j extends _ {
|
|
2189
|
-
constructor() {
|
|
2190
|
-
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
2191
|
-
}
|
|
2192
|
-
_getCached() {
|
|
2193
|
-
if (this._cached !== null)
|
|
2194
|
-
return this._cached;
|
|
2195
|
-
const e = this._def.shape(), s = b.objectKeys(e);
|
|
2196
|
-
return this._cached = { shape: e, keys: s };
|
|
2197
|
-
}
|
|
2198
|
-
_parse(e) {
|
|
2199
|
-
if (this._getType(e) !== f.object) {
|
|
2200
|
-
const d = this._getOrReturnCtx(e);
|
|
2201
|
-
return h(d, {
|
|
2202
|
-
code: l.invalid_type,
|
|
2203
|
-
expected: f.object,
|
|
2204
|
-
received: d.parsedType
|
|
2205
|
-
}), y;
|
|
2206
|
-
}
|
|
2207
|
-
const { status: r, ctx: n } = this._processInputParams(e), { shape: a, keys: o } = this._getCached(), c = [];
|
|
2208
|
-
if (!(this._def.catchall instanceof U && this._def.unknownKeys === "strip"))
|
|
2209
|
-
for (const d in n.data)
|
|
2210
|
-
o.includes(d) || c.push(d);
|
|
2211
|
-
const u = [];
|
|
2212
|
-
for (const d of o) {
|
|
2213
|
-
const m = a[d], k = n.data[d];
|
|
2214
|
-
u.push({
|
|
2215
|
-
key: { status: "valid", value: d },
|
|
2216
|
-
value: m._parse(new $(n, k, n.path, d)),
|
|
2217
|
-
alwaysSet: d in n.data
|
|
2218
|
-
});
|
|
2219
|
-
}
|
|
2220
|
-
if (this._def.catchall instanceof U) {
|
|
2221
|
-
const d = this._def.unknownKeys;
|
|
2222
|
-
if (d === "passthrough")
|
|
2223
|
-
for (const m of c)
|
|
2224
|
-
u.push({
|
|
2225
|
-
key: { status: "valid", value: m },
|
|
2226
|
-
value: { status: "valid", value: n.data[m] }
|
|
2227
|
-
});
|
|
2228
|
-
else if (d === "strict")
|
|
2229
|
-
c.length > 0 && (h(n, {
|
|
2230
|
-
code: l.unrecognized_keys,
|
|
2231
|
-
keys: c
|
|
2232
|
-
}), r.dirty());
|
|
2233
|
-
else if (d !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
2234
|
-
} else {
|
|
2235
|
-
const d = this._def.catchall;
|
|
2236
|
-
for (const m of c) {
|
|
2237
|
-
const k = n.data[m];
|
|
2238
|
-
u.push({
|
|
2239
|
-
key: { status: "valid", value: m },
|
|
2240
|
-
value: d._parse(
|
|
2241
|
-
new $(n, k, n.path, m)
|
|
2242
|
-
//, ctx.child(key), value, getParsedType(value)
|
|
2243
|
-
),
|
|
2244
|
-
alwaysSet: m in n.data
|
|
2245
|
-
});
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
return n.common.async ? Promise.resolve().then(async () => {
|
|
2249
|
-
const d = [];
|
|
2250
|
-
for (const m of u) {
|
|
2251
|
-
const k = await m.key, w = await m.value;
|
|
2252
|
-
d.push({
|
|
2253
|
-
key: k,
|
|
2254
|
-
value: w,
|
|
2255
|
-
alwaysSet: m.alwaysSet
|
|
2256
|
-
});
|
|
2257
|
-
}
|
|
2258
|
-
return d;
|
|
2259
|
-
}).then((d) => C.mergeObjectSync(r, d)) : C.mergeObjectSync(r, u);
|
|
2260
|
-
}
|
|
2261
|
-
get shape() {
|
|
2262
|
-
return this._def.shape();
|
|
2263
|
-
}
|
|
2264
|
-
strict(e) {
|
|
2265
|
-
return p.errToObj, new j({
|
|
2266
|
-
...this._def,
|
|
2267
|
-
unknownKeys: "strict",
|
|
2268
|
-
...e !== void 0 ? {
|
|
2269
|
-
errorMap: (s, r) => {
|
|
2270
|
-
var n, a, o, c;
|
|
2271
|
-
const u = (o = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, s, r).message) !== null && o !== void 0 ? o : r.defaultError;
|
|
2272
|
-
return s.code === "unrecognized_keys" ? {
|
|
2273
|
-
message: (c = p.errToObj(e).message) !== null && c !== void 0 ? c : u
|
|
2274
|
-
} : {
|
|
2275
|
-
message: u
|
|
2276
|
-
};
|
|
2277
|
-
}
|
|
2278
|
-
} : {}
|
|
2279
|
-
});
|
|
2280
|
-
}
|
|
2281
|
-
strip() {
|
|
2282
|
-
return new j({
|
|
2283
|
-
...this._def,
|
|
2284
|
-
unknownKeys: "strip"
|
|
2285
|
-
});
|
|
2286
|
-
}
|
|
2287
|
-
passthrough() {
|
|
2288
|
-
return new j({
|
|
2289
|
-
...this._def,
|
|
2290
|
-
unknownKeys: "passthrough"
|
|
2291
|
-
});
|
|
2292
|
-
}
|
|
2293
|
-
// const AugmentFactory =
|
|
2294
|
-
// <Def extends ZodObjectDef>(def: Def) =>
|
|
2295
|
-
// <Augmentation extends ZodRawShape>(
|
|
2296
|
-
// augmentation: Augmentation
|
|
2297
|
-
// ): ZodObject<
|
|
2298
|
-
// extendShape<ReturnType<Def["shape"]>, Augmentation>,
|
|
2299
|
-
// Def["unknownKeys"],
|
|
2300
|
-
// Def["catchall"]
|
|
2301
|
-
// > => {
|
|
2302
|
-
// return new ZodObject({
|
|
2303
|
-
// ...def,
|
|
2304
|
-
// shape: () => ({
|
|
2305
|
-
// ...def.shape(),
|
|
2306
|
-
// ...augmentation,
|
|
2307
|
-
// }),
|
|
2308
|
-
// }) as any;
|
|
2309
|
-
// };
|
|
2310
|
-
extend(e) {
|
|
2311
|
-
return new j({
|
|
2312
|
-
...this._def,
|
|
2313
|
-
shape: () => ({
|
|
2314
|
-
...this._def.shape(),
|
|
2315
|
-
...e
|
|
2316
|
-
})
|
|
2317
|
-
});
|
|
2318
|
-
}
|
|
2319
|
-
/**
|
|
2320
|
-
* Prior to zod@1.0.12 there was a bug in the
|
|
2321
|
-
* inferred type of merged objects. Please
|
|
2322
|
-
* upgrade if you are experiencing issues.
|
|
2323
|
-
*/
|
|
2324
|
-
merge(e) {
|
|
2325
|
-
return new j({
|
|
2326
|
-
unknownKeys: e._def.unknownKeys,
|
|
2327
|
-
catchall: e._def.catchall,
|
|
2328
|
-
shape: () => ({
|
|
2329
|
-
...this._def.shape(),
|
|
2330
|
-
...e._def.shape()
|
|
2331
|
-
}),
|
|
2332
|
-
typeName: v.ZodObject
|
|
2333
|
-
});
|
|
2334
|
-
}
|
|
2335
|
-
// merge<
|
|
2336
|
-
// Incoming extends AnyZodObject,
|
|
2337
|
-
// Augmentation extends Incoming["shape"],
|
|
2338
|
-
// NewOutput extends {
|
|
2339
|
-
// [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
|
|
2340
|
-
// ? Augmentation[k]["_output"]
|
|
2341
|
-
// : k extends keyof Output
|
|
2342
|
-
// ? Output[k]
|
|
2343
|
-
// : never;
|
|
2344
|
-
// },
|
|
2345
|
-
// NewInput extends {
|
|
2346
|
-
// [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
|
|
2347
|
-
// ? Augmentation[k]["_input"]
|
|
2348
|
-
// : k extends keyof Input
|
|
2349
|
-
// ? Input[k]
|
|
2350
|
-
// : never;
|
|
2351
|
-
// }
|
|
2352
|
-
// >(
|
|
2353
|
-
// merging: Incoming
|
|
2354
|
-
// ): ZodObject<
|
|
2355
|
-
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
2356
|
-
// Incoming["_def"]["unknownKeys"],
|
|
2357
|
-
// Incoming["_def"]["catchall"],
|
|
2358
|
-
// NewOutput,
|
|
2359
|
-
// NewInput
|
|
2360
|
-
// > {
|
|
2361
|
-
// const merged: any = new ZodObject({
|
|
2362
|
-
// unknownKeys: merging._def.unknownKeys,
|
|
2363
|
-
// catchall: merging._def.catchall,
|
|
2364
|
-
// shape: () =>
|
|
2365
|
-
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
2366
|
-
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
2367
|
-
// }) as any;
|
|
2368
|
-
// return merged;
|
|
2369
|
-
// }
|
|
2370
|
-
setKey(e, s) {
|
|
2371
|
-
return this.augment({ [e]: s });
|
|
2372
|
-
}
|
|
2373
|
-
// merge<Incoming extends AnyZodObject>(
|
|
2374
|
-
// merging: Incoming
|
|
2375
|
-
// ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
|
|
2376
|
-
// ZodObject<
|
|
2377
|
-
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
2378
|
-
// Incoming["_def"]["unknownKeys"],
|
|
2379
|
-
// Incoming["_def"]["catchall"]
|
|
2380
|
-
// > {
|
|
2381
|
-
// // const mergedShape = objectUtil.mergeShapes(
|
|
2382
|
-
// // this._def.shape(),
|
|
2383
|
-
// // merging._def.shape()
|
|
2384
|
-
// // );
|
|
2385
|
-
// const merged: any = new ZodObject({
|
|
2386
|
-
// unknownKeys: merging._def.unknownKeys,
|
|
2387
|
-
// catchall: merging._def.catchall,
|
|
2388
|
-
// shape: () =>
|
|
2389
|
-
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
2390
|
-
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
2391
|
-
// }) as any;
|
|
2392
|
-
// return merged;
|
|
2393
|
-
// }
|
|
2394
|
-
catchall(e) {
|
|
2395
|
-
return new j({
|
|
2396
|
-
...this._def,
|
|
2397
|
-
catchall: e
|
|
2398
|
-
});
|
|
2399
|
-
}
|
|
2400
|
-
pick(e) {
|
|
2401
|
-
const s = {};
|
|
2402
|
-
return b.objectKeys(e).forEach((r) => {
|
|
2403
|
-
e[r] && this.shape[r] && (s[r] = this.shape[r]);
|
|
2404
|
-
}), new j({
|
|
2405
|
-
...this._def,
|
|
2406
|
-
shape: () => s
|
|
2407
|
-
});
|
|
2408
|
-
}
|
|
2409
|
-
omit(e) {
|
|
2410
|
-
const s = {};
|
|
2411
|
-
return b.objectKeys(this.shape).forEach((r) => {
|
|
2412
|
-
e[r] || (s[r] = this.shape[r]);
|
|
2413
|
-
}), new j({
|
|
2414
|
-
...this._def,
|
|
2415
|
-
shape: () => s
|
|
2416
|
-
});
|
|
2417
|
-
}
|
|
2418
|
-
/**
|
|
2419
|
-
* @deprecated
|
|
2420
|
-
*/
|
|
2421
|
-
deepPartial() {
|
|
2422
|
-
return se(this);
|
|
2423
|
-
}
|
|
2424
|
-
partial(e) {
|
|
2425
|
-
const s = {};
|
|
2426
|
-
return b.objectKeys(this.shape).forEach((r) => {
|
|
2427
|
-
const n = this.shape[r];
|
|
2428
|
-
e && !e[r] ? s[r] = n : s[r] = n.optional();
|
|
2429
|
-
}), new j({
|
|
2430
|
-
...this._def,
|
|
2431
|
-
shape: () => s
|
|
2432
|
-
});
|
|
2433
|
-
}
|
|
2434
|
-
required(e) {
|
|
2435
|
-
const s = {};
|
|
2436
|
-
return b.objectKeys(this.shape).forEach((r) => {
|
|
2437
|
-
if (e && !e[r])
|
|
2438
|
-
s[r] = this.shape[r];
|
|
2439
|
-
else {
|
|
2440
|
-
let a = this.shape[r];
|
|
2441
|
-
for (; a instanceof D; )
|
|
2442
|
-
a = a._def.innerType;
|
|
2443
|
-
s[r] = a;
|
|
2444
|
-
}
|
|
2445
|
-
}), new j({
|
|
2446
|
-
...this._def,
|
|
2447
|
-
shape: () => s
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
keyof() {
|
|
2451
|
-
return Wt(b.objectKeys(this.shape));
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
j.create = (t, e) => new j({
|
|
2455
|
-
shape: () => t,
|
|
2456
|
-
unknownKeys: "strip",
|
|
2457
|
-
catchall: U.create(),
|
|
2458
|
-
typeName: v.ZodObject,
|
|
2459
|
-
...x(e)
|
|
2460
|
-
});
|
|
2461
|
-
j.strictCreate = (t, e) => new j({
|
|
2462
|
-
shape: () => t,
|
|
2463
|
-
unknownKeys: "strict",
|
|
2464
|
-
catchall: U.create(),
|
|
2465
|
-
typeName: v.ZodObject,
|
|
2466
|
-
...x(e)
|
|
2467
|
-
});
|
|
2468
|
-
j.lazycreate = (t, e) => new j({
|
|
2469
|
-
shape: t,
|
|
2470
|
-
unknownKeys: "strip",
|
|
2471
|
-
catchall: U.create(),
|
|
2472
|
-
typeName: v.ZodObject,
|
|
2473
|
-
...x(e)
|
|
2474
|
-
});
|
|
2475
|
-
class ve extends _ {
|
|
2476
|
-
_parse(e) {
|
|
2477
|
-
const { ctx: s } = this._processInputParams(e), r = this._def.options;
|
|
2478
|
-
function n(a) {
|
|
2479
|
-
for (const c of a)
|
|
2480
|
-
if (c.result.status === "valid")
|
|
2481
|
-
return c.result;
|
|
2482
|
-
for (const c of a)
|
|
2483
|
-
if (c.result.status === "dirty")
|
|
2484
|
-
return s.common.issues.push(...c.ctx.common.issues), c.result;
|
|
2485
|
-
const o = a.map((c) => new P(c.ctx.common.issues));
|
|
2486
|
-
return h(s, {
|
|
2487
|
-
code: l.invalid_union,
|
|
2488
|
-
unionErrors: o
|
|
2489
|
-
}), y;
|
|
2490
|
-
}
|
|
2491
|
-
if (s.common.async)
|
|
2492
|
-
return Promise.all(r.map(async (a) => {
|
|
2493
|
-
const o = {
|
|
2494
|
-
...s,
|
|
2495
|
-
common: {
|
|
2496
|
-
...s.common,
|
|
2497
|
-
issues: []
|
|
2498
|
-
},
|
|
2499
|
-
parent: null
|
|
2500
|
-
};
|
|
2501
|
-
return {
|
|
2502
|
-
result: await a._parseAsync({
|
|
2503
|
-
data: s.data,
|
|
2504
|
-
path: s.path,
|
|
2505
|
-
parent: o
|
|
2506
|
-
}),
|
|
2507
|
-
ctx: o
|
|
2508
|
-
};
|
|
2509
|
-
})).then(n);
|
|
2510
|
-
{
|
|
2511
|
-
let a;
|
|
2512
|
-
const o = [];
|
|
2513
|
-
for (const u of r) {
|
|
2514
|
-
const d = {
|
|
2515
|
-
...s,
|
|
2516
|
-
common: {
|
|
2517
|
-
...s.common,
|
|
2518
|
-
issues: []
|
|
2519
|
-
},
|
|
2520
|
-
parent: null
|
|
2521
|
-
}, m = u._parseSync({
|
|
2522
|
-
data: s.data,
|
|
2523
|
-
path: s.path,
|
|
2524
|
-
parent: d
|
|
2525
|
-
});
|
|
2526
|
-
if (m.status === "valid")
|
|
2527
|
-
return m;
|
|
2528
|
-
m.status === "dirty" && !a && (a = { result: m, ctx: d }), d.common.issues.length && o.push(d.common.issues);
|
|
2529
|
-
}
|
|
2530
|
-
if (a)
|
|
2531
|
-
return s.common.issues.push(...a.ctx.common.issues), a.result;
|
|
2532
|
-
const c = o.map((u) => new P(u));
|
|
2533
|
-
return h(s, {
|
|
2534
|
-
code: l.invalid_union,
|
|
2535
|
-
unionErrors: c
|
|
2536
|
-
}), y;
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
get options() {
|
|
2540
|
-
return this._def.options;
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
ve.create = (t, e) => new ve({
|
|
2544
|
-
options: t,
|
|
2545
|
-
typeName: v.ZodUnion,
|
|
2546
|
-
...x(e)
|
|
2547
|
-
});
|
|
2548
|
-
const F = (t) => t instanceof _e ? F(t.schema) : t instanceof I ? F(t.innerType()) : t instanceof be ? [t.value] : t instanceof K ? t.options : t instanceof we ? b.objectValues(t.enum) : t instanceof ke ? F(t._def.innerType) : t instanceof pe ? [void 0] : t instanceof ge ? [null] : t instanceof D ? [void 0, ...F(t.unwrap())] : t instanceof Y ? [null, ...F(t.unwrap())] : t instanceof nt || t instanceof Te ? F(t.unwrap()) : t instanceof je ? F(t._def.innerType) : [];
|
|
2549
|
-
class Be extends _ {
|
|
2550
|
-
_parse(e) {
|
|
2551
|
-
const { ctx: s } = this._processInputParams(e);
|
|
2552
|
-
if (s.parsedType !== f.object)
|
|
2553
|
-
return h(s, {
|
|
2554
|
-
code: l.invalid_type,
|
|
2555
|
-
expected: f.object,
|
|
2556
|
-
received: s.parsedType
|
|
2557
|
-
}), y;
|
|
2558
|
-
const r = this.discriminator, n = s.data[r], a = this.optionsMap.get(n);
|
|
2559
|
-
return a ? s.common.async ? a._parseAsync({
|
|
2560
|
-
data: s.data,
|
|
2561
|
-
path: s.path,
|
|
2562
|
-
parent: s
|
|
2563
|
-
}) : a._parseSync({
|
|
2564
|
-
data: s.data,
|
|
2565
|
-
path: s.path,
|
|
2566
|
-
parent: s
|
|
2567
|
-
}) : (h(s, {
|
|
2568
|
-
code: l.invalid_union_discriminator,
|
|
2569
|
-
options: Array.from(this.optionsMap.keys()),
|
|
2570
|
-
path: [r]
|
|
2571
|
-
}), y);
|
|
2572
|
-
}
|
|
2573
|
-
get discriminator() {
|
|
2574
|
-
return this._def.discriminator;
|
|
2575
|
-
}
|
|
2576
|
-
get options() {
|
|
2577
|
-
return this._def.options;
|
|
2578
|
-
}
|
|
2579
|
-
get optionsMap() {
|
|
2580
|
-
return this._def.optionsMap;
|
|
2581
|
-
}
|
|
2582
|
-
/**
|
|
2583
|
-
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
2584
|
-
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
2585
|
-
* have a different value for each object in the union.
|
|
2586
|
-
* @param discriminator the name of the discriminator property
|
|
2587
|
-
* @param types an array of object schemas
|
|
2588
|
-
* @param params
|
|
2589
|
-
*/
|
|
2590
|
-
static create(e, s, r) {
|
|
2591
|
-
const n = /* @__PURE__ */ new Map();
|
|
2592
|
-
for (const a of s) {
|
|
2593
|
-
const o = F(a.shape[e]);
|
|
2594
|
-
if (!o.length)
|
|
2595
|
-
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2596
|
-
for (const c of o) {
|
|
2597
|
-
if (n.has(c))
|
|
2598
|
-
throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);
|
|
2599
|
-
n.set(c, a);
|
|
2600
|
-
}
|
|
2601
|
-
}
|
|
2602
|
-
return new Be({
|
|
2603
|
-
typeName: v.ZodDiscriminatedUnion,
|
|
2604
|
-
discriminator: e,
|
|
2605
|
-
options: s,
|
|
2606
|
-
optionsMap: n,
|
|
2607
|
-
...x(r)
|
|
2608
|
-
});
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
function Ge(t, e) {
|
|
2612
|
-
const s = V(t), r = V(e);
|
|
2613
|
-
if (t === e)
|
|
2614
|
-
return { valid: !0, data: t };
|
|
2615
|
-
if (s === f.object && r === f.object) {
|
|
2616
|
-
const n = b.objectKeys(e), a = b.objectKeys(t).filter((c) => n.indexOf(c) !== -1), o = { ...t, ...e };
|
|
2617
|
-
for (const c of a) {
|
|
2618
|
-
const u = Ge(t[c], e[c]);
|
|
2619
|
-
if (!u.valid)
|
|
2620
|
-
return { valid: !1 };
|
|
2621
|
-
o[c] = u.data;
|
|
2622
|
-
}
|
|
2623
|
-
return { valid: !0, data: o };
|
|
2624
|
-
} else if (s === f.array && r === f.array) {
|
|
2625
|
-
if (t.length !== e.length)
|
|
2626
|
-
return { valid: !1 };
|
|
2627
|
-
const n = [];
|
|
2628
|
-
for (let a = 0; a < t.length; a++) {
|
|
2629
|
-
const o = t[a], c = e[a], u = Ge(o, c);
|
|
2630
|
-
if (!u.valid)
|
|
2631
|
-
return { valid: !1 };
|
|
2632
|
-
n.push(u.data);
|
|
2633
|
-
}
|
|
2634
|
-
return { valid: !0, data: n };
|
|
2635
|
-
} else return s === f.date && r === f.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2636
|
-
}
|
|
2637
|
-
class ye extends _ {
|
|
2638
|
-
_parse(e) {
|
|
2639
|
-
const { status: s, ctx: r } = this._processInputParams(e), n = (a, o) => {
|
|
2640
|
-
if (Ye(a) || Ye(o))
|
|
2641
|
-
return y;
|
|
2642
|
-
const c = Ge(a.value, o.value);
|
|
2643
|
-
return c.valid ? ((Je(a) || Je(o)) && s.dirty(), { status: s.value, value: c.data }) : (h(r, {
|
|
2644
|
-
code: l.invalid_intersection_types
|
|
2645
|
-
}), y);
|
|
2646
|
-
};
|
|
2647
|
-
return r.common.async ? Promise.all([
|
|
2648
|
-
this._def.left._parseAsync({
|
|
2649
|
-
data: r.data,
|
|
2650
|
-
path: r.path,
|
|
2651
|
-
parent: r
|
|
2652
|
-
}),
|
|
2653
|
-
this._def.right._parseAsync({
|
|
2654
|
-
data: r.data,
|
|
2655
|
-
path: r.path,
|
|
2656
|
-
parent: r
|
|
2657
|
-
})
|
|
2658
|
-
]).then(([a, o]) => n(a, o)) : n(this._def.left._parseSync({
|
|
2659
|
-
data: r.data,
|
|
2660
|
-
path: r.path,
|
|
2661
|
-
parent: r
|
|
2662
|
-
}), this._def.right._parseSync({
|
|
2663
|
-
data: r.data,
|
|
2664
|
-
path: r.path,
|
|
2665
|
-
parent: r
|
|
2666
|
-
}));
|
|
2667
|
-
}
|
|
2668
|
-
}
|
|
2669
|
-
ye.create = (t, e, s) => new ye({
|
|
2670
|
-
left: t,
|
|
2671
|
-
right: e,
|
|
2672
|
-
typeName: v.ZodIntersection,
|
|
2673
|
-
...x(s)
|
|
2674
|
-
});
|
|
2675
|
-
class z extends _ {
|
|
2676
|
-
_parse(e) {
|
|
2677
|
-
const { status: s, ctx: r } = this._processInputParams(e);
|
|
2678
|
-
if (r.parsedType !== f.array)
|
|
2679
|
-
return h(r, {
|
|
2680
|
-
code: l.invalid_type,
|
|
2681
|
-
expected: f.array,
|
|
2682
|
-
received: r.parsedType
|
|
2683
|
-
}), y;
|
|
2684
|
-
if (r.data.length < this._def.items.length)
|
|
2685
|
-
return h(r, {
|
|
2686
|
-
code: l.too_small,
|
|
2687
|
-
minimum: this._def.items.length,
|
|
2688
|
-
inclusive: !0,
|
|
2689
|
-
exact: !1,
|
|
2690
|
-
type: "array"
|
|
2691
|
-
}), y;
|
|
2692
|
-
!this._def.rest && r.data.length > this._def.items.length && (h(r, {
|
|
2693
|
-
code: l.too_big,
|
|
2694
|
-
maximum: this._def.items.length,
|
|
2695
|
-
inclusive: !0,
|
|
2696
|
-
exact: !1,
|
|
2697
|
-
type: "array"
|
|
2698
|
-
}), s.dirty());
|
|
2699
|
-
const a = [...r.data].map((o, c) => {
|
|
2700
|
-
const u = this._def.items[c] || this._def.rest;
|
|
2701
|
-
return u ? u._parse(new $(r, o, r.path, c)) : null;
|
|
2702
|
-
}).filter((o) => !!o);
|
|
2703
|
-
return r.common.async ? Promise.all(a).then((o) => C.mergeArray(s, o)) : C.mergeArray(s, a);
|
|
2704
|
-
}
|
|
2705
|
-
get items() {
|
|
2706
|
-
return this._def.items;
|
|
2707
|
-
}
|
|
2708
|
-
rest(e) {
|
|
2709
|
-
return new z({
|
|
2710
|
-
...this._def,
|
|
2711
|
-
rest: e
|
|
2712
|
-
});
|
|
2713
|
-
}
|
|
2714
|
-
}
|
|
2715
|
-
z.create = (t, e) => {
|
|
2716
|
-
if (!Array.isArray(t))
|
|
2717
|
-
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2718
|
-
return new z({
|
|
2719
|
-
items: t,
|
|
2720
|
-
typeName: v.ZodTuple,
|
|
2721
|
-
rest: null,
|
|
2722
|
-
...x(e)
|
|
2723
|
-
});
|
|
2724
|
-
};
|
|
2725
|
-
class xe extends _ {
|
|
2726
|
-
get keySchema() {
|
|
2727
|
-
return this._def.keyType;
|
|
2728
|
-
}
|
|
2729
|
-
get valueSchema() {
|
|
2730
|
-
return this._def.valueType;
|
|
2731
|
-
}
|
|
2732
|
-
_parse(e) {
|
|
2733
|
-
const { status: s, ctx: r } = this._processInputParams(e);
|
|
2734
|
-
if (r.parsedType !== f.object)
|
|
2735
|
-
return h(r, {
|
|
2736
|
-
code: l.invalid_type,
|
|
2737
|
-
expected: f.object,
|
|
2738
|
-
received: r.parsedType
|
|
2739
|
-
}), y;
|
|
2740
|
-
const n = [], a = this._def.keyType, o = this._def.valueType;
|
|
2741
|
-
for (const c in r.data)
|
|
2742
|
-
n.push({
|
|
2743
|
-
key: a._parse(new $(r, c, r.path, c)),
|
|
2744
|
-
value: o._parse(new $(r, r.data[c], r.path, c)),
|
|
2745
|
-
alwaysSet: c in r.data
|
|
2746
|
-
});
|
|
2747
|
-
return r.common.async ? C.mergeObjectAsync(s, n) : C.mergeObjectSync(s, n);
|
|
2748
|
-
}
|
|
2749
|
-
get element() {
|
|
2750
|
-
return this._def.valueType;
|
|
2751
|
-
}
|
|
2752
|
-
static create(e, s, r) {
|
|
2753
|
-
return s instanceof _ ? new xe({
|
|
2754
|
-
keyType: e,
|
|
2755
|
-
valueType: s,
|
|
2756
|
-
typeName: v.ZodRecord,
|
|
2757
|
-
...x(r)
|
|
2758
|
-
}) : new xe({
|
|
2759
|
-
keyType: Z.create(),
|
|
2760
|
-
valueType: e,
|
|
2761
|
-
typeName: v.ZodRecord,
|
|
2762
|
-
...x(s)
|
|
2763
|
-
});
|
|
2764
|
-
}
|
|
2765
|
-
}
|
|
2766
|
-
class De extends _ {
|
|
2767
|
-
get keySchema() {
|
|
2768
|
-
return this._def.keyType;
|
|
2769
|
-
}
|
|
2770
|
-
get valueSchema() {
|
|
2771
|
-
return this._def.valueType;
|
|
2772
|
-
}
|
|
2773
|
-
_parse(e) {
|
|
2774
|
-
const { status: s, ctx: r } = this._processInputParams(e);
|
|
2775
|
-
if (r.parsedType !== f.map)
|
|
2776
|
-
return h(r, {
|
|
2777
|
-
code: l.invalid_type,
|
|
2778
|
-
expected: f.map,
|
|
2779
|
-
received: r.parsedType
|
|
2780
|
-
}), y;
|
|
2781
|
-
const n = this._def.keyType, a = this._def.valueType, o = [...r.data.entries()].map(([c, u], d) => ({
|
|
2782
|
-
key: n._parse(new $(r, c, r.path, [d, "key"])),
|
|
2783
|
-
value: a._parse(new $(r, u, r.path, [d, "value"]))
|
|
2784
|
-
}));
|
|
2785
|
-
if (r.common.async) {
|
|
2786
|
-
const c = /* @__PURE__ */ new Map();
|
|
2787
|
-
return Promise.resolve().then(async () => {
|
|
2788
|
-
for (const u of o) {
|
|
2789
|
-
const d = await u.key, m = await u.value;
|
|
2790
|
-
if (d.status === "aborted" || m.status === "aborted")
|
|
2791
|
-
return y;
|
|
2792
|
-
(d.status === "dirty" || m.status === "dirty") && s.dirty(), c.set(d.value, m.value);
|
|
2793
|
-
}
|
|
2794
|
-
return { status: s.value, value: c };
|
|
2795
|
-
});
|
|
2796
|
-
} else {
|
|
2797
|
-
const c = /* @__PURE__ */ new Map();
|
|
2798
|
-
for (const u of o) {
|
|
2799
|
-
const d = u.key, m = u.value;
|
|
2800
|
-
if (d.status === "aborted" || m.status === "aborted")
|
|
2801
|
-
return y;
|
|
2802
|
-
(d.status === "dirty" || m.status === "dirty") && s.dirty(), c.set(d.value, m.value);
|
|
2803
|
-
}
|
|
2804
|
-
return { status: s.value, value: c };
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
}
|
|
2808
|
-
De.create = (t, e, s) => new De({
|
|
2809
|
-
valueType: e,
|
|
2810
|
-
keyType: t,
|
|
2811
|
-
typeName: v.ZodMap,
|
|
2812
|
-
...x(s)
|
|
2813
|
-
});
|
|
2814
|
-
class ee extends _ {
|
|
2815
|
-
_parse(e) {
|
|
2816
|
-
const { status: s, ctx: r } = this._processInputParams(e);
|
|
2817
|
-
if (r.parsedType !== f.set)
|
|
2818
|
-
return h(r, {
|
|
2819
|
-
code: l.invalid_type,
|
|
2820
|
-
expected: f.set,
|
|
2821
|
-
received: r.parsedType
|
|
2822
|
-
}), y;
|
|
2823
|
-
const n = this._def;
|
|
2824
|
-
n.minSize !== null && r.data.size < n.minSize.value && (h(r, {
|
|
2825
|
-
code: l.too_small,
|
|
2826
|
-
minimum: n.minSize.value,
|
|
2827
|
-
type: "set",
|
|
2828
|
-
inclusive: !0,
|
|
2829
|
-
exact: !1,
|
|
2830
|
-
message: n.minSize.message
|
|
2831
|
-
}), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (h(r, {
|
|
2832
|
-
code: l.too_big,
|
|
2833
|
-
maximum: n.maxSize.value,
|
|
2834
|
-
type: "set",
|
|
2835
|
-
inclusive: !0,
|
|
2836
|
-
exact: !1,
|
|
2837
|
-
message: n.maxSize.message
|
|
2838
|
-
}), s.dirty());
|
|
2839
|
-
const a = this._def.valueType;
|
|
2840
|
-
function o(u) {
|
|
2841
|
-
const d = /* @__PURE__ */ new Set();
|
|
2842
|
-
for (const m of u) {
|
|
2843
|
-
if (m.status === "aborted")
|
|
2844
|
-
return y;
|
|
2845
|
-
m.status === "dirty" && s.dirty(), d.add(m.value);
|
|
2846
|
-
}
|
|
2847
|
-
return { status: s.value, value: d };
|
|
2848
|
-
}
|
|
2849
|
-
const c = [...r.data.values()].map((u, d) => a._parse(new $(r, u, r.path, d)));
|
|
2850
|
-
return r.common.async ? Promise.all(c).then((u) => o(u)) : o(c);
|
|
2851
|
-
}
|
|
2852
|
-
min(e, s) {
|
|
2853
|
-
return new ee({
|
|
2854
|
-
...this._def,
|
|
2855
|
-
minSize: { value: e, message: p.toString(s) }
|
|
2856
|
-
});
|
|
2857
|
-
}
|
|
2858
|
-
max(e, s) {
|
|
2859
|
-
return new ee({
|
|
2860
|
-
...this._def,
|
|
2861
|
-
maxSize: { value: e, message: p.toString(s) }
|
|
2862
|
-
});
|
|
2863
|
-
}
|
|
2864
|
-
size(e, s) {
|
|
2865
|
-
return this.min(e, s).max(e, s);
|
|
2866
|
-
}
|
|
2867
|
-
nonempty(e) {
|
|
2868
|
-
return this.min(1, e);
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
|
-
ee.create = (t, e) => new ee({
|
|
2872
|
-
valueType: t,
|
|
2873
|
-
minSize: null,
|
|
2874
|
-
maxSize: null,
|
|
2875
|
-
typeName: v.ZodSet,
|
|
2876
|
-
...x(e)
|
|
2877
|
-
});
|
|
2878
|
-
class ae extends _ {
|
|
2879
|
-
constructor() {
|
|
2880
|
-
super(...arguments), this.validate = this.implement;
|
|
2881
|
-
}
|
|
2882
|
-
_parse(e) {
|
|
2883
|
-
const { ctx: s } = this._processInputParams(e);
|
|
2884
|
-
if (s.parsedType !== f.function)
|
|
2885
|
-
return h(s, {
|
|
2886
|
-
code: l.invalid_type,
|
|
2887
|
-
expected: f.function,
|
|
2888
|
-
received: s.parsedType
|
|
2889
|
-
}), y;
|
|
2890
|
-
function r(c, u) {
|
|
2891
|
-
return Ze({
|
|
2892
|
-
data: c,
|
|
2893
|
-
path: s.path,
|
|
2894
|
-
errorMaps: [
|
|
2895
|
-
s.common.contextualErrorMap,
|
|
2896
|
-
s.schemaErrorMap,
|
|
2897
|
-
Pe(),
|
|
2898
|
-
ie
|
|
2899
|
-
].filter((d) => !!d),
|
|
2900
|
-
issueData: {
|
|
2901
|
-
code: l.invalid_arguments,
|
|
2902
|
-
argumentsError: u
|
|
2903
|
-
}
|
|
2904
|
-
});
|
|
2905
|
-
}
|
|
2906
|
-
function n(c, u) {
|
|
2907
|
-
return Ze({
|
|
2908
|
-
data: c,
|
|
2909
|
-
path: s.path,
|
|
2910
|
-
errorMaps: [
|
|
2911
|
-
s.common.contextualErrorMap,
|
|
2912
|
-
s.schemaErrorMap,
|
|
2913
|
-
Pe(),
|
|
2914
|
-
ie
|
|
2915
|
-
].filter((d) => !!d),
|
|
2916
|
-
issueData: {
|
|
2917
|
-
code: l.invalid_return_type,
|
|
2918
|
-
returnTypeError: u
|
|
2919
|
-
}
|
|
2920
|
-
});
|
|
2921
|
-
}
|
|
2922
|
-
const a = { errorMap: s.common.contextualErrorMap }, o = s.data;
|
|
2923
|
-
if (this._def.returns instanceof ce) {
|
|
2924
|
-
const c = this;
|
|
2925
|
-
return S(async function(...u) {
|
|
2926
|
-
const d = new P([]), m = await c._def.args.parseAsync(u, a).catch((g) => {
|
|
2927
|
-
throw d.addIssue(r(u, g)), d;
|
|
2928
|
-
}), k = await Reflect.apply(o, this, m);
|
|
2929
|
-
return await c._def.returns._def.type.parseAsync(k, a).catch((g) => {
|
|
2930
|
-
throw d.addIssue(n(k, g)), d;
|
|
2931
|
-
});
|
|
2932
|
-
});
|
|
2933
|
-
} else {
|
|
2934
|
-
const c = this;
|
|
2935
|
-
return S(function(...u) {
|
|
2936
|
-
const d = c._def.args.safeParse(u, a);
|
|
2937
|
-
if (!d.success)
|
|
2938
|
-
throw new P([r(u, d.error)]);
|
|
2939
|
-
const m = Reflect.apply(o, this, d.data), k = c._def.returns.safeParse(m, a);
|
|
2940
|
-
if (!k.success)
|
|
2941
|
-
throw new P([n(m, k.error)]);
|
|
2942
|
-
return k.data;
|
|
2943
|
-
});
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
parameters() {
|
|
2947
|
-
return this._def.args;
|
|
2948
|
-
}
|
|
2949
|
-
returnType() {
|
|
2950
|
-
return this._def.returns;
|
|
2951
|
-
}
|
|
2952
|
-
args(...e) {
|
|
2953
|
-
return new ae({
|
|
2954
|
-
...this._def,
|
|
2955
|
-
args: z.create(e).rest(J.create())
|
|
2956
|
-
});
|
|
2957
|
-
}
|
|
2958
|
-
returns(e) {
|
|
2959
|
-
return new ae({
|
|
2960
|
-
...this._def,
|
|
2961
|
-
returns: e
|
|
2962
|
-
});
|
|
2963
|
-
}
|
|
2964
|
-
implement(e) {
|
|
2965
|
-
return this.parse(e);
|
|
2966
|
-
}
|
|
2967
|
-
strictImplement(e) {
|
|
2968
|
-
return this.parse(e);
|
|
2969
|
-
}
|
|
2970
|
-
static create(e, s, r) {
|
|
2971
|
-
return new ae({
|
|
2972
|
-
args: e || z.create([]).rest(J.create()),
|
|
2973
|
-
returns: s || J.create(),
|
|
2974
|
-
typeName: v.ZodFunction,
|
|
2975
|
-
...x(r)
|
|
2976
|
-
});
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
class _e extends _ {
|
|
2980
|
-
get schema() {
|
|
2981
|
-
return this._def.getter();
|
|
2982
|
-
}
|
|
2983
|
-
_parse(e) {
|
|
2984
|
-
const { ctx: s } = this._processInputParams(e);
|
|
2985
|
-
return this._def.getter()._parse({ data: s.data, path: s.path, parent: s });
|
|
2986
|
-
}
|
|
2987
|
-
}
|
|
2988
|
-
_e.create = (t, e) => new _e({
|
|
2989
|
-
getter: t,
|
|
2990
|
-
typeName: v.ZodLazy,
|
|
2991
|
-
...x(e)
|
|
2992
|
-
});
|
|
2993
|
-
class be extends _ {
|
|
2994
|
-
_parse(e) {
|
|
2995
|
-
if (e.data !== this._def.value) {
|
|
2996
|
-
const s = this._getOrReturnCtx(e);
|
|
2997
|
-
return h(s, {
|
|
2998
|
-
received: s.data,
|
|
2999
|
-
code: l.invalid_literal,
|
|
3000
|
-
expected: this._def.value
|
|
3001
|
-
}), y;
|
|
3002
|
-
}
|
|
3003
|
-
return { status: "valid", value: e.data };
|
|
3004
|
-
}
|
|
3005
|
-
get value() {
|
|
3006
|
-
return this._def.value;
|
|
3007
|
-
}
|
|
3008
|
-
}
|
|
3009
|
-
be.create = (t, e) => new be({
|
|
3010
|
-
value: t,
|
|
3011
|
-
typeName: v.ZodLiteral,
|
|
3012
|
-
...x(e)
|
|
3013
|
-
});
|
|
3014
|
-
function Wt(t, e) {
|
|
3015
|
-
return new K({
|
|
3016
|
-
values: t,
|
|
3017
|
-
typeName: v.ZodEnum,
|
|
3018
|
-
...x(e)
|
|
3019
|
-
});
|
|
3020
|
-
}
|
|
3021
|
-
class K extends _ {
|
|
3022
|
-
constructor() {
|
|
3023
|
-
super(...arguments), le.set(this, void 0);
|
|
3024
|
-
}
|
|
3025
|
-
_parse(e) {
|
|
3026
|
-
if (typeof e.data != "string") {
|
|
3027
|
-
const s = this._getOrReturnCtx(e), r = this._def.values;
|
|
3028
|
-
return h(s, {
|
|
3029
|
-
expected: b.joinValues(r),
|
|
3030
|
-
received: s.parsedType,
|
|
3031
|
-
code: l.invalid_type
|
|
3032
|
-
}), y;
|
|
3033
|
-
}
|
|
3034
|
-
if (Re(this, le) || Vt(this, le, new Set(this._def.values)), !Re(this, le).has(e.data)) {
|
|
3035
|
-
const s = this._getOrReturnCtx(e), r = this._def.values;
|
|
3036
|
-
return h(s, {
|
|
3037
|
-
received: s.data,
|
|
3038
|
-
code: l.invalid_enum_value,
|
|
3039
|
-
options: r
|
|
3040
|
-
}), y;
|
|
3041
|
-
}
|
|
3042
|
-
return S(e.data);
|
|
3043
|
-
}
|
|
3044
|
-
get options() {
|
|
3045
|
-
return this._def.values;
|
|
3046
|
-
}
|
|
3047
|
-
get enum() {
|
|
3048
|
-
const e = {};
|
|
3049
|
-
for (const s of this._def.values)
|
|
3050
|
-
e[s] = s;
|
|
3051
|
-
return e;
|
|
3052
|
-
}
|
|
3053
|
-
get Values() {
|
|
3054
|
-
const e = {};
|
|
3055
|
-
for (const s of this._def.values)
|
|
3056
|
-
e[s] = s;
|
|
3057
|
-
return e;
|
|
3058
|
-
}
|
|
3059
|
-
get Enum() {
|
|
3060
|
-
const e = {};
|
|
3061
|
-
for (const s of this._def.values)
|
|
3062
|
-
e[s] = s;
|
|
3063
|
-
return e;
|
|
3064
|
-
}
|
|
3065
|
-
extract(e, s = this._def) {
|
|
3066
|
-
return K.create(e, {
|
|
3067
|
-
...this._def,
|
|
3068
|
-
...s
|
|
3069
|
-
});
|
|
3070
|
-
}
|
|
3071
|
-
exclude(e, s = this._def) {
|
|
3072
|
-
return K.create(this.options.filter((r) => !e.includes(r)), {
|
|
3073
|
-
...this._def,
|
|
3074
|
-
...s
|
|
3075
|
-
});
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
le = /* @__PURE__ */ new WeakMap();
|
|
3079
|
-
K.create = Wt;
|
|
3080
|
-
class we extends _ {
|
|
3081
|
-
constructor() {
|
|
3082
|
-
super(...arguments), ue.set(this, void 0);
|
|
3083
|
-
}
|
|
3084
|
-
_parse(e) {
|
|
3085
|
-
const s = b.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
|
|
3086
|
-
if (r.parsedType !== f.string && r.parsedType !== f.number) {
|
|
3087
|
-
const n = b.objectValues(s);
|
|
3088
|
-
return h(r, {
|
|
3089
|
-
expected: b.joinValues(n),
|
|
3090
|
-
received: r.parsedType,
|
|
3091
|
-
code: l.invalid_type
|
|
3092
|
-
}), y;
|
|
3093
|
-
}
|
|
3094
|
-
if (Re(this, ue) || Vt(this, ue, new Set(b.getValidEnumValues(this._def.values))), !Re(this, ue).has(e.data)) {
|
|
3095
|
-
const n = b.objectValues(s);
|
|
3096
|
-
return h(r, {
|
|
3097
|
-
received: r.data,
|
|
3098
|
-
code: l.invalid_enum_value,
|
|
3099
|
-
options: n
|
|
3100
|
-
}), y;
|
|
3101
|
-
}
|
|
3102
|
-
return S(e.data);
|
|
3103
|
-
}
|
|
3104
|
-
get enum() {
|
|
3105
|
-
return this._def.values;
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
ue = /* @__PURE__ */ new WeakMap();
|
|
3109
|
-
we.create = (t, e) => new we({
|
|
3110
|
-
values: t,
|
|
3111
|
-
typeName: v.ZodNativeEnum,
|
|
3112
|
-
...x(e)
|
|
3113
|
-
});
|
|
3114
|
-
class ce extends _ {
|
|
3115
|
-
unwrap() {
|
|
3116
|
-
return this._def.type;
|
|
3117
|
-
}
|
|
3118
|
-
_parse(e) {
|
|
3119
|
-
const { ctx: s } = this._processInputParams(e);
|
|
3120
|
-
if (s.parsedType !== f.promise && s.common.async === !1)
|
|
3121
|
-
return h(s, {
|
|
3122
|
-
code: l.invalid_type,
|
|
3123
|
-
expected: f.promise,
|
|
3124
|
-
received: s.parsedType
|
|
3125
|
-
}), y;
|
|
3126
|
-
const r = s.parsedType === f.promise ? s.data : Promise.resolve(s.data);
|
|
3127
|
-
return S(r.then((n) => this._def.type.parseAsync(n, {
|
|
3128
|
-
path: s.path,
|
|
3129
|
-
errorMap: s.common.contextualErrorMap
|
|
3130
|
-
})));
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
ce.create = (t, e) => new ce({
|
|
3134
|
-
type: t,
|
|
3135
|
-
typeName: v.ZodPromise,
|
|
3136
|
-
...x(e)
|
|
3137
|
-
});
|
|
3138
|
-
class I extends _ {
|
|
3139
|
-
innerType() {
|
|
3140
|
-
return this._def.schema;
|
|
3141
|
-
}
|
|
3142
|
-
sourceType() {
|
|
3143
|
-
return this._def.schema._def.typeName === v.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3144
|
-
}
|
|
3145
|
-
_parse(e) {
|
|
3146
|
-
const { status: s, ctx: r } = this._processInputParams(e), n = this._def.effect || null, a = {
|
|
3147
|
-
addIssue: (o) => {
|
|
3148
|
-
h(r, o), o.fatal ? s.abort() : s.dirty();
|
|
3149
|
-
},
|
|
3150
|
-
get path() {
|
|
3151
|
-
return r.path;
|
|
3152
|
-
}
|
|
3153
|
-
};
|
|
3154
|
-
if (a.addIssue = a.addIssue.bind(a), n.type === "preprocess") {
|
|
3155
|
-
const o = n.transform(r.data, a);
|
|
3156
|
-
if (r.common.async)
|
|
3157
|
-
return Promise.resolve(o).then(async (c) => {
|
|
3158
|
-
if (s.value === "aborted")
|
|
3159
|
-
return y;
|
|
3160
|
-
const u = await this._def.schema._parseAsync({
|
|
3161
|
-
data: c,
|
|
3162
|
-
path: r.path,
|
|
3163
|
-
parent: r
|
|
3164
|
-
});
|
|
3165
|
-
return u.status === "aborted" ? y : u.status === "dirty" || s.value === "dirty" ? re(u.value) : u;
|
|
3166
|
-
});
|
|
3167
|
-
{
|
|
3168
|
-
if (s.value === "aborted")
|
|
3169
|
-
return y;
|
|
3170
|
-
const c = this._def.schema._parseSync({
|
|
3171
|
-
data: o,
|
|
3172
|
-
path: r.path,
|
|
3173
|
-
parent: r
|
|
3174
|
-
});
|
|
3175
|
-
return c.status === "aborted" ? y : c.status === "dirty" || s.value === "dirty" ? re(c.value) : c;
|
|
3176
|
-
}
|
|
3177
|
-
}
|
|
3178
|
-
if (n.type === "refinement") {
|
|
3179
|
-
const o = (c) => {
|
|
3180
|
-
const u = n.refinement(c, a);
|
|
3181
|
-
if (r.common.async)
|
|
3182
|
-
return Promise.resolve(u);
|
|
3183
|
-
if (u instanceof Promise)
|
|
3184
|
-
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3185
|
-
return c;
|
|
3186
|
-
};
|
|
3187
|
-
if (r.common.async === !1) {
|
|
3188
|
-
const c = this._def.schema._parseSync({
|
|
3189
|
-
data: r.data,
|
|
3190
|
-
path: r.path,
|
|
3191
|
-
parent: r
|
|
3192
|
-
});
|
|
3193
|
-
return c.status === "aborted" ? y : (c.status === "dirty" && s.dirty(), o(c.value), { status: s.value, value: c.value });
|
|
3194
|
-
} else
|
|
3195
|
-
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((c) => c.status === "aborted" ? y : (c.status === "dirty" && s.dirty(), o(c.value).then(() => ({ status: s.value, value: c.value }))));
|
|
3196
|
-
}
|
|
3197
|
-
if (n.type === "transform")
|
|
3198
|
-
if (r.common.async === !1) {
|
|
3199
|
-
const o = this._def.schema._parseSync({
|
|
3200
|
-
data: r.data,
|
|
3201
|
-
path: r.path,
|
|
3202
|
-
parent: r
|
|
3203
|
-
});
|
|
3204
|
-
if (!G(o))
|
|
3205
|
-
return o;
|
|
3206
|
-
const c = n.transform(o.value, a);
|
|
3207
|
-
if (c instanceof Promise)
|
|
3208
|
-
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3209
|
-
return { status: s.value, value: c };
|
|
3210
|
-
} else
|
|
3211
|
-
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => G(o) ? Promise.resolve(n.transform(o.value, a)).then((c) => ({ status: s.value, value: c })) : o);
|
|
3212
|
-
b.assertNever(n);
|
|
3213
|
-
}
|
|
3214
|
-
}
|
|
3215
|
-
I.create = (t, e, s) => new I({
|
|
3216
|
-
schema: t,
|
|
3217
|
-
typeName: v.ZodEffects,
|
|
3218
|
-
effect: e,
|
|
3219
|
-
...x(s)
|
|
3220
|
-
});
|
|
3221
|
-
I.createWithPreprocess = (t, e, s) => new I({
|
|
3222
|
-
schema: e,
|
|
3223
|
-
effect: { type: "preprocess", transform: t },
|
|
3224
|
-
typeName: v.ZodEffects,
|
|
3225
|
-
...x(s)
|
|
3226
|
-
});
|
|
3227
|
-
class D extends _ {
|
|
3228
|
-
_parse(e) {
|
|
3229
|
-
return this._getType(e) === f.undefined ? S(void 0) : this._def.innerType._parse(e);
|
|
3230
|
-
}
|
|
3231
|
-
unwrap() {
|
|
3232
|
-
return this._def.innerType;
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
D.create = (t, e) => new D({
|
|
3236
|
-
innerType: t,
|
|
3237
|
-
typeName: v.ZodOptional,
|
|
3238
|
-
...x(e)
|
|
3239
|
-
});
|
|
3240
|
-
class Y extends _ {
|
|
3241
|
-
_parse(e) {
|
|
3242
|
-
return this._getType(e) === f.null ? S(null) : this._def.innerType._parse(e);
|
|
3243
|
-
}
|
|
3244
|
-
unwrap() {
|
|
3245
|
-
return this._def.innerType;
|
|
3246
|
-
}
|
|
3247
|
-
}
|
|
3248
|
-
Y.create = (t, e) => new Y({
|
|
3249
|
-
innerType: t,
|
|
3250
|
-
typeName: v.ZodNullable,
|
|
3251
|
-
...x(e)
|
|
3252
|
-
});
|
|
3253
|
-
class ke extends _ {
|
|
3254
|
-
_parse(e) {
|
|
3255
|
-
const { ctx: s } = this._processInputParams(e);
|
|
3256
|
-
let r = s.data;
|
|
3257
|
-
return s.parsedType === f.undefined && (r = this._def.defaultValue()), this._def.innerType._parse({
|
|
3258
|
-
data: r,
|
|
3259
|
-
path: s.path,
|
|
3260
|
-
parent: s
|
|
3261
|
-
});
|
|
3262
|
-
}
|
|
3263
|
-
removeDefault() {
|
|
3264
|
-
return this._def.innerType;
|
|
3265
|
-
}
|
|
3266
|
-
}
|
|
3267
|
-
ke.create = (t, e) => new ke({
|
|
3268
|
-
innerType: t,
|
|
3269
|
-
typeName: v.ZodDefault,
|
|
3270
|
-
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
3271
|
-
...x(e)
|
|
3272
|
-
});
|
|
3273
|
-
class je extends _ {
|
|
3274
|
-
_parse(e) {
|
|
3275
|
-
const { ctx: s } = this._processInputParams(e), r = {
|
|
3276
|
-
...s,
|
|
3277
|
-
common: {
|
|
3278
|
-
...s.common,
|
|
3279
|
-
issues: []
|
|
3280
|
-
}
|
|
3281
|
-
}, n = this._def.innerType._parse({
|
|
3282
|
-
data: r.data,
|
|
3283
|
-
path: r.path,
|
|
3284
|
-
parent: {
|
|
3285
|
-
...r
|
|
3286
|
-
}
|
|
3287
|
-
});
|
|
3288
|
-
return fe(n) ? n.then((a) => ({
|
|
3289
|
-
status: "valid",
|
|
3290
|
-
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
3291
|
-
get error() {
|
|
3292
|
-
return new P(r.common.issues);
|
|
3293
|
-
},
|
|
3294
|
-
input: r.data
|
|
3295
|
-
})
|
|
3296
|
-
})) : {
|
|
3297
|
-
status: "valid",
|
|
3298
|
-
value: n.status === "valid" ? n.value : this._def.catchValue({
|
|
3299
|
-
get error() {
|
|
3300
|
-
return new P(r.common.issues);
|
|
3301
|
-
},
|
|
3302
|
-
input: r.data
|
|
3303
|
-
})
|
|
3304
|
-
};
|
|
3305
|
-
}
|
|
3306
|
-
removeCatch() {
|
|
3307
|
-
return this._def.innerType;
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
je.create = (t, e) => new je({
|
|
3311
|
-
innerType: t,
|
|
3312
|
-
typeName: v.ZodCatch,
|
|
3313
|
-
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3314
|
-
...x(e)
|
|
3315
|
-
});
|
|
3316
|
-
class $e extends _ {
|
|
3317
|
-
_parse(e) {
|
|
3318
|
-
if (this._getType(e) !== f.nan) {
|
|
3319
|
-
const r = this._getOrReturnCtx(e);
|
|
3320
|
-
return h(r, {
|
|
3321
|
-
code: l.invalid_type,
|
|
3322
|
-
expected: f.nan,
|
|
3323
|
-
received: r.parsedType
|
|
3324
|
-
}), y;
|
|
3325
|
-
}
|
|
3326
|
-
return { status: "valid", value: e.data };
|
|
3327
|
-
}
|
|
3328
|
-
}
|
|
3329
|
-
$e.create = (t) => new $e({
|
|
3330
|
-
typeName: v.ZodNaN,
|
|
3331
|
-
...x(t)
|
|
3332
|
-
});
|
|
3333
|
-
const fn = Symbol("zod_brand");
|
|
3334
|
-
class nt extends _ {
|
|
3335
|
-
_parse(e) {
|
|
3336
|
-
const { ctx: s } = this._processInputParams(e), r = s.data;
|
|
3337
|
-
return this._def.type._parse({
|
|
3338
|
-
data: r,
|
|
3339
|
-
path: s.path,
|
|
3340
|
-
parent: s
|
|
3341
|
-
});
|
|
3342
|
-
}
|
|
3343
|
-
unwrap() {
|
|
3344
|
-
return this._def.type;
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
class Ne extends _ {
|
|
3348
|
-
_parse(e) {
|
|
3349
|
-
const { status: s, ctx: r } = this._processInputParams(e);
|
|
3350
|
-
if (r.common.async)
|
|
3351
|
-
return (async () => {
|
|
3352
|
-
const a = await this._def.in._parseAsync({
|
|
3353
|
-
data: r.data,
|
|
3354
|
-
path: r.path,
|
|
3355
|
-
parent: r
|
|
3356
|
-
});
|
|
3357
|
-
return a.status === "aborted" ? y : a.status === "dirty" ? (s.dirty(), re(a.value)) : this._def.out._parseAsync({
|
|
3358
|
-
data: a.value,
|
|
3359
|
-
path: r.path,
|
|
3360
|
-
parent: r
|
|
3361
|
-
});
|
|
3362
|
-
})();
|
|
3363
|
-
{
|
|
3364
|
-
const n = this._def.in._parseSync({
|
|
3365
|
-
data: r.data,
|
|
3366
|
-
path: r.path,
|
|
3367
|
-
parent: r
|
|
3368
|
-
});
|
|
3369
|
-
return n.status === "aborted" ? y : n.status === "dirty" ? (s.dirty(), {
|
|
3370
|
-
status: "dirty",
|
|
3371
|
-
value: n.value
|
|
3372
|
-
}) : this._def.out._parseSync({
|
|
3373
|
-
data: n.value,
|
|
3374
|
-
path: r.path,
|
|
3375
|
-
parent: r
|
|
3376
|
-
});
|
|
3377
|
-
}
|
|
3378
|
-
}
|
|
3379
|
-
static create(e, s) {
|
|
3380
|
-
return new Ne({
|
|
3381
|
-
in: e,
|
|
3382
|
-
out: s,
|
|
3383
|
-
typeName: v.ZodPipeline
|
|
3384
|
-
});
|
|
3385
|
-
}
|
|
3386
|
-
}
|
|
3387
|
-
class Te extends _ {
|
|
3388
|
-
_parse(e) {
|
|
3389
|
-
const s = this._def.innerType._parse(e), r = (n) => (G(n) && (n.value = Object.freeze(n.value)), n);
|
|
3390
|
-
return fe(s) ? s.then((n) => r(n)) : r(s);
|
|
3391
|
-
}
|
|
3392
|
-
unwrap() {
|
|
3393
|
-
return this._def.innerType;
|
|
3394
|
-
}
|
|
3395
|
-
}
|
|
3396
|
-
Te.create = (t, e) => new Te({
|
|
3397
|
-
innerType: t,
|
|
3398
|
-
typeName: v.ZodReadonly,
|
|
3399
|
-
...x(e)
|
|
3400
|
-
});
|
|
3401
|
-
function bt(t, e) {
|
|
3402
|
-
const s = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
3403
|
-
return typeof s == "string" ? { message: s } : s;
|
|
3404
|
-
}
|
|
3405
|
-
function Kt(t, e = {}, s) {
|
|
3406
|
-
return t ? oe.create().superRefine((r, n) => {
|
|
3407
|
-
var a, o;
|
|
3408
|
-
const c = t(r);
|
|
3409
|
-
if (c instanceof Promise)
|
|
3410
|
-
return c.then((u) => {
|
|
3411
|
-
var d, m;
|
|
3412
|
-
if (!u) {
|
|
3413
|
-
const k = bt(e, r), w = (m = (d = k.fatal) !== null && d !== void 0 ? d : s) !== null && m !== void 0 ? m : !0;
|
|
3414
|
-
n.addIssue({ code: "custom", ...k, fatal: w });
|
|
3415
|
-
}
|
|
3416
|
-
});
|
|
3417
|
-
if (!c) {
|
|
3418
|
-
const u = bt(e, r), d = (o = (a = u.fatal) !== null && a !== void 0 ? a : s) !== null && o !== void 0 ? o : !0;
|
|
3419
|
-
n.addIssue({ code: "custom", ...u, fatal: d });
|
|
3420
|
-
}
|
|
3421
|
-
}) : oe.create();
|
|
3422
|
-
}
|
|
3423
|
-
const mn = {
|
|
3424
|
-
object: j.lazycreate
|
|
3425
|
-
};
|
|
3426
|
-
var v;
|
|
3427
|
-
(function(t) {
|
|
3428
|
-
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
3429
|
-
})(v || (v = {}));
|
|
3430
|
-
const pn = (t, e = {
|
|
3431
|
-
message: `Input not instance of ${t.name}`
|
|
3432
|
-
}) => Kt((s) => s instanceof t, e), Yt = Z.create, Jt = H.create, gn = $e.create, vn = W.create, Gt = me.create, yn = X.create, xn = Ie.create, _n = pe.create, bn = ge.create, wn = oe.create, kn = J.create, jn = U.create, Tn = Me.create, Nn = R.create, Cn = j.create, Sn = j.strictCreate, On = ve.create, An = Be.create, En = ye.create, Pn = z.create, Zn = xe.create, Rn = De.create, In = ee.create, Mn = ae.create, Dn = _e.create, $n = be.create, zn = K.create, qn = we.create, Ln = ce.create, wt = I.create, Bn = D.create, Fn = Y.create, Vn = I.createWithPreprocess, Qn = Ne.create, Un = () => Yt().optional(), Hn = () => Jt().optional(), Wn = () => Gt().optional(), Kn = {
|
|
3433
|
-
string: (t) => Z.create({ ...t, coerce: !0 }),
|
|
3434
|
-
number: (t) => H.create({ ...t, coerce: !0 }),
|
|
3435
|
-
boolean: (t) => me.create({
|
|
3436
|
-
...t,
|
|
3437
|
-
coerce: !0
|
|
3438
|
-
}),
|
|
3439
|
-
bigint: (t) => W.create({ ...t, coerce: !0 }),
|
|
3440
|
-
date: (t) => X.create({ ...t, coerce: !0 })
|
|
3441
|
-
}, Yn = y;
|
|
3442
|
-
var Oe = /* @__PURE__ */ Object.freeze({
|
|
3443
|
-
__proto__: null,
|
|
3444
|
-
defaultErrorMap: ie,
|
|
3445
|
-
setErrorMap: Fr,
|
|
3446
|
-
getErrorMap: Pe,
|
|
3447
|
-
makeIssue: Ze,
|
|
3448
|
-
EMPTY_PATH: Vr,
|
|
3449
|
-
addIssueToContext: h,
|
|
3450
|
-
ParseStatus: C,
|
|
3451
|
-
INVALID: y,
|
|
3452
|
-
DIRTY: re,
|
|
3453
|
-
OK: S,
|
|
3454
|
-
isAborted: Ye,
|
|
3455
|
-
isDirty: Je,
|
|
3456
|
-
isValid: G,
|
|
3457
|
-
isAsync: fe,
|
|
3458
|
-
get util() {
|
|
3459
|
-
return b;
|
|
3460
|
-
},
|
|
3461
|
-
get objectUtil() {
|
|
3462
|
-
return Ke;
|
|
3463
|
-
},
|
|
3464
|
-
ZodParsedType: f,
|
|
3465
|
-
getParsedType: V,
|
|
3466
|
-
ZodType: _,
|
|
3467
|
-
datetimeRegex: Ht,
|
|
3468
|
-
ZodString: Z,
|
|
3469
|
-
ZodNumber: H,
|
|
3470
|
-
ZodBigInt: W,
|
|
3471
|
-
ZodBoolean: me,
|
|
3472
|
-
ZodDate: X,
|
|
3473
|
-
ZodSymbol: Ie,
|
|
3474
|
-
ZodUndefined: pe,
|
|
3475
|
-
ZodNull: ge,
|
|
3476
|
-
ZodAny: oe,
|
|
3477
|
-
ZodUnknown: J,
|
|
3478
|
-
ZodNever: U,
|
|
3479
|
-
ZodVoid: Me,
|
|
3480
|
-
ZodArray: R,
|
|
3481
|
-
ZodObject: j,
|
|
3482
|
-
ZodUnion: ve,
|
|
3483
|
-
ZodDiscriminatedUnion: Be,
|
|
3484
|
-
ZodIntersection: ye,
|
|
3485
|
-
ZodTuple: z,
|
|
3486
|
-
ZodRecord: xe,
|
|
3487
|
-
ZodMap: De,
|
|
3488
|
-
ZodSet: ee,
|
|
3489
|
-
ZodFunction: ae,
|
|
3490
|
-
ZodLazy: _e,
|
|
3491
|
-
ZodLiteral: be,
|
|
3492
|
-
ZodEnum: K,
|
|
3493
|
-
ZodNativeEnum: we,
|
|
3494
|
-
ZodPromise: ce,
|
|
3495
|
-
ZodEffects: I,
|
|
3496
|
-
ZodTransformer: I,
|
|
3497
|
-
ZodOptional: D,
|
|
3498
|
-
ZodNullable: Y,
|
|
3499
|
-
ZodDefault: ke,
|
|
3500
|
-
ZodCatch: je,
|
|
3501
|
-
ZodNaN: $e,
|
|
3502
|
-
BRAND: fn,
|
|
3503
|
-
ZodBranded: nt,
|
|
3504
|
-
ZodPipeline: Ne,
|
|
3505
|
-
ZodReadonly: Te,
|
|
3506
|
-
custom: Kt,
|
|
3507
|
-
Schema: _,
|
|
3508
|
-
ZodSchema: _,
|
|
3509
|
-
late: mn,
|
|
3510
|
-
get ZodFirstPartyTypeKind() {
|
|
3511
|
-
return v;
|
|
3512
|
-
},
|
|
3513
|
-
coerce: Kn,
|
|
3514
|
-
any: wn,
|
|
3515
|
-
array: Nn,
|
|
3516
|
-
bigint: vn,
|
|
3517
|
-
boolean: Gt,
|
|
3518
|
-
date: yn,
|
|
3519
|
-
discriminatedUnion: An,
|
|
3520
|
-
effect: wt,
|
|
3521
|
-
enum: zn,
|
|
3522
|
-
function: Mn,
|
|
3523
|
-
instanceof: pn,
|
|
3524
|
-
intersection: En,
|
|
3525
|
-
lazy: Dn,
|
|
3526
|
-
literal: $n,
|
|
3527
|
-
map: Rn,
|
|
3528
|
-
nan: gn,
|
|
3529
|
-
nativeEnum: qn,
|
|
3530
|
-
never: jn,
|
|
3531
|
-
null: bn,
|
|
3532
|
-
nullable: Fn,
|
|
3533
|
-
number: Jt,
|
|
3534
|
-
object: Cn,
|
|
3535
|
-
oboolean: Wn,
|
|
3536
|
-
onumber: Hn,
|
|
3537
|
-
optional: Bn,
|
|
3538
|
-
ostring: Un,
|
|
3539
|
-
pipeline: Qn,
|
|
3540
|
-
preprocess: Vn,
|
|
3541
|
-
promise: Ln,
|
|
3542
|
-
record: Zn,
|
|
3543
|
-
set: In,
|
|
3544
|
-
strictObject: Sn,
|
|
3545
|
-
string: Yt,
|
|
3546
|
-
symbol: xn,
|
|
3547
|
-
transformer: wt,
|
|
3548
|
-
tuple: Pn,
|
|
3549
|
-
undefined: _n,
|
|
3550
|
-
union: On,
|
|
3551
|
-
unknown: kn,
|
|
3552
|
-
void: Tn,
|
|
3553
|
-
NEVER: Yn,
|
|
3554
|
-
ZodIssueCode: l,
|
|
3555
|
-
quotelessJson: Br,
|
|
3556
|
-
ZodError: P
|
|
3557
|
-
});
|
|
3558
|
-
const Jn = Oe.object({
|
|
3559
|
-
buildId: Oe.string(),
|
|
3560
|
-
timestamp: Oe.string(),
|
|
3561
|
-
status: Oe.enum(["in-progress", "success", "failed"])
|
|
3562
|
-
}), Gn = ({
|
|
3563
|
-
buildId: t,
|
|
3564
|
-
endpoint: e = "/__zuplo/docs"
|
|
3565
|
-
}) => {
|
|
3566
|
-
const s = js({
|
|
3567
|
-
queryKey: ["zuplo-build-check", t, e],
|
|
3568
|
-
refetchInterval: 3e3,
|
|
3569
|
-
enabled: typeof t < "u" && !1,
|
|
3570
|
-
retry: !1,
|
|
3571
|
-
queryFn: () => fetch(e, { signal: AbortSignal.timeout(2e3) }).then((n) => {
|
|
3572
|
-
if (!n.ok) throw new Error("Failed to fetch build status");
|
|
3573
|
-
return n.json();
|
|
3574
|
-
}).then((n) => Jn.parse(n))
|
|
3575
|
-
});
|
|
3576
|
-
if (s.isError || !s.data || s.data.buildId === t)
|
|
3577
|
-
return null;
|
|
3578
|
-
const r = s.data.status === "success";
|
|
3579
|
-
return /* @__PURE__ */ i.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
|
|
3580
|
-
r ? /* @__PURE__ */ i.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
3581
|
-
/* @__PURE__ */ i.jsx(Ls, { size: 16 }),
|
|
3582
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-sm", children: "New version available" })
|
|
3583
|
-
] }) : /* @__PURE__ */ i.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
3584
|
-
/* @__PURE__ */ i.jsx(Bs, { size: 16, className: "animate-spin" }),
|
|
3585
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-sm", children: "Building new version..." })
|
|
3586
|
-
] }),
|
|
3587
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-xs", children: r ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
|
|
3588
|
-
/* @__PURE__ */ i.jsx(
|
|
3589
|
-
Mt,
|
|
3590
|
-
{
|
|
3591
|
-
variant: "outline",
|
|
3592
|
-
size: "sm",
|
|
3593
|
-
className: "w-full",
|
|
3594
|
-
onClick: () => {
|
|
3595
|
-
window.location.reload();
|
|
3596
|
-
},
|
|
3597
|
-
children: "Reload"
|
|
3598
|
-
}
|
|
3599
|
-
)
|
|
3600
|
-
] });
|
|
3601
|
-
}, Xn = () => {
|
|
3602
|
-
const t = ze(), e = st(t.pathname);
|
|
3603
|
-
te(() => {
|
|
3604
|
-
const s = e.current !== t.pathname, r = t.hash !== "";
|
|
3605
|
-
s && !r && window.scrollTo(0, 0), e.current = t.pathname;
|
|
3606
|
-
}, [t.pathname, t.hash]);
|
|
3607
|
-
}, ea = ({
|
|
3608
|
-
icon: t
|
|
3609
|
-
}) => typeof t == "string" ? /* @__PURE__ */ i.jsx(
|
|
3610
|
-
"img",
|
|
3611
|
-
{
|
|
3612
|
-
src: `https://cdn.simpleicons.org/${t}/000000/ffffff`,
|
|
3613
|
-
className: "size-5",
|
|
3614
|
-
alt: t
|
|
3615
|
-
}
|
|
3616
|
-
) : t, ta = (t) => /^https?:/.test(t), sa = () => {
|
|
3617
|
-
const { page: t } = Ea(), e = t?.footer;
|
|
3618
|
-
return e ? /* @__PURE__ */ i.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ i.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
|
|
3619
|
-
/* @__PURE__ */ i.jsxs(
|
|
3620
|
-
"div",
|
|
3621
|
-
{
|
|
3622
|
-
className: N("flex flex-row gap-8", {
|
|
3623
|
-
"justify-center": !e.position || e.position === "center",
|
|
3624
|
-
"justify-start": e.position === "start",
|
|
3625
|
-
"justify-end": e.position === "end"
|
|
3626
|
-
}),
|
|
3627
|
-
children: [
|
|
3628
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "footer-before" }),
|
|
3629
|
-
e.columns && /* @__PURE__ */ i.jsx(
|
|
3630
|
-
"div",
|
|
3631
|
-
{
|
|
3632
|
-
className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
|
|
3633
|
-
style: { "--columns": e.columns.length },
|
|
3634
|
-
children: e.columns.map((s) => /* @__PURE__ */ i.jsxs(
|
|
3635
|
-
"div",
|
|
3636
|
-
{
|
|
3637
|
-
className: N({
|
|
3638
|
-
"justify-self-center": !s.position || s.position === "center",
|
|
3639
|
-
"justify-self-start": s.position === "start",
|
|
3640
|
-
"justify-self-end": s.position === "end"
|
|
3641
|
-
}),
|
|
3642
|
-
children: [
|
|
3643
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-sm font-semibold", children: s.title }),
|
|
3644
|
-
/* @__PURE__ */ i.jsx("ul", { className: "mt-4 space-y-2", children: s.links.map((r) => {
|
|
3645
|
-
const n = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
|
|
3646
|
-
return /* @__PURE__ */ i.jsx("li", { children: ta(r.href) ? /* @__PURE__ */ i.jsxs(
|
|
3647
|
-
"a",
|
|
3648
|
-
{
|
|
3649
|
-
href: r.href,
|
|
3650
|
-
target: "_blank",
|
|
3651
|
-
rel: "noopener noreferrer",
|
|
3652
|
-
className: n,
|
|
3653
|
-
children: [
|
|
3654
|
-
/* @__PURE__ */ i.jsx("span", { children: r.label }),
|
|
3655
|
-
/* @__PURE__ */ i.jsx(Fs, { size: 12 })
|
|
3656
|
-
]
|
|
3657
|
-
}
|
|
3658
|
-
) : /* @__PURE__ */ i.jsx(Js, { to: r.href, className: n, children: /* @__PURE__ */ i.jsx("span", { children: r.label }) }) }, r.href + r.label);
|
|
3659
|
-
}) })
|
|
3660
|
-
]
|
|
3661
|
-
},
|
|
3662
|
-
s.title
|
|
3663
|
-
))
|
|
3664
|
-
}
|
|
3665
|
-
),
|
|
3666
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "footer-after" })
|
|
3667
|
-
]
|
|
3668
|
-
}
|
|
3669
|
-
),
|
|
3670
|
-
/* @__PURE__ */ i.jsxs(
|
|
3671
|
-
"div",
|
|
3672
|
-
{
|
|
3673
|
-
className: N(
|
|
3674
|
-
"flex items-center justify-between",
|
|
3675
|
-
e.columns && "border-t mt-8 pt-8"
|
|
3676
|
-
),
|
|
3677
|
-
children: [
|
|
3678
|
-
e.logo && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
3679
|
-
/* @__PURE__ */ i.jsx(
|
|
3680
|
-
"img",
|
|
3681
|
-
{
|
|
3682
|
-
src: e.logo.src.light,
|
|
3683
|
-
alt: e.logo.alt,
|
|
3684
|
-
className: "w-8 dark:hidden",
|
|
3685
|
-
style: { width: e.logo.width }
|
|
3686
|
-
}
|
|
3687
|
-
),
|
|
3688
|
-
/* @__PURE__ */ i.jsx(
|
|
3689
|
-
"img",
|
|
3690
|
-
{
|
|
3691
|
-
src: e.logo.src.dark,
|
|
3692
|
-
alt: e.logo.alt,
|
|
3693
|
-
className: "w-8 hidden dark:block",
|
|
3694
|
-
style: { width: e.logo.width }
|
|
3695
|
-
}
|
|
3696
|
-
)
|
|
3697
|
-
] }),
|
|
3698
|
-
e.copyright && /* @__PURE__ */ i.jsx("p", { className: "text-sm text-muted-foreground", children: e.copyright }),
|
|
3699
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: e.social?.map((s) => /* @__PURE__ */ i.jsxs(
|
|
3700
|
-
"a",
|
|
3701
|
-
{
|
|
3702
|
-
href: s.href,
|
|
3703
|
-
target: "_blank",
|
|
3704
|
-
rel: "noopener noreferrer",
|
|
3705
|
-
className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
|
|
3706
|
-
children: [
|
|
3707
|
-
/* @__PURE__ */ i.jsx(ea, { icon: s.icon }),
|
|
3708
|
-
s.label
|
|
3709
|
-
]
|
|
3710
|
-
},
|
|
3711
|
-
s.href
|
|
3712
|
-
)) })
|
|
3713
|
-
]
|
|
3714
|
-
}
|
|
3715
|
-
)
|
|
3716
|
-
] }) }) : null;
|
|
3717
|
-
};
|
|
3718
|
-
function ra({
|
|
3719
|
-
className: t,
|
|
3720
|
-
...e
|
|
3721
|
-
}) {
|
|
3722
|
-
return /* @__PURE__ */ i.jsx(
|
|
3723
|
-
"div",
|
|
3724
|
-
{
|
|
3725
|
-
className: N("animate-pulse rounded-md bg-muted", t),
|
|
3726
|
-
...e
|
|
3727
|
-
}
|
|
3728
|
-
);
|
|
3729
|
-
}
|
|
3730
|
-
const kt = {
|
|
3731
|
-
info: "bg-blue-500",
|
|
3732
|
-
note: "bg-gray-500",
|
|
3733
|
-
tip: "bg-green-600",
|
|
3734
|
-
caution: "bg-orange-500",
|
|
3735
|
-
danger: "bg-rose-500"
|
|
3736
|
-
}, na = () => {
|
|
3737
|
-
const { page: t } = M(), [e, s] = de(!0);
|
|
3738
|
-
if (!t?.banner || !e)
|
|
3739
|
-
return /* @__PURE__ */ i.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
3740
|
-
const r = t.banner.color && t.banner.color in kt ? kt[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = r ? {} : { backgroundColor: t.banner.color };
|
|
3741
|
-
return /* @__PURE__ */ i.jsxs(
|
|
3742
|
-
"div",
|
|
3743
|
-
{
|
|
3744
|
-
className: N(
|
|
3745
|
-
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center lg:h-(--banner-height)",
|
|
3746
|
-
r
|
|
3747
|
-
),
|
|
3748
|
-
"data-pagefind-ignore": "all",
|
|
3749
|
-
style: n,
|
|
3750
|
-
children: [
|
|
3751
|
-
/* @__PURE__ */ i.jsx("div", { className: "w-full", children: t.banner.message }),
|
|
3752
|
-
t.banner.dismissible && /* @__PURE__ */ i.jsx(
|
|
3753
|
-
"button",
|
|
3754
|
-
{
|
|
3755
|
-
type: "button",
|
|
3756
|
-
className: "md:absolute md:end-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
3757
|
-
onClick: () => s(!1),
|
|
3758
|
-
children: /* @__PURE__ */ i.jsx(Vs, { size: 16 })
|
|
3759
|
-
}
|
|
3760
|
-
)
|
|
3761
|
-
]
|
|
3762
|
-
}
|
|
3763
|
-
);
|
|
3764
|
-
}, Xt = (t) => /* @__PURE__ */ i.jsxs(
|
|
3765
|
-
"svg",
|
|
3766
|
-
{
|
|
3767
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3768
|
-
viewBox: "0 0 132 100",
|
|
3769
|
-
fill: "none",
|
|
3770
|
-
...t,
|
|
3771
|
-
children: [
|
|
3772
|
-
/* @__PURE__ */ i.jsx(
|
|
3773
|
-
"path",
|
|
3774
|
-
{
|
|
3775
|
-
fill: "currentColor",
|
|
3776
|
-
fillRule: "evenodd",
|
|
3777
|
-
d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
|
|
3778
|
-
clipRule: "evenodd"
|
|
3779
|
-
}
|
|
3780
|
-
),
|
|
3781
|
-
/* @__PURE__ */ i.jsx(
|
|
3782
|
-
"path",
|
|
3783
|
-
{
|
|
3784
|
-
fill: "currentColor",
|
|
3785
|
-
d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
|
|
3786
|
-
}
|
|
3787
|
-
)
|
|
3788
|
-
]
|
|
3789
|
-
}
|
|
3790
|
-
);
|
|
3791
|
-
Xt.displayName = "ZudokuLogo";
|
|
3792
|
-
const es = ({ className: t }) => /* @__PURE__ */ i.jsxs(
|
|
3793
|
-
"a",
|
|
3794
|
-
{
|
|
3795
|
-
href: "https://zudoku.dev",
|
|
3796
|
-
target: "_blank",
|
|
3797
|
-
rel: "noopener noreferrer",
|
|
3798
|
-
className: N(
|
|
3799
|
-
"flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
|
|
3800
|
-
t
|
|
3801
|
-
),
|
|
3802
|
-
children: [
|
|
3803
|
-
/* @__PURE__ */ i.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
|
|
3804
|
-
/* @__PURE__ */ i.jsx(Xt, { className: "w-3.5 h-3.5 dark:fill-white" }),
|
|
3805
|
-
"powered by ",
|
|
3806
|
-
"Zudoku"
|
|
3807
|
-
] }),
|
|
3808
|
-
/* @__PURE__ */ i.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ i.jsx(
|
|
3809
|
-
Qs,
|
|
3810
|
-
{
|
|
3811
|
-
size: 12,
|
|
3812
|
-
absoluteStrokeWidth: !0,
|
|
3813
|
-
strokeWidth: 1.5,
|
|
3814
|
-
className: "rtl:rotate-180"
|
|
3815
|
-
}
|
|
3816
|
-
) })
|
|
3817
|
-
]
|
|
3818
|
-
}
|
|
3819
|
-
);
|
|
3820
|
-
function aa() {
|
|
3821
|
-
const t = navigator.userAgent.toLowerCase();
|
|
3822
|
-
if (t.includes("win")) return "Windows";
|
|
3823
|
-
if (t.includes("mac")) return "macOS";
|
|
3824
|
-
if (t.includes("linux")) return "Linux";
|
|
3825
|
-
}
|
|
3826
|
-
const ts = ({ className: t }) => {
|
|
3827
|
-
const e = M(), [s, r] = de(!1), n = Ds(() => r(!1), []);
|
|
3828
|
-
te(() => {
|
|
3829
|
-
if (s)
|
|
3830
|
-
return;
|
|
3831
|
-
function o(c) {
|
|
3832
|
-
c.key === "k" && (c.metaKey || c.ctrlKey) && (c.preventDefault(), r(!0));
|
|
3833
|
-
}
|
|
3834
|
-
return window.addEventListener("keydown", o), () => {
|
|
3835
|
-
window.removeEventListener("keydown", o);
|
|
3836
|
-
};
|
|
3837
|
-
}, [s, r]);
|
|
3838
|
-
const a = e.plugins.find(ir);
|
|
3839
|
-
return a ? /* @__PURE__ */ i.jsxs("div", { className: t, children: [
|
|
3840
|
-
/* @__PURE__ */ i.jsxs(
|
|
3841
|
-
"button",
|
|
3842
|
-
{
|
|
3843
|
-
type: "button",
|
|
3844
|
-
onClick: () => r(!0),
|
|
3845
|
-
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
|
|
3846
|
-
children: [
|
|
3847
|
-
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2 grow", children: [
|
|
3848
|
-
/* @__PURE__ */ i.jsx(Us, { size: 14 }),
|
|
3849
|
-
"Search"
|
|
3850
|
-
] }),
|
|
3851
|
-
/* @__PURE__ */ i.jsx(Le, { children: /* @__PURE__ */ i.jsx(ia, {}) })
|
|
3852
|
-
]
|
|
3853
|
-
}
|
|
3854
|
-
),
|
|
3855
|
-
/* @__PURE__ */ i.jsx(rt, { fallback: null, children: a.renderSearch({
|
|
3856
|
-
isOpen: s,
|
|
3857
|
-
onClose: n
|
|
3858
|
-
}) })
|
|
3859
|
-
] }) : null;
|
|
3860
|
-
}, ia = () => {
|
|
3861
|
-
const t = aa();
|
|
3862
|
-
return /* @__PURE__ */ i.jsxs("kbd", { className: "absolute end-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
|
|
3863
|
-
t === "macOS" ? "⌘" : "Ctrl",
|
|
3864
|
-
"+K"
|
|
3865
|
-
] });
|
|
3866
|
-
}, ss = () => {
|
|
3867
|
-
const { resolvedTheme: t, setTheme: e } = Nt();
|
|
3868
|
-
return /* @__PURE__ */ i.jsx(Le, { fallback: /* @__PURE__ */ i.jsx(He, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ i.jsxs(
|
|
3869
|
-
"button",
|
|
3870
|
-
{
|
|
3871
|
-
type: "button",
|
|
3872
|
-
className: "flex rounded-full border p-0.5 gap-0.5 group",
|
|
3873
|
-
onClick: () => e(t === "dark" ? "light" : "dark"),
|
|
3874
|
-
"aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
3875
|
-
children: [
|
|
3876
|
-
/* @__PURE__ */ i.jsx(
|
|
3877
|
-
"div",
|
|
3878
|
-
{
|
|
3879
|
-
className: N(
|
|
3880
|
-
"border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
|
|
3881
|
-
t === "light" && "border-border bg-muted",
|
|
3882
|
-
t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
|
|
3883
|
-
),
|
|
3884
|
-
children: /* @__PURE__ */ i.jsx(Hs, { size: 16 })
|
|
3885
|
-
}
|
|
3886
|
-
),
|
|
3887
|
-
/* @__PURE__ */ i.jsx(
|
|
3888
|
-
"div",
|
|
3889
|
-
{
|
|
3890
|
-
className: N(
|
|
3891
|
-
"border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
|
|
3892
|
-
t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
|
|
3893
|
-
t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
|
|
3894
|
-
),
|
|
3895
|
-
children: /* @__PURE__ */ i.jsx(Ws, { size: 16 })
|
|
3896
|
-
}
|
|
3897
|
-
)
|
|
3898
|
-
]
|
|
3899
|
-
}
|
|
3900
|
-
) });
|
|
3901
|
-
}, rs = () => {
|
|
3902
|
-
const e = qe().state === "loading", [s, r] = de(!1);
|
|
3903
|
-
te(() => {
|
|
3904
|
-
const o = setTimeout(() => r(e), 100);
|
|
3905
|
-
return () => clearTimeout(o);
|
|
3906
|
-
}, [e]);
|
|
3907
|
-
const { isFinished: n, progress: a } = Cr({ isAnimating: s });
|
|
3908
|
-
return /* @__PURE__ */ i.jsx(
|
|
3909
|
-
"div",
|
|
3910
|
-
{
|
|
3911
|
-
className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
|
|
3912
|
-
style: {
|
|
3913
|
-
opacity: n ? 0 : 1,
|
|
3914
|
-
width: n ? 0 : `${a * 100}%`
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
);
|
|
3918
|
-
}, oa = () => {
|
|
3919
|
-
const { topNavigation: t } = M(), { isAuthenticated: e } = he(), s = t.filter(Pt(e));
|
|
3920
|
-
return s.length === 0 ? /* @__PURE__ */ i.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ i.jsxs(rt, { children: [
|
|
3921
|
-
/* @__PURE__ */ i.jsxs("div", { className: "items-center justify-between px-8 h-(--top-nav-height) hidden lg:flex text-sm relative", children: [
|
|
3922
|
-
/* @__PURE__ */ i.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ i.jsx("ul", { className: "flex flex-row items-center gap-8", children: s.map((r) => /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(ns, { ...r }) }, r.id)) }) }),
|
|
3923
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "top-navigation-side" })
|
|
3924
|
-
] }),
|
|
3925
|
-
/* @__PURE__ */ i.jsx(rs, {})
|
|
3926
|
-
] });
|
|
3927
|
-
}, ns = ({
|
|
3928
|
-
id: t,
|
|
3929
|
-
label: e,
|
|
3930
|
-
default: s
|
|
3931
|
-
}) => {
|
|
3932
|
-
const { sidebars: r } = M(), n = r[t], a = Zt(), o = !!qe().location, c = a.topNavItem?.id === t && !o, u = s ?? (n ? Ts(n, (d) => {
|
|
3933
|
-
if (d.type === "doc") return ne(d.id);
|
|
3934
|
-
}) : ne(t)) ?? ne(t);
|
|
3935
|
-
return (
|
|
3936
|
-
// We don't use isActive here because it has to be inside the sidebar,
|
|
3937
|
-
// the top nav id doesn't necessarily start with the sidebar id
|
|
3938
|
-
/* @__PURE__ */ i.jsx(
|
|
3939
|
-
gs,
|
|
3940
|
-
{
|
|
3941
|
-
className: ({ isPending: d }) => Sr(
|
|
3942
|
-
"block lg:py-3.5 font-medium -mb-px",
|
|
3943
|
-
c || d ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
3944
|
-
),
|
|
3945
|
-
to: u,
|
|
3946
|
-
children: e
|
|
3947
|
-
}
|
|
3948
|
-
)
|
|
3949
|
-
);
|
|
3950
|
-
}, ca = () => {
|
|
3951
|
-
const { topNavigation: t, options: e } = M(), { isAuthenticated: s } = he(), [r, n] = de(!1);
|
|
3952
|
-
return /* @__PURE__ */ i.jsxs(
|
|
3953
|
-
Tr,
|
|
3954
|
-
{
|
|
3955
|
-
direction: e.page?.dir === "rtl" ? "left" : "right",
|
|
3956
|
-
open: r,
|
|
3957
|
-
onOpenChange: (a) => n(a),
|
|
3958
|
-
children: [
|
|
3959
|
-
/* @__PURE__ */ i.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
|
|
3960
|
-
/* @__PURE__ */ i.jsx(Nr, { className: "lg:hidden", children: /* @__PURE__ */ i.jsx(Ks, { size: 22 }) }),
|
|
3961
|
-
/* @__PURE__ */ i.jsx(rs, {})
|
|
3962
|
-
] }),
|
|
3963
|
-
/* @__PURE__ */ i.jsx(
|
|
3964
|
-
Lt,
|
|
3965
|
-
{
|
|
3966
|
-
className: "lg:hidden h-[100dvh] end-0 start-auto w-[320px] rounded-none",
|
|
3967
|
-
"aria-describedby": void 0,
|
|
3968
|
-
children: /* @__PURE__ */ i.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
|
|
3969
|
-
/* @__PURE__ */ i.jsxs("div", { children: [
|
|
3970
|
-
/* @__PURE__ */ i.jsx(qt, { children: /* @__PURE__ */ i.jsx(Bt, { children: "Navigation" }) }),
|
|
3971
|
-
/* @__PURE__ */ i.jsx(ts, { className: "flex p-4" }),
|
|
3972
|
-
/* @__PURE__ */ i.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
3973
|
-
/* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(ss, {}) }),
|
|
3974
|
-
t.filter(Pt(s)).map((a) => /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx("button", { type: "button", onClick: () => n(!1), children: /* @__PURE__ */ i.jsx(ns, { ...a }) }) }, a.label))
|
|
3975
|
-
] })
|
|
3976
|
-
] }),
|
|
3977
|
-
e.page?.showPoweredBy !== !1 && /* @__PURE__ */ i.jsx(es, { className: "grow-0 justify-center gap-1" })
|
|
3978
|
-
] })
|
|
3979
|
-
}
|
|
3980
|
-
)
|
|
3981
|
-
]
|
|
3982
|
-
}
|
|
3983
|
-
);
|
|
3984
|
-
}, Ee = ({ item: t }) => t.children ? /* @__PURE__ */ i.jsxs(_r, { children: [
|
|
3985
|
-
/* @__PURE__ */ i.jsx(br, { children: t.label }),
|
|
3986
|
-
/* @__PURE__ */ i.jsx(wr, { children: /* @__PURE__ */ i.jsx(kr, { children: t.children.map((e, s) => (
|
|
3987
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
3988
|
-
/* @__PURE__ */ i.jsx(Ee, { item: e }, s)
|
|
3989
|
-
)) }) })
|
|
3990
|
-
] }, t.label) : /* @__PURE__ */ i.jsx(et, { to: t.path ?? "", children: /* @__PURE__ */ i.jsxs(jr, { className: "flex gap-2", children: [
|
|
3991
|
-
t.icon && /* @__PURE__ */ i.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
3992
|
-
t.label
|
|
3993
|
-
] }, t.label) }), as = $t(function() {
|
|
3994
|
-
const e = he(), { isAuthenticated: s, profile: r, isAuthEnabled: n } = he(), a = M(), { page: o, plugins: c, options: u } = a, d = c.filter((g) => or(g)).flatMap((g) => g.getProfileMenuItems(a)).sort((g) => g.weight ?? 0), m = o?.logo ? /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : ne(u.basePath, o.logo.src.light) : void 0, k = o?.logo ? /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : ne(u.basePath, o.logo.src.dark) : void 0, w = "inset-shadow-[0_-1px_0_0_var(--border)]";
|
|
3995
|
-
return /* @__PURE__ */ i.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
3996
|
-
/* @__PURE__ */ i.jsx(na, {}),
|
|
3997
|
-
/* @__PURE__ */ i.jsx("div", { className: w, children: /* @__PURE__ */ i.jsxs("div", { className: "max-w-screen-2xl mx-auto flex relative items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent", children: [
|
|
3998
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex", children: /* @__PURE__ */ i.jsx(et, { to: "/", children: /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
3999
|
-
o?.logo && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4000
|
-
/* @__PURE__ */ i.jsx(
|
|
4001
|
-
"img",
|
|
4002
|
-
{
|
|
4003
|
-
src: m,
|
|
4004
|
-
alt: o.logo.alt ?? o.pageTitle,
|
|
4005
|
-
style: { width: o.logo.width },
|
|
4006
|
-
className: "max-h-(--top-header-height) dark:hidden",
|
|
4007
|
-
loading: "lazy"
|
|
4008
|
-
}
|
|
4009
|
-
),
|
|
4010
|
-
/* @__PURE__ */ i.jsx(
|
|
4011
|
-
"img",
|
|
4012
|
-
{
|
|
4013
|
-
src: k,
|
|
4014
|
-
alt: o.logo.alt ?? o.pageTitle,
|
|
4015
|
-
style: { width: o.logo.width },
|
|
4016
|
-
className: "max-h-(--top-header-height) hidden dark:block",
|
|
4017
|
-
loading: "lazy"
|
|
4018
|
-
}
|
|
4019
|
-
)
|
|
4020
|
-
] }),
|
|
4021
|
-
/* @__PURE__ */ i.jsx("span", { className: "font-semibold text-2xl", children: o?.pageTitle })
|
|
4022
|
-
] }) }) }),
|
|
4023
|
-
/* @__PURE__ */ i.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ i.jsx(ts, { className: "pointer-events-auto" }) }),
|
|
4024
|
-
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-8", children: [
|
|
4025
|
-
/* @__PURE__ */ i.jsx(ca, {}),
|
|
4026
|
-
/* @__PURE__ */ i.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
4027
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "head-navigation-start" }),
|
|
4028
|
-
n && /* @__PURE__ */ i.jsx(
|
|
4029
|
-
Le,
|
|
4030
|
-
{
|
|
4031
|
-
fallback: /* @__PURE__ */ i.jsx(ra, { className: "rounded-sm h-5 w-24 mr-4" }),
|
|
4032
|
-
children: s ? Object.values(d).length > 0 && /* @__PURE__ */ i.jsxs(gr, { modal: !1, children: [
|
|
4033
|
-
/* @__PURE__ */ i.jsx(vr, { asChild: !0, children: /* @__PURE__ */ i.jsx(He, { variant: "ghost", children: r?.name ?? "My Account" }) }),
|
|
4034
|
-
/* @__PURE__ */ i.jsxs(yr, { className: "w-56", children: [
|
|
4035
|
-
/* @__PURE__ */ i.jsxs(xr, { children: [
|
|
4036
|
-
r?.name ? `${r.name}` : "My Account",
|
|
4037
|
-
r?.email && /* @__PURE__ */ i.jsx("div", { className: "font-normal text-muted-foreground", children: r.email })
|
|
4038
|
-
] }),
|
|
4039
|
-
d.filter((g) => g.category === "top").length > 0 && /* @__PURE__ */ i.jsx(Ve, {}),
|
|
4040
|
-
d.filter((g) => g.category === "top").map((g) => /* @__PURE__ */ i.jsx(Ee, { item: g }, g.label)),
|
|
4041
|
-
d.filter(
|
|
4042
|
-
(g) => !g.category || g.category === "middle"
|
|
4043
|
-
).length > 0 && /* @__PURE__ */ i.jsx(Ve, {}),
|
|
4044
|
-
d.filter(
|
|
4045
|
-
(g) => !g.category || g.category === "middle"
|
|
4046
|
-
).map((g) => /* @__PURE__ */ i.jsx(Ee, { item: g }, g.label)),
|
|
4047
|
-
d.filter((g) => g.category === "bottom").length > 0 && /* @__PURE__ */ i.jsx(Ve, {}),
|
|
4048
|
-
d.filter((g) => g.category === "bottom").map((g) => /* @__PURE__ */ i.jsx(Ee, { item: g }, g.label))
|
|
4049
|
-
] })
|
|
4050
|
-
] }) : /* @__PURE__ */ i.jsx(He, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
4051
|
-
}
|
|
4052
|
-
),
|
|
4053
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "head-navigation-end" }),
|
|
4054
|
-
/* @__PURE__ */ i.jsx(ss, {})
|
|
4055
|
-
] })
|
|
4056
|
-
] })
|
|
4057
|
-
] }) }),
|
|
4058
|
-
/* @__PURE__ */ i.jsx("div", { className: N("hidden lg:block", w), children: /* @__PURE__ */ i.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent", children: [
|
|
4059
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "top-navigation-before" }),
|
|
4060
|
-
/* @__PURE__ */ i.jsx(oa, {}),
|
|
4061
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "top-navigation-after" })
|
|
4062
|
-
] }) })
|
|
4063
|
-
] });
|
|
4064
|
-
}), is = ({
|
|
4065
|
-
shouldScaleBackground: t = !0,
|
|
4066
|
-
...e
|
|
4067
|
-
}) => /* @__PURE__ */ i.jsx(
|
|
4068
|
-
q.Root,
|
|
4069
|
-
{
|
|
4070
|
-
shouldScaleBackground: t,
|
|
4071
|
-
...e
|
|
4072
|
-
}
|
|
4073
|
-
);
|
|
4074
|
-
is.displayName = "Drawer";
|
|
4075
|
-
const da = q.Trigger, la = q.Portal, os = Q.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i.jsx(
|
|
4076
|
-
q.Overlay,
|
|
4077
|
-
{
|
|
4078
|
-
ref: s,
|
|
4079
|
-
className: N("fixed inset-0 z-50 bg-black/80", t),
|
|
4080
|
-
...e
|
|
4081
|
-
}
|
|
4082
|
-
));
|
|
4083
|
-
os.displayName = q.Overlay.displayName;
|
|
4084
|
-
const ua = Q.forwardRef(
|
|
4085
|
-
({ className: t, children: e, hideBar: s = !0, ...r }, n) => /* @__PURE__ */ i.jsxs(la, { children: [
|
|
4086
|
-
/* @__PURE__ */ i.jsx(os, {}),
|
|
4087
|
-
/* @__PURE__ */ i.jsxs(
|
|
4088
|
-
q.Content,
|
|
4089
|
-
{
|
|
4090
|
-
ref: n,
|
|
4091
|
-
className: N(
|
|
4092
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
4093
|
-
t
|
|
4094
|
-
),
|
|
4095
|
-
...r,
|
|
4096
|
-
children: [
|
|
4097
|
-
!s && /* @__PURE__ */ i.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
4098
|
-
e
|
|
4099
|
-
]
|
|
4100
|
-
}
|
|
4101
|
-
)
|
|
4102
|
-
] })
|
|
4103
|
-
);
|
|
4104
|
-
ua.displayName = "DrawerContent";
|
|
4105
|
-
const ha = Q.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i.jsx(
|
|
4106
|
-
q.Title,
|
|
4107
|
-
{
|
|
4108
|
-
ref: s,
|
|
4109
|
-
className: N(
|
|
4110
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
4111
|
-
t
|
|
4112
|
-
),
|
|
4113
|
-
...e
|
|
4114
|
-
}
|
|
4115
|
-
));
|
|
4116
|
-
ha.displayName = q.Title.displayName;
|
|
4117
|
-
const fa = Q.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i.jsx(
|
|
4118
|
-
q.Description,
|
|
4119
|
-
{
|
|
4120
|
-
ref: s,
|
|
4121
|
-
className: N("text-sm text-muted-foreground", t),
|
|
4122
|
-
...e
|
|
4123
|
-
}
|
|
4124
|
-
));
|
|
4125
|
-
fa.displayName = q.Description.displayName;
|
|
4126
|
-
const cs = ({
|
|
4127
|
-
children: t,
|
|
4128
|
-
className: e
|
|
4129
|
-
}) => {
|
|
4130
|
-
const { options: s } = M(), r = st(null);
|
|
4131
|
-
return te(() => {
|
|
4132
|
-
const n = r.current?.querySelector('[aria-current="page"]');
|
|
4133
|
-
Gs(n ?? null);
|
|
4134
|
-
}, []), /* @__PURE__ */ i.jsxs("div", { className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r", children: [
|
|
4135
|
-
/* @__PURE__ */ i.jsx(
|
|
4136
|
-
"nav",
|
|
4137
|
-
{
|
|
4138
|
-
ref: r,
|
|
4139
|
-
className: N(
|
|
4140
|
-
"hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
|
|
4141
|
-
"-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
|
|
4142
|
-
// Revert the padding/margin on the first child
|
|
4143
|
-
"-mt-2.5",
|
|
4144
|
-
e
|
|
4145
|
-
),
|
|
4146
|
-
style: {
|
|
4147
|
-
maskImage: "linear-gradient(180deg, transparent 1%, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 90%, transparent 99%)"
|
|
4148
|
-
},
|
|
4149
|
-
children: t
|
|
4150
|
-
}
|
|
4151
|
-
),
|
|
4152
|
-
/* @__PURE__ */ i.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: s.page?.showPoweredBy !== !1 && /* @__PURE__ */ i.jsx(es, {}) })
|
|
4153
|
-
] });
|
|
4154
|
-
};
|
|
4155
|
-
cs.displayName = "SidebarWrapper";
|
|
4156
|
-
const ma = ({
|
|
4157
|
-
onRequestClose: t,
|
|
4158
|
-
sidebar: e
|
|
4159
|
-
}) => /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4160
|
-
/* @__PURE__ */ i.jsxs(cs, { children: [
|
|
4161
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "navigation-before" }),
|
|
4162
|
-
e.map((s) => /* @__PURE__ */ i.jsx(
|
|
4163
|
-
mt,
|
|
4164
|
-
{
|
|
4165
|
-
item: s
|
|
4166
|
-
},
|
|
4167
|
-
("id" in s ? s.id : "") + ("href" in s ? s.href : "") + s.label
|
|
4168
|
-
)),
|
|
4169
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "navigation-after" })
|
|
4170
|
-
] }),
|
|
4171
|
-
/* @__PURE__ */ i.jsx(
|
|
4172
|
-
Lt,
|
|
4173
|
-
{
|
|
4174
|
-
className: "lg:hidden h-[100dvh] start-0 w-[320px] rounded-none",
|
|
4175
|
-
"aria-describedby": void 0,
|
|
4176
|
-
children: /* @__PURE__ */ i.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
4177
|
-
/* @__PURE__ */ i.jsx(qt, { children: /* @__PURE__ */ i.jsx(Bt, { children: "Sidebar" }) }),
|
|
4178
|
-
e.map((s) => /* @__PURE__ */ i.jsx(
|
|
4179
|
-
mt,
|
|
4180
|
-
{
|
|
4181
|
-
item: s,
|
|
4182
|
-
onRequestClose: t
|
|
4183
|
-
},
|
|
4184
|
-
s.label
|
|
4185
|
-
))
|
|
4186
|
-
] })
|
|
4187
|
-
}
|
|
4188
|
-
)
|
|
4189
|
-
] }), pa = ({ children: t }) => {
|
|
4190
|
-
const [e, s] = de(!1), { sidebar: r } = Zt(), n = r.length > 0, a = qe().state === "loading", { options: o } = M();
|
|
4191
|
-
return /* @__PURE__ */ i.jsxs(
|
|
4192
|
-
is,
|
|
4193
|
-
{
|
|
4194
|
-
direction: o.page?.dir === "rtl" ? "right" : "left",
|
|
4195
|
-
open: e,
|
|
4196
|
-
onOpenChange: (c) => s(c),
|
|
4197
|
-
children: [
|
|
4198
|
-
n && /* @__PURE__ */ i.jsx(
|
|
4199
|
-
ma,
|
|
4200
|
-
{
|
|
4201
|
-
onRequestClose: () => s(!1),
|
|
4202
|
-
sidebar: r
|
|
4203
|
-
}
|
|
4204
|
-
),
|
|
4205
|
-
n && /* @__PURE__ */ i.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ i.jsxs(da, { className: "flex items-center gap-2 px-4", children: [
|
|
4206
|
-
/* @__PURE__ */ i.jsx(Ys, { size: 16, strokeWidth: 1.5 }),
|
|
4207
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-sm", children: "Menu" })
|
|
4208
|
-
] }) }),
|
|
4209
|
-
/* @__PURE__ */ i.jsxs(
|
|
4210
|
-
"main",
|
|
4211
|
-
{
|
|
4212
|
-
"data-pagefind-body": !0,
|
|
4213
|
-
className: N(
|
|
4214
|
-
"px-4 lg:pe-8 lg:px-8",
|
|
4215
|
-
!n && "col-span-full",
|
|
4216
|
-
a && "animate-pulse"
|
|
4217
|
-
),
|
|
4218
|
-
children: [
|
|
4219
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "content-before" }),
|
|
4220
|
-
t,
|
|
4221
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "content-after" })
|
|
4222
|
-
]
|
|
4223
|
-
}
|
|
4224
|
-
)
|
|
4225
|
-
]
|
|
4226
|
-
}
|
|
4227
|
-
);
|
|
4228
|
-
}, ga = () => /* @__PURE__ */ i.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ i.jsx(zt, {}) }), va = ({ children: t }) => {
|
|
4229
|
-
const { meta: e, authentication: s, options: r } = M(), n = ze();
|
|
4230
|
-
return Xs(), Xn(), te(() => {
|
|
4231
|
-
s?.onPageLoad?.();
|
|
4232
|
-
}, [s]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4233
|
-
/* @__PURE__ */ i.jsxs(Xe, { titleTemplate: e?.title, children: [
|
|
4234
|
-
r.canonicalUrlOrigin && /* @__PURE__ */ i.jsx(
|
|
4235
|
-
"link",
|
|
4236
|
-
{
|
|
4237
|
-
rel: "canonical",
|
|
4238
|
-
href: ne(
|
|
4239
|
-
r.canonicalUrlOrigin,
|
|
4240
|
-
r.basePath,
|
|
4241
|
-
n.pathname
|
|
4242
|
-
)
|
|
4243
|
-
}
|
|
4244
|
-
),
|
|
4245
|
-
e?.description && /* @__PURE__ */ i.jsx("meta", { name: "description", content: e.description }),
|
|
4246
|
-
e?.favicon && /* @__PURE__ */ i.jsx("link", { rel: "icon", href: e.favicon })
|
|
4247
|
-
] }),
|
|
4248
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "layout-before-head" }),
|
|
4249
|
-
/* @__PURE__ */ i.jsx(as, {}),
|
|
4250
|
-
/* @__PURE__ */ i.jsx(E.Target, { name: "layout-after-head" }),
|
|
4251
|
-
/* @__PURE__ */ i.jsx(
|
|
4252
|
-
"div",
|
|
4253
|
-
{
|
|
4254
|
-
className: N(
|
|
4255
|
-
"grid max-w-screen-2xl w-full lg:mx-auto",
|
|
4256
|
-
"[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
|
|
4257
|
-
"grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
|
|
4258
|
-
),
|
|
4259
|
-
children: /* @__PURE__ */ i.jsx(rt, { fallback: /* @__PURE__ */ i.jsx(ga, {}), children: /* @__PURE__ */ i.jsx(pa, { children: t ?? /* @__PURE__ */ i.jsx(Ct, {}) }) })
|
|
4260
|
-
}
|
|
4261
|
-
),
|
|
4262
|
-
/* @__PURE__ */ i.jsx(sa, {})
|
|
4263
|
-
] });
|
|
4264
|
-
}, ya = ({
|
|
4265
|
-
title: t = "An error occurred",
|
|
4266
|
-
message: e,
|
|
4267
|
-
category: s
|
|
4268
|
-
}) => /* @__PURE__ */ i.jsxs("div", { className: tr + " h-full pt-(--padding-content-top)", children: [
|
|
4269
|
-
s && /* @__PURE__ */ i.jsx(ar, { children: s }),
|
|
4270
|
-
t && /* @__PURE__ */ i.jsx(er, { level: 1, className: "flex gap-3.5 items-center", children: t }),
|
|
4271
|
-
/* @__PURE__ */ i.jsx("p", { children: e })
|
|
4272
|
-
] }), xa = (t) => {
|
|
4273
|
-
switch (t) {
|
|
4274
|
-
case 400:
|
|
4275
|
-
return {
|
|
4276
|
-
title: "Bad Request",
|
|
4277
|
-
message: "The request could not be understood by the server due to malformed syntax."
|
|
4278
|
-
};
|
|
4279
|
-
case 403:
|
|
4280
|
-
return {
|
|
4281
|
-
title: "Forbidden",
|
|
4282
|
-
message: "You don't have permission to access this resource."
|
|
4283
|
-
};
|
|
4284
|
-
case 404:
|
|
4285
|
-
return {
|
|
4286
|
-
title: "Not Found",
|
|
4287
|
-
message: "The requested resource could not be found."
|
|
4288
|
-
};
|
|
4289
|
-
case 405:
|
|
4290
|
-
return {
|
|
4291
|
-
title: "Method Not Allowed",
|
|
4292
|
-
message: "The request method is not supported for the requested resource."
|
|
4293
|
-
};
|
|
4294
|
-
case 414:
|
|
4295
|
-
return {
|
|
4296
|
-
title: "Request URI Too Large",
|
|
4297
|
-
message: "The request URI is too large."
|
|
4298
|
-
};
|
|
4299
|
-
case 416:
|
|
4300
|
-
return {
|
|
4301
|
-
title: "Range Not Satisfiable",
|
|
4302
|
-
message: "The server cannot satisfy the request range."
|
|
4303
|
-
};
|
|
4304
|
-
case 500:
|
|
4305
|
-
return {
|
|
4306
|
-
title: "Internal Server Error",
|
|
4307
|
-
message: "An unexpected error occurred while processing your request."
|
|
4308
|
-
};
|
|
4309
|
-
case 501:
|
|
4310
|
-
return {
|
|
4311
|
-
title: "Not Implemented",
|
|
4312
|
-
message: "The server does not support the functionality required to fulfill the request."
|
|
4313
|
-
};
|
|
4314
|
-
case 502:
|
|
4315
|
-
return {
|
|
4316
|
-
title: "Bad Gateway",
|
|
4317
|
-
message: "The server received an invalid response from the upstream server."
|
|
4318
|
-
};
|
|
4319
|
-
case 503:
|
|
4320
|
-
return {
|
|
4321
|
-
title: "Service Unavailable",
|
|
4322
|
-
message: "The server is temporarily unable to handle the request."
|
|
4323
|
-
};
|
|
4324
|
-
case 504:
|
|
4325
|
-
return {
|
|
4326
|
-
title: "Gateway Timeout",
|
|
4327
|
-
message: "The server did not receive a timely response from the upstream server."
|
|
4328
|
-
};
|
|
4329
|
-
default:
|
|
4330
|
-
return {
|
|
4331
|
-
title: "An error occurred",
|
|
4332
|
-
message: "Something went wrong while processing your request."
|
|
4333
|
-
};
|
|
4334
|
-
}
|
|
4335
|
-
}, _a = ({ statusCode: t, message: e }) => {
|
|
4336
|
-
const s = xa(t);
|
|
4337
|
-
return /* @__PURE__ */ i.jsx(
|
|
4338
|
-
ya,
|
|
4339
|
-
{
|
|
4340
|
-
title: s.title,
|
|
4341
|
-
message: e ?? s.message,
|
|
4342
|
-
category: t
|
|
4343
|
-
}
|
|
4344
|
-
);
|
|
4345
|
-
}, ba = tt(null), Ue = {
|
|
4346
|
-
didCatch: !1,
|
|
4347
|
-
error: null
|
|
4348
|
-
};
|
|
4349
|
-
class wa extends $s {
|
|
4350
|
-
constructor(e) {
|
|
4351
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ue;
|
|
4352
|
-
}
|
|
4353
|
-
static getDerivedStateFromError(e) {
|
|
4354
|
-
return {
|
|
4355
|
-
didCatch: !0,
|
|
4356
|
-
error: e
|
|
4357
|
-
};
|
|
4358
|
-
}
|
|
4359
|
-
resetErrorBoundary() {
|
|
4360
|
-
const {
|
|
4361
|
-
error: e
|
|
4362
|
-
} = this.state;
|
|
4363
|
-
if (e !== null) {
|
|
4364
|
-
for (var s, r, n = arguments.length, a = new Array(n), o = 0; o < n; o++)
|
|
4365
|
-
a[o] = arguments[o];
|
|
4366
|
-
(s = (r = this.props).onReset) === null || s === void 0 || s.call(r, {
|
|
4367
|
-
args: a,
|
|
4368
|
-
reason: "imperative-api"
|
|
4369
|
-
}), this.setState(Ue);
|
|
4370
|
-
}
|
|
4371
|
-
}
|
|
4372
|
-
componentDidCatch(e, s) {
|
|
4373
|
-
var r, n;
|
|
4374
|
-
(r = (n = this.props).onError) === null || r === void 0 || r.call(n, e, s);
|
|
4375
|
-
}
|
|
4376
|
-
componentDidUpdate(e, s) {
|
|
4377
|
-
const {
|
|
4378
|
-
didCatch: r
|
|
4379
|
-
} = this.state, {
|
|
4380
|
-
resetKeys: n
|
|
4381
|
-
} = this.props;
|
|
4382
|
-
if (r && s.error !== null && ka(e.resetKeys, n)) {
|
|
4383
|
-
var a, o;
|
|
4384
|
-
(a = (o = this.props).onReset) === null || a === void 0 || a.call(o, {
|
|
4385
|
-
next: n,
|
|
4386
|
-
prev: e.resetKeys,
|
|
4387
|
-
reason: "keys"
|
|
4388
|
-
}), this.setState(Ue);
|
|
4389
|
-
}
|
|
4390
|
-
}
|
|
4391
|
-
render() {
|
|
4392
|
-
const {
|
|
4393
|
-
children: e,
|
|
4394
|
-
fallbackRender: s,
|
|
4395
|
-
FallbackComponent: r,
|
|
4396
|
-
fallback: n
|
|
4397
|
-
} = this.props, {
|
|
4398
|
-
didCatch: a,
|
|
4399
|
-
error: o
|
|
4400
|
-
} = this.state;
|
|
4401
|
-
let c = e;
|
|
4402
|
-
if (a) {
|
|
4403
|
-
const u = {
|
|
4404
|
-
error: o,
|
|
4405
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
4406
|
-
};
|
|
4407
|
-
if (typeof s == "function")
|
|
4408
|
-
c = s(u);
|
|
4409
|
-
else if (r)
|
|
4410
|
-
c = ft(r, u);
|
|
4411
|
-
else if (n !== void 0)
|
|
4412
|
-
c = n;
|
|
4413
|
-
else
|
|
4414
|
-
throw o;
|
|
4415
|
-
}
|
|
4416
|
-
return ft(ba.Provider, {
|
|
4417
|
-
value: {
|
|
4418
|
-
didCatch: a,
|
|
4419
|
-
error: o,
|
|
4420
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
4421
|
-
}
|
|
4422
|
-
}, c);
|
|
4423
|
-
}
|
|
4424
|
-
}
|
|
4425
|
-
function ka() {
|
|
4426
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
4427
|
-
return t.length !== e.length || t.some((s, r) => !Object.is(s, e[r]));
|
|
4428
|
-
}
|
|
4429
|
-
let ja = () => ({
|
|
4430
|
-
emit(t, ...e) {
|
|
4431
|
-
for (let s = this.events[t] || [], r = 0, n = s.length; r < n; r++)
|
|
4432
|
-
s[r](...e);
|
|
4433
|
-
},
|
|
4434
|
-
events: {},
|
|
4435
|
-
on(t, e) {
|
|
4436
|
-
return (this.events[t] ||= []).push(e), () => {
|
|
4437
|
-
this.events[t] = this.events[t]?.filter((s) => e !== s);
|
|
4438
|
-
};
|
|
4439
|
-
}
|
|
4440
|
-
});
|
|
4441
|
-
class Ta {
|
|
4442
|
-
plugins;
|
|
4443
|
-
sidebars;
|
|
4444
|
-
topNavigation;
|
|
4445
|
-
meta;
|
|
4446
|
-
page;
|
|
4447
|
-
authentication;
|
|
4448
|
-
queryClient;
|
|
4449
|
-
options;
|
|
4450
|
-
navigationPlugins;
|
|
4451
|
-
emitter = ja();
|
|
4452
|
-
constructor(e, s) {
|
|
4453
|
-
const r = (e.protectedRoutes ?? []).concat(
|
|
4454
|
-
e.plugins?.flatMap(
|
|
4455
|
-
(n) => pt(n) ? n.getProtectedRoutes?.() ?? [] : []
|
|
4456
|
-
) ?? []
|
|
4457
|
-
);
|
|
4458
|
-
this.queryClient = s, this.options = { ...e, protectedRoutes: r }, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(pt), this.authentication = this.plugins.find(cr), this.meta = e.metadata, this.page = e.page, this.plugins.forEach((n) => {
|
|
4459
|
-
dr(n) && pr(n.events).forEach(([a, o]) => {
|
|
4460
|
-
this.emitter.on(a, o);
|
|
4461
|
-
});
|
|
4462
|
-
}), Ns.subscribe((n, a) => {
|
|
4463
|
-
this.emitEvent("auth", {
|
|
4464
|
-
prev: a,
|
|
4465
|
-
next: n
|
|
4466
|
-
});
|
|
4467
|
-
});
|
|
4468
|
-
}
|
|
4469
|
-
initialize = async () => {
|
|
4470
|
-
await Promise.all(
|
|
4471
|
-
this.plugins.filter(lr).map((e) => e.initialize?.(this))
|
|
4472
|
-
);
|
|
4473
|
-
};
|
|
4474
|
-
getApiIdentities = async () => (await Promise.all(
|
|
4475
|
-
this.plugins.filter(ur).map((s) => s.getIdentities(this))
|
|
4476
|
-
)).flat();
|
|
4477
|
-
addEventListener(e, s) {
|
|
4478
|
-
return this.emitter.on(e, s);
|
|
4479
|
-
}
|
|
4480
|
-
emitEvent = (e, ...s) => this.emitter.emit(e, ...s);
|
|
4481
|
-
getPluginSidebar = async (e) => (await Promise.all(
|
|
4482
|
-
this.navigationPlugins.map(
|
|
4483
|
-
(r) => r.getSidebar?.(mr(e), this)
|
|
4484
|
-
)
|
|
4485
|
-
)).flatMap((r) => r ?? []);
|
|
4486
|
-
signRequest = async (e) => {
|
|
4487
|
-
if (!this.authentication)
|
|
4488
|
-
throw new Error("No authentication provider configured");
|
|
4489
|
-
return await this.authentication.signRequest(e);
|
|
4490
|
-
};
|
|
4491
|
-
}
|
|
4492
|
-
function Na({ error: t, resetErrorBoundary: e }) {
|
|
4493
|
-
return /* @__PURE__ */ i.jsx(It, { error: t });
|
|
4494
|
-
}
|
|
4495
|
-
const Ae = globalThis;
|
|
4496
|
-
(!Ae.requestIdleCallback || !Ae.cancelIdleCallback) && (Ae.requestIdleCallback = (t) => setTimeout(t, 1), Ae.cancelIdleCallback = clearTimeout);
|
|
4497
|
-
const ds = {
|
|
4498
|
-
Header: as
|
|
4499
|
-
}, Ca = tt(ds), Sa = Ca.Provider, Oa = () => {
|
|
4500
|
-
const t = ze(), e = M(), s = st(void 0);
|
|
4501
|
-
return te(() => {
|
|
4502
|
-
e.emitEvent("location", {
|
|
4503
|
-
from: s.current,
|
|
4504
|
-
to: t
|
|
4505
|
-
}), s.current = t;
|
|
4506
|
-
}, [e, t]), null;
|
|
4507
|
-
}, Aa = ({
|
|
4508
|
-
children: t,
|
|
4509
|
-
context: e
|
|
4510
|
-
}) => (Cs({
|
|
4511
|
-
queryFn: async () => (await e.initialize(), !0),
|
|
4512
|
-
queryKey: ["zudoku-initialize", Ss]
|
|
4513
|
-
}), /* @__PURE__ */ i.jsx(Os.Provider, { value: e, children: t }));
|
|
4514
|
-
let jt;
|
|
4515
|
-
const ls = $t(
|
|
4516
|
-
({ children: t, ...e }) => {
|
|
4517
|
-
const s = Fe(
|
|
4518
|
-
() => ({ ...ds, ...e.overrides }),
|
|
4519
|
-
[e.overrides]
|
|
4520
|
-
), r = ze(), n = Fe(() => ({
|
|
4521
|
-
...(e.plugins ?? []).filter(hr).flatMap(
|
|
4522
|
-
(g) => g.getMdxComponents ? [g.getMdxComponents()] : []
|
|
4523
|
-
).reduce(
|
|
4524
|
-
(g, T) => ({ ...g, ...T }),
|
|
4525
|
-
{}
|
|
4526
|
-
),
|
|
4527
|
-
...sr,
|
|
4528
|
-
...e.mdx?.components
|
|
4529
|
-
}), [e.mdx?.components, e.plugins]), { stagger: a } = zs(We), [o, c] = de(!1), u = Fe(
|
|
4530
|
-
() => o ? { stagger: !0 } : { stagger: a },
|
|
4531
|
-
[a, o]
|
|
4532
|
-
), d = qe(), m = At();
|
|
4533
|
-
te(() => {
|
|
4534
|
-
o || c(!0);
|
|
4535
|
-
}, [o, d.location]), jt ??= new Ta(e, m);
|
|
4536
|
-
const k = e.plugins?.flatMap(
|
|
4537
|
-
(w) => fr(w) ? w.getHead?.({ location: r }) ?? [] : []
|
|
4538
|
-
).map((w, g) => /* @__PURE__ */ i.jsx(Xe, { children: w }, g));
|
|
4539
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4540
|
-
k,
|
|
4541
|
-
/* @__PURE__ */ i.jsx(We.Provider, { value: u, children: /* @__PURE__ */ i.jsxs(Aa, { context: jt, children: [
|
|
4542
|
-
/* @__PURE__ */ i.jsx(Oa, {}),
|
|
4543
|
-
/* @__PURE__ */ i.jsx(Zs, { slots: e.slots ?? e.UNSAFE_slotlets, children: /* @__PURE__ */ i.jsx(Or, { components: n, children: /* @__PURE__ */ i.jsx(fs, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ i.jsx(Sa, { value: s, children: /* @__PURE__ */ i.jsx(rr, { children: t ?? /* @__PURE__ */ i.jsx(Ct, {}) }) }) }) }) })
|
|
4544
|
-
] }) })
|
|
4545
|
-
] });
|
|
4546
|
-
}
|
|
4547
|
-
);
|
|
4548
|
-
ls.displayName = "ZudokoInner";
|
|
4549
|
-
const us = (t) => /* @__PURE__ */ i.jsx(wa, { FallbackComponent: Na, children: /* @__PURE__ */ i.jsx(ls, { ...t }) });
|
|
4550
|
-
us.displayName = "Zudoku";
|
|
4551
|
-
const ai = va, ii = Rs, oi = Dr, ci = qr, di = Lr, li = Ps, ui = Xe, hi = _a, fi = Is, mi = nr, pi = zt, gi = Le, vi = Mt, yi = et, xi = Gn, _i = us, bi = Ar, Ea = M, wi = he, ki = As, ji = Es, Ti = Nt;
|
|
1
|
+
import "./index.esm-BnYHxCYC.js";
|
|
2
|
+
import "./useExposedProps-U3pmsHaG.js";
|
|
3
|
+
import "./chunk-PVWAREVJ-BMhpCH5D.js";
|
|
4
|
+
import "./hook-CMeoxziF.js";
|
|
5
|
+
import "./ui/Button.js";
|
|
6
|
+
import "./ui/Callout.js";
|
|
7
|
+
import "./ClientOnly-E7hGysn1.js";
|
|
8
|
+
import "./ZudokuContext-BUZ5hkWB.js";
|
|
9
|
+
import "./ErrorAlert-_1Zmhr68.js";
|
|
10
|
+
import "./Spinner-CI6bRyZw.js";
|
|
11
|
+
import { B as d, i as h, C as l, d as k, c as S, L as y, M, e as T, S as Z, T as c, Z as f, g, h as A, f as B, j as E, u as H } from "./index-pMMX55GH.js";
|
|
4552
12
|
export {
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
_i as Zudoku,
|
|
4570
|
-
wi as useAuth,
|
|
4571
|
-
ki as useCache,
|
|
4572
|
-
bi as useMDXComponents,
|
|
4573
|
-
Ti as useTheme,
|
|
4574
|
-
Ea as useZudoku
|
|
13
|
+
d as Button,
|
|
14
|
+
h as CACHE_KEYS,
|
|
15
|
+
l as Callout,
|
|
16
|
+
k as ClientOnly,
|
|
17
|
+
S as Head,
|
|
18
|
+
y as Link,
|
|
19
|
+
M as Markdown,
|
|
20
|
+
T as Slot,
|
|
21
|
+
Z as Spinner,
|
|
22
|
+
c as Typography,
|
|
23
|
+
f as Zudoku,
|
|
24
|
+
g as useAuth,
|
|
25
|
+
A as useCache,
|
|
26
|
+
B as useMDXComponents,
|
|
27
|
+
E as useTheme,
|
|
28
|
+
H as useZudoku
|
|
4575
29
|
};
|
|
4576
30
|
//# sourceMappingURL=zudoku.components.js.map
|