zudoku 0.0.0-f42e3678 → 0.0.0-f46233e4
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 +32 -12
- package/cli.js +1 -0
- package/dist/app/ZuploBuildConfig.d.ts +1 -1
- package/dist/app/ZuploBuildConfig.js +1 -1
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +6 -5
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -3
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.js +6 -6
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +12 -6
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +5 -2
- package/dist/app/standalone.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/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +11 -4
- package/dist/config/validators/BuildSchema.js +17 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +194 -68
- package/dist/config/validators/InputNavigationSchema.js +6 -2
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +2 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +1 -1
- package/dist/config/validators/NavigationSchema.js +5 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +6 -5
- package/dist/config/validators/ProtectedRoutesSchema.js +5 -14
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
- 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 +1 -1
- package/dist/config/validators/icon-types.js +28 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +57 -30
- package/dist/config/validators/validate.js +26 -3
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +1 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +26 -2
- package/dist/index.d.ts +6 -5
- 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.test.js +1 -0
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -3
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +2 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +2 -2
- package/dist/lib/authentication/providers/supabase.js +1 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +5 -3
- 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.js.map +1 -1
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +13 -6
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +2 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Heading.js +1 -1
- 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 +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/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 +4 -4
- package/dist/lib/components/MobileTopNavigation.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/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +2 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.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 +1 -1
- package/dist/lib/components/context/ZudokuContext.js +11 -3
- 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 +11 -27
- package/dist/lib/components/index.js +3 -16
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +7 -2
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +6 -5
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +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 +3 -3
- package/dist/lib/components/navigation/utils.js +12 -12
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +14 -3
- 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/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 +0 -1
- package/dist/lib/errors/ErrorAlert.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/oas/graphql/circular.js +2 -2
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +22 -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 +1 -1
- 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.js +7 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +9 -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/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +10 -16
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +11 -7
- package/dist/lib/plugins/api-keys/index.js +1 -1
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +4 -4
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +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/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 +22 -7
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +8 -4
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
- package/dist/lib/plugins/openapi/Sidecar.js +4 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -4
- 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/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 +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +5 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js +3 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +2 -2
- package/dist/lib/plugins/openapi/index.js +2 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +5 -4
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +3 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +15 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/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/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/AllOfGroup/AllOfGroupConnector.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +7 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.d.ts → AllOfGroup/AllOfGroupItem.d.ts} +1 -3
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +10 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +16 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +7 -15
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +16 -11
- 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 +36 -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 +72 -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 +0 -6
- 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.js +1 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +1 -2
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +1 -1
- 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.js +1 -1
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +4 -1
- 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 +6 -5
- package/dist/lib/shiki.js +18 -6
- package/dist/lib/shiki.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/CodeBlock.d.ts +1 -1
- package/dist/lib/ui/CodeBlock.js +5 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +2 -6
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +2 -2
- 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/ToggleGroup.d.ts +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 +1 -1
- package/dist/lib/util/MdxComponents.js +5 -3
- 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 +2 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- 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.js +3 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/pastellize.js +4 -4
- package/dist/lib/util/pastellize.js.map +1 -1
- 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/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +2 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/ts.js +3 -3
- package/dist/ts.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +16 -12
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +60 -42
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +76 -3
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +6 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +2 -2
- 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 +28 -0
- package/dist/vite/llms.js +82 -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.js +0 -1
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- 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/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 +7 -15
- 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.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 +1 -1
- 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 +71 -50
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +1 -1
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-llms.d.ts +10 -0
- package/dist/vite/plugin-llms.js +105 -0
- package/dist/vite/plugin-llms.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +16 -29
- 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 +2 -2
- package/dist/vite/plugin-navigation.js +38 -35
- package/dist/vite/plugin-navigation.js.map +1 -1
- 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.js +6 -6
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +2 -0
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -1
- package/dist/vite/plugin.js +4 -2
- 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 +24 -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.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 +8 -33
- 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-B3o-2Xdf.js → Button-DmS4u8Lj.js} +2 -2
- package/lib/{Button-B3o-2Xdf.js.map → Button-DmS4u8Lj.js.map} +1 -1
- package/lib/{Card-CMDQUPM4.js → Card-KFniaZn5.js} +2 -2
- package/lib/{Card-CMDQUPM4.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/CodeBlock-CanTUJLl.js +221 -0
- package/lib/CodeBlock-CanTUJLl.js.map +1 -0
- package/lib/{Command-BYukybsa.js → Command-CJY6q3PF.js} +22 -28
- package/lib/Command-CJY6q3PF.js.map +1 -0
- package/lib/Dialog-BOl0QB3n.js +114 -0
- package/lib/Dialog-BOl0QB3n.js.map +1 -0
- package/lib/{Drawer-DJ05s2pH.js → Drawer-Ci7XwhqT.js} +2 -2
- package/lib/{Drawer-DJ05s2pH.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
- package/lib/{Slot-DAyXieeZ.js → ErrorAlert-Brvk_U1i.js} +2082 -2286
- package/lib/ErrorAlert-Brvk_U1i.js.map +1 -0
- package/lib/{MdxPage-Bsko6_kb.js → MdxPage-CGX72MLx.js} +30 -29
- package/lib/MdxPage-CGX72MLx.js.map +1 -0
- package/lib/{OAuthErrorPage-DJzGiIBt.js → OAuthErrorPage-Cv2Cy3L8.js} +8 -8
- package/lib/OAuthErrorPage-Cv2Cy3L8.js.map +1 -0
- package/lib/{OasProvider-DQQRt3oS.js → OasProvider-Doa4bJq6.js} +5 -4
- package/lib/OasProvider-Doa4bJq6.js.map +1 -0
- package/lib/{OperationList-DpmkHf26.js → OperationList-B6v941u4.js} +2245 -1977
- package/lib/OperationList-B6v941u4.js.map +1 -0
- package/lib/{Pagination-kqFNgtnI.js → Pagination-DLOX63A8.js} +4 -4
- package/lib/{Pagination-kqFNgtnI.js.map → Pagination-DLOX63A8.js.map} +1 -1
- package/lib/RouteGuard-hHAwglew.js +56 -0
- package/lib/RouteGuard-hHAwglew.js.map +1 -0
- package/lib/RouterError-DFKYoA21.js +41 -0
- package/lib/RouterError-DFKYoA21.js.map +1 -0
- package/lib/{SchemaList-DS-pMd6B.js → SchemaList-B_ZSBIZQ.js} +17 -16
- package/lib/{SchemaList-DS-pMd6B.js.map → SchemaList-B_ZSBIZQ.js.map} +1 -1
- package/lib/SchemaView-P_vs98kp.js +458 -0
- package/lib/SchemaView-P_vs98kp.js.map +1 -0
- package/lib/Select-Cd4-iVtm.js +372 -0
- package/lib/Select-Cd4-iVtm.js.map +1 -0
- package/lib/{SignUp-BwOSCD-6.js → SignUp-DmGhKaYB.js} +7 -7
- package/lib/SignUp-DmGhKaYB.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-BMKR4pl6.js → SyntaxHighlight-BvPom2Ah.js} +656 -637
- package/lib/SyntaxHighlight-BvPom2Ah.js.map +1 -0
- package/lib/{Toc-BKDRCQzU.js → Toc-BUvPY3Eo.js} +3 -3
- package/lib/{Toc-BKDRCQzU.js.map → Toc-BUvPY3Eo.js.map} +1 -1
- package/lib/ZudokuContext-CgNnmIdS.js +1507 -0
- package/lib/ZudokuContext-CgNnmIdS.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-BO6B-RAk.js +7965 -0
- package/lib/chunk-PVWAREVJ-BO6B-RAk.js.map +1 -0
- package/lib/{circular-8GWQDvCW.js → circular-Dj7ksnVz.js} +30 -30
- package/lib/{circular-8GWQDvCW.js.map → circular-Dj7ksnVz.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- 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-BsezSzvV.js → createServer-TdhrtpF-.js} +4023 -3976
- package/lib/createServer-TdhrtpF-.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-Cs7hKmdL.js → errors-Djd93sGS.js} +3 -3
- package/lib/errors-Djd93sGS.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-CN3s-MdA.js +31 -0
- package/lib/hook-CN3s-MdA.js.map +1 -0
- package/lib/html-MGnI2uzP.js +33 -0
- package/lib/html-MGnI2uzP.js.map +1 -0
- package/lib/{index-BkW9tJ6j.js → index-B9_Vty7t.js} +166 -50
- package/lib/index-B9_Vty7t.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-D5H3egwO.js +1058 -0
- package/lib/index-D5H3egwO.js.map +1 -0
- package/lib/{index-Bg7Js3jB.js → index-flQyzEBn.js} +732 -702
- package/lib/index-flQyzEBn.js.map +1 -0
- package/lib/{index-DmNq2fbN.js → index-nGbmHh_A.js} +2 -2
- package/lib/index-nGbmHh_A.js.map +1 -0
- package/lib/{RouteGuard-0wPUKdxJ.js → index.esm-BnYHxCYC.js} +226 -281
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-DpgNxKa2.js +1267 -0
- package/lib/index.esm-DpgNxKa2.js.map +1 -0
- package/lib/invariant-Bm-FVUQE.js.map +1 -1
- 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-Byfu-P5y.js +196 -0
- package/lib/mutation-Byfu-P5y.js.map +1 -0
- 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/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 +1 -1
- package/lib/ui/ActionButton.js +3 -3
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Breadcrumb.js +23 -22
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +4 -3
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +21 -27
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +4 -4
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Pagination.js +28 -29
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ReactComponentDoc.js +28 -0
- package/lib/ui/ReactComponentDoc.js.map +1 -0
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Secret.js +106 -0
- package/lib/ui/Secret.js.map +1 -0
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Value.js +39 -0
- package/lib/ui/Value.js.map +1 -0
- package/lib/useCopyToClipboard-B_085nfO.js +14 -0
- package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
- package/lib/useExposedProps-B8NHdNRq.js +113 -0
- package/lib/useExposedProps-B8NHdNRq.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- 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 +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +14 -15
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +57 -58
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +3 -2
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +24 -31
- package/lib/zudoku.hooks.js +19 -20
- 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 +30 -24
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +253 -278
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +29 -30
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2507 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +69 -73
- package/src/app/ZuploBuildConfig.ts +1 -1
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +7 -6
- package/src/app/entry.server.tsx +4 -4
- package/src/app/env.ts +6 -6
- package/src/app/main.css +12 -16
- package/src/app/main.tsx +24 -12
- package/src/app/standalone.tsx +8 -3
- 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 +1 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +3 -3
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +5 -5
- package/src/lib/authentication/providers/azureb2c.tsx +5 -5
- package/src/lib/authentication/providers/clerk.tsx +5 -5
- package/src/lib/authentication/providers/openid.tsx +6 -6
- package/src/lib/authentication/providers/supabase.tsx +7 -6
- 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 +1 -1
- package/src/lib/components/Bootstrap.tsx +1 -0
- package/src/lib/components/BuildCheck.tsx +27 -14
- package/src/lib/components/Header.tsx +5 -5
- package/src/lib/components/Heading.tsx +2 -3
- package/src/lib/components/LanguageIcon.tsx +181 -0
- package/src/lib/components/Layout.tsx +3 -22
- package/src/lib/components/Markdown.tsx +5 -2
- package/src/lib/components/Meta.tsx +45 -0
- package/src/lib/components/MobileTopNavigation.tsx +11 -13
- 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/TopNavigation.tsx +3 -3
- package/src/lib/components/Zudoku.tsx +2 -2
- 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 +13 -4
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/index.ts +3 -19
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -5
- package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +16 -17
- package/src/lib/core/ZudokuContext.ts +25 -6
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +0 -1
- package/src/lib/errors/TopLevelError.tsx +2 -4
- package/src/lib/hooks/useEvent.test.tsx +2 -2
- package/src/lib/oas/graphql/circular.ts +3 -3
- package/src/lib/oas/graphql/index.ts +20 -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 +2 -2
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +7 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -4
- package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +24 -73
- package/src/lib/plugins/api-keys/index.tsx +17 -11
- package/src/lib/plugins/custom-pages/index.tsx +4 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +6 -6
- package/src/lib/plugins/markdown/index.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- 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 +25 -11
- package/src/lib/plugins/openapi/OperationListItem.tsx +93 -74
- package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
- package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -12
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -13
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -2
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +4 -3
- package/src/lib/plugins/openapi/SidecarExamples.tsx +3 -10
- 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/context.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +11 -3
- package/src/lib/plugins/openapi/index.tsx +5 -4
- package/src/lib/plugins/openapi/interfaces.ts +7 -4
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +3 -3
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +4 -4
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +12 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +3 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +31 -3
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +3 -3
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
- 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/{LogicalGroup/LogicalGroupConnector.tsx → AllOfGroup/AllOfGroupConnector.tsx} +4 -25
- package/src/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.tsx → AllOfGroup/AllOfGroupItem.tsx} +3 -11
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +42 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +9 -27
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +35 -23
- package/src/lib/plugins/openapi/schema/UnionView.tsx +143 -0
- package/src/lib/plugins/openapi/schema/union-helpers.ts +124 -0
- package/src/lib/plugins/openapi/schema/utils.ts +0 -11
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
- package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +1 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +3 -4
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +3 -3
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +2 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +3 -4
- package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
- package/src/lib/shiki.ts +21 -6
- package/src/lib/ui/Breadcrumb.tsx +1 -0
- package/src/lib/ui/CodeBlock.tsx +11 -19
- package/src/lib/ui/Command.tsx +2 -4
- package/src/lib/ui/Dialog.tsx +12 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/ui/Form.tsx +4 -4
- 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/ToggleGroup.tsx +1 -1
- package/src/lib/ui/Value.tsx +42 -0
- package/src/lib/util/MdxComponents.tsx +13 -3
- package/src/lib/util/cn.ts +1 -1
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/groupBy.ts +1 -0
- package/src/lib/util/humanFileSize.ts +2 -3
- package/src/lib/util/invariant.ts +1 -0
- package/src/lib/util/pastellize.ts +4 -4
- package/src/lib/util/traverse.ts +36 -0
- package/src/lib/util/types.ts +1 -1
- package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -1
- package/src/shiki/langs/vue-vine.js +1 -0
- 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/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.js +0 -10
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/CodeBlock-B-G0eKtw.js +0 -85
- package/lib/CodeBlock-B-G0eKtw.js.map +0 -1
- package/lib/Command-BYukybsa.js.map +0 -1
- package/lib/Dialog-u9Uz9sTt.js +0 -99
- package/lib/Dialog-u9Uz9sTt.js.map +0 -1
- package/lib/MdxPage-Bsko6_kb.js.map +0 -1
- package/lib/OAuthErrorPage-DJzGiIBt.js.map +0 -1
- package/lib/OasProvider-DQQRt3oS.js.map +0 -1
- package/lib/OperationList-DpmkHf26.js.map +0 -1
- package/lib/RouteGuard-0wPUKdxJ.js.map +0 -1
- package/lib/SchemaView-BnN6WHjw.js +0 -366
- package/lib/SchemaView-BnN6WHjw.js.map +0 -1
- package/lib/Select-BmTTKNPp.js +0 -273
- package/lib/Select-BmTTKNPp.js.map +0 -1
- package/lib/SignUp-BwOSCD-6.js.map +0 -1
- package/lib/Slot-DAyXieeZ.js.map +0 -1
- package/lib/SyntaxHighlight-BMKR4pl6.js.map +0 -1
- package/lib/ZudokuContext-CLl5w57E.js +0 -1278
- package/lib/ZudokuContext-CLl5w57E.js.map +0 -1
- package/lib/chunk-QMGIS6GS-CEOk3lro.js +0 -1839
- package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +0 -1
- package/lib/createServer-BsezSzvV.js.map +0 -1
- package/lib/errors-Cs7hKmdL.js.map +0 -1
- package/lib/hook-DbUCLQNg.js +0 -247
- package/lib/hook-DbUCLQNg.js.map +0 -1
- package/lib/index-A5Qdwj1B.js +0 -4081
- package/lib/index-A5Qdwj1B.js.map +0 -1
- package/lib/index-Bg7Js3jB.js.map +0 -1
- package/lib/index-BkW9tJ6j.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-DmNq2fbN.js.map +0 -1
- package/lib/index.esm-CdzlRw50.js +0 -1254
- package/lib/index.esm-CdzlRw50.js.map +0 -1
- package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
- package/lib/useExposedProps-KcgXHKeE.js +0 -9
- package/lib/useExposedProps-KcgXHKeE.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/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as at } from "./jsx-runtime-
|
|
1
|
+
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { Fragment as rs, memo as os } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { a as ss } from "./ZudokuContext-CgNnmIdS.js";
|
|
4
4
|
import { c as as } from "./cn-dYga0KKN.js";
|
|
5
5
|
import { g as is, i as ls } from "./invariant-Bm-FVUQE.js";
|
|
6
|
-
import { C as us } from "./CodeBlock-
|
|
6
|
+
import { C as us } from "./CodeBlock-CanTUJLl.js";
|
|
7
7
|
import { EmbeddedCodeBlock as cs } from "./ui/EmbeddedCodeBlock.js";
|
|
8
|
-
function eh() {
|
|
9
|
-
}
|
|
10
8
|
function th() {
|
|
11
9
|
}
|
|
12
|
-
function nh(
|
|
10
|
+
function nh() {
|
|
11
|
+
}
|
|
12
|
+
function rh(t) {
|
|
13
13
|
const e = [], n = String(t || "");
|
|
14
14
|
let r = n.indexOf(","), o = 0, s = !1;
|
|
15
15
|
for (; !s; ) {
|
|
@@ -25,9 +25,9 @@ function Ir(t, e) {
|
|
|
25
25
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
26
26
|
).trim();
|
|
27
27
|
}
|
|
28
|
-
const hs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,
|
|
28
|
+
const hs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, fs = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ps = {};
|
|
29
29
|
function In(t, e) {
|
|
30
|
-
return (
|
|
30
|
+
return (ps.jsx ? fs : hs).test(t);
|
|
31
31
|
}
|
|
32
32
|
const ds = /[ \t\n\f\r]/g;
|
|
33
33
|
function Ct(t) {
|
|
@@ -89,7 +89,7 @@ W.prototype.property = "";
|
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
91
|
let gs = 0;
|
|
92
|
-
const x = ye(), $ = ye(),
|
|
92
|
+
const x = ye(), $ = ye(), Lr = ye(), b = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
94
|
return 2 ** ++gs;
|
|
95
95
|
}
|
|
@@ -100,7 +100,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
102
|
number: b,
|
|
103
|
-
overloadedBoolean:
|
|
103
|
+
overloadedBoolean: Lr,
|
|
104
104
|
spaceSeparated: I
|
|
105
105
|
}, Symbol.toStringTag, { value: "Module" })), At = (
|
|
106
106
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
@@ -122,15 +122,15 @@ let hn = class extends W {
|
|
|
122
122
|
*/
|
|
123
123
|
constructor(e, n, r, o) {
|
|
124
124
|
let s = -1;
|
|
125
|
-
if (super(e, n),
|
|
125
|
+
if (super(e, n), Ln(this, "space", o), typeof r == "number")
|
|
126
126
|
for (; ++s < At.length; ) {
|
|
127
127
|
const a = At[s];
|
|
128
|
-
|
|
128
|
+
Ln(this, At[s], (r & Ht[a]) === Ht[a]);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
hn.prototype.defined = !0;
|
|
133
|
-
function
|
|
133
|
+
function Ln(t, e, n) {
|
|
134
134
|
n && (t[e] = n);
|
|
135
135
|
}
|
|
136
136
|
function Ie(t) {
|
|
@@ -146,7 +146,7 @@ function Ie(t) {
|
|
|
146
146
|
}
|
|
147
147
|
return new qe(e, n, t.space);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const Pr = Ie({
|
|
150
150
|
properties: {
|
|
151
151
|
ariaActiveDescendant: null,
|
|
152
152
|
ariaAtomic: $,
|
|
@@ -256,7 +256,7 @@ const ms = Ie({
|
|
|
256
256
|
dir: null,
|
|
257
257
|
dirName: null,
|
|
258
258
|
disabled: x,
|
|
259
|
-
download:
|
|
259
|
+
download: Lr,
|
|
260
260
|
draggable: $,
|
|
261
261
|
encType: null,
|
|
262
262
|
enterKeyHint: null,
|
|
@@ -1171,7 +1171,7 @@ const ms = Ie({
|
|
|
1171
1171
|
xLinkTitle: "xlinkTitle",
|
|
1172
1172
|
xLinkType: "xlinkType",
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
|
-
}, ws = /[A-Z]/g,
|
|
1174
|
+
}, ws = /[A-Z]/g, Pn = /-[a-z]/g, Cs = /^data[-\w.:]+$/i;
|
|
1175
1175
|
function _s(t, e) {
|
|
1176
1176
|
const n = zt(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
@@ -1179,11 +1179,11 @@ function _s(t, e) {
|
|
|
1179
1179
|
return t.property[t.normal[n]];
|
|
1180
1180
|
if (n.length > 4 && n.slice(0, 4) === "data" && Cs.test(e)) {
|
|
1181
1181
|
if (e.charAt(4) === "-") {
|
|
1182
|
-
const s = e.slice(5).replace(
|
|
1182
|
+
const s = e.slice(5).replace(Pn, ks);
|
|
1183
1183
|
r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
|
|
1184
1184
|
} else {
|
|
1185
1185
|
const s = e.slice(4);
|
|
1186
|
-
if (!
|
|
1186
|
+
if (!Pn.test(s)) {
|
|
1187
1187
|
let a = s.replace(ws, Ss);
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
@@ -1198,8 +1198,8 @@ function Ss(t) {
|
|
|
1198
1198
|
function ks(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const vs = Nr([
|
|
1202
|
-
function
|
|
1201
|
+
const vs = Nr([Pr, ms, Mr, Or, Dr], "html"), fn = Nr([Pr, ys, Mr, Or, Dr], "svg");
|
|
1202
|
+
function ih(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1205
1205
|
}
|
|
@@ -1211,7 +1211,7 @@ function xs() {
|
|
|
1211
1211
|
if ($n) return Rt;
|
|
1212
1212
|
$n = 1;
|
|
1213
1213
|
var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
|
|
1214
|
-
`, u = "/", c = "*", h = "",
|
|
1214
|
+
`, u = "/", c = "*", h = "", p = "comment", d = "declaration";
|
|
1215
1215
|
Rt = function(g, C) {
|
|
1216
1216
|
if (typeof g != "string")
|
|
1217
1217
|
throw new TypeError("First argument must be a string");
|
|
@@ -1240,7 +1240,7 @@ function xs() {
|
|
|
1240
1240
|
);
|
|
1241
1241
|
if (k.reason = R, k.filename = C.source, k.line = y, k.column = m, k.source = g, !C.silent) throw k;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function L(R) {
|
|
1244
1244
|
var k = R.exec(g);
|
|
1245
1245
|
if (k) {
|
|
1246
1246
|
var G = k[0];
|
|
@@ -1248,7 +1248,7 @@ function xs() {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
function j() {
|
|
1251
|
-
|
|
1251
|
+
L(n);
|
|
1252
1252
|
}
|
|
1253
1253
|
function Z(R) {
|
|
1254
1254
|
var k;
|
|
@@ -1265,21 +1265,21 @@ function xs() {
|
|
|
1265
1265
|
return D("End of comment missing");
|
|
1266
1266
|
var G = g.slice(2, k - 2);
|
|
1267
1267
|
return m += 2, _(G), g = g.slice(k), m += 2, R({
|
|
1268
|
-
type:
|
|
1268
|
+
type: p,
|
|
1269
1269
|
comment: G
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
function ce() {
|
|
1274
|
-
var R = S(), k =
|
|
1274
|
+
var R = S(), k = L(r);
|
|
1275
1275
|
if (k) {
|
|
1276
|
-
if (ee(), !
|
|
1277
|
-
var G =
|
|
1276
|
+
if (ee(), !L(o)) return D("property missing ':'");
|
|
1277
|
+
var G = L(s), Te = R({
|
|
1278
1278
|
type: d,
|
|
1279
|
-
property:
|
|
1280
|
-
value: G ?
|
|
1279
|
+
property: f(k[0].replace(t, h)),
|
|
1280
|
+
value: G ? f(G[0].replace(t, h)) : h
|
|
1281
1281
|
});
|
|
1282
|
-
return
|
|
1282
|
+
return L(a), Te;
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
function te() {
|
|
@@ -1291,7 +1291,7 @@ function xs() {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return j(), te();
|
|
1293
1293
|
};
|
|
1294
|
-
function
|
|
1294
|
+
function f(g) {
|
|
1295
1295
|
return g ? g.replace(i, h) : h;
|
|
1296
1296
|
}
|
|
1297
1297
|
return Rt;
|
|
@@ -1350,7 +1350,7 @@ function Rs() {
|
|
|
1350
1350
|
return r.default = r, Oe = r, Oe;
|
|
1351
1351
|
}
|
|
1352
1352
|
var Is = Rs();
|
|
1353
|
-
const Ns = /* @__PURE__ */ is(Is),
|
|
1353
|
+
const Ns = /* @__PURE__ */ is(Is), Ls = Br("end"), Fr = Br("start");
|
|
1354
1354
|
function Br(t) {
|
|
1355
1355
|
return e;
|
|
1356
1356
|
function e(n) {
|
|
@@ -1363,12 +1363,12 @@ function Br(t) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const e = Fr(t), n =
|
|
1366
|
+
function lh(t) {
|
|
1367
|
+
const e = Fr(t), n = Ls(t);
|
|
1368
1368
|
if (e && n)
|
|
1369
1369
|
return { start: e, end: n };
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Ps(t) {
|
|
1372
1372
|
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ? Wt(t) : "";
|
|
1373
1373
|
}
|
|
1374
1374
|
function Wt(t) {
|
|
@@ -1451,7 +1451,7 @@ class H extends Error {
|
|
|
1451
1451
|
l && (s.place = l.position);
|
|
1452
1452
|
}
|
|
1453
1453
|
const i = s.place && "start" in s.place ? s.place.start : s.place;
|
|
1454
|
-
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name =
|
|
1454
|
+
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name = Ps(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = a && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual, this.expected, this.note, this.url;
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
H.prototype.file = "";
|
|
@@ -1467,7 +1467,7 @@ H.prototype.fatal = void 0;
|
|
|
1467
1467
|
H.prototype.place = void 0;
|
|
1468
1468
|
H.prototype.ruleId = void 0;
|
|
1469
1469
|
H.prototype.source = void 0;
|
|
1470
|
-
const
|
|
1470
|
+
const pn = {}.hasOwnProperty, $s = /* @__PURE__ */ new Map(), Ts = /[A-Z]/g, Ms = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Os = /* @__PURE__ */ new Set(["td", "th"]), jr = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1471
1471
|
function Ds(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -1497,7 +1497,7 @@ function Ds(t, e) {
|
|
|
1497
1497
|
ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
|
|
1498
1498
|
passKeys: e.passKeys !== !1,
|
|
1499
1499
|
passNode: e.passNode || !1,
|
|
1500
|
-
schema: e.space === "svg" ?
|
|
1500
|
+
schema: e.space === "svg" ? fn : vs,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
1503
|
}, s = Ur(o, t, void 0);
|
|
@@ -1525,7 +1525,7 @@ function Ur(t, e, n) {
|
|
|
1525
1525
|
function Gs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
|
-
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o =
|
|
1528
|
+
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1529
1529
|
const s = Hr(t, e.tagName, !1), a = Vs(t, e);
|
|
1530
1530
|
let i = gn(t, e);
|
|
1531
1531
|
return Ms.has(e.tagName) && (i = i.filter(function(l) {
|
|
@@ -1551,7 +1551,7 @@ function Bs(t, e) {
|
|
|
1551
1551
|
function js(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
|
-
e.name === "svg" && r.space === "html" && (o =
|
|
1554
|
+
e.name === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1555
1555
|
const s = e.name === null ? t.Fragment : Hr(t, e.name, !0), a = qs(t, e), i = gn(t, e);
|
|
1556
1556
|
return zr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
@@ -1600,7 +1600,7 @@ function Vs(t, e) {
|
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
|
-
if (o !== "children" &&
|
|
1603
|
+
if (o !== "children" && pn.call(e.properties, o)) {
|
|
1604
1604
|
const s = Xs(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
@@ -1723,7 +1723,7 @@ function Hr(t, e, n) {
|
|
|
1723
1723
|
/** @type {string | number} */
|
|
1724
1724
|
r.value
|
|
1725
1725
|
);
|
|
1726
|
-
return
|
|
1726
|
+
return pn.call(t.components, o) ? t.components[o] : o;
|
|
1727
1727
|
}
|
|
1728
1728
|
if (t.evaluater)
|
|
1729
1729
|
return t.evaluater.evaluateExpression(r);
|
|
@@ -1745,7 +1745,7 @@ function Ys(t) {
|
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
|
|
1748
|
+
pn.call(t, n) && (e[Js(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
1751
|
function Js(t) {
|
|
@@ -1770,7 +1770,7 @@ const Wr = (
|
|
|
1770
1770
|
* @param {Test} [test]
|
|
1771
1771
|
* @returns {Check}
|
|
1772
1772
|
*/
|
|
1773
|
-
function(t) {
|
|
1773
|
+
(function(t) {
|
|
1774
1774
|
if (t == null)
|
|
1775
1775
|
return na;
|
|
1776
1776
|
if (typeof t == "function")
|
|
@@ -1780,7 +1780,7 @@ const Wr = (
|
|
|
1780
1780
|
if (typeof t == "string")
|
|
1781
1781
|
return ta(t);
|
|
1782
1782
|
throw new Error("Expected function, string, or object as test");
|
|
1783
|
-
}
|
|
1783
|
+
})
|
|
1784
1784
|
);
|
|
1785
1785
|
function Qs(t) {
|
|
1786
1786
|
const e = [];
|
|
@@ -1855,13 +1855,13 @@ function aa(t, e, n, r) {
|
|
|
1855
1855
|
typeof h.name == "string" ? h.name : void 0
|
|
1856
1856
|
)
|
|
1857
1857
|
);
|
|
1858
|
-
Object.defineProperty(
|
|
1858
|
+
Object.defineProperty(p, "name", {
|
|
1859
1859
|
value: "node (" + (l.type + (d ? "<" + d + ">" : "")) + ")"
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
|
-
return
|
|
1863
|
-
function
|
|
1864
|
-
let d = Vr,
|
|
1862
|
+
return p;
|
|
1863
|
+
function p() {
|
|
1864
|
+
let d = Vr, f, g, C;
|
|
1865
1865
|
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d = ia(n(l, c)), d[0] === Fn))
|
|
1866
1866
|
return d;
|
|
1867
1867
|
if ("children" in l && l.children) {
|
|
@@ -1872,9 +1872,9 @@ function aa(t, e, n, r) {
|
|
|
1872
1872
|
if (y.children && d[0] !== sa)
|
|
1873
1873
|
for (g = (r ? y.children.length : -1) + a, C = c.concat(y); g > -1 && g < y.children.length; ) {
|
|
1874
1874
|
const m = y.children[g];
|
|
1875
|
-
if (
|
|
1876
|
-
return
|
|
1877
|
-
g = typeof
|
|
1875
|
+
if (f = i(m, g, C)(), f[0] === Fn)
|
|
1876
|
+
return f;
|
|
1877
|
+
g = typeof f[1] == "number" ? f[1] : g + a;
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
1880
|
return d;
|
|
@@ -1947,7 +1947,7 @@ function ca(t) {
|
|
|
1947
1947
|
return mn(t);
|
|
1948
1948
|
}
|
|
1949
1949
|
function mn(t) {
|
|
1950
|
-
return Array.isArray(t) ? ha(t) : t instanceof RegExp ? t : typeof t == "object" ?
|
|
1950
|
+
return Array.isArray(t) ? ha(t) : t instanceof RegExp ? t : typeof t == "object" ? fa(t) : t;
|
|
1951
1951
|
}
|
|
1952
1952
|
function ha(t) {
|
|
1953
1953
|
let e = [];
|
|
@@ -1955,7 +1955,7 @@ function ha(t) {
|
|
|
1955
1955
|
e[n] = mn(t[n]);
|
|
1956
1956
|
return e;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function fa(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
1961
|
e[n] = mn(t[n]);
|
|
@@ -2056,7 +2056,7 @@ var Qr = class {
|
|
|
2056
2056
|
if (t === null)
|
|
2057
2057
|
return this._defaults;
|
|
2058
2058
|
const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
|
|
2059
|
-
(o) =>
|
|
2059
|
+
(o) => pa(t.parent, o.parentScopes)
|
|
2060
2060
|
);
|
|
2061
2061
|
return r ? new eo(
|
|
2062
2062
|
r.fontStyle,
|
|
@@ -2103,7 +2103,7 @@ var Qr = class {
|
|
|
2103
2103
|
return r === e ? n.reverse() : void 0;
|
|
2104
2104
|
}
|
|
2105
2105
|
};
|
|
2106
|
-
function
|
|
2106
|
+
function pa(t, e) {
|
|
2107
2107
|
if (e.length === 0)
|
|
2108
2108
|
return !0;
|
|
2109
2109
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2151,8 +2151,8 @@ function ga(t) {
|
|
|
2151
2151
|
if (typeof a.settings.fontStyle == "string") {
|
|
2152
2152
|
l = 0;
|
|
2153
2153
|
let h = a.settings.fontStyle.split(" ");
|
|
2154
|
-
for (let
|
|
2155
|
-
switch (h[
|
|
2154
|
+
for (let p = 0, d = h.length; p < d; p++)
|
|
2155
|
+
switch (h[p]) {
|
|
2156
2156
|
case "italic":
|
|
2157
2157
|
l = l | 1;
|
|
2158
2158
|
break;
|
|
@@ -2171,9 +2171,9 @@ function ga(t) {
|
|
|
2171
2171
|
typeof a.settings.foreground == "string" && Un(a.settings.foreground) && (u = a.settings.foreground);
|
|
2172
2172
|
let c = null;
|
|
2173
2173
|
typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
|
|
2174
|
-
for (let h = 0,
|
|
2175
|
-
let
|
|
2176
|
-
|
|
2174
|
+
for (let h = 0, p = i.length; h < p; h++) {
|
|
2175
|
+
let f = i[h].trim().split(" "), g = f[f.length - 1], C = null;
|
|
2176
|
+
f.length > 1 && (C = f.slice(0, f.length - 1), C.reverse()), n[r++] = new ma(
|
|
2177
2177
|
g,
|
|
2178
2178
|
C,
|
|
2179
2179
|
o,
|
|
@@ -2342,8 +2342,8 @@ var ba = class {
|
|
|
2342
2342
|
* A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
|
|
2343
2343
|
*/
|
|
2344
2344
|
static set(e, n, r, o, s, a, i) {
|
|
2345
|
-
let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e),
|
|
2346
|
-
return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (
|
|
2345
|
+
let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e), p = K.getForeground(e), d = K.getBackground(e);
|
|
2346
|
+
return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (p = a), i !== 0 && (d = i), (l << 0 | u << 8 | c << 10 | h << 11 | p << 15 | d << 24) >>> 0;
|
|
2347
2347
|
}
|
|
2348
2348
|
};
|
|
2349
2349
|
function lt(t, e) {
|
|
@@ -2579,7 +2579,7 @@ function ro(t) {
|
|
|
2579
2579
|
return new Na(n, r);
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
|
-
var
|
|
2582
|
+
var La = /\\(\d+)/, Hn = /\\(\d+)/g, Pa = -1, oo = -2;
|
|
2583
2583
|
var Xe = class {
|
|
2584
2584
|
$location;
|
|
2585
2585
|
id;
|
|
@@ -2848,11 +2848,11 @@ var Xe = class {
|
|
|
2848
2848
|
break;
|
|
2849
2849
|
case 3:
|
|
2850
2850
|
case 4:
|
|
2851
|
-
const h = u.scopeName,
|
|
2851
|
+
const h = u.scopeName, p = u.kind === 4 ? u.ruleName : null, d = n.getExternalGrammar(h, r);
|
|
2852
2852
|
if (d)
|
|
2853
|
-
if (
|
|
2854
|
-
let
|
|
2855
|
-
|
|
2853
|
+
if (p) {
|
|
2854
|
+
let f = d.repository[p];
|
|
2855
|
+
f && (l = U.getCompiledRuleId(f, n, d.repository));
|
|
2856
2856
|
} else
|
|
2857
2857
|
l = U.getCompiledRuleId(d.repository.$self, n, d.repository);
|
|
2858
2858
|
break;
|
|
@@ -2890,7 +2890,7 @@ var Xe = class {
|
|
|
2890
2890
|
this.hasAnchor = a, o === 0 ? this.source = e : (s.push(e.substring(o, r)), this.source = s.join(""));
|
|
2891
2891
|
} else
|
|
2892
2892
|
this.hasAnchor = !1, this.source = e;
|
|
2893
|
-
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences =
|
|
2893
|
+
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = La.test(this.source) : this.hasBackReferences = !1;
|
|
2894
2894
|
}
|
|
2895
2895
|
clone() {
|
|
2896
2896
|
return new ao(this.source, this.ruleId);
|
|
@@ -2987,7 +2987,7 @@ var Xe = class {
|
|
|
2987
2987
|
captureIndices: r.captureIndices
|
|
2988
2988
|
} : null;
|
|
2989
2989
|
}
|
|
2990
|
-
},
|
|
2990
|
+
}, Lt = class {
|
|
2991
2991
|
constructor(t, e) {
|
|
2992
2992
|
this.languageId = t, this.tokenType = e;
|
|
2993
2993
|
}
|
|
@@ -2995,7 +2995,7 @@ var Xe = class {
|
|
|
2995
2995
|
_defaultAttributes;
|
|
2996
2996
|
_embeddedLanguagesMatcher;
|
|
2997
2997
|
constructor(e, n) {
|
|
2998
|
-
this._defaultAttributes = new
|
|
2998
|
+
this._defaultAttributes = new Lt(
|
|
2999
2999
|
e,
|
|
3000
3000
|
8
|
|
3001
3001
|
/* NotSet */
|
|
@@ -3007,10 +3007,10 @@ var Xe = class {
|
|
|
3007
3007
|
getBasicScopeAttributes(e) {
|
|
3008
3008
|
return e === null ? Yt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
|
|
3009
3009
|
}
|
|
3010
|
-
static _NULL_SCOPE_METADATA = new
|
|
3010
|
+
static _NULL_SCOPE_METADATA = new Lt(0, 0);
|
|
3011
3011
|
_getBasicScopeAttributes = new Qr((e) => {
|
|
3012
3012
|
const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
|
|
3013
|
-
return new
|
|
3013
|
+
return new Lt(n, r);
|
|
3014
3014
|
});
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Given a produced TM scope, return the language that token describes or null if unknown.
|
|
@@ -3085,10 +3085,10 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3085
3085
|
for (; !u; ) {
|
|
3086
3086
|
if (i !== 0 && Date.now() - h > i)
|
|
3087
3087
|
return new qn(o, !0);
|
|
3088
|
-
|
|
3088
|
+
p();
|
|
3089
3089
|
}
|
|
3090
3090
|
return new qn(o, !1);
|
|
3091
|
-
function
|
|
3091
|
+
function p() {
|
|
3092
3092
|
const d = Ga(
|
|
3093
3093
|
t,
|
|
3094
3094
|
e,
|
|
@@ -3101,18 +3101,18 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3101
3101
|
s.produce(o, l), u = !0;
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
|
-
const
|
|
3105
|
-
if (g ===
|
|
3104
|
+
const f = d.captureIndices, g = d.matchedRuleId, C = f && f.length > 0 ? f[0].end > r : !1;
|
|
3105
|
+
if (g === Pa) {
|
|
3106
3106
|
const y = o.getRule(t);
|
|
3107
|
-
s.produce(o,
|
|
3107
|
+
s.produce(o, f[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
|
|
3108
3108
|
t,
|
|
3109
3109
|
e,
|
|
3110
3110
|
n,
|
|
3111
3111
|
o,
|
|
3112
3112
|
s,
|
|
3113
3113
|
y.endCaptures,
|
|
3114
|
-
|
|
3115
|
-
), s.produce(o,
|
|
3114
|
+
f
|
|
3115
|
+
), s.produce(o, f[0].end);
|
|
3116
3116
|
const m = o;
|
|
3117
3117
|
if (o = o.parent, c = m.getAnchorPos(), !C && m.getEnterPos() === r) {
|
|
3118
3118
|
o = m, s.produce(o, l), u = !0;
|
|
@@ -3120,8 +3120,8 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3120
3120
|
}
|
|
3121
3121
|
} else {
|
|
3122
3122
|
const y = t.getRule(g);
|
|
3123
|
-
s.produce(o,
|
|
3124
|
-
const m = o, _ = y.getName(e.content,
|
|
3123
|
+
s.produce(o, f[0].start);
|
|
3124
|
+
const m = o, _ = y.getName(e.content, f), S = o.contentNameScopesList.pushAttributed(
|
|
3125
3125
|
_,
|
|
3126
3126
|
t
|
|
3127
3127
|
);
|
|
@@ -3129,7 +3129,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3129
3129
|
g,
|
|
3130
3130
|
r,
|
|
3131
3131
|
c,
|
|
3132
|
-
|
|
3132
|
+
f[0].end === l,
|
|
3133
3133
|
null,
|
|
3134
3134
|
S,
|
|
3135
3135
|
S
|
|
@@ -3142,19 +3142,19 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3142
3142
|
o,
|
|
3143
3143
|
s,
|
|
3144
3144
|
A.beginCaptures,
|
|
3145
|
-
|
|
3146
|
-
), s.produce(o,
|
|
3145
|
+
f
|
|
3146
|
+
), s.produce(o, f[0].end), c = f[0].end;
|
|
3147
3147
|
const D = A.getContentName(
|
|
3148
3148
|
e.content,
|
|
3149
|
-
|
|
3150
|
-
),
|
|
3149
|
+
f
|
|
3150
|
+
), L = S.pushAttributed(
|
|
3151
3151
|
D,
|
|
3152
3152
|
t
|
|
3153
3153
|
);
|
|
3154
|
-
if (o = o.withContentNameScopesList(
|
|
3154
|
+
if (o = o.withContentNameScopesList(L), A.endHasBackReferences && (o = o.withEndRule(
|
|
3155
3155
|
A.getEndWithResolvedBackReferences(
|
|
3156
3156
|
e.content,
|
|
3157
|
-
|
|
3157
|
+
f
|
|
3158
3158
|
)
|
|
3159
3159
|
)), !C && m.hasSameRuleAs(o)) {
|
|
3160
3160
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
@@ -3169,19 +3169,19 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3169
3169
|
o,
|
|
3170
3170
|
s,
|
|
3171
3171
|
A.beginCaptures,
|
|
3172
|
-
|
|
3173
|
-
), s.produce(o,
|
|
3172
|
+
f
|
|
3173
|
+
), s.produce(o, f[0].end), c = f[0].end;
|
|
3174
3174
|
const D = A.getContentName(
|
|
3175
3175
|
e.content,
|
|
3176
|
-
|
|
3177
|
-
),
|
|
3176
|
+
f
|
|
3177
|
+
), L = S.pushAttributed(
|
|
3178
3178
|
D,
|
|
3179
3179
|
t
|
|
3180
3180
|
);
|
|
3181
|
-
if (o = o.withContentNameScopesList(
|
|
3181
|
+
if (o = o.withContentNameScopesList(L), A.whileHasBackReferences && (o = o.withEndRule(
|
|
3182
3182
|
A.getWhileWithResolvedBackReferences(
|
|
3183
3183
|
e.content,
|
|
3184
|
-
|
|
3184
|
+
f
|
|
3185
3185
|
)
|
|
3186
3186
|
)), !C && m.hasSameRuleAs(o)) {
|
|
3187
3187
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
@@ -3194,13 +3194,13 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3194
3194
|
o,
|
|
3195
3195
|
s,
|
|
3196
3196
|
y.captures,
|
|
3197
|
-
|
|
3198
|
-
), s.produce(o,
|
|
3197
|
+
f
|
|
3198
|
+
), s.produce(o, f[0].end), o = o.pop(), !C) {
|
|
3199
3199
|
o = o.safePop(), s.produce(o, l), u = !0;
|
|
3200
3200
|
return;
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
|
|
3203
|
+
f[0].end > r && (r = f[0].end, n = !1);
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
3206
|
function Da(t, e, n, r, o, s) {
|
|
@@ -3250,15 +3250,15 @@ function Fa(t, e, n, r, o, s) {
|
|
|
3250
3250
|
function Ba(t, e, n, r, o, s, a) {
|
|
3251
3251
|
let i = Number.MAX_VALUE, l = null, u, c = 0;
|
|
3252
3252
|
const h = s.contentNameScopesList.getScopeNames();
|
|
3253
|
-
for (let
|
|
3254
|
-
const
|
|
3255
|
-
if (!
|
|
3253
|
+
for (let p = 0, d = t.length; p < d; p++) {
|
|
3254
|
+
const f = t[p];
|
|
3255
|
+
if (!f.matcher(h))
|
|
3256
3256
|
continue;
|
|
3257
|
-
const g = e.getRule(
|
|
3257
|
+
const g = e.getRule(f.ruleId), { ruleScanner: C, findOptions: y } = lo(g, e, null, r, o === a), m = C.findNextMatchSync(n, o, y);
|
|
3258
3258
|
if (!m)
|
|
3259
3259
|
continue;
|
|
3260
3260
|
const _ = m.captureIndices[0].start;
|
|
3261
|
-
if (!(_ >= i) && (i = _, l = m.captureIndices, u = m.ruleId, c =
|
|
3261
|
+
if (!(_ >= i) && (i = _, l = m.captureIndices, u = m.ruleId, c = f.priority, i === o))
|
|
3262
3262
|
break;
|
|
3263
3263
|
}
|
|
3264
3264
|
return l ? {
|
|
@@ -3286,8 +3286,8 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3286
3286
|
return;
|
|
3287
3287
|
const i = e.content, l = Math.min(s.length, a.length), u = [], c = a[0].end;
|
|
3288
3288
|
for (let h = 0; h < l; h++) {
|
|
3289
|
-
const
|
|
3290
|
-
if (
|
|
3289
|
+
const p = s[h];
|
|
3290
|
+
if (p === null)
|
|
3291
3291
|
continue;
|
|
3292
3292
|
const d = a[h];
|
|
3293
3293
|
if (d.length === 0)
|
|
@@ -3296,8 +3296,8 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3296
3296
|
break;
|
|
3297
3297
|
for (; u.length > 0 && u[u.length - 1].endPos <= d.start; )
|
|
3298
3298
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3299
|
-
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start),
|
|
3300
|
-
const g =
|
|
3299
|
+
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
3300
|
+
const g = p.getName(i, a), C = r.contentNameScopesList.pushAttributed(g, t), y = p.getContentName(i, a), m = C.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, C, m), S = t.createOnigString(i.substring(0, d.end));
|
|
3301
3301
|
io(
|
|
3302
3302
|
t,
|
|
3303
3303
|
S,
|
|
@@ -3311,9 +3311,9 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3311
3311
|
), no(S);
|
|
3312
3312
|
continue;
|
|
3313
3313
|
}
|
|
3314
|
-
const
|
|
3315
|
-
if (
|
|
3316
|
-
const C = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(
|
|
3314
|
+
const f = p.getName(i, a);
|
|
3315
|
+
if (f !== null) {
|
|
3316
|
+
const C = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, t);
|
|
3317
3317
|
u.push(new Ua(C, d.end));
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
@@ -3497,13 +3497,13 @@ var Wa = class {
|
|
|
3497
3497
|
c.fontStyle,
|
|
3498
3498
|
c.foregroundId,
|
|
3499
3499
|
c.backgroundId
|
|
3500
|
-
),
|
|
3500
|
+
), p = this.getRule(this._rootId).getName(
|
|
3501
3501
|
null,
|
|
3502
3502
|
null
|
|
3503
3503
|
);
|
|
3504
3504
|
let d;
|
|
3505
|
-
|
|
3506
|
-
|
|
3505
|
+
p ? d = Fe.createRootAndLookUpScopeName(
|
|
3506
|
+
p,
|
|
3507
3507
|
h,
|
|
3508
3508
|
this
|
|
3509
3509
|
) : d = Fe.createRoot(
|
|
@@ -3644,7 +3644,7 @@ var Fe = class ne {
|
|
|
3644
3644
|
}), r = r.parent;
|
|
3645
3645
|
return r === e ? n.reverse() : void 0;
|
|
3646
3646
|
}
|
|
3647
|
-
}, Jt = class
|
|
3647
|
+
}, Jt = class fe {
|
|
3648
3648
|
/**
|
|
3649
3649
|
* Invariant:
|
|
3650
3650
|
* ```
|
|
@@ -3661,7 +3661,7 @@ var Fe = class ne {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
_stackElementBrand = void 0;
|
|
3663
3663
|
// TODO remove me
|
|
3664
|
-
static NULL = new
|
|
3664
|
+
static NULL = new fe(
|
|
3665
3665
|
null,
|
|
3666
3666
|
0,
|
|
3667
3667
|
0,
|
|
@@ -3688,7 +3688,7 @@ var Fe = class ne {
|
|
|
3688
3688
|
*/
|
|
3689
3689
|
depth;
|
|
3690
3690
|
equals(e) {
|
|
3691
|
-
return e === null ? !1 :
|
|
3691
|
+
return e === null ? !1 : fe._equals(this, e);
|
|
3692
3692
|
}
|
|
3693
3693
|
static _equals(e, n) {
|
|
3694
3694
|
return e === n ? !0 : this._structuralEquals(e, n) ? Fe.equals(e.contentNameScopesList, n.contentNameScopesList) : !1;
|
|
@@ -3713,7 +3713,7 @@ var Fe = class ne {
|
|
|
3713
3713
|
e._enterPos = -1, e._anchorPos = -1, e = e.parent;
|
|
3714
3714
|
}
|
|
3715
3715
|
reset() {
|
|
3716
|
-
|
|
3716
|
+
fe._reset(this);
|
|
3717
3717
|
}
|
|
3718
3718
|
pop() {
|
|
3719
3719
|
return this.parent;
|
|
@@ -3722,7 +3722,7 @@ var Fe = class ne {
|
|
|
3722
3722
|
return this.parent ? this.parent : this;
|
|
3723
3723
|
}
|
|
3724
3724
|
push(e, n, r, o, s, a, i) {
|
|
3725
|
-
return new
|
|
3725
|
+
return new fe(
|
|
3726
3726
|
this,
|
|
3727
3727
|
e,
|
|
3728
3728
|
n,
|
|
@@ -3761,7 +3761,7 @@ var Fe = class ne {
|
|
|
3761
3761
|
);
|
|
3762
3762
|
}
|
|
3763
3763
|
withEndRule(e) {
|
|
3764
|
-
return this.endRule === e ? this : new
|
|
3764
|
+
return this.endRule === e ? this : new fe(
|
|
3765
3765
|
this.parent,
|
|
3766
3766
|
this.ruleId,
|
|
3767
3767
|
this._enterPos,
|
|
@@ -3793,7 +3793,7 @@ var Fe = class ne {
|
|
|
3793
3793
|
}
|
|
3794
3794
|
static pushFrame(e, n) {
|
|
3795
3795
|
const r = Fe.fromExtension(e?.nameScopesList ?? null, n.nameScopesList);
|
|
3796
|
-
return new
|
|
3796
|
+
return new fe(
|
|
3797
3797
|
e,
|
|
3798
3798
|
n.ruleId,
|
|
3799
3799
|
n.enterPos ?? -1,
|
|
@@ -4134,7 +4134,7 @@ const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4134
4134
|
number: w,
|
|
4135
4135
|
overloadedBoolean: en,
|
|
4136
4136
|
spaceSeparated: N
|
|
4137
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4137
|
+
}, Symbol.toStringTag, { value: "Module" })), Pt = (
|
|
4138
4138
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
4139
4139
|
Object.keys(tn)
|
|
4140
4140
|
);
|
|
@@ -4155,9 +4155,9 @@ class yn extends V {
|
|
|
4155
4155
|
constructor(e, n, r, o) {
|
|
4156
4156
|
let s = -1;
|
|
4157
4157
|
if (super(e, n), Yn(this, "space", o), typeof r == "number")
|
|
4158
|
-
for (; ++s <
|
|
4159
|
-
const a =
|
|
4160
|
-
Yn(this,
|
|
4158
|
+
for (; ++s < Pt.length; ) {
|
|
4159
|
+
const a = Pt[s];
|
|
4160
|
+
Yn(this, Pt[s], (r & tn[a]) === tn[a]);
|
|
4161
4161
|
}
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
@@ -4237,7 +4237,7 @@ const co = Ne({
|
|
|
4237
4237
|
function ho(t, e) {
|
|
4238
4238
|
return e in t ? t[e] : e;
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4240
|
+
function fo(t, e) {
|
|
4241
4241
|
return ho(t, e.toLowerCase());
|
|
4242
4242
|
}
|
|
4243
4243
|
const Ja = Ne({
|
|
@@ -4600,7 +4600,7 @@ const Ja = Ne({
|
|
|
4600
4600
|
unselectable: null
|
|
4601
4601
|
},
|
|
4602
4602
|
space: "html",
|
|
4603
|
-
transform:
|
|
4603
|
+
transform: fo
|
|
4604
4604
|
}), Za = Ne({
|
|
4605
4605
|
attributes: {
|
|
4606
4606
|
accentHeight: "accent-height",
|
|
@@ -5160,7 +5160,7 @@ const Ja = Ne({
|
|
|
5160
5160
|
},
|
|
5161
5161
|
space: "svg",
|
|
5162
5162
|
transform: ho
|
|
5163
|
-
}),
|
|
5163
|
+
}), po = Ne({
|
|
5164
5164
|
properties: {
|
|
5165
5165
|
xLinkActuate: null,
|
|
5166
5166
|
xLinkArcRole: null,
|
|
@@ -5178,7 +5178,7 @@ const Ja = Ne({
|
|
|
5178
5178
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
5179
5179
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
5180
5180
|
space: "xmlns",
|
|
5181
|
-
transform:
|
|
5181
|
+
transform: fo
|
|
5182
5182
|
}), mo = Ne({
|
|
5183
5183
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
5184
5184
|
space: "xml",
|
|
@@ -5212,7 +5212,7 @@ function ni(t) {
|
|
|
5212
5212
|
function ri(t) {
|
|
5213
5213
|
return t.charAt(1).toUpperCase();
|
|
5214
5214
|
}
|
|
5215
|
-
const oi = uo([co, Ja,
|
|
5215
|
+
const oi = uo([co, Ja, po, go, mo], "html"), yo = uo([co, Za, po, go, mo], "svg"), si = /["&'<>`]/g, ai = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, ii = (
|
|
5216
5216
|
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
5217
5217
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
5218
5218
|
), li = /[|\\{}()[\]^$+*?.]/g, Zn = /* @__PURE__ */ new WeakMap();
|
|
@@ -5249,10 +5249,10 @@ function hi(t) {
|
|
|
5249
5249
|
e.push(t[n].replace(li, "\\$&"));
|
|
5250
5250
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5253
|
-
function
|
|
5252
|
+
const fi = /[\dA-Fa-f]/;
|
|
5253
|
+
function pi(t, e, n) {
|
|
5254
5254
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
5255
|
-
return n && e && !
|
|
5255
|
+
return n && e && !fi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5256
5256
|
}
|
|
5257
5257
|
const di = /\d/;
|
|
5258
5258
|
function gi(t, e, n) {
|
|
@@ -5642,7 +5642,7 @@ function wi(t, e, n, r) {
|
|
|
5642
5642
|
return "";
|
|
5643
5643
|
}
|
|
5644
5644
|
function Ci(t, e, n) {
|
|
5645
|
-
let r =
|
|
5645
|
+
let r = pi(t, e, n.omitOptionalSemicolons), o;
|
|
5646
5646
|
if ((n.useNamedReferences || n.useShortestReferences) && (o = wi(
|
|
5647
5647
|
t,
|
|
5648
5648
|
e,
|
|
@@ -5701,10 +5701,10 @@ const bn = _o({
|
|
|
5701
5701
|
caption: Tt,
|
|
5702
5702
|
colgroup: Tt,
|
|
5703
5703
|
dd: $i,
|
|
5704
|
-
dt:
|
|
5704
|
+
dt: Pi,
|
|
5705
5705
|
head: Tt,
|
|
5706
5706
|
html: Ri,
|
|
5707
|
-
li:
|
|
5707
|
+
li: Li,
|
|
5708
5708
|
optgroup: Ti,
|
|
5709
5709
|
option: Mi,
|
|
5710
5710
|
p: Ni,
|
|
@@ -5734,11 +5734,11 @@ function Ni(t, e, n) {
|
|
|
5734
5734
|
return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
|
|
5735
5735
|
!(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
|
|
5736
5736
|
}
|
|
5737
|
-
function
|
|
5737
|
+
function Li(t, e, n) {
|
|
5738
5738
|
const r = O(n, e);
|
|
5739
5739
|
return !r || r.type === "element" && r.tagName === "li";
|
|
5740
5740
|
}
|
|
5741
|
-
function
|
|
5741
|
+
function Pi(t, e, n) {
|
|
5742
5742
|
const r = O(n, e);
|
|
5743
5743
|
return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
|
|
5744
5744
|
}
|
|
@@ -5972,7 +5972,7 @@ function al(t) {
|
|
|
5972
5972
|
e[r] = this.one(n[r], r, t);
|
|
5973
5973
|
return e.join("");
|
|
5974
5974
|
}
|
|
5975
|
-
function
|
|
5975
|
+
function ft(t, e) {
|
|
5976
5976
|
const n = typeof t == "string" ? {} : { ...t.colorReplacements }, r = typeof t == "string" ? t : t.name;
|
|
5977
5977
|
for (const [o, s] of Object.entries(e?.colorReplacements || {}))
|
|
5978
5978
|
typeof s == "string" ? n[o] = s : o === r && Object.assign(n, s);
|
|
@@ -6062,40 +6062,40 @@ function hl(t, e) {
|
|
|
6062
6062
|
offset: t.offset + n
|
|
6063
6063
|
}), r;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function fl(t, e) {
|
|
6066
6066
|
const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
|
|
6067
6067
|
return n.length ? t.map((r) => r.flatMap((o) => {
|
|
6068
6068
|
const s = n.filter((a) => o.offset < a && a < o.offset + o.content.length).map((a) => a - o.offset).sort((a, i) => a - i);
|
|
6069
6069
|
return s.length ? hl(o, s) : o;
|
|
6070
6070
|
})) : t;
|
|
6071
6071
|
}
|
|
6072
|
-
function
|
|
6072
|
+
function pl(t, e, n, r, o = "css-vars") {
|
|
6073
6073
|
const s = {
|
|
6074
6074
|
content: t.content,
|
|
6075
6075
|
explanation: t.explanation,
|
|
6076
6076
|
offset: t.offset
|
|
6077
|
-
}, a = e.map((c) =>
|
|
6078
|
-
const
|
|
6079
|
-
return n + e[c] + (h === "color" ? "" :
|
|
6077
|
+
}, a = e.map((c) => pt(t.variants[c])), i = new Set(a.flatMap((c) => Object.keys(c))), l = {}, u = (c, h) => {
|
|
6078
|
+
const p = h === "color" ? "" : h === "background-color" ? "-bg" : `-${h}`;
|
|
6079
|
+
return n + e[c] + (h === "color" ? "" : p);
|
|
6080
6080
|
};
|
|
6081
6081
|
return a.forEach((c, h) => {
|
|
6082
|
-
for (const
|
|
6083
|
-
const d = c[
|
|
6084
|
-
if (h === 0 && r && cl.includes(
|
|
6082
|
+
for (const p of i) {
|
|
6083
|
+
const d = c[p] || "inherit";
|
|
6084
|
+
if (h === 0 && r && cl.includes(p))
|
|
6085
6085
|
if (r === _n && a.length > 1) {
|
|
6086
|
-
const
|
|
6087
|
-
if (
|
|
6086
|
+
const f = e.findIndex((m) => m === "light"), g = e.findIndex((m) => m === "dark");
|
|
6087
|
+
if (f === -1 || g === -1)
|
|
6088
6088
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6089
|
-
const C = a[
|
|
6090
|
-
l[
|
|
6089
|
+
const C = a[f][p] || "inherit", y = a[g][p] || "inherit";
|
|
6090
|
+
l[p] = `light-dark(${C}, ${y})`, o === "css-vars" && (l[u(h, p)] = d);
|
|
6091
6091
|
} else
|
|
6092
|
-
l[
|
|
6092
|
+
l[p] = d;
|
|
6093
6093
|
else
|
|
6094
|
-
o === "css-vars" && (l[u(h,
|
|
6094
|
+
o === "css-vars" && (l[u(h, p)] = d);
|
|
6095
6095
|
}
|
|
6096
6096
|
}), s.htmlStyle = l, s;
|
|
6097
6097
|
}
|
|
6098
|
-
function
|
|
6098
|
+
function pt(t) {
|
|
6099
6099
|
const e = {};
|
|
6100
6100
|
if (t.color && (e.color = t.color), t.bgColor && (e["background-color"] = t.bgColor), t.fontStyle) {
|
|
6101
6101
|
t.fontStyle & z.Italic && (e["font-style"] = "italic"), t.fontStyle & z.Bold && (e["font-weight"] = "bold");
|
|
@@ -6114,7 +6114,7 @@ function kt(t, e) {
|
|
|
6114
6114
|
function We(t) {
|
|
6115
6115
|
return Eo.get(t);
|
|
6116
6116
|
}
|
|
6117
|
-
class
|
|
6117
|
+
class Le {
|
|
6118
6118
|
/**
|
|
6119
6119
|
* Theme to Stack mapping
|
|
6120
6120
|
*/
|
|
@@ -6133,7 +6133,7 @@ class Pe {
|
|
|
6133
6133
|
* Static method to create a initial grammar state.
|
|
6134
6134
|
*/
|
|
6135
6135
|
static initial(e, n) {
|
|
6136
|
-
return new
|
|
6136
|
+
return new Le(
|
|
6137
6137
|
Object.fromEntries(il(n).map((r) => [r, Zt])),
|
|
6138
6138
|
e
|
|
6139
6139
|
);
|
|
@@ -6178,7 +6178,7 @@ function dl(t) {
|
|
|
6178
6178
|
return r(t), e;
|
|
6179
6179
|
}
|
|
6180
6180
|
function gl(t, e) {
|
|
6181
|
-
if (!(t instanceof
|
|
6181
|
+
if (!(t instanceof Le))
|
|
6182
6182
|
throw new F("Invalid grammar state");
|
|
6183
6183
|
return t.getInternalStack(e);
|
|
6184
6184
|
}
|
|
@@ -6198,11 +6198,13 @@ function ml() {
|
|
|
6198
6198
|
const i = o.lines[a.line];
|
|
6199
6199
|
if (i === void 0)
|
|
6200
6200
|
throw new F(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);
|
|
6201
|
-
|
|
6201
|
+
let l = a.character;
|
|
6202
|
+
if (l < 0 && (l = i.length + l), l < 0 || l > i.length)
|
|
6202
6203
|
throw new F(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${i.length}`);
|
|
6203
6204
|
return {
|
|
6204
6205
|
...a,
|
|
6205
|
-
|
|
6206
|
+
character: l,
|
|
6207
|
+
offset: o.posToIndex(a.line, l)
|
|
6206
6208
|
};
|
|
6207
6209
|
}
|
|
6208
6210
|
};
|
|
@@ -6225,7 +6227,7 @@ function ml() {
|
|
|
6225
6227
|
if (!this.options.decorations?.length)
|
|
6226
6228
|
return;
|
|
6227
6229
|
const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
|
|
6228
|
-
return
|
|
6230
|
+
return fl(n, o);
|
|
6229
6231
|
},
|
|
6230
6232
|
code(n) {
|
|
6231
6233
|
if (!this.options.decorations?.length)
|
|
@@ -6233,19 +6235,19 @@ function ml() {
|
|
|
6233
6235
|
const r = e(this), o = Array.from(n.children).filter((c) => c.type === "element" && c.tagName === "span");
|
|
6234
6236
|
if (o.length !== r.converter.lines.length)
|
|
6235
6237
|
throw new F(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
|
|
6236
|
-
function s(c, h,
|
|
6237
|
-
const
|
|
6238
|
+
function s(c, h, p, d) {
|
|
6239
|
+
const f = o[c];
|
|
6238
6240
|
let g = "", C = -1, y = -1;
|
|
6239
|
-
if (h === 0 && (C = 0),
|
|
6240
|
-
for (let _ = 0; _ <
|
|
6241
|
-
g += Ao(
|
|
6241
|
+
if (h === 0 && (C = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = f.children.length), C === -1 || y === -1)
|
|
6242
|
+
for (let _ = 0; _ < f.children.length; _++)
|
|
6243
|
+
g += Ao(f.children[_]), C === -1 && g.length === h && (C = _ + 1), y === -1 && g.length === p && (y = _ + 1);
|
|
6242
6244
|
if (C === -1)
|
|
6243
6245
|
throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6244
6246
|
if (y === -1)
|
|
6245
6247
|
throw new F(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);
|
|
6246
|
-
const m =
|
|
6247
|
-
if (!d.alwaysWrap && m.length ===
|
|
6248
|
-
i(
|
|
6248
|
+
const m = f.children.slice(C, y);
|
|
6249
|
+
if (!d.alwaysWrap && m.length === f.children.length)
|
|
6250
|
+
i(f, d, "line");
|
|
6249
6251
|
else if (!d.alwaysWrap && m.length === 1 && m[0].type === "element")
|
|
6250
6252
|
i(m[0], d, "token");
|
|
6251
6253
|
else {
|
|
@@ -6255,30 +6257,30 @@ function ml() {
|
|
|
6255
6257
|
properties: {},
|
|
6256
6258
|
children: m
|
|
6257
6259
|
};
|
|
6258
|
-
i(_, d, "wrapper"),
|
|
6260
|
+
i(_, d, "wrapper"), f.children.splice(C, m.length, _);
|
|
6259
6261
|
}
|
|
6260
6262
|
}
|
|
6261
6263
|
function a(c, h) {
|
|
6262
6264
|
o[c] = i(o[c], h, "line");
|
|
6263
6265
|
}
|
|
6264
|
-
function i(c, h,
|
|
6265
|
-
const d = h.properties || {},
|
|
6266
|
+
function i(c, h, p) {
|
|
6267
|
+
const d = h.properties || {}, f = h.transform || ((g) => g);
|
|
6266
6268
|
return c.tagName = h.tagName || "span", c.properties = {
|
|
6267
6269
|
...c.properties,
|
|
6268
6270
|
...d,
|
|
6269
6271
|
class: c.properties.class
|
|
6270
|
-
}, h.properties?.class && xo(c, h.properties.class), c =
|
|
6272
|
+
}, h.properties?.class && xo(c, h.properties.class), c = f(c, p) || c, c;
|
|
6271
6273
|
}
|
|
6272
6274
|
const l = [], u = r.decorations.sort((c, h) => h.start.offset - c.start.offset || c.end.offset - h.end.offset);
|
|
6273
6275
|
for (const c of u) {
|
|
6274
|
-
const { start: h, end:
|
|
6275
|
-
if (h.line ===
|
|
6276
|
-
s(h.line, h.character,
|
|
6277
|
-
else if (h.line <
|
|
6276
|
+
const { start: h, end: p } = c;
|
|
6277
|
+
if (h.line === p.line)
|
|
6278
|
+
s(h.line, h.character, p.character, c);
|
|
6279
|
+
else if (h.line < p.line) {
|
|
6278
6280
|
s(h.line, h.character, Number.POSITIVE_INFINITY, c);
|
|
6279
|
-
for (let d = h.line + 1; d <
|
|
6281
|
+
for (let d = h.line + 1; d < p.line; d++)
|
|
6280
6282
|
l.unshift(() => a(d, c));
|
|
6281
|
-
s(
|
|
6283
|
+
s(p.line, 0, p.character, c);
|
|
6282
6284
|
}
|
|
6283
6285
|
}
|
|
6284
6286
|
l.forEach((c) => c());
|
|
@@ -6293,7 +6295,7 @@ function yl(t) {
|
|
|
6293
6295
|
for (let r = e + 1; r < t.length; r++) {
|
|
6294
6296
|
const o = t[r], s = n.start.offset <= o.start.offset && o.start.offset < n.end.offset, a = n.start.offset < o.end.offset && o.end.offset <= n.end.offset, i = o.start.offset <= n.start.offset && n.start.offset < o.end.offset, l = o.start.offset < n.end.offset && n.end.offset <= o.end.offset;
|
|
6295
6297
|
if (s || a || i || l) {
|
|
6296
|
-
if (s && a || i && l)
|
|
6298
|
+
if (s && a || i && l || i && n.start.offset === n.end.offset || a && o.start.offset === o.end.offset)
|
|
6297
6299
|
continue;
|
|
6298
6300
|
throw new F(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`);
|
|
6299
6301
|
}
|
|
@@ -6307,11 +6309,29 @@ const bl = [
|
|
|
6307
6309
|
/* @__PURE__ */ ml()
|
|
6308
6310
|
];
|
|
6309
6311
|
function dt(t) {
|
|
6312
|
+
const e = wl(t.transformers || []);
|
|
6310
6313
|
return [
|
|
6311
|
-
...
|
|
6314
|
+
...e.pre,
|
|
6315
|
+
...e.normal,
|
|
6316
|
+
...e.post,
|
|
6312
6317
|
...bl
|
|
6313
6318
|
];
|
|
6314
6319
|
}
|
|
6320
|
+
function wl(t) {
|
|
6321
|
+
const e = [], n = [], r = [];
|
|
6322
|
+
for (const o of t)
|
|
6323
|
+
switch (o.enforce) {
|
|
6324
|
+
case "pre":
|
|
6325
|
+
e.push(o);
|
|
6326
|
+
break;
|
|
6327
|
+
case "post":
|
|
6328
|
+
n.push(o);
|
|
6329
|
+
break;
|
|
6330
|
+
default:
|
|
6331
|
+
r.push(o);
|
|
6332
|
+
}
|
|
6333
|
+
return { pre: e, post: n, normal: r };
|
|
6334
|
+
}
|
|
6315
6335
|
var de = [
|
|
6316
6336
|
"black",
|
|
6317
6337
|
"red",
|
|
@@ -6338,7 +6358,7 @@ var de = [
|
|
|
6338
6358
|
8: "hidden",
|
|
6339
6359
|
9: "strikethrough"
|
|
6340
6360
|
};
|
|
6341
|
-
function
|
|
6361
|
+
function Cl(t, e) {
|
|
6342
6362
|
const n = t.indexOf("\x1B", e);
|
|
6343
6363
|
if (n !== -1 && t[n + 1] === "[") {
|
|
6344
6364
|
const r = t.indexOf("m", n);
|
|
@@ -6367,7 +6387,7 @@ function tr(t) {
|
|
|
6367
6387
|
return { type: "table", index: Number(n) };
|
|
6368
6388
|
}
|
|
6369
6389
|
}
|
|
6370
|
-
function
|
|
6390
|
+
function _l(t) {
|
|
6371
6391
|
const e = [];
|
|
6372
6392
|
for (; t.length > 0; ) {
|
|
6373
6393
|
const n = t.shift();
|
|
@@ -6435,21 +6455,21 @@ function Cl(t) {
|
|
|
6435
6455
|
}
|
|
6436
6456
|
return e;
|
|
6437
6457
|
}
|
|
6438
|
-
function
|
|
6458
|
+
function Sl() {
|
|
6439
6459
|
let t = null, e = null, n = /* @__PURE__ */ new Set();
|
|
6440
6460
|
return {
|
|
6441
6461
|
parse(r) {
|
|
6442
6462
|
const o = [];
|
|
6443
6463
|
let s = 0;
|
|
6444
6464
|
do {
|
|
6445
|
-
const a =
|
|
6465
|
+
const a = Cl(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
|
|
6446
6466
|
if (i.length > 0 && o.push({
|
|
6447
6467
|
value: i,
|
|
6448
6468
|
foreground: t,
|
|
6449
6469
|
background: e,
|
|
6450
6470
|
decorations: new Set(n)
|
|
6451
6471
|
}), a.sequence) {
|
|
6452
|
-
const l =
|
|
6472
|
+
const l = _l(a.sequence);
|
|
6453
6473
|
for (const u of l)
|
|
6454
6474
|
u.type === "resetAll" ? (t = null, e = null, n.clear()) : u.type === "resetForegroundColor" ? t = null : u.type === "resetBackgroundColor" ? e = null : u.type === "resetDecoration" && n.delete(u.value);
|
|
6455
6475
|
for (const u of l)
|
|
@@ -6461,7 +6481,7 @@ function _l() {
|
|
|
6461
6481
|
}
|
|
6462
6482
|
};
|
|
6463
6483
|
}
|
|
6464
|
-
var
|
|
6484
|
+
var kl = {
|
|
6465
6485
|
black: "#000000",
|
|
6466
6486
|
red: "#bb0000",
|
|
6467
6487
|
green: "#00bb00",
|
|
@@ -6479,7 +6499,7 @@ var Sl = {
|
|
|
6479
6499
|
brightCyan: "#55ffff",
|
|
6480
6500
|
brightWhite: "#ffffff"
|
|
6481
6501
|
};
|
|
6482
|
-
function
|
|
6502
|
+
function vl(t = kl) {
|
|
6483
6503
|
function e(i) {
|
|
6484
6504
|
return t[i];
|
|
6485
6505
|
}
|
|
@@ -6520,19 +6540,19 @@ function kl(t = Sl) {
|
|
|
6520
6540
|
value: a
|
|
6521
6541
|
};
|
|
6522
6542
|
}
|
|
6523
|
-
function
|
|
6524
|
-
const r =
|
|
6543
|
+
function xl(t, e, n) {
|
|
6544
|
+
const r = ft(t, n), o = St(e), s = vl(
|
|
6525
6545
|
Object.fromEntries(
|
|
6526
6546
|
de.map((i) => [
|
|
6527
6547
|
i,
|
|
6528
6548
|
t.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]
|
|
6529
6549
|
])
|
|
6530
6550
|
)
|
|
6531
|
-
), a =
|
|
6551
|
+
), a = Sl();
|
|
6532
6552
|
return o.map(
|
|
6533
6553
|
(i) => a.parse(i[0]).map((l) => {
|
|
6534
6554
|
let u, c;
|
|
6535
|
-
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u =
|
|
6555
|
+
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u = El(u));
|
|
6536
6556
|
let h = z.None;
|
|
6537
6557
|
return l.decorations.has("bold") && (h |= z.Bold), l.decorations.has("italic") && (h |= z.Italic), l.decorations.has("underline") && (h |= z.Underline), l.decorations.has("strikethrough") && (h |= z.Strikethrough), {
|
|
6538
6558
|
content: l.value,
|
|
@@ -6545,7 +6565,7 @@ function vl(t, e, n) {
|
|
|
6545
6565
|
})
|
|
6546
6566
|
);
|
|
6547
6567
|
}
|
|
6548
|
-
function
|
|
6568
|
+
function El(t) {
|
|
6549
6569
|
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
|
|
6550
6570
|
if (e)
|
|
6551
6571
|
if (e[3]) {
|
|
@@ -6564,7 +6584,7 @@ function Sn(t, e, n = {}) {
|
|
|
6564
6584
|
return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6565
6585
|
const { theme: s, colorMap: a } = t.setTheme(o);
|
|
6566
6586
|
if (r === "ansi")
|
|
6567
|
-
return
|
|
6587
|
+
return xl(s, e, n);
|
|
6568
6588
|
const i = t.getLanguage(r);
|
|
6569
6589
|
if (n.grammarState) {
|
|
6570
6590
|
if (n.grammarState.lang !== i.name)
|
|
@@ -6572,9 +6592,9 @@ function Sn(t, e, n = {}) {
|
|
|
6572
6592
|
if (!n.grammarState.themes.includes(s.name))
|
|
6573
6593
|
throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
|
|
6574
6594
|
}
|
|
6575
|
-
return
|
|
6595
|
+
return Rl(e, i, s, a, n);
|
|
6576
6596
|
}
|
|
6577
|
-
function
|
|
6597
|
+
function Al(...t) {
|
|
6578
6598
|
if (t.length === 2)
|
|
6579
6599
|
return We(t[1]);
|
|
6580
6600
|
const [e, n, r = {}] = t, {
|
|
@@ -6586,14 +6606,14 @@ function El(...t) {
|
|
|
6586
6606
|
if (o === "ansi")
|
|
6587
6607
|
throw new F("ANSI language does not have grammar state");
|
|
6588
6608
|
const { theme: a, colorMap: i } = e.setTheme(s), l = e.getLanguage(o);
|
|
6589
|
-
return new
|
|
6609
|
+
return new Le(
|
|
6590
6610
|
gt(n, l, a, i, r).stateStack,
|
|
6591
6611
|
l.name,
|
|
6592
6612
|
a.name
|
|
6593
6613
|
);
|
|
6594
6614
|
}
|
|
6595
|
-
function
|
|
6596
|
-
const s = gt(t, e, n, r, o), a = new
|
|
6615
|
+
function Rl(t, e, n, r, o) {
|
|
6616
|
+
const s = gt(t, e, n, r, o), a = new Le(
|
|
6597
6617
|
gt(t, e, n, r, o).stateStack,
|
|
6598
6618
|
e.name,
|
|
6599
6619
|
n.name
|
|
@@ -6601,7 +6621,7 @@ function Al(t, e, n, r, o) {
|
|
|
6601
6621
|
return kt(s.tokens, a), s.tokens;
|
|
6602
6622
|
}
|
|
6603
6623
|
function gt(t, e, n, r, o) {
|
|
6604
|
-
const s =
|
|
6624
|
+
const s = ft(n, o), {
|
|
6605
6625
|
tokenizeMaxLineLength: a = 0,
|
|
6606
6626
|
tokenizeTimeLimit: i = 500
|
|
6607
6627
|
} = o, l = St(t);
|
|
@@ -6617,15 +6637,15 @@ function gt(t, e, n, r, o) {
|
|
|
6617
6637
|
}
|
|
6618
6638
|
).stateStack : Zt, c = [];
|
|
6619
6639
|
const h = [];
|
|
6620
|
-
for (let
|
|
6621
|
-
const [
|
|
6622
|
-
if (
|
|
6640
|
+
for (let p = 0, d = l.length; p < d; p++) {
|
|
6641
|
+
const [f, g] = l[p];
|
|
6642
|
+
if (f === "") {
|
|
6623
6643
|
c = [], h.push([]);
|
|
6624
6644
|
continue;
|
|
6625
6645
|
}
|
|
6626
|
-
if (a > 0 &&
|
|
6646
|
+
if (a > 0 && f.length >= a) {
|
|
6627
6647
|
c = [], h.push([{
|
|
6628
|
-
content:
|
|
6648
|
+
content: f,
|
|
6629
6649
|
offset: g,
|
|
6630
6650
|
color: "",
|
|
6631
6651
|
fontStyle: 0
|
|
@@ -6633,17 +6653,17 @@ function gt(t, e, n, r, o) {
|
|
|
6633
6653
|
continue;
|
|
6634
6654
|
}
|
|
6635
6655
|
let C, y, m;
|
|
6636
|
-
o.includeExplanation && (C = e.tokenizeLine(
|
|
6637
|
-
const _ = e.tokenizeLine2(
|
|
6656
|
+
o.includeExplanation && (C = e.tokenizeLine(f, u, i), y = C.tokens, m = 0);
|
|
6657
|
+
const _ = e.tokenizeLine2(f, u, i), S = _.tokens.length / 2;
|
|
6638
6658
|
for (let A = 0; A < S; A++) {
|
|
6639
|
-
const D = _.tokens[2 * A],
|
|
6640
|
-
if (D ===
|
|
6659
|
+
const D = _.tokens[2 * A], L = A + 1 < S ? _.tokens[2 * A + 2] : f.length;
|
|
6660
|
+
if (D === L)
|
|
6641
6661
|
continue;
|
|
6642
6662
|
const j = _.tokens[2 * A + 1], Z = ue(
|
|
6643
6663
|
r[Re.getForeground(j)],
|
|
6644
6664
|
s
|
|
6645
6665
|
), ee = Re.getFontStyle(j), ce = {
|
|
6646
|
-
content:
|
|
6666
|
+
content: f.substring(D, L),
|
|
6647
6667
|
offset: g + D,
|
|
6648
6668
|
color: Z,
|
|
6649
6669
|
fontStyle: ee
|
|
@@ -6670,16 +6690,16 @@ function gt(t, e, n, r, o) {
|
|
|
6670
6690
|
}
|
|
6671
6691
|
ce.explanation = [];
|
|
6672
6692
|
let R = 0;
|
|
6673
|
-
for (; D + R <
|
|
6674
|
-
const k = y[m], G =
|
|
6693
|
+
for (; D + R < L; ) {
|
|
6694
|
+
const k = y[m], G = f.substring(
|
|
6675
6695
|
k.startIndex,
|
|
6676
6696
|
k.endIndex
|
|
6677
6697
|
);
|
|
6678
6698
|
R += G.length, ce.explanation.push({
|
|
6679
6699
|
content: G,
|
|
6680
|
-
scopes: o.includeExplanation === "scopeName" ?
|
|
6700
|
+
scopes: o.includeExplanation === "scopeName" ? Il(
|
|
6681
6701
|
k.scopes
|
|
6682
|
-
) :
|
|
6702
|
+
) : Nl(
|
|
6683
6703
|
te,
|
|
6684
6704
|
k.scopes
|
|
6685
6705
|
)
|
|
@@ -6695,10 +6715,10 @@ function gt(t, e, n, r, o) {
|
|
|
6695
6715
|
stateStack: u
|
|
6696
6716
|
};
|
|
6697
6717
|
}
|
|
6698
|
-
function
|
|
6718
|
+
function Il(t) {
|
|
6699
6719
|
return t.map((e) => ({ scopeName: e }));
|
|
6700
6720
|
}
|
|
6701
|
-
function
|
|
6721
|
+
function Nl(t, e) {
|
|
6702
6722
|
const n = [];
|
|
6703
6723
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
6704
6724
|
const s = e[r];
|
|
@@ -6712,7 +6732,7 @@ function Il(t, e) {
|
|
|
6712
6732
|
function nr(t, e) {
|
|
6713
6733
|
return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
|
|
6714
6734
|
}
|
|
6715
|
-
function
|
|
6735
|
+
function Ll(t, e, n) {
|
|
6716
6736
|
if (!nr(t[t.length - 1], e))
|
|
6717
6737
|
return !1;
|
|
6718
6738
|
let r = t.length - 2, o = n.length - 1;
|
|
@@ -6724,7 +6744,7 @@ function Pl(t, e, n) {
|
|
|
6724
6744
|
const r = [];
|
|
6725
6745
|
for (const { selectors: o, settings: s } of t)
|
|
6726
6746
|
for (const a of o)
|
|
6727
|
-
if (
|
|
6747
|
+
if (Ll(a, e, n)) {
|
|
6728
6748
|
r.push(s);
|
|
6729
6749
|
break;
|
|
6730
6750
|
}
|
|
@@ -6741,32 +6761,32 @@ function Ro(t, e, n) {
|
|
|
6741
6761
|
state: c,
|
|
6742
6762
|
theme: h
|
|
6743
6763
|
};
|
|
6744
|
-
}), s =
|
|
6764
|
+
}), s = $l(
|
|
6745
6765
|
...o.map((l) => l.tokens)
|
|
6746
6766
|
), a = s[0].map(
|
|
6747
6767
|
(l, u) => l.map((c, h) => {
|
|
6748
|
-
const
|
|
6768
|
+
const p = {
|
|
6749
6769
|
content: c.content,
|
|
6750
6770
|
variants: {},
|
|
6751
6771
|
offset: c.offset
|
|
6752
6772
|
};
|
|
6753
|
-
return "includeExplanation" in n && n.includeExplanation && (
|
|
6773
|
+
return "includeExplanation" in n && n.includeExplanation && (p.explanation = c.explanation), s.forEach((d, f) => {
|
|
6754
6774
|
const {
|
|
6755
6775
|
content: g,
|
|
6756
6776
|
explanation: C,
|
|
6757
6777
|
offset: y,
|
|
6758
6778
|
...m
|
|
6759
6779
|
} = d[u][h];
|
|
6760
|
-
|
|
6761
|
-
}),
|
|
6780
|
+
p.variants[r[f].color] = m;
|
|
6781
|
+
}), p;
|
|
6762
6782
|
})
|
|
6763
|
-
), i = o[0].state ? new
|
|
6783
|
+
), i = o[0].state ? new Le(
|
|
6764
6784
|
Object.fromEntries(o.map((l) => [l.theme, l.state?.getInternalStack(l.theme)])),
|
|
6765
6785
|
o[0].state.lang
|
|
6766
6786
|
) : void 0;
|
|
6767
6787
|
return i && kt(a, i), a;
|
|
6768
6788
|
}
|
|
6769
|
-
function
|
|
6789
|
+
function $l(...t) {
|
|
6770
6790
|
const e = t.map(() => []), n = t.length;
|
|
6771
6791
|
for (let r = 0; r < t[0].length; r++) {
|
|
6772
6792
|
const o = t.map((l) => l[r]), s = e.map(() => []);
|
|
@@ -6796,22 +6816,22 @@ function mt(t, e, n) {
|
|
|
6796
6816
|
defaultColor: u = "light",
|
|
6797
6817
|
cssVariablePrefix: c = "--shiki-",
|
|
6798
6818
|
colorsRendering: h = "css-vars"
|
|
6799
|
-
} = n,
|
|
6800
|
-
if (
|
|
6819
|
+
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, m) => y.color === u ? -1 : m.color === u ? 1 : 0);
|
|
6820
|
+
if (p.length === 0)
|
|
6801
6821
|
throw new F("`themes` option must not be empty");
|
|
6802
6822
|
const d = Ro(
|
|
6803
6823
|
t,
|
|
6804
6824
|
e,
|
|
6805
6825
|
n
|
|
6806
6826
|
);
|
|
6807
|
-
if (l = We(d), u && _n !== u && !
|
|
6827
|
+
if (l = We(d), u && _n !== u && !p.find((y) => y.color === u))
|
|
6808
6828
|
throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6809
|
-
const
|
|
6810
|
-
s = d.map((y) => y.map((m) =>
|
|
6811
|
-
const C =
|
|
6812
|
-
o = rr(
|
|
6829
|
+
const f = p.map((y) => t.getTheme(y.theme)), g = p.map((y) => y.color);
|
|
6830
|
+
s = d.map((y) => y.map((m) => pl(m, g, c, u, h))), l && kt(s, l);
|
|
6831
|
+
const C = p.map((y) => ft(y.theme, n));
|
|
6832
|
+
o = rr(p, f, C, c, u, "fg", h), r = rr(p, f, C, c, u, "bg", h), a = `shiki-themes ${f.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6813
6833
|
} else if ("theme" in n) {
|
|
6814
|
-
const u =
|
|
6834
|
+
const u = ft(n.theme, n);
|
|
6815
6835
|
s = Sn(
|
|
6816
6836
|
t,
|
|
6817
6837
|
e,
|
|
@@ -6835,11 +6855,11 @@ function rr(t, e, n, r, o, s, a) {
|
|
|
6835
6855
|
const u = ue(e[l][s], n[l]) || "inherit", c = `${r + i.color}${s === "bg" ? "-bg" : ""}:${u}`;
|
|
6836
6856
|
if (l === 0 && o) {
|
|
6837
6857
|
if (o === _n && t.length > 1) {
|
|
6838
|
-
const h = t.findIndex((g) => g.color === "light"),
|
|
6839
|
-
if (h === -1 ||
|
|
6858
|
+
const h = t.findIndex((g) => g.color === "light"), p = t.findIndex((g) => g.color === "dark");
|
|
6859
|
+
if (h === -1 || p === -1)
|
|
6840
6860
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6841
|
-
const d = ue(e[h][s], n[h]) || "inherit",
|
|
6842
|
-
return `light-dark(${d}, ${
|
|
6861
|
+
const d = ue(e[h][s], n[h]) || "inherit", f = ue(e[p][s], n[p]) || "inherit";
|
|
6862
|
+
return `light-dark(${d}, ${f});${c}`;
|
|
6843
6863
|
}
|
|
6844
6864
|
return u;
|
|
6845
6865
|
}
|
|
@@ -6853,8 +6873,8 @@ function yt(t, e, n, r = {
|
|
|
6853
6873
|
codeToTokens: (o, s) => mt(t, o, s)
|
|
6854
6874
|
}) {
|
|
6855
6875
|
let o = e;
|
|
6856
|
-
for (const
|
|
6857
|
-
o =
|
|
6876
|
+
for (const f of dt(n))
|
|
6877
|
+
o = f.preprocess?.call(r, o, n) || o;
|
|
6858
6878
|
let {
|
|
6859
6879
|
tokens: s,
|
|
6860
6880
|
fg: a,
|
|
@@ -6865,18 +6885,18 @@ function yt(t, e, n, r = {
|
|
|
6865
6885
|
} = mt(t, o, n);
|
|
6866
6886
|
const {
|
|
6867
6887
|
mergeWhitespaces: h = !0,
|
|
6868
|
-
mergeSameStyleTokens:
|
|
6888
|
+
mergeSameStyleTokens: p = !1
|
|
6869
6889
|
} = n;
|
|
6870
|
-
h === !0 ? s =
|
|
6890
|
+
h === !0 ? s = Ml(s) : h === "never" && (s = Ol(s)), p && (s = Dl(s));
|
|
6871
6891
|
const d = {
|
|
6872
6892
|
...r,
|
|
6873
6893
|
get source() {
|
|
6874
6894
|
return o;
|
|
6875
6895
|
}
|
|
6876
6896
|
};
|
|
6877
|
-
for (const
|
|
6878
|
-
s =
|
|
6879
|
-
return
|
|
6897
|
+
for (const f of dt(n))
|
|
6898
|
+
s = f.tokens?.call(d, s) || s;
|
|
6899
|
+
return Tl(
|
|
6880
6900
|
s,
|
|
6881
6901
|
{
|
|
6882
6902
|
...n,
|
|
@@ -6889,7 +6909,7 @@ function yt(t, e, n, r = {
|
|
|
6889
6909
|
c
|
|
6890
6910
|
);
|
|
6891
6911
|
}
|
|
6892
|
-
function
|
|
6912
|
+
function Tl(t, e, n, r = We(t)) {
|
|
6893
6913
|
const o = dt(e), s = [], a = {
|
|
6894
6914
|
type: "root",
|
|
6895
6915
|
children: []
|
|
@@ -6909,7 +6929,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6909
6929
|
...Object.fromEntries(
|
|
6910
6930
|
Array.from(
|
|
6911
6931
|
Object.entries(e.meta || {})
|
|
6912
|
-
).filter(([
|
|
6932
|
+
).filter(([f]) => !f.startsWith("_"))
|
|
6913
6933
|
)
|
|
6914
6934
|
},
|
|
6915
6935
|
children: []
|
|
@@ -6919,7 +6939,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6919
6939
|
properties: {},
|
|
6920
6940
|
children: s
|
|
6921
6941
|
};
|
|
6922
|
-
const h = [],
|
|
6942
|
+
const h = [], p = {
|
|
6923
6943
|
...n,
|
|
6924
6944
|
structure: i,
|
|
6925
6945
|
addClassToHast: xo,
|
|
@@ -6945,7 +6965,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6945
6965
|
return h;
|
|
6946
6966
|
}
|
|
6947
6967
|
};
|
|
6948
|
-
if (t.forEach((
|
|
6968
|
+
if (t.forEach((f, g) => {
|
|
6949
6969
|
g && (i === "inline" ? a.children.push({ type: "element", tagName: "br", properties: {}, children: [] }) : i === "classic" && s.push({ type: "text", value: `
|
|
6950
6970
|
` }));
|
|
6951
6971
|
let C = {
|
|
@@ -6954,7 +6974,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6954
6974
|
properties: { class: "line" },
|
|
6955
6975
|
children: []
|
|
6956
6976
|
}, y = 0;
|
|
6957
|
-
for (const m of
|
|
6977
|
+
for (const m of f) {
|
|
6958
6978
|
let _ = {
|
|
6959
6979
|
type: "element",
|
|
6960
6980
|
tagName: "span",
|
|
@@ -6963,31 +6983,31 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6963
6983
|
},
|
|
6964
6984
|
children: [{ type: "text", value: m.content }]
|
|
6965
6985
|
};
|
|
6966
|
-
const S = rn(m.htmlStyle ||
|
|
6986
|
+
const S = rn(m.htmlStyle || pt(m));
|
|
6967
6987
|
S && (_.properties.style = S);
|
|
6968
6988
|
for (const A of o)
|
|
6969
|
-
_ = A?.span?.call(
|
|
6989
|
+
_ = A?.span?.call(p, _, g + 1, y, C, m) || _;
|
|
6970
6990
|
i === "inline" ? a.children.push(_) : i === "classic" && C.children.push(_), y += m.content.length;
|
|
6971
6991
|
}
|
|
6972
6992
|
if (i === "classic") {
|
|
6973
6993
|
for (const m of o)
|
|
6974
|
-
C = m?.line?.call(
|
|
6994
|
+
C = m?.line?.call(p, C, g + 1) || C;
|
|
6975
6995
|
h.push(C), s.push(C);
|
|
6976
6996
|
}
|
|
6977
6997
|
}), i === "classic") {
|
|
6978
|
-
for (const
|
|
6979
|
-
c =
|
|
6998
|
+
for (const f of o)
|
|
6999
|
+
c = f?.code?.call(p, c) || c;
|
|
6980
7000
|
u.children.push(c);
|
|
6981
|
-
for (const
|
|
6982
|
-
u =
|
|
7001
|
+
for (const f of o)
|
|
7002
|
+
u = f?.pre?.call(p, u) || u;
|
|
6983
7003
|
a.children.push(u);
|
|
6984
7004
|
}
|
|
6985
7005
|
let d = a;
|
|
6986
|
-
for (const
|
|
6987
|
-
d =
|
|
7006
|
+
for (const f of o)
|
|
7007
|
+
d = f?.root?.call(p, d) || d;
|
|
6988
7008
|
return r && kt(d, r), d;
|
|
6989
7009
|
}
|
|
6990
|
-
function
|
|
7010
|
+
function Ml(t) {
|
|
6991
7011
|
return t.map((e) => {
|
|
6992
7012
|
const n = [];
|
|
6993
7013
|
let r = "", o = 0;
|
|
@@ -7007,7 +7027,7 @@ function Tl(t) {
|
|
|
7007
7027
|
}), n;
|
|
7008
7028
|
});
|
|
7009
7029
|
}
|
|
7010
|
-
function
|
|
7030
|
+
function Ol(t) {
|
|
7011
7031
|
return t.map((e) => e.flatMap((n) => {
|
|
7012
7032
|
if (n.content.match(/^\s+$/))
|
|
7013
7033
|
return n;
|
|
@@ -7031,7 +7051,7 @@ function Ml(t) {
|
|
|
7031
7051
|
}), i;
|
|
7032
7052
|
}));
|
|
7033
7053
|
}
|
|
7034
|
-
function
|
|
7054
|
+
function Dl(t) {
|
|
7035
7055
|
return t.map((e) => {
|
|
7036
7056
|
const n = [];
|
|
7037
7057
|
for (const r of e) {
|
|
@@ -7039,21 +7059,21 @@ function Ol(t) {
|
|
|
7039
7059
|
n.push({ ...r });
|
|
7040
7060
|
continue;
|
|
7041
7061
|
}
|
|
7042
|
-
const o = n[n.length - 1], s = rn(o.htmlStyle ||
|
|
7062
|
+
const o = n[n.length - 1], s = rn(o.htmlStyle || pt(o)), a = rn(r.htmlStyle || pt(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
|
|
7043
7063
|
!i && !l && s === a ? o.content += r.content : n.push({ ...r });
|
|
7044
7064
|
}
|
|
7045
7065
|
return n;
|
|
7046
7066
|
});
|
|
7047
7067
|
}
|
|
7048
|
-
const
|
|
7049
|
-
function
|
|
7068
|
+
const Gl = ol;
|
|
7069
|
+
function Fl(t, e, n) {
|
|
7050
7070
|
const r = {
|
|
7051
7071
|
meta: {},
|
|
7052
7072
|
options: n,
|
|
7053
7073
|
codeToHast: (s, a) => yt(t, s, a),
|
|
7054
7074
|
codeToTokens: (s, a) => mt(t, s, a)
|
|
7055
7075
|
};
|
|
7056
|
-
let o =
|
|
7076
|
+
let o = Gl(yt(t, e, n, r));
|
|
7057
7077
|
for (const s of dt(n))
|
|
7058
7078
|
o = s.postprocess?.call(r, o, n) || o;
|
|
7059
7079
|
return o;
|
|
@@ -7129,16 +7149,16 @@ async function No(t) {
|
|
|
7129
7149
|
)
|
|
7130
7150
|
)).filter((n) => !!n);
|
|
7131
7151
|
}
|
|
7132
|
-
let
|
|
7133
|
-
function
|
|
7134
|
-
e >
|
|
7152
|
+
let Bl = 3;
|
|
7153
|
+
function jl(t, e = 3) {
|
|
7154
|
+
e > Bl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
|
|
7135
7155
|
}
|
|
7136
7156
|
class ve extends Error {
|
|
7137
7157
|
constructor(e) {
|
|
7138
7158
|
super(e), this.name = "ShikiError";
|
|
7139
7159
|
}
|
|
7140
7160
|
}
|
|
7141
|
-
class
|
|
7161
|
+
class Ul extends Ka {
|
|
7142
7162
|
constructor(e, n, r, o = {}) {
|
|
7143
7163
|
super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((s) => this.loadTheme(s)), this.loadLanguages(this._langs);
|
|
7144
7164
|
}
|
|
@@ -7225,7 +7245,7 @@ class jl extends Ka {
|
|
|
7225
7245
|
this._langGraph.set(n, this._langMap.get(n));
|
|
7226
7246
|
}
|
|
7227
7247
|
}
|
|
7228
|
-
class
|
|
7248
|
+
class zl {
|
|
7229
7249
|
_langs = /* @__PURE__ */ new Map();
|
|
7230
7250
|
_scopeToLang = /* @__PURE__ */ new Map();
|
|
7231
7251
|
_injections = /* @__PURE__ */ new Map();
|
|
@@ -7263,12 +7283,12 @@ class Ul {
|
|
|
7263
7283
|
}
|
|
7264
7284
|
}
|
|
7265
7285
|
let De = 0;
|
|
7266
|
-
function
|
|
7286
|
+
function Hl(t) {
|
|
7267
7287
|
De += 1, t.warnings !== !1 && De >= 10 && De % 10 === 0 && console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
|
|
7268
7288
|
let e = !1;
|
|
7269
7289
|
if (!t.engine)
|
|
7270
7290
|
throw new ve("`engine` option is required for synchronous mode");
|
|
7271
|
-
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new
|
|
7291
|
+
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new zl(t.engine, n), s = new Ul(o, r, n, t.langAlias);
|
|
7272
7292
|
let a;
|
|
7273
7293
|
function i(m) {
|
|
7274
7294
|
C();
|
|
@@ -7302,19 +7322,19 @@ function zl(t) {
|
|
|
7302
7322
|
function h() {
|
|
7303
7323
|
return C(), s.getLoadedLanguages();
|
|
7304
7324
|
}
|
|
7305
|
-
function
|
|
7325
|
+
function p(...m) {
|
|
7306
7326
|
C(), s.loadLanguages(m.flat(1));
|
|
7307
7327
|
}
|
|
7308
7328
|
async function d(...m) {
|
|
7309
|
-
return
|
|
7329
|
+
return p(await Io(m));
|
|
7310
7330
|
}
|
|
7311
|
-
function
|
|
7331
|
+
function f(...m) {
|
|
7312
7332
|
C();
|
|
7313
7333
|
for (const _ of m.flat(1))
|
|
7314
7334
|
s.loadTheme(_);
|
|
7315
7335
|
}
|
|
7316
7336
|
async function g(...m) {
|
|
7317
|
-
return C(),
|
|
7337
|
+
return C(), f(await No(m));
|
|
7318
7338
|
}
|
|
7319
7339
|
function C() {
|
|
7320
7340
|
if (e)
|
|
@@ -7330,15 +7350,15 @@ function zl(t) {
|
|
|
7330
7350
|
getLoadedThemes: c,
|
|
7331
7351
|
getLoadedLanguages: h,
|
|
7332
7352
|
loadLanguage: d,
|
|
7333
|
-
loadLanguageSync:
|
|
7353
|
+
loadLanguageSync: p,
|
|
7334
7354
|
loadTheme: g,
|
|
7335
|
-
loadThemeSync:
|
|
7355
|
+
loadThemeSync: f,
|
|
7336
7356
|
dispose: y,
|
|
7337
7357
|
[Symbol.dispose]: y
|
|
7338
7358
|
};
|
|
7339
7359
|
}
|
|
7340
|
-
async function
|
|
7341
|
-
t.engine ||
|
|
7360
|
+
async function Wl(t) {
|
|
7361
|
+
t.engine || jl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
7342
7362
|
const [
|
|
7343
7363
|
e,
|
|
7344
7364
|
n,
|
|
@@ -7348,44 +7368,44 @@ async function Hl(t) {
|
|
|
7348
7368
|
Io(t.langs || []),
|
|
7349
7369
|
t.engine
|
|
7350
7370
|
]);
|
|
7351
|
-
return
|
|
7371
|
+
return Hl({
|
|
7352
7372
|
...t,
|
|
7353
7373
|
themes: e,
|
|
7354
7374
|
langs: n,
|
|
7355
7375
|
engine: r
|
|
7356
7376
|
});
|
|
7357
7377
|
}
|
|
7358
|
-
async function
|
|
7359
|
-
const e = await
|
|
7378
|
+
async function Vl(t) {
|
|
7379
|
+
const e = await Wl(t);
|
|
7360
7380
|
return {
|
|
7361
|
-
getLastGrammarState: (...n) =>
|
|
7381
|
+
getLastGrammarState: (...n) => Al(e, ...n),
|
|
7362
7382
|
codeToTokensBase: (n, r) => Sn(e, n, r),
|
|
7363
7383
|
codeToTokensWithThemes: (n, r) => Ro(e, n, r),
|
|
7364
7384
|
codeToTokens: (n, r) => mt(e, n, r),
|
|
7365
7385
|
codeToHast: (n, r) => yt(e, n, r),
|
|
7366
|
-
codeToHtml: (n, r) =>
|
|
7386
|
+
codeToHtml: (n, r) => Fl(e, n, r),
|
|
7367
7387
|
getBundledLanguages: () => ({}),
|
|
7368
7388
|
getBundledThemes: () => ({}),
|
|
7369
7389
|
...e,
|
|
7370
7390
|
getInternalContext: () => e
|
|
7371
7391
|
};
|
|
7372
7392
|
}
|
|
7373
|
-
function
|
|
7374
|
-
return "children" in t ?
|
|
7393
|
+
function Lo(t) {
|
|
7394
|
+
return "children" in t ? Po(t) : "value" in t ? t.value : "";
|
|
7375
7395
|
}
|
|
7376
|
-
function
|
|
7377
|
-
return t.type === "text" ? t.value : "children" in t ?
|
|
7396
|
+
function ql(t) {
|
|
7397
|
+
return t.type === "text" ? t.value : "children" in t ? Po(t) : "";
|
|
7378
7398
|
}
|
|
7379
|
-
function
|
|
7399
|
+
function Po(t) {
|
|
7380
7400
|
let e = -1;
|
|
7381
7401
|
const n = [];
|
|
7382
7402
|
for (; ++e < t.children.length; )
|
|
7383
|
-
n[e] =
|
|
7403
|
+
n[e] = ql(t.children[e]);
|
|
7384
7404
|
return n.join("");
|
|
7385
7405
|
}
|
|
7386
|
-
const
|
|
7406
|
+
const Xl = {
|
|
7387
7407
|
"tailing-curly-colon": (t, e) => {
|
|
7388
|
-
const n =
|
|
7408
|
+
const n = Lo(e), r = n.match(/(.+)\{:([\w-]+)\}$/);
|
|
7389
7409
|
if (r)
|
|
7390
7410
|
return {
|
|
7391
7411
|
type: "inline",
|
|
@@ -7393,7 +7413,7 @@ const ql = {
|
|
|
7393
7413
|
lang: r.at(2)
|
|
7394
7414
|
};
|
|
7395
7415
|
}
|
|
7396
|
-
}, ir = "language-",
|
|
7416
|
+
}, ir = "language-", Kl = (t, e) => {
|
|
7397
7417
|
const n = e.children[0];
|
|
7398
7418
|
if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
|
|
7399
7419
|
return;
|
|
@@ -7403,11 +7423,11 @@ const ql = {
|
|
|
7403
7423
|
return {
|
|
7404
7424
|
type: "pre",
|
|
7405
7425
|
lang: typeof o == "string" ? o.slice(ir.length) : void 0,
|
|
7406
|
-
code:
|
|
7426
|
+
code: Lo(n),
|
|
7407
7427
|
meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
|
|
7408
7428
|
};
|
|
7409
|
-
},
|
|
7410
|
-
function
|
|
7429
|
+
}, Yl = "language-";
|
|
7430
|
+
function Jl(t, e) {
|
|
7411
7431
|
const {
|
|
7412
7432
|
addLanguageClass: n = !1,
|
|
7413
7433
|
parseMetaString: r,
|
|
@@ -7420,8 +7440,8 @@ function Yl(t, e) {
|
|
|
7420
7440
|
lazy: c = !1,
|
|
7421
7441
|
...h
|
|
7422
7442
|
} = e;
|
|
7423
|
-
function
|
|
7424
|
-
const y = `${d}:${g}:${
|
|
7443
|
+
function p(d, f, g = "", C = {}) {
|
|
7444
|
+
const y = `${d}:${g}:${f}`, m = o?.get(y);
|
|
7425
7445
|
if (m)
|
|
7426
7446
|
return m;
|
|
7427
7447
|
const _ = {
|
|
@@ -7438,13 +7458,13 @@ function Yl(t, e) {
|
|
|
7438
7458
|
{
|
|
7439
7459
|
name: "rehype-shiki:code-language-class",
|
|
7440
7460
|
code(S) {
|
|
7441
|
-
return this.addClassToHast(S, `${
|
|
7461
|
+
return this.addClassToHast(S, `${Yl}${d}`), S;
|
|
7442
7462
|
}
|
|
7443
7463
|
}
|
|
7444
|
-
]), l &&
|
|
7445
|
-
`) && (
|
|
7464
|
+
]), l && f.endsWith(`
|
|
7465
|
+
`) && (f = f.slice(0, -1));
|
|
7446
7466
|
try {
|
|
7447
|
-
const S = t.codeToHast(
|
|
7467
|
+
const S = t.codeToHast(f, _);
|
|
7448
7468
|
return o?.set(y, S), S;
|
|
7449
7469
|
} catch (S) {
|
|
7450
7470
|
if (i)
|
|
@@ -7454,15 +7474,15 @@ function Yl(t, e) {
|
|
|
7454
7474
|
}
|
|
7455
7475
|
}
|
|
7456
7476
|
return (d) => {
|
|
7457
|
-
const
|
|
7477
|
+
const f = [];
|
|
7458
7478
|
if (qr(d, "element", (g, C, y) => {
|
|
7459
7479
|
let m;
|
|
7460
7480
|
if (!y || C == null)
|
|
7461
7481
|
return;
|
|
7462
7482
|
if (g.tagName === "pre")
|
|
7463
|
-
m =
|
|
7483
|
+
m = Kl;
|
|
7464
7484
|
else if (g.tagName === "code" && u)
|
|
7465
|
-
m =
|
|
7485
|
+
m = Xl[u];
|
|
7466
7486
|
else
|
|
7467
7487
|
return;
|
|
7468
7488
|
const _ = m(d, g);
|
|
@@ -7471,8 +7491,8 @@ function Yl(t, e) {
|
|
|
7471
7491
|
let S, A = !1;
|
|
7472
7492
|
if (_.lang ? t.getLoadedLanguages().includes(_.lang) || vo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
|
|
7473
7493
|
return;
|
|
7474
|
-
const D = _.meta ? r?.(_.meta, g, d) : void 0,
|
|
7475
|
-
const Z =
|
|
7494
|
+
const D = _.meta ? r?.(_.meta, g, d) : void 0, L = (j) => {
|
|
7495
|
+
const Z = p(j, _.code, _.meta, D ?? {});
|
|
7476
7496
|
if (Z) {
|
|
7477
7497
|
if (_.type === "inline") {
|
|
7478
7498
|
const ee = Z.children[0];
|
|
@@ -7483,26 +7503,26 @@ function Yl(t, e) {
|
|
|
7483
7503
|
};
|
|
7484
7504
|
if (A)
|
|
7485
7505
|
try {
|
|
7486
|
-
|
|
7506
|
+
f.push(t.loadLanguage(S).then(() => L(S)));
|
|
7487
7507
|
} catch (j) {
|
|
7488
7508
|
if (a)
|
|
7489
|
-
return
|
|
7509
|
+
return L(a);
|
|
7490
7510
|
if (i)
|
|
7491
7511
|
i(j);
|
|
7492
7512
|
else throw j;
|
|
7493
7513
|
}
|
|
7494
7514
|
else
|
|
7495
|
-
|
|
7515
|
+
L(S);
|
|
7496
7516
|
return "skip";
|
|
7497
|
-
}),
|
|
7517
|
+
}), f.length > 0) {
|
|
7498
7518
|
async function g() {
|
|
7499
|
-
await Promise.all(
|
|
7519
|
+
await Promise.all(f);
|
|
7500
7520
|
}
|
|
7501
7521
|
return g();
|
|
7502
7522
|
}
|
|
7503
7523
|
};
|
|
7504
7524
|
}
|
|
7505
|
-
function
|
|
7525
|
+
function Zl(t) {
|
|
7506
7526
|
if (!t)
|
|
7507
7527
|
return null;
|
|
7508
7528
|
const e = t.match(/\{([\d,-]+)\}/);
|
|
@@ -7512,7 +7532,7 @@ function Jl(t) {
|
|
|
7512
7532
|
}) : null;
|
|
7513
7533
|
}
|
|
7514
7534
|
const lr = Symbol("highlighted-lines");
|
|
7515
|
-
function
|
|
7535
|
+
function Ql(t = {}) {
|
|
7516
7536
|
const {
|
|
7517
7537
|
className: e = "highlighted"
|
|
7518
7538
|
} = t;
|
|
@@ -7522,14 +7542,14 @@ function Zl(t = {}) {
|
|
|
7522
7542
|
if (!this.options.meta?.__raw)
|
|
7523
7543
|
return;
|
|
7524
7544
|
const o = this.meta;
|
|
7525
|
-
return o[lr] ??=
|
|
7545
|
+
return o[lr] ??= Zl(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
|
|
7526
7546
|
}
|
|
7527
7547
|
};
|
|
7528
7548
|
}
|
|
7529
|
-
function
|
|
7549
|
+
function eu(t) {
|
|
7530
7550
|
return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
|
|
7531
7551
|
}
|
|
7532
|
-
function
|
|
7552
|
+
function tu(t = {}) {
|
|
7533
7553
|
const {
|
|
7534
7554
|
className: e = "highlighted-word"
|
|
7535
7555
|
} = t;
|
|
@@ -7538,10 +7558,10 @@ function eu(t = {}) {
|
|
|
7538
7558
|
preprocess(n, r) {
|
|
7539
7559
|
if (!this.options.meta?.__raw)
|
|
7540
7560
|
return;
|
|
7541
|
-
const o =
|
|
7561
|
+
const o = eu(this.options.meta.__raw);
|
|
7542
7562
|
r.decorations ||= [];
|
|
7543
7563
|
for (const s of o) {
|
|
7544
|
-
const a =
|
|
7564
|
+
const a = nu(n, s);
|
|
7545
7565
|
for (const i of a)
|
|
7546
7566
|
r.decorations.push({
|
|
7547
7567
|
start: i,
|
|
@@ -7554,7 +7574,7 @@ function eu(t = {}) {
|
|
|
7554
7574
|
}
|
|
7555
7575
|
};
|
|
7556
7576
|
}
|
|
7557
|
-
function
|
|
7577
|
+
function nu(t, e) {
|
|
7558
7578
|
const n = [];
|
|
7559
7579
|
let r = 0;
|
|
7560
7580
|
for (; ; ) {
|
|
@@ -7565,11 +7585,11 @@ function tu(t, e) {
|
|
|
7565
7585
|
}
|
|
7566
7586
|
return n;
|
|
7567
7587
|
}
|
|
7568
|
-
function
|
|
7588
|
+
function Pe(t) {
|
|
7569
7589
|
if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
|
|
7570
7590
|
return t.codePointAt(0);
|
|
7571
7591
|
}
|
|
7572
|
-
function
|
|
7592
|
+
function ru(t, e, n) {
|
|
7573
7593
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
7574
7594
|
}
|
|
7575
7595
|
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
|
|
@@ -7609,10 +7629,10 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
|
|
|
7609
7629
|
| &&
|
|
7610
7630
|
| .
|
|
7611
7631
|
`.replace(/\s+/g, ""), "gsu");
|
|
7612
|
-
function
|
|
7632
|
+
function ou(t, e = {}) {
|
|
7613
7633
|
const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
|
|
7614
7634
|
if (typeof t != "string") throw new Error("String expected as pattern");
|
|
7615
|
-
const r =
|
|
7635
|
+
const r = ku(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
|
|
7616
7636
|
return o.at(-1);
|
|
7617
7637
|
}, numOpenGroups: 0, popModX() {
|
|
7618
7638
|
o.pop();
|
|
@@ -7623,30 +7643,30 @@ function ru(t, e = {}) {
|
|
|
7623
7643
|
}, singleline: n.rules.singleline };
|
|
7624
7644
|
let a = [], i;
|
|
7625
7645
|
for (et.lastIndex = 0; i = et.exec(t); ) {
|
|
7626
|
-
const h =
|
|
7646
|
+
const h = su(s, t, i[0], et.lastIndex);
|
|
7627
7647
|
h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
|
|
7628
7648
|
}
|
|
7629
7649
|
const l = [];
|
|
7630
7650
|
let u = 0;
|
|
7631
7651
|
a.filter((h) => h.type === "GroupOpen").forEach((h) => {
|
|
7632
7652
|
h.kind === "capturing" ? h.number = ++u : h.raw === "(" && l.push(h);
|
|
7633
|
-
}), u || l.forEach((h,
|
|
7634
|
-
h.kind = "capturing", h.number =
|
|
7653
|
+
}), u || l.forEach((h, p) => {
|
|
7654
|
+
h.kind = "capturing", h.number = p + 1;
|
|
7635
7655
|
});
|
|
7636
7656
|
const c = u || l.length;
|
|
7637
|
-
return { tokens: a.map((h) => h.type === "EscapedNumber" ?
|
|
7657
|
+
return { tokens: a.map((h) => h.type === "EscapedNumber" ? xu(h, c) : h).flat(), flags: r };
|
|
7638
7658
|
}
|
|
7639
|
-
function
|
|
7659
|
+
function su(t, e, n, r) {
|
|
7640
7660
|
const [o, s] = n;
|
|
7641
7661
|
if (n === "[" || n === "[^") {
|
|
7642
|
-
const a =
|
|
7662
|
+
const a = au(e, n, r);
|
|
7643
7663
|
return { tokens: a.tokens, lastIndex: a.lastIndex };
|
|
7644
7664
|
}
|
|
7645
7665
|
if (o === "\\") {
|
|
7646
7666
|
if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
|
|
7647
7667
|
if (/^\\g[<']/.test(n)) {
|
|
7648
7668
|
if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7649
|
-
return { token:
|
|
7669
|
+
return { token: mu(n) };
|
|
7650
7670
|
}
|
|
7651
7671
|
if (/^\\k[<']/.test(n)) {
|
|
7652
7672
|
if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
@@ -7660,13 +7680,13 @@ function ou(t, e, n, r) {
|
|
|
7660
7680
|
return Array.isArray(a) ? { tokens: a } : { token: a };
|
|
7661
7681
|
}
|
|
7662
7682
|
if (o === "(") {
|
|
7663
|
-
if (s === "*") return { token:
|
|
7683
|
+
if (s === "*") return { token: Cu(n) };
|
|
7664
7684
|
if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
|
|
7665
7685
|
if (n.startsWith("(?#")) {
|
|
7666
7686
|
if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
|
|
7667
7687
|
return { lastIndex: r + 1 };
|
|
7668
7688
|
}
|
|
7669
|
-
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token:
|
|
7689
|
+
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: wu(n, t) };
|
|
7670
7690
|
if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
|
|
7671
7691
|
if (n === "(?>") return { token: Se("atomic", n) };
|
|
7672
7692
|
if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
|
|
@@ -7697,9 +7717,9 @@ function ou(t, e, n, r) {
|
|
|
7697
7717
|
const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
|
|
7698
7718
|
return { token: ur(a, n) };
|
|
7699
7719
|
}
|
|
7700
|
-
return n === "|" ? { token:
|
|
7720
|
+
return n === "|" ? { token: lu(n) } : xn.test(n) ? { tokens: Eu(n) } : { token: se(Pe(n), n) };
|
|
7701
7721
|
}
|
|
7702
|
-
function
|
|
7722
|
+
function au(t, e, n) {
|
|
7703
7723
|
const r = [cr(e[1] === "^", e)];
|
|
7704
7724
|
let o = 1, s;
|
|
7705
7725
|
for (Ot.lastIndex = n; s = Ot.exec(t); ) {
|
|
@@ -7707,50 +7727,50 @@ function su(t, e, n) {
|
|
|
7707
7727
|
if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
|
|
7708
7728
|
else if (a === "]") {
|
|
7709
7729
|
if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
|
|
7710
|
-
else if (o--, r.push(
|
|
7730
|
+
else if (o--, r.push(uu(a)), !o) break;
|
|
7711
7731
|
} else {
|
|
7712
|
-
const i =
|
|
7732
|
+
const i = iu(a);
|
|
7713
7733
|
Array.isArray(i) ? r.push(...i) : r.push(i);
|
|
7714
7734
|
}
|
|
7715
7735
|
}
|
|
7716
7736
|
return { tokens: r, lastIndex: Ot.lastIndex || t.length };
|
|
7717
7737
|
}
|
|
7718
|
-
function
|
|
7738
|
+
function iu(t) {
|
|
7719
7739
|
if (t[0] === "\\") return Mo(t, { inCharClass: !0 });
|
|
7720
7740
|
if (t[0] === "[") {
|
|
7721
7741
|
const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
|
|
7722
7742
|
if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
7723
7743
|
return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
|
|
7724
7744
|
}
|
|
7725
|
-
return t === "-" ?
|
|
7745
|
+
return t === "-" ? cu(t) : t === "&&" ? hu(t) : se(Pe(t), t);
|
|
7726
7746
|
}
|
|
7727
7747
|
function Mo(t, { inCharClass: e }) {
|
|
7728
7748
|
const n = t[1];
|
|
7729
|
-
if (n === "c" || n === "C") return
|
|
7730
|
-
if ("dDhHsSwW".includes(n)) return
|
|
7749
|
+
if (n === "c" || n === "C") return bu(t);
|
|
7750
|
+
if ("dDhHsSwW".includes(n)) return _u(t);
|
|
7731
7751
|
if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7732
7752
|
if (/^\\[pP]\{/.test(t)) {
|
|
7733
7753
|
if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
|
|
7734
|
-
return
|
|
7754
|
+
return Su(t);
|
|
7735
7755
|
}
|
|
7736
7756
|
if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
|
|
7737
7757
|
const r = t.split(/\\x/).slice(1).map((a) => parseInt(a, 16)), o = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }).decode(new Uint8Array(r)), s = new TextEncoder();
|
|
7738
7758
|
return [...o].map((a) => {
|
|
7739
7759
|
const i = [...s.encode(a)].map((l) => `\\x${l.toString(16)}`).join("");
|
|
7740
|
-
return se(
|
|
7760
|
+
return se(Pe(a), i);
|
|
7741
7761
|
});
|
|
7742
7762
|
} catch {
|
|
7743
7763
|
throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
|
|
7744
7764
|
}
|
|
7745
|
-
if (n === "u" || n === "x") return se(
|
|
7765
|
+
if (n === "u" || n === "x") return se(vu(t), t);
|
|
7746
7766
|
if (hr.has(n)) return se(hr.get(n), t);
|
|
7747
|
-
if (/\d/.test(n)) return
|
|
7767
|
+
if (/\d/.test(n)) return fu(e, t);
|
|
7748
7768
|
if (t === "\\") throw new Error(B`Incomplete escape "\"`);
|
|
7749
7769
|
if (n === "M") throw new Error(`Unsupported meta "${t}"`);
|
|
7750
7770
|
if ([...t].length === 2) return se(t.codePointAt(1), t);
|
|
7751
7771
|
throw new Error(`Unexpected escape "${t}"`);
|
|
7752
7772
|
}
|
|
7753
|
-
function
|
|
7773
|
+
function lu(t) {
|
|
7754
7774
|
return { type: "Alternator", raw: t };
|
|
7755
7775
|
}
|
|
7756
7776
|
function ur(t, e) {
|
|
@@ -7762,13 +7782,13 @@ function Oo(t) {
|
|
|
7762
7782
|
function se(t, e) {
|
|
7763
7783
|
return { type: "Character", value: t, raw: e };
|
|
7764
7784
|
}
|
|
7765
|
-
function
|
|
7785
|
+
function uu(t) {
|
|
7766
7786
|
return { type: "CharacterClassClose", raw: t };
|
|
7767
7787
|
}
|
|
7768
|
-
function
|
|
7788
|
+
function cu(t) {
|
|
7769
7789
|
return { type: "CharacterClassHyphen", raw: t };
|
|
7770
7790
|
}
|
|
7771
|
-
function
|
|
7791
|
+
function hu(t) {
|
|
7772
7792
|
return { type: "CharacterClassIntersector", raw: t };
|
|
7773
7793
|
}
|
|
7774
7794
|
function cr(t, e) {
|
|
@@ -7780,7 +7800,7 @@ function ge(t, e, n = {}) {
|
|
|
7780
7800
|
function Do(t, e, n = {}) {
|
|
7781
7801
|
return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
|
|
7782
7802
|
}
|
|
7783
|
-
function
|
|
7803
|
+
function fu(t, e) {
|
|
7784
7804
|
return { type: "EscapedNumber", inCharClass: t, raw: e };
|
|
7785
7805
|
}
|
|
7786
7806
|
function pu(t) {
|
|
@@ -7789,36 +7809,36 @@ function pu(t) {
|
|
|
7789
7809
|
function Se(t, e, n = {}) {
|
|
7790
7810
|
return { type: "GroupOpen", kind: t, ...n, raw: e };
|
|
7791
7811
|
}
|
|
7792
|
-
function
|
|
7812
|
+
function du(t, e, n, r) {
|
|
7793
7813
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
|
|
7794
7814
|
}
|
|
7795
|
-
function
|
|
7815
|
+
function gu(t, e, n, r) {
|
|
7796
7816
|
return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
|
|
7797
7817
|
}
|
|
7798
|
-
function
|
|
7818
|
+
function mu(t) {
|
|
7799
7819
|
return { type: "Subroutine", raw: t };
|
|
7800
7820
|
}
|
|
7801
|
-
const
|
|
7802
|
-
function
|
|
7821
|
+
const yu = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
|
|
7822
|
+
function bu(t) {
|
|
7803
7823
|
const e = t[1] === "c" ? t[2] : t[3];
|
|
7804
7824
|
if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
|
|
7805
|
-
return se(
|
|
7825
|
+
return se(Pe(e.toUpperCase()) - 64, t);
|
|
7806
7826
|
}
|
|
7807
|
-
function
|
|
7827
|
+
function wu(t, e) {
|
|
7808
7828
|
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
|
|
7809
7829
|
r ??= "";
|
|
7810
|
-
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s =
|
|
7830
|
+
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = pr(n), a = pr(r), i = {};
|
|
7811
7831
|
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o), Do("flags", t, { flags: i });
|
|
7812
7832
|
if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
|
|
7813
7833
|
throw new Error(`Unexpected flag modifier "${t}"`);
|
|
7814
7834
|
}
|
|
7815
|
-
function
|
|
7835
|
+
function Cu(t) {
|
|
7816
7836
|
const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
|
|
7817
7837
|
if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
|
|
7818
7838
|
const { name: n, tag: r, args: o } = e.groups;
|
|
7819
7839
|
if (!n) throw new Error(`Invalid named callout "${t}"`);
|
|
7820
7840
|
if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
|
|
7821
|
-
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u =
|
|
7841
|
+
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = yu.has(n) ? n.toLowerCase() : "custom";
|
|
7822
7842
|
switch (u) {
|
|
7823
7843
|
case "fail":
|
|
7824
7844
|
case "mismatch":
|
|
@@ -7850,9 +7870,9 @@ function wu(t) {
|
|
|
7850
7870
|
default:
|
|
7851
7871
|
throw new Error(`Unexpected named callout kind "${u}"`);
|
|
7852
7872
|
}
|
|
7853
|
-
return
|
|
7873
|
+
return du(u, r ?? null, o?.split(",") ?? null, t);
|
|
7854
7874
|
}
|
|
7855
|
-
function
|
|
7875
|
+
function fr(t) {
|
|
7856
7876
|
let e = null, n, r;
|
|
7857
7877
|
if (t[0] === "{") {
|
|
7858
7878
|
const { minStr: o, maxStr: s } = /^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups, a = 1e5;
|
|
@@ -7862,21 +7882,21 @@ function pr(t) {
|
|
|
7862
7882
|
e = "lazy";
|
|
7863
7883
|
} else e || (e = "greedy");
|
|
7864
7884
|
} else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
|
|
7865
|
-
return
|
|
7885
|
+
return gu(e, n, r, t);
|
|
7866
7886
|
}
|
|
7867
|
-
function
|
|
7887
|
+
function _u(t) {
|
|
7868
7888
|
const e = t[1].toLowerCase();
|
|
7869
7889
|
return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
|
|
7870
7890
|
}
|
|
7871
|
-
function
|
|
7891
|
+
function Su(t) {
|
|
7872
7892
|
const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
|
|
7873
7893
|
return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
|
|
7874
7894
|
}
|
|
7875
|
-
function
|
|
7895
|
+
function pr(t) {
|
|
7876
7896
|
const e = {};
|
|
7877
7897
|
return t.includes("i") && (e.ignoreCase = !0), t.includes("m") && (e.dotAll = !0), t.includes("x") && (e.extended = !0), Object.keys(e).length ? e : null;
|
|
7878
7898
|
}
|
|
7879
|
-
function
|
|
7899
|
+
function ku(t) {
|
|
7880
7900
|
const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
|
|
7881
7901
|
for (let n = 0; n < t.length; n++) {
|
|
7882
7902
|
const r = t[n];
|
|
@@ -7890,12 +7910,12 @@ function Su(t) {
|
|
|
7890
7910
|
}
|
|
7891
7911
|
return e;
|
|
7892
7912
|
}
|
|
7893
|
-
function
|
|
7913
|
+
function vu(t) {
|
|
7894
7914
|
if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t)) throw new Error(`Incomplete or invalid escape "${t}"`);
|
|
7895
7915
|
const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
|
|
7896
7916
|
return parseInt(e, 16);
|
|
7897
7917
|
}
|
|
7898
|
-
function
|
|
7918
|
+
function xu(t, e) {
|
|
7899
7919
|
const { raw: n, inCharClass: r } = t, o = n.slice(1);
|
|
7900
7920
|
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Oo(n)];
|
|
7901
7921
|
const s = [], a = o.match(/^[0-7]+|\d/g);
|
|
@@ -7904,12 +7924,12 @@ function vu(t, e) {
|
|
|
7904
7924
|
let u;
|
|
7905
7925
|
if (i === 0 && l !== "8" && l !== "9") {
|
|
7906
7926
|
if (u = parseInt(l, 8), u > 127) throw new Error(B`Octal encoded byte above 177 unsupported "${n}"`);
|
|
7907
|
-
} else u =
|
|
7927
|
+
} else u = Pe(l);
|
|
7908
7928
|
s.push(se(u, (i === 0 ? "\\" : "") + l));
|
|
7909
7929
|
}
|
|
7910
7930
|
return s;
|
|
7911
7931
|
}
|
|
7912
|
-
function
|
|
7932
|
+
function Eu(t) {
|
|
7913
7933
|
const e = [], n = new RegExp(xn, "gy");
|
|
7914
7934
|
let r;
|
|
7915
7935
|
for (; r = n.exec(t); ) {
|
|
@@ -7919,12 +7939,12 @@ function xu(t) {
|
|
|
7919
7939
|
if (s) {
|
|
7920
7940
|
const { min: a, max: i } = s.groups;
|
|
7921
7941
|
if (+a > +i && o.endsWith("?")) {
|
|
7922
|
-
n.lastIndex--, e.push(
|
|
7942
|
+
n.lastIndex--, e.push(fr(o.slice(0, -1)));
|
|
7923
7943
|
continue;
|
|
7924
7944
|
}
|
|
7925
7945
|
}
|
|
7926
7946
|
}
|
|
7927
|
-
e.push(
|
|
7947
|
+
e.push(fr(o));
|
|
7928
7948
|
}
|
|
7929
7949
|
return e;
|
|
7930
7950
|
}
|
|
@@ -7934,62 +7954,62 @@ function Go(t, e) {
|
|
|
7934
7954
|
const n = t.body[0];
|
|
7935
7955
|
return !e || Object.keys(e).every((r) => e[r] === n[r]);
|
|
7936
7956
|
}
|
|
7937
|
-
function
|
|
7938
|
-
return
|
|
7957
|
+
function Au(t) {
|
|
7958
|
+
return Ru.has(t.type);
|
|
7939
7959
|
}
|
|
7940
|
-
const
|
|
7960
|
+
const Ru = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
|
|
7941
7961
|
function Fo(t, e = {}) {
|
|
7942
|
-
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r =
|
|
7943
|
-
const
|
|
7944
|
-
switch (s.parent =
|
|
7962
|
+
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = ou(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (p, d) => {
|
|
7963
|
+
const f = r.tokens[s.nextIndex];
|
|
7964
|
+
switch (s.parent = p, s.nextIndex++, f.type) {
|
|
7945
7965
|
case "Alternator":
|
|
7946
7966
|
return me();
|
|
7947
7967
|
case "Assertion":
|
|
7948
|
-
return
|
|
7968
|
+
return Iu(f);
|
|
7949
7969
|
case "Backreference":
|
|
7950
|
-
return
|
|
7970
|
+
return Nu(f, s);
|
|
7951
7971
|
case "Character":
|
|
7952
|
-
return vt(
|
|
7972
|
+
return vt(f.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
7953
7973
|
case "CharacterClassHyphen":
|
|
7954
|
-
return
|
|
7974
|
+
return Lu(f, s, d);
|
|
7955
7975
|
case "CharacterClassOpen":
|
|
7956
|
-
return Pu(
|
|
7976
|
+
return Pu(f, s, d);
|
|
7957
7977
|
case "CharacterSet":
|
|
7958
|
-
return
|
|
7978
|
+
return $u(f, s);
|
|
7959
7979
|
case "Directive":
|
|
7960
|
-
return
|
|
7980
|
+
return Fu(f.kind, { flags: f.flags });
|
|
7961
7981
|
case "GroupOpen":
|
|
7962
|
-
return
|
|
7982
|
+
return Tu(f, s, d);
|
|
7963
7983
|
case "NamedCallout":
|
|
7964
|
-
return
|
|
7984
|
+
return ju(f.kind, f.tag, f.arguments);
|
|
7965
7985
|
case "Quantifier":
|
|
7966
|
-
return
|
|
7986
|
+
return Mu(f, s);
|
|
7967
7987
|
case "Subroutine":
|
|
7968
|
-
return
|
|
7988
|
+
return Ou(f, s);
|
|
7969
7989
|
default:
|
|
7970
|
-
throw new Error(`Unexpected token type "${
|
|
7990
|
+
throw new Error(`Unexpected token type "${f.type}"`);
|
|
7971
7991
|
}
|
|
7972
|
-
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a =
|
|
7992
|
+
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = zu(Bu(r.flags));
|
|
7973
7993
|
let i = a.body[0];
|
|
7974
7994
|
for (; s.nextIndex < r.tokens.length; ) {
|
|
7975
|
-
const
|
|
7976
|
-
|
|
7995
|
+
const p = o(i, {});
|
|
7996
|
+
p.type === "Alternative" ? (a.body.push(p), i = p) : i.body.push(p);
|
|
7977
7997
|
}
|
|
7978
7998
|
const { capturingGroups: l, hasNumberedRef: u, namedGroupsByName: c, subroutines: h } = s;
|
|
7979
7999
|
if (u && c.size && !n.rules.captureGroup) throw new Error("Numbered backref/subroutine not allowed when using named capture");
|
|
7980
|
-
for (const { ref:
|
|
7981
|
-
if (
|
|
7982
|
-
|
|
7983
|
-
} else if (c.has(
|
|
7984
|
-
if (c.get(
|
|
7985
|
-
c.get(
|
|
7986
|
-
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${
|
|
8000
|
+
for (const { ref: p } of h) if (typeof p == "number") {
|
|
8001
|
+
if (p > l.length) throw new Error("Subroutine uses a group number that's not defined");
|
|
8002
|
+
p && (l[p - 1].isSubroutined = !0);
|
|
8003
|
+
} else if (c.has(p)) {
|
|
8004
|
+
if (c.get(p).length > 1) throw new Error(B`Subroutine uses a duplicate group name "\g<${p}>"`);
|
|
8005
|
+
c.get(p)[0].isSubroutined = !0;
|
|
8006
|
+
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${p}>"`);
|
|
7987
8007
|
return a;
|
|
7988
8008
|
}
|
|
7989
|
-
function
|
|
8009
|
+
function Iu({ kind: t }) {
|
|
7990
8010
|
return on($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === B`\B` || t === B`\Y` });
|
|
7991
8011
|
}
|
|
7992
|
-
function
|
|
8012
|
+
function Nu({ raw: t }, e) {
|
|
7993
8013
|
const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
|
|
7994
8014
|
const i = e.capturingGroups.length;
|
|
7995
8015
|
let l = !1;
|
|
@@ -8006,14 +8026,14 @@ function Iu({ raw: t }, e) {
|
|
|
8006
8026
|
}
|
|
8007
8027
|
return o(+r);
|
|
8008
8028
|
}
|
|
8009
|
-
function
|
|
8029
|
+
function Lu(t, e, n) {
|
|
8010
8030
|
const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
|
|
8011
8031
|
if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
|
|
8012
8032
|
const l = o(s, { ...n, isCheckingRangeEnd: !0 });
|
|
8013
|
-
if (a.type === "Character" && l.type === "Character") return s.body.pop(),
|
|
8033
|
+
if (a.type === "Character" && l.type === "Character") return s.body.pop(), Gu(a, l);
|
|
8014
8034
|
throw new Error("Invalid character class range");
|
|
8015
8035
|
}
|
|
8016
|
-
return vt(
|
|
8036
|
+
return vt(Pe("-"));
|
|
8017
8037
|
}
|
|
8018
8038
|
function Pu({ negate: t }, e, n) {
|
|
8019
8039
|
const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
|
|
@@ -8029,41 +8049,41 @@ function Pu({ negate: t }, e, n) {
|
|
|
8029
8049
|
const l = st({ negate: t });
|
|
8030
8050
|
return a.length === 1 ? l.body = a[0].body : (l.kind = "intersection", l.body = a.map((u) => u.body.length === 1 ? u.body[0] : u)), e.nextIndex++, l;
|
|
8031
8051
|
}
|
|
8032
|
-
function
|
|
8052
|
+
function $u({ kind: t, negate: e, value: n }, r) {
|
|
8033
8053
|
const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
|
|
8034
8054
|
if (t === "property") {
|
|
8035
8055
|
const i = xt(n);
|
|
8036
8056
|
if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
|
|
8037
8057
|
else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
|
|
8038
8058
|
}
|
|
8039
|
-
return t === "posix" ?
|
|
8059
|
+
return t === "posix" ? Uu(n, { negate: e }) : an(t, { negate: e });
|
|
8040
8060
|
}
|
|
8041
|
-
function
|
|
8042
|
-
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l =
|
|
8043
|
-
if (l.type === "CapturingGroup" && (o.push(l), l.name &&
|
|
8044
|
-
let
|
|
8045
|
-
for (;
|
|
8046
|
-
if (
|
|
8061
|
+
function Tu(t, e, n) {
|
|
8062
|
+
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Hu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
8063
|
+
if (l.type === "CapturingGroup" && (o.push(l), l.name && ru(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
|
|
8064
|
+
let p = yr(r[e.nextIndex]);
|
|
8065
|
+
for (; p.type !== "GroupClose"; ) {
|
|
8066
|
+
if (p.type === "Alternator") l.body.push(me()), e.nextIndex++;
|
|
8047
8067
|
else {
|
|
8048
|
-
const d = l.body.at(-1),
|
|
8049
|
-
if (d.body.push(
|
|
8068
|
+
const d = l.body.at(-1), f = i(d, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || u, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || h });
|
|
8069
|
+
if (d.body.push(f), (c || n.isInLookbehind) && !a) {
|
|
8050
8070
|
const g = "Lookbehind includes a pattern not allowed by Oniguruma";
|
|
8051
8071
|
if (h || n.isInNegLookbehind) {
|
|
8052
|
-
if (dr(
|
|
8053
|
-
} else if (dr(
|
|
8072
|
+
if (dr(f) || f.type === "CapturingGroup") throw new Error(g);
|
|
8073
|
+
} else if (dr(f) || gr(f) && f.negate) throw new Error(g);
|
|
8054
8074
|
}
|
|
8055
8075
|
}
|
|
8056
|
-
|
|
8076
|
+
p = yr(r[e.nextIndex]);
|
|
8057
8077
|
}
|
|
8058
8078
|
return e.nextIndex++, l;
|
|
8059
8079
|
}
|
|
8060
|
-
function
|
|
8080
|
+
function Mu({ kind: t, min: e, max: n }, r) {
|
|
8061
8081
|
const o = r.parent, s = o.body.at(-1);
|
|
8062
|
-
if (!s || !
|
|
8082
|
+
if (!s || !Au(s)) throw new Error("Quantifier requires a repeatable token");
|
|
8063
8083
|
const a = jo(t, e, n, s);
|
|
8064
8084
|
return o.body.pop(), a;
|
|
8065
8085
|
}
|
|
8066
|
-
function
|
|
8086
|
+
function Ou({ raw: t }, e) {
|
|
8067
8087
|
const { capturingGroups: n, subroutines: r } = e;
|
|
8068
8088
|
let o = t.slice(3, -1);
|
|
8069
8089
|
const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
|
|
@@ -8074,7 +8094,7 @@ function Mu({ raw: t }, e) {
|
|
|
8074
8094
|
const a = Uo(o);
|
|
8075
8095
|
return r.push(a), a;
|
|
8076
8096
|
}
|
|
8077
|
-
function
|
|
8097
|
+
function Du(t, e) {
|
|
8078
8098
|
return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
|
|
8079
8099
|
}
|
|
8080
8100
|
function me(t) {
|
|
@@ -8090,7 +8110,7 @@ function sn(t, e) {
|
|
|
8090
8110
|
}
|
|
8091
8111
|
function Bo(t, e) {
|
|
8092
8112
|
const n = { name: void 0, isSubroutined: !1, ...e };
|
|
8093
|
-
if (n.name !== void 0 && !
|
|
8113
|
+
if (n.name !== void 0 && !Wu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
8094
8114
|
return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
|
|
8095
8115
|
}
|
|
8096
8116
|
function vt(t, e) {
|
|
@@ -8106,7 +8126,7 @@ function st(t) {
|
|
|
8106
8126
|
const e = { kind: "union", negate: !1, ...t };
|
|
8107
8127
|
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: zo(t?.body) };
|
|
8108
8128
|
}
|
|
8109
|
-
function
|
|
8129
|
+
function Gu(t, e) {
|
|
8110
8130
|
if (e.value < t.value) throw new Error("Character class range out of order");
|
|
8111
8131
|
return { type: "CharacterClassRange", min: t, max: e };
|
|
8112
8132
|
}
|
|
@@ -8114,12 +8134,12 @@ function an(t, e) {
|
|
|
8114
8134
|
const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
|
|
8115
8135
|
return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
|
|
8116
8136
|
}
|
|
8117
|
-
function
|
|
8137
|
+
function Fu(t, e = {}) {
|
|
8118
8138
|
if (t === "keep") return { type: "Directive", kind: t };
|
|
8119
8139
|
if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
|
|
8120
8140
|
throw new Error(`Unexpected directive kind "${t}"`);
|
|
8121
8141
|
}
|
|
8122
|
-
function
|
|
8142
|
+
function Bu(t) {
|
|
8123
8143
|
return { type: "Flags", ...t };
|
|
8124
8144
|
}
|
|
8125
8145
|
function Q(t) {
|
|
@@ -8127,14 +8147,14 @@ function Q(t) {
|
|
|
8127
8147
|
if (e && n) throw new Error("Atomic group cannot have flags");
|
|
8128
8148
|
return { type: "Group", ...e && { atomic: e }, ...n && { flags: n }, body: Ye(t?.body) };
|
|
8129
8149
|
}
|
|
8130
|
-
function
|
|
8150
|
+
function pe(t) {
|
|
8131
8151
|
const e = { behind: !1, negate: !1, ...t };
|
|
8132
8152
|
return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
|
|
8133
8153
|
}
|
|
8134
|
-
function
|
|
8154
|
+
function ju(t, e, n) {
|
|
8135
8155
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n };
|
|
8136
8156
|
}
|
|
8137
|
-
function
|
|
8157
|
+
function Uu(t, e) {
|
|
8138
8158
|
const n = !!e?.negate;
|
|
8139
8159
|
if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
8140
8160
|
return { type: "CharacterSet", kind: "posix", value: t, negate: n };
|
|
@@ -8143,7 +8163,7 @@ function jo(t, e, n, r) {
|
|
|
8143
8163
|
if (e > n) throw new Error("Invalid reversed quantifier range");
|
|
8144
8164
|
return { type: "Quantifier", kind: t, min: e, max: n, body: r };
|
|
8145
8165
|
}
|
|
8146
|
-
function
|
|
8166
|
+
function zu(t, e) {
|
|
8147
8167
|
return { type: "Regex", body: Ye(e?.body), flags: t };
|
|
8148
8168
|
}
|
|
8149
8169
|
function Uo(t) {
|
|
@@ -8153,15 +8173,15 @@ function ke(t, e) {
|
|
|
8153
8173
|
const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
|
|
8154
8174
|
let r = n.unicodePropertyMap?.get(xt(t));
|
|
8155
8175
|
if (!r) {
|
|
8156
|
-
if (n.normalizeUnknownPropertyNames) r =
|
|
8176
|
+
if (n.normalizeUnknownPropertyNames) r = Vu(t);
|
|
8157
8177
|
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
|
|
8158
8178
|
}
|
|
8159
8179
|
return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
|
|
8160
8180
|
}
|
|
8161
|
-
function
|
|
8181
|
+
function Hu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
8162
8182
|
switch (e) {
|
|
8163
8183
|
case "absence_repeater":
|
|
8164
|
-
return
|
|
8184
|
+
return Du("repeater");
|
|
8165
8185
|
case "atomic":
|
|
8166
8186
|
return Q({ atomic: !0 });
|
|
8167
8187
|
case "capturing":
|
|
@@ -8170,7 +8190,7 @@ function zu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
|
8170
8190
|
return Q({ flags: t });
|
|
8171
8191
|
case "lookahead":
|
|
8172
8192
|
case "lookbehind":
|
|
8173
|
-
return
|
|
8193
|
+
return pe({ behind: e === "lookbehind", negate: r });
|
|
8174
8194
|
default:
|
|
8175
8195
|
throw new Error(`Unexpected group kind "${e}"`);
|
|
8176
8196
|
}
|
|
@@ -8191,10 +8211,10 @@ function dr(t) {
|
|
|
8191
8211
|
function gr(t) {
|
|
8192
8212
|
return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
|
|
8193
8213
|
}
|
|
8194
|
-
function
|
|
8214
|
+
function Wu(t) {
|
|
8195
8215
|
return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
|
|
8196
8216
|
}
|
|
8197
|
-
function
|
|
8217
|
+
function Vu(t) {
|
|
8198
8218
|
return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
8199
8219
|
}
|
|
8200
8220
|
function xt(t) {
|
|
@@ -8234,8 +8254,8 @@ function Be(t, e, n = null) {
|
|
|
8234
8254
|
c = !0;
|
|
8235
8255
|
}, skip() {
|
|
8236
8256
|
c = !0;
|
|
8237
|
-
} }, { type:
|
|
8238
|
-
if (g?.(h, n), C?.(h, n), !c) switch (
|
|
8257
|
+
} }, { type: p } = s, d = e["*"], f = e[p], g = typeof d == "function" ? d : d?.enter, C = typeof f == "function" ? f : f?.enter;
|
|
8258
|
+
if (g?.(h, n), C?.(h, n), !c) switch (p) {
|
|
8239
8259
|
case "AbsenceFunction":
|
|
8240
8260
|
case "CapturingGroup":
|
|
8241
8261
|
case "Group":
|
|
@@ -8267,9 +8287,9 @@ function Be(t, e, n = null) {
|
|
|
8267
8287
|
r(s.body, s), o(s.flags, s, "flags");
|
|
8268
8288
|
break;
|
|
8269
8289
|
default:
|
|
8270
|
-
throw new Error(`Unexpected node type "${
|
|
8290
|
+
throw new Error(`Unexpected node type "${p}"`);
|
|
8271
8291
|
}
|
|
8272
|
-
return
|
|
8292
|
+
return f?.exit?.(h, n), d?.exit?.(h, n), u;
|
|
8273
8293
|
}
|
|
8274
8294
|
return o(t), t;
|
|
8275
8295
|
}
|
|
@@ -8281,12 +8301,12 @@ function Ce(t) {
|
|
|
8281
8301
|
if (typeof t != "number") throw new Error("Numeric key expected");
|
|
8282
8302
|
return t;
|
|
8283
8303
|
}
|
|
8284
|
-
const
|
|
8285
|
-
function
|
|
8304
|
+
const qu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
8305
|
+
function Xu(t, e) {
|
|
8286
8306
|
for (let n = 0; n < t.length; n++)
|
|
8287
8307
|
t[n] >= e && t[n]++;
|
|
8288
8308
|
}
|
|
8289
|
-
function
|
|
8309
|
+
function Ku(t, e, n, r) {
|
|
8290
8310
|
return t.slice(0, e) + r + t.slice(e + n.length);
|
|
8291
8311
|
}
|
|
8292
8312
|
const J = Object.freeze({
|
|
@@ -8312,7 +8332,7 @@ function En(t, e, n, r) {
|
|
|
8312
8332
|
function Ho(t, e, n, r) {
|
|
8313
8333
|
En(t, e, n, r);
|
|
8314
8334
|
}
|
|
8315
|
-
function
|
|
8335
|
+
function Yu(t, e, n = 0, r) {
|
|
8316
8336
|
if (!new RegExp(e, "su").test(t))
|
|
8317
8337
|
return null;
|
|
8318
8338
|
const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
|
|
@@ -8327,9 +8347,9 @@ function Ku(t, e, n = 0, r) {
|
|
|
8327
8347
|
return null;
|
|
8328
8348
|
}
|
|
8329
8349
|
function nt(t, e, n) {
|
|
8330
|
-
return !!
|
|
8350
|
+
return !!Yu(t, e, 0, n);
|
|
8331
8351
|
}
|
|
8332
|
-
function
|
|
8352
|
+
function Ju(t, e) {
|
|
8333
8353
|
const n = /\\?./gsu;
|
|
8334
8354
|
n.lastIndex = e;
|
|
8335
8355
|
let r = t.length, o = 0, s = 1, a;
|
|
@@ -8348,8 +8368,8 @@ function Yu(t, e) {
|
|
|
8348
8368
|
}
|
|
8349
8369
|
return t.slice(e, r);
|
|
8350
8370
|
}
|
|
8351
|
-
const br = new RegExp(String.raw`(?<noncapturingStart>${
|
|
8352
|
-
function
|
|
8371
|
+
const br = new RegExp(String.raw`(?<noncapturingStart>${qu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
|
8372
|
+
function Zu(t, e) {
|
|
8353
8373
|
const n = e?.hiddenCaptures ?? [];
|
|
8354
8374
|
let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
8355
8375
|
if (!/\(\?>/.test(t))
|
|
@@ -8362,28 +8382,28 @@ function Ju(t, e) {
|
|
|
8362
8382
|
let l = 0, u = 0, c = NaN, h;
|
|
8363
8383
|
do {
|
|
8364
8384
|
h = !1;
|
|
8365
|
-
let
|
|
8385
|
+
let p = 0, d = 0, f = !1, g;
|
|
8366
8386
|
for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length; g = br.exec(t); ) {
|
|
8367
8387
|
const { 0: C, index: y, groups: { capturingStart: m, noncapturingStart: _ } } = g;
|
|
8368
8388
|
if (C === "[")
|
|
8369
|
-
|
|
8370
|
-
else if (
|
|
8371
|
-
C === "]" &&
|
|
8372
|
-
else if (C === o && !
|
|
8373
|
-
c = y,
|
|
8374
|
-
else if (
|
|
8389
|
+
p++;
|
|
8390
|
+
else if (p)
|
|
8391
|
+
C === "]" && p--;
|
|
8392
|
+
else if (C === o && !f)
|
|
8393
|
+
c = y, f = !0;
|
|
8394
|
+
else if (f && _)
|
|
8375
8395
|
d++;
|
|
8376
8396
|
else if (m)
|
|
8377
|
-
|
|
8378
|
-
else if (C === ")" &&
|
|
8397
|
+
f ? d++ : (l++, a.push(l + u));
|
|
8398
|
+
else if (C === ")" && f) {
|
|
8379
8399
|
if (!d) {
|
|
8380
8400
|
u++;
|
|
8381
8401
|
const S = l + u;
|
|
8382
|
-
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S),
|
|
8402
|
+
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S), Xu(n, S), r.size) {
|
|
8383
8403
|
const A = /* @__PURE__ */ new Map();
|
|
8384
|
-
r.forEach((D,
|
|
8404
|
+
r.forEach((D, L) => {
|
|
8385
8405
|
A.set(
|
|
8386
|
-
|
|
8406
|
+
L >= S ? L + 1 : L,
|
|
8387
8407
|
D.map((j) => j >= S ? j + 1 : j)
|
|
8388
8408
|
);
|
|
8389
8409
|
}), r = A;
|
|
@@ -8397,14 +8417,14 @@ function Ju(t, e) {
|
|
|
8397
8417
|
return n.push(...i), t = En(
|
|
8398
8418
|
t,
|
|
8399
8419
|
String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,
|
|
8400
|
-
({ 0:
|
|
8420
|
+
({ 0: p, groups: { backrefNum: d, wrappedBackrefNum: f } }) => {
|
|
8401
8421
|
if (d) {
|
|
8402
8422
|
const g = +d;
|
|
8403
8423
|
if (g > a.length - 1)
|
|
8404
|
-
throw new Error(`Backref "${
|
|
8424
|
+
throw new Error(`Backref "${p}" greater than number of captures`);
|
|
8405
8425
|
return `\\${a[g]}`;
|
|
8406
8426
|
}
|
|
8407
|
-
return `\\${
|
|
8427
|
+
return `\\${f}`;
|
|
8408
8428
|
},
|
|
8409
8429
|
J.DEFAULT
|
|
8410
8430
|
), {
|
|
@@ -8429,7 +8449,7 @@ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
|
8429
8449
|
| (?<qBase>${Wo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
8430
8450
|
| \\?.
|
|
8431
8451
|
`.replace(/\s+/g, ""), "gsu");
|
|
8432
|
-
function
|
|
8452
|
+
function Qu(t) {
|
|
8433
8453
|
if (!new RegExp(`${Wo}\\+`).test(t))
|
|
8434
8454
|
return {
|
|
8435
8455
|
pattern: t
|
|
@@ -8446,9 +8466,9 @@ function Zu(t) {
|
|
|
8446
8466
|
if (c === "+" && o && !o.startsWith("(")) {
|
|
8447
8467
|
if (h)
|
|
8448
8468
|
throw new Error(`Invalid quantifier "${i}"`);
|
|
8449
|
-
let
|
|
8469
|
+
let p = -1;
|
|
8450
8470
|
if (/^\{\d+\}$/.test(u))
|
|
8451
|
-
t =
|
|
8471
|
+
t = Ku(t, l + u.length, c, "");
|
|
8452
8472
|
else {
|
|
8453
8473
|
if (o === ")" || o === "]") {
|
|
8454
8474
|
const d = o === ")" ? n : r;
|
|
@@ -8457,9 +8477,9 @@ function Zu(t) {
|
|
|
8457
8477
|
t = `${t.slice(0, d)}(?>${t.slice(d, l)}${u})${t.slice(l + i.length)}`;
|
|
8458
8478
|
} else
|
|
8459
8479
|
t = `${t.slice(0, l - o.length)}(?>${o}${u})${t.slice(l + i.length)}`;
|
|
8460
|
-
|
|
8480
|
+
p += 4;
|
|
8461
8481
|
}
|
|
8462
|
-
Dt.lastIndex +=
|
|
8482
|
+
Dt.lastIndex += p;
|
|
8463
8483
|
} else i[0] === "(" ? e.push(l) : i === ")" && (n = e.length ? e.pop() : null);
|
|
8464
8484
|
o = i;
|
|
8465
8485
|
}
|
|
@@ -8467,8 +8487,8 @@ function Zu(t) {
|
|
|
8467
8487
|
pattern: t
|
|
8468
8488
|
};
|
|
8469
8489
|
}
|
|
8470
|
-
const Y = String.raw,
|
|
8471
|
-
function
|
|
8490
|
+
const Y = String.raw, ec = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${ec}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, Vo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
|
|
8491
|
+
function tc(t, e) {
|
|
8472
8492
|
const { hiddenCaptures: n, mode: r } = {
|
|
8473
8493
|
hiddenCaptures: [],
|
|
8474
8494
|
mode: "plugin",
|
|
@@ -8484,9 +8504,9 @@ function ec(t, e) {
|
|
|
8484
8504
|
if (r === "plugin" && nt(t, Y`\(\?\(DEFINE\)`, J.DEFAULT))
|
|
8485
8505
|
throw new Error("DEFINE groups cannot be used with recursion");
|
|
8486
8506
|
const s = [], a = nt(t, Y`\\[1-9]`, J.DEFAULT), i = /* @__PURE__ */ new Map(), l = [];
|
|
8487
|
-
let u = !1, c = 0, h = 0,
|
|
8488
|
-
for (he.lastIndex = 0;
|
|
8489
|
-
const { 0: d, groups: { captureName:
|
|
8507
|
+
let u = !1, c = 0, h = 0, p;
|
|
8508
|
+
for (he.lastIndex = 0; p = he.exec(t); ) {
|
|
8509
|
+
const { 0: d, groups: { captureName: f, rDepth: g, gRNameOrNum: C, gRDepth: y } } = p;
|
|
8490
8510
|
if (d === "[")
|
|
8491
8511
|
c++;
|
|
8492
8512
|
else if (c)
|
|
@@ -8500,7 +8520,7 @@ function ec(t, e) {
|
|
|
8500
8520
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8501
8521
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
|
|
8502
8522
|
);
|
|
8503
|
-
const m = t.slice(0,
|
|
8523
|
+
const m = t.slice(0, p.index), _ = t.slice(he.lastIndex);
|
|
8504
8524
|
if (nt(_, ln, J.DEFAULT))
|
|
8505
8525
|
throw new Error(Gt);
|
|
8506
8526
|
const S = +g - 1;
|
|
@@ -8532,14 +8552,14 @@ function ec(t, e) {
|
|
|
8532
8552
|
}
|
|
8533
8553
|
if (!m)
|
|
8534
8554
|
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? C : Y`\g<${C}&R=${y}>`}"`);
|
|
8535
|
-
const _ = i.get(C), S =
|
|
8555
|
+
const _ = i.get(C), S = Ju(t, _);
|
|
8536
8556
|
if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
|
|
8537
8557
|
throw new Error(
|
|
8538
8558
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
8539
8559
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8540
8560
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
|
|
8541
8561
|
);
|
|
8542
|
-
const A = t.slice(_,
|
|
8562
|
+
const A = t.slice(_, p.index), D = S.slice(A.length + d.length), L = s.length, j = +y - 1, Z = Cr(
|
|
8543
8563
|
A,
|
|
8544
8564
|
D,
|
|
8545
8565
|
j,
|
|
@@ -8552,16 +8572,16 @@ function ec(t, e) {
|
|
|
8552
8572
|
o,
|
|
8553
8573
|
A,
|
|
8554
8574
|
j,
|
|
8555
|
-
s.length -
|
|
8556
|
-
|
|
8575
|
+
s.length - L,
|
|
8576
|
+
L,
|
|
8557
8577
|
h
|
|
8558
8578
|
);
|
|
8559
8579
|
const ee = t.slice(0, _), ce = t.slice(_ + S.length);
|
|
8560
8580
|
t = `${ee}${Z}${ce}`, he.lastIndex += Z.length - d.length - A.length - D.length, l.forEach((te) => te.hasRecursedWithin = !0), u = !0;
|
|
8561
|
-
} else if (
|
|
8562
|
-
h++, i.set(String(h), he.lastIndex), i.set(
|
|
8581
|
+
} else if (f)
|
|
8582
|
+
h++, i.set(String(h), he.lastIndex), i.set(f, he.lastIndex), l.push({
|
|
8563
8583
|
num: h,
|
|
8564
|
-
name:
|
|
8584
|
+
name: f
|
|
8565
8585
|
});
|
|
8566
8586
|
else if (d[0] === "(") {
|
|
8567
8587
|
const m = d === "(";
|
|
@@ -8603,13 +8623,13 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8603
8623
|
u += En(
|
|
8604
8624
|
t,
|
|
8605
8625
|
Y`${Vo}|\\k<(?<backref>[^>]+)>`,
|
|
8606
|
-
({ 0:
|
|
8626
|
+
({ 0: p, groups: { captureName: d, unnamed: f, backref: g } }) => {
|
|
8607
8627
|
if (g && r && !r.has(g))
|
|
8608
|
-
return
|
|
8628
|
+
return p;
|
|
8609
8629
|
const C = `_$${h}`;
|
|
8610
|
-
if (
|
|
8630
|
+
if (f || d) {
|
|
8611
8631
|
const y = a + s.length + 1;
|
|
8612
|
-
return s.push(y),
|
|
8632
|
+
return s.push(y), nc(o, y), f ? p : `(?<${d}${C}>`;
|
|
8613
8633
|
}
|
|
8614
8634
|
return Y`\k<${g}${C}>`;
|
|
8615
8635
|
},
|
|
@@ -8618,7 +8638,7 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8618
8638
|
}
|
|
8619
8639
|
return u;
|
|
8620
8640
|
}
|
|
8621
|
-
function
|
|
8641
|
+
function nc(t, e) {
|
|
8622
8642
|
for (let n = 0; n < t.length; n++)
|
|
8623
8643
|
t[n] >= e && t[n]++;
|
|
8624
8644
|
}
|
|
@@ -8628,19 +8648,19 @@ function Sr(t, e, n, r, o, s) {
|
|
|
8628
8648
|
Ho(e, Vo, () => a++, J.DEFAULT);
|
|
8629
8649
|
const i = s - a + o, l = /* @__PURE__ */ new Map();
|
|
8630
8650
|
return t.forEach((u, c) => {
|
|
8631
|
-
const h = (r - a * n) / n,
|
|
8651
|
+
const h = (r - a * n) / n, p = a * n, d = c > i + a ? c + r : c, f = [];
|
|
8632
8652
|
for (const g of u)
|
|
8633
8653
|
if (g <= i)
|
|
8634
|
-
|
|
8654
|
+
f.push(g);
|
|
8635
8655
|
else if (g > i + a + h)
|
|
8636
|
-
|
|
8656
|
+
f.push(g + r);
|
|
8637
8657
|
else if (g <= i + a)
|
|
8638
8658
|
for (let C = 0; C <= n; C++)
|
|
8639
|
-
|
|
8659
|
+
f.push(g + a * C);
|
|
8640
8660
|
else
|
|
8641
8661
|
for (let C = 0; C <= n; C++)
|
|
8642
|
-
|
|
8643
|
-
l.set(d,
|
|
8662
|
+
f.push(g + p + h * C);
|
|
8663
|
+
l.set(d, f);
|
|
8644
8664
|
}), l;
|
|
8645
8665
|
}
|
|
8646
8666
|
return t;
|
|
@@ -8684,7 +8704,7 @@ function Ve(t, e, n) {
|
|
|
8684
8704
|
function un(t, e) {
|
|
8685
8705
|
return kr[t] >= kr[e];
|
|
8686
8706
|
}
|
|
8687
|
-
function
|
|
8707
|
+
function rc(t, e) {
|
|
8688
8708
|
if (t == null)
|
|
8689
8709
|
throw new Error(e ?? "Value expected");
|
|
8690
8710
|
return t;
|
|
@@ -8693,7 +8713,7 @@ var kr = {
|
|
|
8693
8713
|
ES2025: 2025,
|
|
8694
8714
|
ES2024: 2024,
|
|
8695
8715
|
ES2018: 2018
|
|
8696
|
-
},
|
|
8716
|
+
}, oc = (
|
|
8697
8717
|
/** @type {const} */
|
|
8698
8718
|
{
|
|
8699
8719
|
auto: "auto",
|
|
@@ -8705,7 +8725,7 @@ var kr = {
|
|
|
8705
8725
|
function qo(t = {}) {
|
|
8706
8726
|
if ({}.toString.call(t) !== "[object Object]")
|
|
8707
8727
|
throw new Error("Unexpected options");
|
|
8708
|
-
if (t.target !== void 0 && !
|
|
8728
|
+
if (t.target !== void 0 && !oc[t.target])
|
|
8709
8729
|
throw new Error(`Unexpected target "${t.target}"`);
|
|
8710
8730
|
const e = {
|
|
8711
8731
|
// Sets the level of emulation rigor/strictness.
|
|
@@ -8749,16 +8769,16 @@ function qo(t = {}) {
|
|
|
8749
8769
|
};
|
|
8750
8770
|
return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
|
|
8751
8771
|
}
|
|
8752
|
-
var
|
|
8772
|
+
var sc = "[ -\r ]", ac = /* @__PURE__ */ new Set([
|
|
8753
8773
|
M(304),
|
|
8754
8774
|
// İ
|
|
8755
8775
|
M(305)
|
|
8756
8776
|
// ı
|
|
8757
8777
|
]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
8758
8778
|
function Xo(t) {
|
|
8759
|
-
if (
|
|
8779
|
+
if (ac.has(t))
|
|
8760
8780
|
return [t];
|
|
8761
|
-
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o =
|
|
8781
|
+
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = uc.get(n), s = ic.get(n), a = lc.get(n);
|
|
8762
8782
|
return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
|
|
8763
8783
|
}
|
|
8764
8784
|
var An = /* @__PURE__ */ new Map(
|
|
@@ -8853,12 +8873,12 @@ Variation_Selector VS
|
|
|
8853
8873
|
White_Space space
|
|
8854
8874
|
XID_Continue XIDC
|
|
8855
8875
|
XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
8856
|
-
),
|
|
8876
|
+
), ic = /* @__PURE__ */ new Map([
|
|
8857
8877
|
["s", M(383)],
|
|
8858
8878
|
// s, ſ
|
|
8859
8879
|
[M(383), "s"]
|
|
8860
8880
|
// ſ, s
|
|
8861
|
-
]),
|
|
8881
|
+
]), lc = /* @__PURE__ */ new Map([
|
|
8862
8882
|
[M(223), M(7838)],
|
|
8863
8883
|
// ß, ẞ
|
|
8864
8884
|
[M(107), M(8490)],
|
|
@@ -8867,7 +8887,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8867
8887
|
// å, Å (Angstrom)
|
|
8868
8888
|
[M(969), M(8486)]
|
|
8869
8889
|
// ω, Ω (Ohm)
|
|
8870
|
-
]),
|
|
8890
|
+
]), uc = new Map([
|
|
8871
8891
|
ie(453),
|
|
8872
8892
|
ie(456),
|
|
8873
8893
|
ie(459),
|
|
@@ -8878,7 +8898,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8878
8898
|
ie(8124),
|
|
8879
8899
|
ie(8140),
|
|
8880
8900
|
ie(8188)
|
|
8881
|
-
]),
|
|
8901
|
+
]), cc = /* @__PURE__ */ new Map([
|
|
8882
8902
|
["alnum", v`[\p{Alpha}\p{Nd}]`],
|
|
8883
8903
|
["alpha", v`\p{Alpha}`],
|
|
8884
8904
|
["ascii", v`\p{ASCII}`],
|
|
@@ -8895,7 +8915,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8895
8915
|
["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
8896
8916
|
["xdigit", v`\p{AHex}`]
|
|
8897
8917
|
]);
|
|
8898
|
-
function
|
|
8918
|
+
function hc(t, e) {
|
|
8899
8919
|
const n = [];
|
|
8900
8920
|
for (let r = t; r <= e; r++)
|
|
8901
8921
|
n.push(r);
|
|
@@ -8906,7 +8926,7 @@ function ie(t) {
|
|
|
8906
8926
|
return [e.toLowerCase(), e];
|
|
8907
8927
|
}
|
|
8908
8928
|
function Ft(t, e) {
|
|
8909
|
-
return
|
|
8929
|
+
return hc(t, e).map((n) => ie(n));
|
|
8910
8930
|
}
|
|
8911
8931
|
var Ko = /* @__PURE__ */ new Set([
|
|
8912
8932
|
"Lower",
|
|
@@ -8924,7 +8944,7 @@ var Ko = /* @__PURE__ */ new Set([
|
|
|
8924
8944
|
// generally extreme edge cases and using such properties case insensitively generally produces
|
|
8925
8945
|
// undesired behavior anyway
|
|
8926
8946
|
]);
|
|
8927
|
-
function
|
|
8947
|
+
function fc(t, e) {
|
|
8928
8948
|
const n = {
|
|
8929
8949
|
// A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
|
|
8930
8950
|
// - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
|
|
@@ -8970,14 +8990,14 @@ function hc(t, e) {
|
|
|
8970
8990
|
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
8971
8991
|
subroutineRefMap: r.subroutineRefMap
|
|
8972
8992
|
};
|
|
8973
|
-
Be(t,
|
|
8993
|
+
Be(t, dc, s);
|
|
8974
8994
|
const a = {
|
|
8975
8995
|
groupsByName: s.groupsByName,
|
|
8976
8996
|
highestOrphanBackref: 0,
|
|
8977
8997
|
numCapturesToLeft: 0,
|
|
8978
8998
|
reffedNodesByReferencer: s.reffedNodesByReferencer
|
|
8979
8999
|
};
|
|
8980
|
-
return Be(t,
|
|
9000
|
+
return Be(t, gc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
|
|
8981
9001
|
}
|
|
8982
9002
|
var pc = {
|
|
8983
9003
|
AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
|
|
@@ -8986,13 +9006,13 @@ var pc = {
|
|
|
8986
9006
|
const s = Q();
|
|
8987
9007
|
s.body[0].body.push(
|
|
8988
9008
|
// Insert own alts as `body`
|
|
8989
|
-
|
|
9009
|
+
pe({ negate: !0, body: r }),
|
|
8990
9010
|
ke("Any")
|
|
8991
9011
|
);
|
|
8992
9012
|
const a = Q();
|
|
8993
9013
|
a.body[0].body.push(
|
|
8994
9014
|
jo("greedy", 0, 1 / 0, s)
|
|
8995
|
-
), n(
|
|
9015
|
+
), n(P(a, e), { traverse: !0 });
|
|
8996
9016
|
} else
|
|
8997
9017
|
throw new Error('Unsupported absence function "(?~|"');
|
|
8998
9018
|
},
|
|
@@ -9009,30 +9029,30 @@ var pc = {
|
|
|
9009
9029
|
const n = Zo(e.get(t));
|
|
9010
9030
|
if (n) {
|
|
9011
9031
|
const r = Q({ flags: n });
|
|
9012
|
-
r.body[0].body = t.body, t.body = [
|
|
9032
|
+
r.body[0].body = t.body, t.body = [P(r, t)];
|
|
9013
9033
|
}
|
|
9014
9034
|
}
|
|
9015
9035
|
}
|
|
9016
9036
|
},
|
|
9017
9037
|
Assertion({ node: t, parent: e, key: n, container: r, root: o, remove: s, replaceWith: a }, i) {
|
|
9018
|
-
const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes:
|
|
9038
|
+
const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes: p, wordIsAscii: d } = i;
|
|
9019
9039
|
if (l === "text_segment_boundary")
|
|
9020
9040
|
throw new Error(`Unsupported text segment boundary "\\${u ? "Y" : "y"}"`);
|
|
9021
9041
|
if (l === "line_end")
|
|
9022
|
-
a(
|
|
9042
|
+
a(P(pe({ body: [
|
|
9023
9043
|
me({ body: [on("string_end")] }),
|
|
9024
9044
|
me({ body: [vt(10)] })
|
|
9025
9045
|
// `\n`
|
|
9026
9046
|
] }), e));
|
|
9027
9047
|
else if (l === "line_start")
|
|
9028
|
-
a(
|
|
9048
|
+
a(P(oe(v`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: !0 }), e));
|
|
9029
9049
|
else if (l === "search_start")
|
|
9030
|
-
if (
|
|
9050
|
+
if (p.has(t))
|
|
9031
9051
|
o.flags.sticky = !0, s();
|
|
9032
9052
|
else {
|
|
9033
|
-
const
|
|
9034
|
-
if (
|
|
9035
|
-
a(
|
|
9053
|
+
const f = r[n - 1];
|
|
9054
|
+
if (f && _c(f))
|
|
9055
|
+
a(P(pe({ negate: !0 }), e));
|
|
9036
9056
|
else {
|
|
9037
9057
|
if (h)
|
|
9038
9058
|
throw new Error(v`Uses "\G" in a way that requires a subclass`);
|
|
@@ -9040,11 +9060,11 @@ var pc = {
|
|
|
9040
9060
|
}
|
|
9041
9061
|
}
|
|
9042
9062
|
else if (!(l === "string_end" || l === "string_start")) if (l === "string_end_newline")
|
|
9043
|
-
a(
|
|
9063
|
+
a(P(oe(v`(?=\n?\z)`), e));
|
|
9044
9064
|
else if (l === "word_boundary") {
|
|
9045
9065
|
if (!d && !c) {
|
|
9046
|
-
const
|
|
9047
|
-
a(
|
|
9066
|
+
const f = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`, g = `(?:(?<=${re})(?=${re})|(?<!${re})(?!${re}))`;
|
|
9067
|
+
a(P(oe(u ? g : f), e));
|
|
9048
9068
|
}
|
|
9049
9069
|
} else
|
|
9050
9070
|
throw new Error(`Unexpected assertion kind "${l}"`);
|
|
@@ -9060,7 +9080,7 @@ var pc = {
|
|
|
9060
9080
|
CharacterClassRange({ node: t, parent: e, replaceWith: n }) {
|
|
9061
9081
|
if (e.kind === "intersection") {
|
|
9062
9082
|
const r = st({ body: [t] });
|
|
9063
|
-
n(
|
|
9083
|
+
n(P(r, e), { traverse: !0 });
|
|
9064
9084
|
}
|
|
9065
9085
|
},
|
|
9066
9086
|
CharacterSet({ node: t, parent: e, replaceWith: n }, { accuracy: r, minTargetEs2024: o, digitIsAscii: s, spaceIsAscii: a, wordIsAscii: i }) {
|
|
@@ -9070,7 +9090,7 @@ var pc = {
|
|
|
9070
9090
|
return;
|
|
9071
9091
|
}
|
|
9072
9092
|
if (a && (l === "space" || c === "space")) {
|
|
9073
|
-
n(
|
|
9093
|
+
n(P(Ut(oe(sc), u), e));
|
|
9074
9094
|
return;
|
|
9075
9095
|
}
|
|
9076
9096
|
if (i && (l === "word" || c === "word")) {
|
|
@@ -9084,17 +9104,17 @@ var pc = {
|
|
|
9084
9104
|
else if (l !== "dot") if (l === "text_segment") {
|
|
9085
9105
|
if (r === "strict")
|
|
9086
9106
|
throw new Error(v`Use of "\X" requires non-strict accuracy`);
|
|
9087
|
-
const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",
|
|
9088
|
-
n(
|
|
9107
|
+
const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", p = v`\p{RI}{2}|${h}(?:\u200D${h})*`;
|
|
9108
|
+
n(P(oe(
|
|
9089
9109
|
// Close approximation of an extended grapheme cluster; see: <unicode.org/reports/tr29/>
|
|
9090
|
-
v`(?>\r\n|${o ? v`\p{RGI_Emoji}` :
|
|
9110
|
+
v`(?>\r\n|${o ? v`\p{RGI_Emoji}` : p}|\P{M}\p{M}*)`,
|
|
9091
9111
|
// Allow JS property `RGI_Emoji` through
|
|
9092
9112
|
{ skipPropertyNameValidation: !0 }
|
|
9093
9113
|
), e));
|
|
9094
9114
|
} else if (l === "hex")
|
|
9095
9115
|
n(le(ke("AHex", { negate: u }), e));
|
|
9096
9116
|
else if (l === "newline")
|
|
9097
|
-
n(
|
|
9117
|
+
n(P(oe(u ? `[^
|
|
9098
9118
|
]` : `(?>\r
|
|
9099
9119
|
?|[
|
|
9100
9120
|
\v\f
\u2028\u2029])`), e));
|
|
@@ -9106,15 +9126,15 @@ var pc = {
|
|
|
9106
9126
|
graph: "!-~",
|
|
9107
9127
|
print: " -~"
|
|
9108
9128
|
}[c];
|
|
9109
|
-
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(
|
|
9129
|
+
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9110
9130
|
} else
|
|
9111
|
-
n(
|
|
9131
|
+
n(P(Ut(oe(cc.get(c)), u), e));
|
|
9112
9132
|
else if (l === "property")
|
|
9113
9133
|
An.has(xt(c)) || (t.key = "sc");
|
|
9114
9134
|
else if (l === "space")
|
|
9115
9135
|
n(le(ke("space", { negate: u }), e));
|
|
9116
9136
|
else if (l === "word")
|
|
9117
|
-
n(
|
|
9137
|
+
n(P(Ut(oe(re), u), e));
|
|
9118
9138
|
else
|
|
9119
9139
|
throw new Error(`Unexpected character set kind "${l}"`);
|
|
9120
9140
|
},
|
|
@@ -9125,15 +9145,15 @@ var pc = {
|
|
|
9125
9145
|
r();
|
|
9126
9146
|
else {
|
|
9127
9147
|
const u = Q({ flags: l });
|
|
9128
|
-
u.body[0].body = a(), o(
|
|
9148
|
+
u.body[0].body = a(), o(P(u, e), { traverse: !0 });
|
|
9129
9149
|
}
|
|
9130
9150
|
else if (i === "keep") {
|
|
9131
9151
|
const u = n.body[0], h = n.body.length === 1 && // Not emulatable if within a `CapturingGroup`
|
|
9132
9152
|
Go(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
|
|
9133
9153
|
if (e.parent !== h || h.body.length > 1)
|
|
9134
9154
|
throw new Error(v`Uses "\K" in a way that's unsupported`);
|
|
9135
|
-
const
|
|
9136
|
-
|
|
9155
|
+
const p = pe({ behind: !0 });
|
|
9156
|
+
p.body[0].body = s(), o(P(p, e));
|
|
9137
9157
|
} else
|
|
9138
9158
|
throw new Error(`Unexpected directive kind "${i}"`);
|
|
9139
9159
|
},
|
|
@@ -9198,14 +9218,14 @@ var pc = {
|
|
|
9198
9218
|
NamedCallout({ node: t, parent: e, replaceWith: n }) {
|
|
9199
9219
|
const { kind: r } = t;
|
|
9200
9220
|
if (r === "fail")
|
|
9201
|
-
n(
|
|
9221
|
+
n(P(pe({ negate: !0 }), e));
|
|
9202
9222
|
else
|
|
9203
9223
|
throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`);
|
|
9204
9224
|
},
|
|
9205
9225
|
Quantifier({ node: t }) {
|
|
9206
9226
|
if (t.body.type === "Quantifier") {
|
|
9207
9227
|
const e = Q();
|
|
9208
|
-
e.body[0].body.push(t.body), t.body =
|
|
9228
|
+
e.body[0].body.push(t.body), t.body = P(e, t);
|
|
9209
9229
|
}
|
|
9210
9230
|
},
|
|
9211
9231
|
Regex: {
|
|
@@ -9230,7 +9250,7 @@ var pc = {
|
|
|
9230
9250
|
let { ref: n } = t;
|
|
9231
9251
|
typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
|
|
9232
9252
|
}
|
|
9233
|
-
},
|
|
9253
|
+
}, dc = {
|
|
9234
9254
|
Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
|
|
9235
9255
|
const { orphan: r, ref: o } = t;
|
|
9236
9256
|
r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
|
|
@@ -9257,13 +9277,13 @@ var pc = {
|
|
|
9257
9277
|
i.set(t.number, t), a.set(t.number, []), t.name && Ve(a, t.name, []);
|
|
9258
9278
|
const c = a.get(t.name ?? t.number);
|
|
9259
9279
|
for (let h = 0; h < c.length; h++) {
|
|
9260
|
-
const
|
|
9280
|
+
const p = c[h];
|
|
9261
9281
|
if (
|
|
9262
9282
|
// This group is from subroutine expansion, and there's a multiplex value from either the
|
|
9263
9283
|
// origin node or a prior subroutine expansion group with the same origin
|
|
9264
|
-
u ===
|
|
9284
|
+
u === p.node || u && u === p.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
|
|
9265
9285
|
// group that refers to this group
|
|
9266
|
-
t ===
|
|
9286
|
+
t === p.origin
|
|
9267
9287
|
) {
|
|
9268
9288
|
c.splice(h, 1);
|
|
9269
9289
|
break;
|
|
@@ -9271,16 +9291,16 @@ var pc = {
|
|
|
9271
9291
|
}
|
|
9272
9292
|
if (a.get(t.number).push({ node: t, origin: u }), t.name && a.get(t.name).push({ node: t, origin: u }), t.name) {
|
|
9273
9293
|
const h = Ve(s, t.name, /* @__PURE__ */ new Map());
|
|
9274
|
-
let
|
|
9294
|
+
let p = !1;
|
|
9275
9295
|
if (u)
|
|
9276
|
-
|
|
9296
|
+
p = !0;
|
|
9277
9297
|
else
|
|
9278
9298
|
for (const d of h.values())
|
|
9279
9299
|
if (!d.hasDuplicateNameToRemove) {
|
|
9280
|
-
|
|
9300
|
+
p = !0;
|
|
9281
9301
|
break;
|
|
9282
9302
|
}
|
|
9283
|
-
s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove:
|
|
9303
|
+
s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove: p });
|
|
9284
9304
|
}
|
|
9285
9305
|
},
|
|
9286
9306
|
exit({ node: t }, { openRefs: e }) {
|
|
@@ -9310,25 +9330,25 @@ var pc = {
|
|
|
9310
9330
|
);
|
|
9311
9331
|
let u = l;
|
|
9312
9332
|
if (!i) {
|
|
9313
|
-
const c = Zo(
|
|
9333
|
+
const c = Zo(bc(
|
|
9314
9334
|
a,
|
|
9315
|
-
(
|
|
9335
|
+
(p) => p.type === "Group" && !!p.flags
|
|
9316
9336
|
)), h = c ? bt(r.globalFlags, c) : r.globalFlags;
|
|
9317
|
-
|
|
9318
|
-
flags:
|
|
9337
|
+
mc(h, r.currentFlags) || (u = Q({
|
|
9338
|
+
flags: wc(h)
|
|
9319
9339
|
}), u.body[0].body.push(l));
|
|
9320
9340
|
}
|
|
9321
|
-
n(
|
|
9341
|
+
n(P(u, e), { traverse: !i });
|
|
9322
9342
|
}
|
|
9323
|
-
},
|
|
9343
|
+
}, gc = {
|
|
9324
9344
|
Backreference({ node: t, parent: e, replaceWith: n }, r) {
|
|
9325
9345
|
if (t.orphan) {
|
|
9326
9346
|
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
|
|
9327
9347
|
return;
|
|
9328
9348
|
}
|
|
9329
|
-
const s = r.reffedNodesByReferencer.get(t).filter((a) =>
|
|
9349
|
+
const s = r.reffedNodesByReferencer.get(t).filter((a) => yc(a, t));
|
|
9330
9350
|
if (!s.length)
|
|
9331
|
-
n(
|
|
9351
|
+
n(P(pe({ negate: !0 }), e));
|
|
9332
9352
|
else if (s.length > 1) {
|
|
9333
9353
|
const a = Q({
|
|
9334
9354
|
atomic: !0,
|
|
@@ -9336,7 +9356,7 @@ var pc = {
|
|
|
9336
9356
|
body: [sn(i.number)]
|
|
9337
9357
|
}))
|
|
9338
9358
|
});
|
|
9339
|
-
n(
|
|
9359
|
+
n(P(a, e));
|
|
9340
9360
|
} else
|
|
9341
9361
|
t.ref = s[0].number;
|
|
9342
9362
|
},
|
|
@@ -9363,10 +9383,10 @@ function Yo(t) {
|
|
|
9363
9383
|
}
|
|
9364
9384
|
});
|
|
9365
9385
|
}
|
|
9366
|
-
function
|
|
9386
|
+
function mc(t, e) {
|
|
9367
9387
|
return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
|
|
9368
9388
|
}
|
|
9369
|
-
function
|
|
9389
|
+
function yc(t, e) {
|
|
9370
9390
|
let n = e;
|
|
9371
9391
|
do {
|
|
9372
9392
|
if (n.type === "Regex")
|
|
@@ -9395,7 +9415,7 @@ function vr(t) {
|
|
|
9395
9415
|
const e = Uo(t);
|
|
9396
9416
|
return e.isRecursive = !0, e;
|
|
9397
9417
|
}
|
|
9398
|
-
function
|
|
9418
|
+
function bc(t, e) {
|
|
9399
9419
|
const n = [];
|
|
9400
9420
|
for (; t = t.parent; )
|
|
9401
9421
|
(!e || e(t)) && n.push(t);
|
|
@@ -9415,7 +9435,7 @@ function Zo(t) {
|
|
|
9415
9435
|
});
|
|
9416
9436
|
}), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
|
|
9417
9437
|
}
|
|
9418
|
-
function
|
|
9438
|
+
function wc({ dotAll: t, ignoreCase: e }) {
|
|
9419
9439
|
const n = {};
|
|
9420
9440
|
return (t || e) && (n.enable = {}, t && (n.enable.dotAll = !0), e && (n.enable.ignoreCase = !0)), (!t || !e) && (n.disable = {}, !t && (n.disable.dotAll = !0), !e && (n.disable.ignoreCase = !0)), n;
|
|
9421
9441
|
}
|
|
@@ -9426,7 +9446,7 @@ function Qo(t) {
|
|
|
9426
9446
|
return Array.isArray(e) ? e : e ? [e] : null;
|
|
9427
9447
|
}
|
|
9428
9448
|
function es(t) {
|
|
9429
|
-
const e = t.find((n) => n.kind === "search_start" ||
|
|
9449
|
+
const e = t.find((n) => n.kind === "search_start" || Sc(n, { negate: !1 }) || !Cc(n));
|
|
9430
9450
|
if (!e)
|
|
9431
9451
|
return null;
|
|
9432
9452
|
if (e.kind === "search_start")
|
|
@@ -9452,10 +9472,10 @@ function ts(t, e) {
|
|
|
9452
9472
|
return !0;
|
|
9453
9473
|
return !1;
|
|
9454
9474
|
}
|
|
9455
|
-
function
|
|
9475
|
+
function Cc({ type: t }) {
|
|
9456
9476
|
return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
|
|
9457
9477
|
}
|
|
9458
|
-
function
|
|
9478
|
+
function _c(t) {
|
|
9459
9479
|
const e = [
|
|
9460
9480
|
"Character",
|
|
9461
9481
|
"CharacterClass",
|
|
@@ -9463,7 +9483,7 @@ function Cc(t) {
|
|
|
9463
9483
|
];
|
|
9464
9484
|
return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
|
|
9465
9485
|
}
|
|
9466
|
-
function
|
|
9486
|
+
function Sc(t, e) {
|
|
9467
9487
|
const n = {
|
|
9468
9488
|
negate: null,
|
|
9469
9489
|
...e
|
|
@@ -9491,23 +9511,23 @@ function Ut(t, e) {
|
|
|
9491
9511
|
function le(t, e) {
|
|
9492
9512
|
return t.parent = e, t;
|
|
9493
9513
|
}
|
|
9494
|
-
function
|
|
9514
|
+
function P(t, e) {
|
|
9495
9515
|
return Yo(t), t.parent = e, t;
|
|
9496
9516
|
}
|
|
9497
|
-
function
|
|
9517
|
+
function kc(t, e) {
|
|
9498
9518
|
const n = qo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
|
|
9499
9519
|
if (!Number.isInteger(s) || s < 2 || s > 20)
|
|
9500
9520
|
throw new Error("Invalid recursionLimit; use 2-20");
|
|
9501
9521
|
let a = null, i = null;
|
|
9502
9522
|
if (!o) {
|
|
9503
9523
|
const d = [t.flags.ignoreCase];
|
|
9504
|
-
Be(t,
|
|
9524
|
+
Be(t, vc, {
|
|
9505
9525
|
getCurrentModI: () => d.at(-1),
|
|
9506
9526
|
popModI() {
|
|
9507
9527
|
d.pop();
|
|
9508
9528
|
},
|
|
9509
|
-
pushModI(
|
|
9510
|
-
d.push(
|
|
9529
|
+
pushModI(f) {
|
|
9530
|
+
d.push(f);
|
|
9511
9531
|
},
|
|
9512
9532
|
setHasCasedChar() {
|
|
9513
9533
|
d.at(-1) ? a = !0 : i = !0;
|
|
@@ -9541,19 +9561,19 @@ function Sc(t, e) {
|
|
|
9541
9561
|
verbose: n.verbose
|
|
9542
9562
|
};
|
|
9543
9563
|
function h(d) {
|
|
9544
|
-
return c.lastNode = u, u = d,
|
|
9564
|
+
return c.lastNode = u, u = d, rc(xc[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
|
|
9545
9565
|
}
|
|
9546
|
-
const
|
|
9566
|
+
const p = {
|
|
9547
9567
|
pattern: t.body.map(h).join("|"),
|
|
9548
9568
|
// Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags
|
|
9549
9569
|
flags: h(t.flags),
|
|
9550
9570
|
options: { ...t.options }
|
|
9551
9571
|
};
|
|
9552
|
-
return r || (delete
|
|
9553
|
-
d.hidden &&
|
|
9554
|
-
}),
|
|
9572
|
+
return r || (delete p.options.force.v, p.options.disable.v = !0, p.options.unicodeSetsPlugin = null), p._captureTransfers = /* @__PURE__ */ new Map(), p._hiddenCaptures = [], c.captureMap.forEach((d, f) => {
|
|
9573
|
+
d.hidden && p._hiddenCaptures.push(f), d.transferTo && Ve(p._captureTransfers, d.transferTo, []).push(f);
|
|
9574
|
+
}), p;
|
|
9555
9575
|
}
|
|
9556
|
-
var
|
|
9576
|
+
var vc = {
|
|
9557
9577
|
"*": {
|
|
9558
9578
|
enter({ node: t }, e) {
|
|
9559
9579
|
if (Er(t)) {
|
|
@@ -9579,7 +9599,7 @@ var kc = {
|
|
|
9579
9599
|
CharacterSet({ node: t }, e) {
|
|
9580
9600
|
t.kind === "property" && Ko.has(t.value) && e.setHasCasedChar();
|
|
9581
9601
|
}
|
|
9582
|
-
},
|
|
9602
|
+
}, xc = {
|
|
9583
9603
|
/**
|
|
9584
9604
|
@param {AlternativeNode} node
|
|
9585
9605
|
*/
|
|
@@ -9651,10 +9671,10 @@ var kc = {
|
|
|
9651
9671
|
(h) => h.type === "CharacterClass" && h.kind === "union" && h.negate
|
|
9652
9672
|
);
|
|
9653
9673
|
if (c.length) {
|
|
9654
|
-
const h = Q(),
|
|
9655
|
-
return h.parent = s,
|
|
9656
|
-
const
|
|
9657
|
-
d.parent =
|
|
9674
|
+
const h = Q(), p = h.body[0];
|
|
9675
|
+
return h.parent = s, p.parent = h, a = a.filter((d) => !c.includes(d)), t.body = a, a.length ? (t.parent = p, p.body.push(t)) : h.body.pop(), c.forEach((d) => {
|
|
9676
|
+
const f = me({ body: [d] });
|
|
9677
|
+
d.parent = f, f.parent = h, h.body.push(f);
|
|
9658
9678
|
}), n(h);
|
|
9659
9679
|
}
|
|
9660
9680
|
}
|
|
@@ -9685,7 +9705,7 @@ var kc = {
|
|
|
9685
9705
|
}, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
|
|
9686
9706
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
|
|
9687
9707
|
const l = ns(t);
|
|
9688
|
-
|
|
9708
|
+
Nc(l).forEach((c) => {
|
|
9689
9709
|
i.add(
|
|
9690
9710
|
Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
|
|
9691
9711
|
);
|
|
@@ -9733,7 +9753,7 @@ var kc = {
|
|
|
9733
9753
|
const a = o.currentFlags;
|
|
9734
9754
|
n && (o.currentFlags = bt(a, n));
|
|
9735
9755
|
const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
|
|
9736
|
-
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${
|
|
9756
|
+
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Lc(t, n, o.useFlagMods)}${i})`;
|
|
9737
9757
|
return o.currentFlags = a, l;
|
|
9738
9758
|
},
|
|
9739
9759
|
/**
|
|
@@ -9757,7 +9777,7 @@ var kc = {
|
|
|
9757
9777
|
const r = n.recursionLimit;
|
|
9758
9778
|
return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
|
|
9759
9779
|
}
|
|
9760
|
-
},
|
|
9780
|
+
}, Ec = /* @__PURE__ */ new Set([
|
|
9761
9781
|
"$",
|
|
9762
9782
|
"(",
|
|
9763
9783
|
")",
|
|
@@ -9772,7 +9792,7 @@ var kc = {
|
|
|
9772
9792
|
"{",
|
|
9773
9793
|
"|",
|
|
9774
9794
|
"}"
|
|
9775
|
-
]),
|
|
9795
|
+
]), Ac = /* @__PURE__ */ new Set([
|
|
9776
9796
|
"-",
|
|
9777
9797
|
"\\",
|
|
9778
9798
|
"]",
|
|
@@ -9780,7 +9800,7 @@ var kc = {
|
|
|
9780
9800
|
// Literal `[` doesn't require escaping with flag u, but this can help work around regex source
|
|
9781
9801
|
// linters and regex syntax processors that expect unescaped `[` to create a nested class
|
|
9782
9802
|
"["
|
|
9783
|
-
]),
|
|
9803
|
+
]), Rc = /* @__PURE__ */ new Set([
|
|
9784
9804
|
"(",
|
|
9785
9805
|
")",
|
|
9786
9806
|
"-",
|
|
@@ -9828,9 +9848,9 @@ var kc = {
|
|
|
9828
9848
|
// paragraph separator
|
|
9829
9849
|
[65279, v`\uFEFF`]
|
|
9830
9850
|
// ZWNBSP/BOM
|
|
9831
|
-
]),
|
|
9851
|
+
]), Ic = /^\p{Cased}$/u;
|
|
9832
9852
|
function Rn(t) {
|
|
9833
|
-
return
|
|
9853
|
+
return Ic.test(t);
|
|
9834
9854
|
}
|
|
9835
9855
|
function ns(t, e) {
|
|
9836
9856
|
const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
|
|
@@ -9856,20 +9876,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
|
|
|
9856
9876
|
// Control chars, etc.; condition modeled on the Chrome developer console's display for strings
|
|
9857
9877
|
t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
|
|
9858
9878
|
t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
|
|
9859
|
-
e &&
|
|
9879
|
+
e && $c(t)
|
|
9860
9880
|
)
|
|
9861
9881
|
return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
9862
|
-
const o = n ? r ?
|
|
9882
|
+
const o = n ? r ? Rc : Ac : Ec, s = M(t);
|
|
9863
9883
|
return (o.has(s) ? "\\" : "") + s;
|
|
9864
9884
|
}
|
|
9865
|
-
function
|
|
9885
|
+
function Nc(t) {
|
|
9866
9886
|
const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
|
|
9867
9887
|
let r = null;
|
|
9868
9888
|
for (let o = 0; o < e.length; o++)
|
|
9869
9889
|
e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
|
|
9870
9890
|
return n;
|
|
9871
9891
|
}
|
|
9872
|
-
function
|
|
9892
|
+
function Lc(t, e, n) {
|
|
9873
9893
|
if (t)
|
|
9874
9894
|
return ">";
|
|
9875
9895
|
let r = "";
|
|
@@ -9890,13 +9910,13 @@ function Pc({ kind: t, max: e, min: n }) {
|
|
|
9890
9910
|
function Er({ type: t }) {
|
|
9891
9911
|
return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
|
|
9892
9912
|
}
|
|
9893
|
-
function
|
|
9913
|
+
function $c(t) {
|
|
9894
9914
|
return t > 47 && t < 58;
|
|
9895
9915
|
}
|
|
9896
9916
|
function Ar({ type: t, value: e }) {
|
|
9897
9917
|
return t === "Character" && e === 45;
|
|
9898
9918
|
}
|
|
9899
|
-
var
|
|
9919
|
+
var Tc = class cn extends RegExp {
|
|
9900
9920
|
/**
|
|
9901
9921
|
@type {Map<number, {
|
|
9902
9922
|
hidden?: true;
|
|
@@ -9954,7 +9974,7 @@ var $c = class cn extends RegExp {
|
|
|
9954
9974
|
transfers: [],
|
|
9955
9975
|
...r
|
|
9956
9976
|
};
|
|
9957
|
-
super(o ? "" : e, n), this.#r = e, this.#t =
|
|
9977
|
+
super(o ? "" : e, n), this.#r = e, this.#t = Oc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
|
|
9958
9978
|
}
|
|
9959
9979
|
o || (this.#e = this);
|
|
9960
9980
|
}
|
|
@@ -9973,7 +9993,7 @@ var $c = class cn extends RegExp {
|
|
|
9973
9993
|
if (this.#o === "clip_search" && n && r) {
|
|
9974
9994
|
this.lastIndex = 0;
|
|
9975
9995
|
const o = this.#s(e.slice(r));
|
|
9976
|
-
return o && (
|
|
9996
|
+
return o && (Mc(o, r, e, this.hasIndices), this.lastIndex += r), o;
|
|
9977
9997
|
}
|
|
9978
9998
|
return this.#s(e);
|
|
9979
9999
|
}
|
|
@@ -9999,7 +10019,7 @@ var $c = class cn extends RegExp {
|
|
|
9999
10019
|
if (!u)
|
|
10000
10020
|
throw new Error(`Invalid capture transfer to "${u}"`);
|
|
10001
10021
|
if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
|
|
10002
|
-
this.#n || (this.#n =
|
|
10022
|
+
this.#n || (this.#n = Dc(this.source));
|
|
10003
10023
|
const c = this.#n.get(l);
|
|
10004
10024
|
c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
|
|
10005
10025
|
}
|
|
@@ -10008,7 +10028,7 @@ var $c = class cn extends RegExp {
|
|
|
10008
10028
|
return n;
|
|
10009
10029
|
}
|
|
10010
10030
|
};
|
|
10011
|
-
function
|
|
10031
|
+
function Mc(t, e, n, r) {
|
|
10012
10032
|
if (t.index += e, t.input = n, r) {
|
|
10013
10033
|
const o = t.indices;
|
|
10014
10034
|
for (let a = 0; a < o.length; a++) {
|
|
@@ -10022,7 +10042,7 @@ function Tc(t, e, n, r) {
|
|
|
10022
10042
|
});
|
|
10023
10043
|
}
|
|
10024
10044
|
}
|
|
10025
|
-
function
|
|
10045
|
+
function Oc(t, e) {
|
|
10026
10046
|
const n = /* @__PURE__ */ new Map();
|
|
10027
10047
|
for (const r of t)
|
|
10028
10048
|
n.set(r, {
|
|
@@ -10033,7 +10053,7 @@ function Mc(t, e) {
|
|
|
10033
10053
|
Ve(n, s, {}).transferTo = r;
|
|
10034
10054
|
return n;
|
|
10035
10055
|
}
|
|
10036
|
-
function
|
|
10056
|
+
function Dc(t) {
|
|
10037
10057
|
const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
|
|
10038
10058
|
let r = 0, o = 0, s;
|
|
10039
10059
|
for (; s = e.exec(t); ) {
|
|
@@ -10042,11 +10062,11 @@ function Oc(t) {
|
|
|
10042
10062
|
}
|
|
10043
10063
|
return n;
|
|
10044
10064
|
}
|
|
10045
|
-
function Dc(t, e) {
|
|
10046
|
-
const n = Gc(t, e);
|
|
10047
|
-
return n.options ? new $c(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10048
|
-
}
|
|
10049
10065
|
function Gc(t, e) {
|
|
10066
|
+
const n = Fc(t, e);
|
|
10067
|
+
return n.options ? new Tc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10068
|
+
}
|
|
10069
|
+
function Fc(t, e) {
|
|
10050
10070
|
const n = qo(e), r = Fo(t, {
|
|
10051
10071
|
flags: n.flags,
|
|
10052
10072
|
normalizeUnknownPropertyNames: !0,
|
|
@@ -10056,16 +10076,16 @@ function Gc(t, e) {
|
|
|
10056
10076
|
},
|
|
10057
10077
|
skipBackrefValidation: n.rules.allowOrphanBackrefs,
|
|
10058
10078
|
unicodePropertyMap: An
|
|
10059
|
-
}), o =
|
|
10079
|
+
}), o = fc(r, {
|
|
10060
10080
|
accuracy: n.accuracy,
|
|
10061
10081
|
asciiWordBoundaries: n.rules.asciiWordBoundaries,
|
|
10062
10082
|
avoidSubclass: n.avoidSubclass,
|
|
10063
10083
|
bestEffortTarget: n.target
|
|
10064
|
-
}), s =
|
|
10084
|
+
}), s = kc(o, n), a = tc(s.pattern, {
|
|
10065
10085
|
captureTransfers: s._captureTransfers,
|
|
10066
10086
|
hiddenCaptures: s._hiddenCaptures,
|
|
10067
10087
|
mode: "external"
|
|
10068
|
-
}), i =
|
|
10088
|
+
}), i = Qu(a.pattern), l = Zu(i.pattern, {
|
|
10069
10089
|
captureTransfers: a.captureTransfers,
|
|
10070
10090
|
hiddenCaptures: a.hiddenCaptures
|
|
10071
10091
|
}), u = {
|
|
@@ -10076,18 +10096,18 @@ function Gc(t, e) {
|
|
|
10076
10096
|
if (n.lazyCompileLength !== 1 / 0)
|
|
10077
10097
|
throw new Error("Lazy compilation requires subclass");
|
|
10078
10098
|
} else {
|
|
10079
|
-
const c = l.hiddenCaptures.sort((
|
|
10080
|
-
(c.length || h.length ||
|
|
10099
|
+
const c = l.hiddenCaptures.sort((f, g) => f - g), h = Array.from(l.captureTransfers), p = o._strategy, d = u.pattern.length >= n.lazyCompileLength;
|
|
10100
|
+
(c.length || h.length || p || d) && (u.options = {
|
|
10081
10101
|
...c.length && { hiddenCaptures: c },
|
|
10082
10102
|
...h.length && { transfers: h },
|
|
10083
|
-
...
|
|
10103
|
+
...p && { strategy: p },
|
|
10084
10104
|
...d && { lazyCompile: d }
|
|
10085
10105
|
});
|
|
10086
10106
|
}
|
|
10087
10107
|
return u;
|
|
10088
10108
|
}
|
|
10089
10109
|
const Rr = 4294967295;
|
|
10090
|
-
class
|
|
10110
|
+
class Bc {
|
|
10091
10111
|
constructor(e, n = {}) {
|
|
10092
10112
|
this.patterns = e, this.options = n;
|
|
10093
10113
|
const {
|
|
@@ -10161,8 +10181,8 @@ class Fc {
|
|
|
10161
10181
|
return null;
|
|
10162
10182
|
}
|
|
10163
10183
|
}
|
|
10164
|
-
function
|
|
10165
|
-
return
|
|
10184
|
+
function jc(t, e) {
|
|
10185
|
+
return Gc(
|
|
10166
10186
|
t,
|
|
10167
10187
|
{
|
|
10168
10188
|
global: !0,
|
|
@@ -10188,7 +10208,7 @@ function Bc(t, e) {
|
|
|
10188
10208
|
}
|
|
10189
10209
|
);
|
|
10190
10210
|
}
|
|
10191
|
-
function
|
|
10211
|
+
function Uc(t = {}) {
|
|
10192
10212
|
const e = Object.assign(
|
|
10193
10213
|
{
|
|
10194
10214
|
target: "auto",
|
|
@@ -10196,9 +10216,9 @@ function jc(t = {}) {
|
|
|
10196
10216
|
},
|
|
10197
10217
|
t
|
|
10198
10218
|
);
|
|
10199
|
-
return e.regexConstructor ||= (n) =>
|
|
10219
|
+
return e.regexConstructor ||= (n) => jc(n, { target: e.target }), {
|
|
10200
10220
|
createScanner(n) {
|
|
10201
|
-
return new
|
|
10221
|
+
return new Bc(n, e);
|
|
10202
10222
|
},
|
|
10203
10223
|
createString(n) {
|
|
10204
10224
|
return {
|
|
@@ -10207,8 +10227,8 @@ function jc(t = {}) {
|
|
|
10207
10227
|
}
|
|
10208
10228
|
};
|
|
10209
10229
|
}
|
|
10210
|
-
const
|
|
10211
|
-
engine:
|
|
10230
|
+
const zc = Uc({ forgiving: !0 }), Hc = await Vl({
|
|
10231
|
+
engine: zc,
|
|
10212
10232
|
langAlias: {
|
|
10213
10233
|
markup: "html",
|
|
10214
10234
|
svg: "xml",
|
|
@@ -10224,9 +10244,11 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10224
10244
|
dark: "github-dark"
|
|
10225
10245
|
},
|
|
10226
10246
|
defaultColor: !1,
|
|
10247
|
+
defaultLanguage: "text",
|
|
10248
|
+
fallbackLanguage: "text",
|
|
10227
10249
|
inline: "tailing-curly-colon",
|
|
10228
10250
|
addLanguageClass: !0,
|
|
10229
|
-
transformers: [
|
|
10251
|
+
transformers: [Ql(), tu()],
|
|
10230
10252
|
parseMetaString: (t) => {
|
|
10231
10253
|
const e = t.matchAll(
|
|
10232
10254
|
/([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
|
|
@@ -10238,7 +10260,7 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10238
10260
|
})
|
|
10239
10261
|
);
|
|
10240
10262
|
}
|
|
10241
|
-
},
|
|
10263
|
+
}, Wc = () => (t) => {
|
|
10242
10264
|
qr(t, "element", (e, n, r) => {
|
|
10243
10265
|
if (e.tagName !== "code") return;
|
|
10244
10266
|
const o = r?.type === "element" && r.tagName === "pre";
|
|
@@ -10248,28 +10270,25 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10248
10270
|
class: as(e.properties.class, r.properties.class)
|
|
10249
10271
|
}, r.properties = {});
|
|
10250
10272
|
});
|
|
10251
|
-
},
|
|
10273
|
+
}, hh = (t = wt.themes, e = Hc) => [
|
|
10252
10274
|
[
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
{
|
|
10256
|
-
...wt,
|
|
10257
|
-
themes: t ?? wt.themes
|
|
10258
|
-
}
|
|
10275
|
+
Jl,
|
|
10276
|
+
e,
|
|
10277
|
+
{ ...wt, themes: t }
|
|
10259
10278
|
],
|
|
10260
|
-
|
|
10261
|
-
],
|
|
10279
|
+
Wc
|
|
10280
|
+
], Vc = (t, e, n = "text", r = wt.themes) => {
|
|
10262
10281
|
const o = t.codeToHast(e, {
|
|
10263
10282
|
lang: n,
|
|
10264
10283
|
...wt,
|
|
10265
10284
|
themes: r
|
|
10266
10285
|
});
|
|
10267
10286
|
return Ds(o, { Fragment: rs, jsx: at.jsx, jsxs: at.jsxs });
|
|
10268
|
-
},
|
|
10287
|
+
}, qc = os(
|
|
10269
10288
|
({ code: t, children: e, embedded: n, ...r }) => {
|
|
10270
10289
|
const { syntaxHighlighting: o } = ss().options;
|
|
10271
10290
|
ls(o?.highlighter, "Highlighter not found");
|
|
10272
|
-
const s =
|
|
10291
|
+
const s = Vc(
|
|
10273
10292
|
o.highlighter,
|
|
10274
10293
|
t ?? e,
|
|
10275
10294
|
r.language,
|
|
@@ -10278,29 +10297,29 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10278
10297
|
return n ? /* @__PURE__ */ at.jsx(cs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(us, { ...r, children: s });
|
|
10279
10298
|
}
|
|
10280
10299
|
);
|
|
10281
|
-
|
|
10300
|
+
qc.displayName = "SyntaxHighlight";
|
|
10282
10301
|
export {
|
|
10283
10302
|
Fn as E,
|
|
10284
|
-
|
|
10303
|
+
qc as S,
|
|
10285
10304
|
H as V,
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10305
|
+
Ls as a,
|
|
10306
|
+
lh as b,
|
|
10307
|
+
ih as c,
|
|
10308
|
+
rh as d,
|
|
10290
10309
|
Ir as e,
|
|
10291
10310
|
Gr as f,
|
|
10292
10311
|
ua as g,
|
|
10293
|
-
|
|
10312
|
+
Vc as h,
|
|
10294
10313
|
Wr as i,
|
|
10295
10314
|
aa as j,
|
|
10296
10315
|
jn as k,
|
|
10297
|
-
|
|
10298
|
-
|
|
10316
|
+
hh as l,
|
|
10317
|
+
th as o,
|
|
10299
10318
|
Fr as p,
|
|
10300
|
-
|
|
10319
|
+
Ps as s,
|
|
10301
10320
|
Ds as t,
|
|
10302
|
-
|
|
10321
|
+
nh as u,
|
|
10303
10322
|
qr as v,
|
|
10304
10323
|
la as z
|
|
10305
10324
|
};
|
|
10306
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10325
|
+
//# sourceMappingURL=SyntaxHighlight-BvPom2Ah.js.map
|