From b27bf875c95d3b82a0df411f68d0d8497993667b Mon Sep 17 00:00:00 2001 From: Forge Date: Tue, 22 Sep 2026 13:06:43 +0000 Subject: [PATCH] fix: tighten Drupal wiring evidence and pending release metadata --- extensions/drupal/index.cjs | 80 ++++++++++++++++--- extensions/drupal/package.json | 12 ++- extensions/drupal/releases/drupal-0.1.0.cgext | 1 + marketplace/public/app.js | 7 +- scripts/build-extensions.mjs | 5 +- scripts/validation/drupal-accuracy.test.cjs | 8 +- .../validation/extensions-compatibility.cjs | 15 ++++ 7 files changed, 110 insertions(+), 18 deletions(-) create mode 100644 extensions/drupal/releases/drupal-0.1.0.cgext diff --git a/extensions/drupal/index.cjs b/extensions/drupal/index.cjs index 1a98683fa..8844d726a 100644 --- a/extensions/drupal/index.cjs +++ b/extensions/drupal/index.cjs @@ -35,6 +35,47 @@ function codeMask(source) { } return chars.join(''); } +// Only metadata immediately attached to a declaration counts. Walking backward +// over balanced attributes avoids carrying examples from an earlier class body. +function declarationMetadata(source, code, offset) { + const parts = []; + let end = offset; + for (;;) { + while (end > 0 && /\s/.test(source[end - 1])) end--; + const tailStart = Math.max(0, end - 16); + const modifier = /\b(?:public|protected|private|static|final|abstract|readonly)\s*$/.exec(code.slice(tailStart, end)); + if (modifier && tailStart + modifier.index + modifier[0].length === end) { end = tailStart + modifier.index; continue; } + if (source.slice(end - 2, end) === '*/') { + const start = source.lastIndexOf('/*', end - 2); + if (start < 0) break; + if (source.startsWith('/**', start)) parts.unshift(source.slice(start, end)); + end = start; continue; + } + if (code[end - 1] === ']') { + let depth = 1, start = end - 2; + for (; start >= 0; start--) { + if (code[start] === ']') depth++; + if (code[start] === '[' && --depth === 0) break; + } + if (start < 1 || code[start - 1] !== '#') break; + parts.unshift(source.slice(start - 1, end)); end = start - 1; continue; + } + break; + } + return parts.join('\n'); +} +function callArguments(source, code, open) { + const args = []; + let depth = 1, start = open + 1; + for (let i = start; i < code.length; i++) { + if ('([{'.includes(code[i])) depth++; + if (')]}'.includes(code[i])) { + if (--depth === 0) { args.push(source.slice(start, i).trim()); return args; } + } + if (code[i] === ',' && depth === 1) { args.push(source.slice(start, i).trim()); start = i + 1; } + } + return []; +} function yaml(source) { const doc = YAML.parseDocument(source, { uniqueKeys: true, maxAliasCount: 50 }); if (doc.errors.length) return {}; @@ -68,11 +109,9 @@ function serviceNodes(file, source) { function pluginDeclarations(file, source) { const nodes = []; const code = codeMask(source); - let previous = 0; for (const cls of source.matchAll(/\b(?:final\s+|abstract\s+)?class\s+(\w+)/g)) { if (code[cls.index] === ' ') continue; - const prelude = source.slice(previous, cls.index); - previous = cls.index + cls[0].length; + const prelude = declarationMetadata(source, code, cls.index); const annotation = /@(Block|FieldType|FieldFormatter|FieldWidget|Action|QueueWorker|Condition|Filter|MenuLink|MigrateSource|MigrateProcess|MigrateDestination|Views\w*|SearchPlugin|RenderElement|FormElement)\s*\([\s\S]*?\bid\s*=\s*["']([^"']+)["']/g; const attribute = /#\[\s*(?:[\w\\]+\\)?(Block|FieldType|FieldFormatter|FieldWidget|Action|QueueWorker|Condition|Filter|MenuLink|MigrateSource|MigrateProcess|MigrateDestination|Views\w*|SearchPlugin|RenderElement|FormElement)\s*\([\s\S]*?(?:\bid\s*:\s*)?["']([^"']+)["']/g; const matches = [...prelude.matchAll(annotation), ...prelude.matchAll(attribute)]; @@ -110,7 +149,9 @@ module.exports = () => ({ const files = ctx.getAllFiles().slice().sort(); const nodesInFile = new Map(); const sourceCache = new Map(); + const codeCache = new Map(); const read = f => { if (!sourceCache.has(f)) sourceCache.set(f, ctx.readFile(f) || ''); return sourceCache.get(f); }; + const codeFor = f => { if (!codeCache.has(f)) codeCache.set(f, codeMask(read(f))); return codeCache.get(f); }; const nodes = f => { if (!nodesInFile.has(f)) nodesInFile.set(f, ctx.getNodesInFile(f)); return nodesInFile.get(f); }; const classes = new Map(); const services = new Map(); @@ -131,7 +172,7 @@ module.exports = () => ({ function fullClass(name, file) { if (!name) return ''; if (name.startsWith('\\')) return clean(name); - const source = read(file); + const source = codeFor(file); const first = name.split('\\')[0]; for (const u of source.matchAll(/^\s*use\s+([\w\\]+)(?:\s+as\s+(\w+))?\s*;/gm)) { if ((u[2] || simple(u[1])) === first) return clean(u[1]) + name.slice(first.length); @@ -165,15 +206,18 @@ module.exports = () => ({ if (constant[2] === 'class') return name; if (cls) { const source = read(cls.filePath); - const value = new RegExp('\\bconst\\s+' + constant[2] + '\\s*=\\s*["\\\']([^"\\\']+)["\\\']').exec(source); - if (value) return value[1]; + const pattern = new RegExp('\\bconst\\s+' + constant[2] + '\\s*=\\s*["\\\']([^"\\\']+)["\\\']', 'g'); + for (const value of source.matchAll(pattern)) { + const line = lineAt(source, value.index); + if (codeFor(cls.filePath)[value.index] !== ' ' && line >= cls.startLine && line <= cls.endLine) return value[1]; + } } return name + '::' + constant[2]; } for (const file of files.filter(phpFile)) { const source = read(file); - const ns = /\bnamespace\s+([\w\\]+)\s*[;{]/.exec(source)?.[1]; + const ns = /\bnamespace\s+([\w\\]+)\s*[;{]/.exec(codeFor(file))?.[1]; for (const cls of nodes(file).filter(n => n.kind === 'class')) add(classes, ns ? ns+'\\'+cls.name : cls.name, cls); await yieldToLoop(); } @@ -215,6 +259,7 @@ module.exports = () => ({ } for (const file of files.filter(phpFile)) { const source = read(file), lines = source.split('\n'); + const offsets = [0]; for (let i = 0; i < lines.length; i++) offsets.push(offsets[i] + lines[i].length + 1); for (const n of nodes(file)) { if (n.id.startsWith('plugin:drupal:') && n.kind === 'component') { const cls = nodes(file).find(c => c.kind === 'class' && c.startLine <= n.startLine && c.endLine >= n.startLine); @@ -222,8 +267,9 @@ module.exports = () => ({ const id = n.name.slice(n.name.indexOf(':') + 1); if (cls) add(pluginClasses, id, cls); } if (!['method', 'function'].includes(n.kind)) continue; - const priorNodeEnd = Math.max(0, ...nodes(file).filter(p => ['method', 'function'].includes(p.kind) && p.endLine < n.startLine).map(p => p.endLine)); - const prelude = lines.slice(priorNodeEnd, n.startLine).join('\n'); + const start = offsets[n.startLine - 1]; + const declaration = /\bfunction\s+&?\s*[A-Za-z_]\w*\s*\(/.exec(codeFor(file).slice(start, offsets[n.endLine])); + const prelude = declaration ? declarationMetadata(source, codeFor(file), start + declaration.index) : ''; const hookAttribute = /#\[\s*(?:[\w\\]+\\)?Hook\s*\(\s*['"]([^'"]+)['"]/g; for (const h of prelude.matchAll(hookAttribute)) add(hooks, h[1], n); if (n.kind === 'function' && /\.(module|install|theme|inc)$/.test(file)) { @@ -239,8 +285,11 @@ module.exports = () => ({ const cls = nodes(file).find(c => c.kind === 'class' && n.startLine >= c.startLine && n.endLine <= c.endLine); if (!cls || !/EventSubscriberInterface/.test(source.slice(0, source.indexOf('{', source.indexOf('class '+cls.name))))) continue; const body = lines.slice(n.startLine - 1, n.endLine).join('\n'); + const bodyCode = codeMask(body); const registration = /(?:\$events\s*\[([^\]]+)\]\s*(?:\[\])?\s*=|(['"][^'"]+['"]|[\w\\]+::\w+)\s*=>)\s*\[?\s*['"](\w+)['"]/g; for (const r of body.matchAll(registration)) { + const executable = bodyCode.slice(r.index, r.index + r[0].length); + if (r[1] ? executable[0] !== '$' : !executable.includes('=>')) continue; const event = eventName(r[1] || r[2], file), handler = method(cls, r[3]); if (event && handler) add(subscribers, event, { handler, file, line: n.startLine + lineAt(body, r.index) - 1 }); } @@ -250,15 +299,16 @@ module.exports = () => ({ } for (const file of files.filter(phpFile)) { const source = read(file); - const code = codeMask(source); + const code = codeFor(file); const patterns = [ { re: /(?:->invokeAll|->alter)\s*\(\s*['"]([^'"]+)['"]/g, kind: 'hook' }, { re: /(?:\\?Drupal::service|\$container->get)\s*\(\s*['"]([^'"]+)['"]/g, kind: 'service' }, { re: /->createInstance\s*\(\s*['"]([^'"]+)['"]/g, kind: 'plugin' }, - { re: /->dispatch\s*\(\s*[^,\n]+,\s*([^\)\n]+)\)/g, kind: 'event' }, + { re: /->dispatch\s*\(/g, kind: 'event' }, ]; for (const { re, kind } of patterns) for (const m of source.matchAll(re)) { if (code[m.index] === ' ') continue; + if (kind === 'service' && /[A-Za-z0-9_\\]/.test(source[m.index - 1] || '')) continue; const line = lineAt(source, m.index), from = enclosing(file, line); if (!from) continue; if (kind === 'hook') { const hook = m[0].startsWith('->alter') ? m[1] + '_alter' : m[1]; @@ -269,7 +319,13 @@ module.exports = () => ({ // Literal id must uniquely identify a declaration across managers. edge(from, unique(pluginClasses.get(m[1]) || []), 'Drupal plugin construction', file, line, 'instantiates'); } else { - const event = eventName(m[1], file); + // Symfony changed from dispatch(name, event) to dispatch(event, name). + // Accept either explicit literal/constant slot, never infer a dynamic name. + const args = callArguments(source, code, m.index + m[0].length - 1); + if (args.length !== 2) continue; + const names = args.map(arg => eventName(arg, file)).filter(Boolean); + if (names.length !== 1) continue; + const event = names[0]; for (const target of subscribers.get(event) || []) edge(from, target.handler, `Drupal event ${event}`, target.file, target.line); } } diff --git a/extensions/drupal/package.json b/extensions/drupal/package.json index 18ac48604..43f5273e7 100644 --- a/extensions/drupal/package.json +++ b/extensions/drupal/package.json @@ -1,9 +1,17 @@ { "name": "@colbymchenry/codegraph-drupal", - "version": "0.1.0", + "version": "0.1.1", "description": "Drupal routes, service wiring, hooks, plugins and event subscribers.", "main": "dist/index.cjs", "license": "MIT", "repository": "https://github.com/colbymchenry/codegraph", - "codegraph": { "id": "drupal", "apiVersion": 1, "engines": ">=1.6.0 <2", "capabilities": ["frameworks", "synthPasses"] } + "codegraph": { + "id": "drupal", + "apiVersion": 1, + "engines": ">=1.6.0 <2", + "capabilities": [ + "frameworks", + "synthPasses" + ] + } } diff --git a/extensions/drupal/releases/drupal-0.1.0.cgext b/extensions/drupal/releases/drupal-0.1.0.cgext new file mode 100644 index 000000000..cde17f9bb --- /dev/null +++ b/extensions/drupal/releases/drupal-0.1.0.cgext @@ -0,0 +1 @@ +{"format":"codegraph-extension-1","package":{"name":"@colbymchenry/codegraph-drupal","version":"0.1.0","description":"Drupal routes, service wiring, hooks, plugins and event subscribers.","main":"dist/index.cjs","license":"MIT","repository":"https://github.com/colbymchenry/codegraph","codegraph":{"id":"drupal","apiVersion":1,"engines":">=1.6.0 <2","capabilities":["frameworks","synthPasses"]}},"files":{"dist/index.cjs":"\"use strict\";\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\n\n// node_modules/yaml/dist/nodes/identity.js\nvar require_identity = __commonJS({\n \"node_modules/yaml/dist/nodes/identity.js\"(exports2) {\n \"use strict\";\n var ALIAS = Symbol.for(\"yaml.alias\");\n var DOC = Symbol.for(\"yaml.document\");\n var MAP = Symbol.for(\"yaml.map\");\n var PAIR = Symbol.for(\"yaml.pair\");\n var SCALAR = Symbol.for(\"yaml.scalar\");\n var SEQ = Symbol.for(\"yaml.seq\");\n var NODE_TYPE = Symbol.for(\"yaml.node.type\");\n var isAlias = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === ALIAS;\n var isDocument = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === DOC;\n var isMap = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === MAP;\n var isPair = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === PAIR;\n var isScalar = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === SCALAR;\n var isSeq = (node) => !!node && typeof node === \"object\" && node[NODE_TYPE] === SEQ;\n function isCollection(node) {\n if (node && typeof node === \"object\")\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n }\n function isNode(node) {\n if (node && typeof node === \"object\")\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n }\n var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n exports2.ALIAS = ALIAS;\n exports2.DOC = DOC;\n exports2.MAP = MAP;\n exports2.NODE_TYPE = NODE_TYPE;\n exports2.PAIR = PAIR;\n exports2.SCALAR = SCALAR;\n exports2.SEQ = SEQ;\n exports2.hasAnchor = hasAnchor;\n exports2.isAlias = isAlias;\n exports2.isCollection = isCollection;\n exports2.isDocument = isDocument;\n exports2.isMap = isMap;\n exports2.isNode = isNode;\n exports2.isPair = isPair;\n exports2.isScalar = isScalar;\n exports2.isSeq = isSeq;\n }\n});\n\n// node_modules/yaml/dist/visit.js\nvar require_visit = __commonJS({\n \"node_modules/yaml/dist/visit.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var BREAK = Symbol(\"break visit\");\n var SKIP = Symbol(\"skip children\");\n var REMOVE = Symbol(\"remove node\");\n function visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n } else\n visit_(null, node, visitor_, Object.freeze([]));\n }\n visit.BREAK = BREAK;\n visit.SKIP = SKIP;\n visit.REMOVE = REMOVE;\n function visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== \"symbol\") {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === \"number\")\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n } else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_(\"key\", node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_(\"value\", node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n }\n async function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n } else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n }\n visitAsync.BREAK = BREAK;\n visitAsync.SKIP = SKIP;\n visitAsync.REMOVE = REMOVE;\n async function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== \"symbol\") {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === \"number\")\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n } else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_(\"key\", node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_(\"value\", node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n }\n function initVisitor(visitor) {\n if (typeof visitor === \"object\" && (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n }\n function callVisitor(key, node, visitor, path) {\n if (typeof visitor === \"function\")\n return visitor(key, node, path);\n if (identity.isMap(node))\n return visitor.Map?.(key, node, path);\n if (identity.isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (identity.isPair(node))\n return visitor.Pair?.(key, node, path);\n if (identity.isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (identity.isAlias(node))\n return visitor.Alias?.(key, node, path);\n return void 0;\n }\n function replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (identity.isCollection(parent)) {\n parent.items[key] = node;\n } else if (identity.isPair(parent)) {\n if (key === \"key\")\n parent.key = node;\n else\n parent.value = node;\n } else if (identity.isDocument(parent)) {\n parent.contents = node;\n } else {\n const pt = identity.isAlias(parent) ? \"alias\" : \"scalar\";\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n }\n exports2.visit = visit;\n exports2.visitAsync = visitAsync;\n }\n});\n\n// node_modules/yaml/dist/doc/directives.js\nvar require_directives = __commonJS({\n \"node_modules/yaml/dist/doc/directives.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var visit = require_visit();\n var escapeChars = {\n \"!\": \"%21\",\n \",\": \"%2C\",\n \"[\": \"%5B\",\n \"]\": \"%5D\",\n \"{\": \"%7B\",\n \"}\": \"%7D\"\n };\n var escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, (ch) => escapeChars[ch]);\n var Directives = class _Directives {\n constructor(yaml2, tags) {\n this.docStart = null;\n this.docEnd = false;\n this.yaml = Object.assign({}, _Directives.defaultYaml, yaml2);\n this.tags = Object.assign({}, _Directives.defaultTags, tags);\n }\n clone() {\n const copy = new _Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new _Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case \"1.1\":\n this.atNextDocument = true;\n break;\n case \"1.2\":\n this.atNextDocument = false;\n this.yaml = {\n explicit: _Directives.defaultYaml.explicit,\n version: \"1.2\"\n };\n this.tags = Object.assign({}, _Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: _Directives.defaultYaml.explicit, version: \"1.1\" };\n this.tags = Object.assign({}, _Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case \"%TAG\": {\n if (parts.length !== 2) {\n onError(0, \"%TAG directive should contain exactly two parts\");\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case \"%YAML\": {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, \"%YAML directive should contain exactly one part\");\n return false;\n }\n const [version] = parts;\n if (version === \"1.1\" || version === \"1.2\") {\n this.yaml.version = version;\n return true;\n } else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === \"!\")\n return \"!\";\n if (source[0] !== \"!\") {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === \"<\") {\n const verbatim = source.slice(2, -1);\n if (verbatim === \"!\" || verbatim === \"!!\") {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== \">\")\n onError(\"Verbatim tags must end with a >\");\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n } catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === \"!\")\n return source;\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === \"!\" ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || \"1.2\"}`] : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n const tags = {};\n visit.visit(doc.contents, (_key, node) => {\n if (identity.isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n } else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === \"!!\" && prefix === \"tag:yaml.org,2002:\")\n continue;\n if (!doc || tagNames.some((tn) => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join(\"\\n\");\n }\n };\n Directives.defaultYaml = { explicit: false, version: \"1.2\" };\n Directives.defaultTags = { \"!!\": \"tag:yaml.org,2002:\" };\n exports2.Directives = Directives;\n }\n});\n\n// node_modules/yaml/dist/doc/anchors.js\nvar require_anchors = __commonJS({\n \"node_modules/yaml/dist/doc/anchors.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var visit = require_visit();\n function anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n }\n function anchorNames(root) {\n const anchors = /* @__PURE__ */ new Set();\n visit.visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n }\n function findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n }\n function createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = /* @__PURE__ */ new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n prevAnchors ?? (prevAnchors = anchorNames(doc));\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === \"object\" && ref.anchor && (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n } else {\n const error = new Error(\"Failed to resolve repeated object (this should not happen)\");\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n }\n exports2.anchorIsValid = anchorIsValid;\n exports2.anchorNames = anchorNames;\n exports2.createNodeAnchors = createNodeAnchors;\n exports2.findNewAnchor = findNewAnchor;\n }\n});\n\n// node_modules/yaml/dist/doc/applyReviver.js\nvar require_applyReviver = __commonJS({\n \"node_modules/yaml/dist/doc/applyReviver.js\"(exports2) {\n \"use strict\";\n function applyReviver(reviver, obj, key, val) {\n if (val && typeof val === \"object\") {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n if (v1 === void 0)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n } else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === void 0)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n } else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === void 0)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n } else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === void 0)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n }\n exports2.applyReviver = applyReviver;\n }\n});\n\n// node_modules/yaml/dist/nodes/toJS.js\nvar require_toJS = __commonJS({\n \"node_modules/yaml/dist/nodes/toJS.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n function toJS(value, arg, ctx) {\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === \"function\") {\n if (!ctx || !identity.hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: void 0 };\n ctx.anchors.set(value, data);\n ctx.onCreate = (res2) => {\n data.res = res2;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === \"bigint\" && !ctx?.keep)\n return Number(value);\n return value;\n }\n exports2.toJS = toJS;\n }\n});\n\n// node_modules/yaml/dist/nodes/Node.js\nvar require_Node = __commonJS({\n \"node_modules/yaml/dist/nodes/Node.js\"(exports2) {\n \"use strict\";\n var applyReviver = require_applyReviver();\n var identity = require_identity();\n var toJS = require_toJS();\n var NodeBase = class {\n constructor(type) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!identity.isDocument(doc))\n throw new TypeError(\"A document argument is required\");\n const ctx = {\n anchors: /* @__PURE__ */ new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === \"number\" ? maxAliasCount : 100\n };\n const res = toJS.toJS(this, \"\", ctx);\n if (typeof onAnchor === \"function\")\n for (const { count, res: res2 } of ctx.anchors.values())\n onAnchor(res2, count);\n return typeof reviver === \"function\" ? applyReviver.applyReviver(reviver, { \"\": res }, \"\", res) : res;\n }\n };\n exports2.NodeBase = NodeBase;\n }\n});\n\n// node_modules/yaml/dist/nodes/Alias.js\nvar require_Alias = __commonJS({\n \"node_modules/yaml/dist/nodes/Alias.js\"(exports2) {\n \"use strict\";\n var anchors = require_anchors();\n var visit = require_visit();\n var identity = require_identity();\n var Node = require_Node();\n var toJS = require_toJS();\n var Alias = class extends Node.NodeBase {\n constructor(source) {\n super(identity.ALIAS);\n this.source = source;\n Object.defineProperty(this, \"tag\", {\n set() {\n throw new Error(\"Alias nodes cannot have tags\");\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc, ctx) {\n if (ctx?.maxAliasCount === 0)\n throw new ReferenceError(\"Alias resolution is disabled\");\n let nodes;\n if (ctx?.aliasResolveCache) {\n nodes = ctx.aliasResolveCache;\n } else {\n nodes = [];\n visit.visit(doc, {\n Node: (_key, node) => {\n if (identity.isAlias(node) || identity.hasAnchor(node))\n nodes.push(node);\n }\n });\n if (ctx)\n ctx.aliasResolveCache = nodes;\n }\n let found = void 0;\n for (const node of nodes) {\n if (node === this)\n break;\n if (node.anchor === this.source)\n found = node;\n }\n if (found && ctx) {\n const { anchors: anchors2, doc: doc2, maxAliasCount } = ctx;\n let data = anchors2.get(found);\n if (!data) {\n toJS.toJS(found, null, ctx);\n data = anchors2.get(found);\n }\n if (data?.res === void 0) {\n const msg = \"This should not happen: Alias anchor was not resolved?\";\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc2, found, anchors2);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = \"Excessive alias count indicates a resource exhaustion attack\";\n throw new ReferenceError(msg);\n }\n }\n }\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const source = this.resolve(ctx.doc, ctx);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n return ctx.anchors.get(source).res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchors.anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n };\n function getAliasCount(doc, node, anchors2) {\n if (identity.isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors2 && source && anchors2.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n } else if (identity.isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors2);\n if (c > count)\n count = c;\n }\n return count;\n } else if (identity.isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors2);\n const vc = getAliasCount(doc, node.value, anchors2);\n return Math.max(kc, vc);\n }\n return 1;\n }\n exports2.Alias = Alias;\n }\n});\n\n// node_modules/yaml/dist/nodes/Scalar.js\nvar require_Scalar = __commonJS({\n \"node_modules/yaml/dist/nodes/Scalar.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Node = require_Node();\n var toJS = require_toJS();\n var isScalarValue = (value) => !value || typeof value !== \"function\" && typeof value !== \"object\";\n var Scalar = class extends Node.NodeBase {\n constructor(value) {\n super(identity.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n };\n Scalar.BLOCK_FOLDED = \"BLOCK_FOLDED\";\n Scalar.BLOCK_LITERAL = \"BLOCK_LITERAL\";\n Scalar.PLAIN = \"PLAIN\";\n Scalar.QUOTE_DOUBLE = \"QUOTE_DOUBLE\";\n Scalar.QUOTE_SINGLE = \"QUOTE_SINGLE\";\n exports2.Scalar = Scalar;\n exports2.isScalarValue = isScalarValue;\n }\n});\n\n// node_modules/yaml/dist/doc/createNode.js\nvar require_createNode = __commonJS({\n \"node_modules/yaml/dist/doc/createNode.js\"(exports2) {\n \"use strict\";\n var Alias = require_Alias();\n var identity = require_identity();\n var Scalar = require_Scalar();\n var defaultTagPrefix = \"tag:yaml.org,2002:\";\n function findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter((t) => t.tag === tagName);\n const tagObj = match.find((t) => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find((t) => t.identify?.(value) && !t.format);\n }\n function createNode(value, tagName, ctx) {\n if (identity.isDocument(value))\n value = value.contents;\n if (identity.isNode(value))\n return value;\n if (identity.isPair(value)) {\n const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== \"undefined\" && value instanceof BigInt) {\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n let ref = void 0;\n if (aliasDuplicateObjects && value && typeof value === \"object\") {\n ref = sourceObjects.get(value);\n if (ref) {\n ref.anchor ?? (ref.anchor = onAnchor(value));\n return new Alias.Alias(ref.anchor);\n } else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith(\"!!\"))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === \"function\") {\n value = value.toJSON();\n }\n if (!value || typeof value !== \"object\") {\n const node2 = new Scalar.Scalar(value);\n if (ref)\n ref.node = node2;\n return node2;\n }\n tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : schema[identity.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === \"function\" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n }\n exports2.createNode = createNode;\n }\n});\n\n// node_modules/yaml/dist/nodes/Collection.js\nvar require_Collection = __commonJS({\n \"node_modules/yaml/dist/nodes/Collection.js\"(exports2) {\n \"use strict\";\n var createNode = require_createNode();\n var identity = require_identity();\n var Node = require_Node();\n function collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === \"number\" && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n } else {\n v = /* @__PURE__ */ new Map([[k, v]]);\n }\n }\n return createNode.createNode(v, void 0, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error(\"This should not happen, please report a bug.\");\n },\n schema,\n sourceObjects: /* @__PURE__ */ new Map()\n });\n }\n var isEmptyPath = (path) => path == null || typeof path === \"object\" && !!path[Symbol.iterator]().next().done;\n var Collection = class extends Node.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, \"schema\", {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.addIn(rest, value);\n else if (node === void 0 && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (identity.isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && identity.isScalar(node) ? node.value : node;\n else\n return identity.isCollection(node) ? node.getIn(rest, keepScalar) : void 0;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every((node) => {\n if (!identity.isPair(node))\n return false;\n const n = node.value;\n return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return identity.isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n } else {\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.setIn(rest, value);\n else if (node === void 0 && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n };\n exports2.Collection = Collection;\n exports2.collectionFromPath = collectionFromPath;\n exports2.isEmptyPath = isEmptyPath;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyComment.js\nvar require_stringifyComment = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyComment.js\"(exports2) {\n \"use strict\";\n var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, \"#\");\n function indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n }\n var lineComment = (str, indent, comment) => str.endsWith(\"\\n\") ? indentComment(comment, indent) : comment.includes(\"\\n\") ? \"\\n\" + indentComment(comment, indent) : (str.endsWith(\" \") ? \"\" : \" \") + comment;\n exports2.indentComment = indentComment;\n exports2.lineComment = lineComment;\n exports2.stringifyComment = stringifyComment;\n }\n});\n\n// node_modules/yaml/dist/stringify/foldFlowLines.js\nvar require_foldFlowLines = __commonJS({\n \"node_modules/yaml/dist/stringify/foldFlowLines.js\"(exports2) {\n \"use strict\";\n var FOLD_FLOW = \"flow\";\n var FOLD_BLOCK = \"block\";\n var FOLD_QUOTED = \"quoted\";\n function foldFlowLines(text, indent, mode = \"flow\", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === \"number\") {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = void 0;\n let prev = void 0;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; ch = text[i += 1]; ) {\n if (mode === FOLD_QUOTED && ch === \"\\\\\") {\n escStart = i;\n switch (text[i + 1]) {\n case \"x\":\n i += 3;\n break;\n case \"u\":\n i += 5;\n break;\n case \"U\":\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === \"\\n\") {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = void 0;\n } else {\n if (ch === \" \" && prev && prev !== \" \" && prev !== \"\\n\" && prev !== \"\t\") {\n const next = text[i + 1];\n if (next && next !== \" \" && next !== \"\\n\" && next !== \"\t\")\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = void 0;\n } else if (mode === FOLD_QUOTED) {\n while (prev === \" \" || prev === \"\t\") {\n prev = ch;\n ch = text[i += 1];\n overflow = true;\n }\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = void 0;\n } else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i2 = 0; i2 < folds.length; ++i2) {\n const fold = folds[i2];\n const end2 = folds[i2 + 1] || text.length;\n if (fold === 0)\n res = `\n${indent}${text.slice(0, end2)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\n${indent}${text.slice(fold + 1, end2)}`;\n }\n }\n return res;\n }\n function consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === \" \" || ch === \"\t\") {\n if (i < start + indent) {\n ch = text[++i];\n } else {\n do {\n ch = text[++i];\n } while (ch && ch !== \"\\n\");\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n }\n exports2.FOLD_BLOCK = FOLD_BLOCK;\n exports2.FOLD_FLOW = FOLD_FLOW;\n exports2.FOLD_QUOTED = FOLD_QUOTED;\n exports2.foldFlowLines = foldFlowLines;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyString.js\nvar require_stringifyString = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyString.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var foldFlowLines = require_foldFlowLines();\n var getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n });\n var containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\n function lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === \"\\n\") {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n }\n function doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? \" \" : \"\");\n let str = \"\";\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === \" \" && json[i + 1] === \"\\\\\" && json[i + 2] === \"n\") {\n str += json.slice(start, i) + \"\\\\ \";\n i += 1;\n start = i;\n ch = \"\\\\\";\n }\n if (ch === \"\\\\\")\n switch (json[i + 1]) {\n case \"u\":\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case \"0000\":\n str += \"\\\\0\";\n break;\n case \"0007\":\n str += \"\\\\a\";\n break;\n case \"000b\":\n str += \"\\\\v\";\n break;\n case \"001b\":\n str += \"\\\\e\";\n break;\n case \"0085\":\n str += \"\\\\N\";\n break;\n case \"00a0\":\n str += \"\\\\_\";\n break;\n case \"2028\":\n str += \"\\\\L\";\n break;\n case \"2029\":\n str += \"\\\\P\";\n break;\n default:\n if (code.substr(0, 2) === \"00\")\n str += \"\\\\x\" + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case \"n\":\n if (implicitKey || json[i + 2] === '\"' || json.length < minMultiLineLength) {\n i += 1;\n } else {\n str += json.slice(start, i) + \"\\n\\n\";\n while (json[i + 2] === \"\\\\\" && json[i + 3] === \"n\" && json[i + 4] !== '\"') {\n str += \"\\n\";\n i += 2;\n }\n str += indent;\n if (json[i + 2] === \" \")\n str += \"\\\\\";\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n }\n function singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes(\"\\n\") || /[ \\t]\\n|\\n[ \\t]/.test(value))\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? \" \" : \"\");\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\n${indent}`) + \"'\";\n return ctx.implicitKey ? res : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n }\n function quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n }\n var blockEndNewlines;\n try {\n blockEndNewlines = new RegExp(\"(^|(?\\n\";\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== \"\\n\" && ch !== \"\t\" && ch !== \" \")\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf(\"\\n\");\n if (endNlPos === -1) {\n chomp = \"-\";\n } else if (value === end || endNlPos !== end.length - 1) {\n chomp = \"+\";\n if (onChompKeep)\n onChompKeep();\n } else {\n chomp = \"\";\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === \"\\n\")\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === \" \")\n startWithSpace = true;\n else if (ch === \"\\n\")\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? \"2\" : \"1\";\n let header = (startWithSpace ? indentSize : \"\") + chomp;\n if (comment) {\n header += \" \" + commentString(comment.replace(/ ?[\\r\\n]+/g, \" \"));\n if (onComment)\n onComment();\n }\n if (!literal) {\n const foldedValue = value.replace(/\\n+/g, \"\\n$&\").replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, \"$1$2\").replace(/\\n+/g, `$&${indent}`);\n let literalFallback = false;\n const foldOptions = getFoldOptions(ctx, true);\n if (blockQuote !== \"folded\" && type !== Scalar.Scalar.BLOCK_FOLDED) {\n foldOptions.onOverflow = () => {\n literalFallback = true;\n };\n }\n const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);\n if (!literalFallback)\n return `>${header}\n${indent}${body}`;\n }\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `|${header}\n${indent}${start}${value}${end}`;\n }\n function plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if (implicitKey && value.includes(\"\\n\") || inFlow && /[[\\]{},]/.test(value)) {\n return quotedString(value, ctx);\n }\n if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n return implicitKey || inFlow || !value.includes(\"\\n\") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes(\"\\n\")) {\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === \"\") {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n } else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\n${indent}`);\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== \"tag:yaml.org,2002:str\" && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n }\n function stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === \"string\" ? item : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.Scalar.BLOCK_FOLDED:\n case Scalar.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = implicitKey && defaultKeyType || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n }\n exports2.stringifyString = stringifyString;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringify.js\nvar require_stringify = __commonJS({\n \"node_modules/yaml/dist/stringify/stringify.js\"(exports2) {\n \"use strict\";\n var anchors = require_anchors();\n var identity = require_identity();\n var stringifyComment = require_stringifyComment();\n var stringifyString = require_stringifyString();\n function createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment.stringifyComment,\n defaultKeyType: null,\n defaultStringType: \"PLAIN\",\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: \"false\",\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: \"null\",\n simpleKeys: false,\n singleQuote: null,\n trailingComma: false,\n trueStr: \"true\",\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case \"block\":\n inFlow = false;\n break;\n case \"flow\":\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: /* @__PURE__ */ new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? \" \" : \"\",\n indent: \"\",\n indentStep: typeof opt.indent === \"number\" ? \" \".repeat(opt.indent) : \" \",\n inFlow,\n options: opt\n };\n }\n function getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter((t) => t.tag === item.tag);\n if (match.length > 0)\n return match.find((t) => t.format === item.format) ?? match[0];\n }\n let tagObj = void 0;\n let obj;\n if (identity.isScalar(item)) {\n obj = item.value;\n let match = tags.filter((t) => t.identify?.(obj));\n if (match.length > 1) {\n const testMatch = match.filter((t) => t.test);\n if (testMatch.length > 0)\n match = testMatch;\n }\n tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);\n } else {\n obj = item;\n tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? (obj === null ? \"null\" : typeof obj);\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n }\n function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return \"\";\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(\" \");\n }\n function stringify(item, ctx, onComment, onChompKeep) {\n if (identity.isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (identity.isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n } else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = void 0;\n const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });\n tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === \"function\" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return identity.isScalar(node) || str[0] === \"{\" || str[0] === \"[\" ? `${props} ${str}` : `${props}\n${ctx.indent}${str}`;\n }\n exports2.createStringifyContext = createStringifyContext;\n exports2.stringify = stringify;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyPair.js\nvar require_stringifyPair = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyPair.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Scalar = require_Scalar();\n var stringify = require_stringify();\n var stringifyComment = require_stringifyComment();\n function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = identity.isNode(key) && key.comment || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error(\"With simple keys, key nodes cannot have comments\");\n }\n if (identity.isCollection(key) || !identity.isNode(key) && typeof key === \"object\") {\n const msg = \"With simple keys, collection cannot be used as a key value\";\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === \"object\"));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error(\"With simple keys, single line scalar must not span more than 1024 characters\");\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === \"\" ? \"?\" : explicitKey ? `? ${str}` : str;\n }\n } else if (allNullValues && !simpleKeys || value == null && explicitKey) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n } else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\n${indent}:`;\n } else {\n str = `${str}:`;\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (identity.isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n } else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === \"object\")\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && identity.isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);\n let ws = \" \";\n if (keyComment || vsb || vcb) {\n ws = vsb ? \"\\n\" : \"\";\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === \"\" && !ctx.inFlow) {\n if (ws === \"\\n\" && valueComment)\n ws = \"\\n\\n\";\n } else {\n ws += `\n${ctx.indent}`;\n }\n } else if (!explicitKey && identity.isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf(\"\\n\");\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === \"&\" || vs0 === \"!\")) {\n let sp0 = valueStr.indexOf(\" \");\n if (vs0 === \"&\" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === \"!\") {\n sp0 = valueStr.indexOf(\" \", sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\n${ctx.indent}`;\n }\n } else if (valueStr === \"\" || valueStr[0] === \"\\n\") {\n ws = \"\";\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n } else if (valueComment && !valueCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n } else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n }\n exports2.stringifyPair = stringifyPair;\n }\n});\n\n// node_modules/yaml/dist/log.js\nvar require_log = __commonJS({\n \"node_modules/yaml/dist/log.js\"(exports2) {\n \"use strict\";\n var node_process = require(\"process\");\n function debug(logLevel, ...messages) {\n if (logLevel === \"debug\")\n console.log(...messages);\n }\n function warn(logLevel, warning) {\n if (logLevel === \"debug\" || logLevel === \"warn\") {\n if (typeof node_process.emitWarning === \"function\")\n node_process.emitWarning(warning);\n else\n console.warn(warning);\n }\n }\n exports2.debug = debug;\n exports2.warn = warn;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/merge.js\nvar require_merge = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/merge.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Scalar = require_Scalar();\n var MERGE_KEY = \"<<\";\n var merge = {\n identify: (value) => value === MERGE_KEY || typeof value === \"symbol\" && value.description === MERGE_KEY,\n default: \"key\",\n tag: \"tag:yaml.org,2002:merge\",\n test: /^<<$/,\n resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {\n addToJSMap: addMergeToJSMap\n }),\n stringify: () => MERGE_KEY\n };\n var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);\n function addMergeToJSMap(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (identity.isSeq(source))\n for (const it of source.items)\n mergeValue(ctx, map, it);\n else if (Array.isArray(source))\n for (const it of source)\n mergeValue(ctx, map, it);\n else\n mergeValue(ctx, map, source);\n }\n function mergeValue(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (!identity.isMap(source))\n throw new Error(\"Merge sources must be maps or map aliases\");\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value2] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value2);\n } else if (map instanceof Set) {\n map.add(key);\n } else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value: value2,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n }\n function resolveAliasValue(ctx, value) {\n return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;\n }\n exports2.addMergeToJSMap = addMergeToJSMap;\n exports2.isMergeKey = isMergeKey;\n exports2.merge = merge;\n }\n});\n\n// node_modules/yaml/dist/nodes/addPairToJSMap.js\nvar require_addPairToJSMap = __commonJS({\n \"node_modules/yaml/dist/nodes/addPairToJSMap.js\"(exports2) {\n \"use strict\";\n var log = require_log();\n var merge = require_merge();\n var stringify = require_stringify();\n var identity = require_identity();\n var toJS = require_toJS();\n function addPairToJSMap(ctx, map, { key, value }) {\n if (identity.isNode(key) && key.addToJSMap)\n key.addToJSMap(ctx, map, value);\n else if (merge.isMergeKey(ctx, key))\n merge.addMergeToJSMap(ctx, map, value);\n else {\n const jsKey = toJS.toJS(key, \"\", ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n } else if (map instanceof Set) {\n map.add(jsKey);\n } else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS.toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n }\n function stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return \"\";\n if (typeof jsKey !== \"object\")\n return String(jsKey);\n if (identity.isNode(key) && ctx?.doc) {\n const strCtx = stringify.createStringifyContext(ctx.doc, {});\n strCtx.anchors = /* @__PURE__ */ new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n log.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.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n }\n exports2.addPairToJSMap = addPairToJSMap;\n }\n});\n\n// node_modules/yaml/dist/nodes/Pair.js\nvar require_Pair = __commonJS({\n \"node_modules/yaml/dist/nodes/Pair.js\"(exports2) {\n \"use strict\";\n var createNode = require_createNode();\n var stringifyPair = require_stringifyPair();\n var addPairToJSMap = require_addPairToJSMap();\n var identity = require_identity();\n function createPair(key, value, ctx) {\n const k = createNode.createNode(key, void 0, ctx);\n const v = createNode.createNode(value, void 0, ctx);\n return new Pair(k, v);\n }\n var Pair = class _Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (identity.isNode(key))\n key = key.clone(schema);\n if (identity.isNode(value))\n value = value.clone(schema);\n return new _Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};\n return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);\n }\n };\n exports2.Pair = Pair;\n exports2.createPair = createPair;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyCollection.js\nvar require_stringifyCollection = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyCollection.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var stringify = require_stringify();\n var stringifyComment = require_stringifyComment();\n function stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify2(collection, ctx, options);\n }\n function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment2 = null;\n if (identity.isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push(\"\");\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment2 = item.comment;\n } else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push(\"\");\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);\n if (comment2)\n str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));\n if (chompKeep && comment2)\n chompKeep = false;\n lines.push(blockItemPrefix + str2);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n } else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\n${indent}${line}` : \"\\n\";\n }\n }\n if (comment) {\n str += \"\\n\" + stringifyComment.indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n } else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (item.spaceBefore)\n lines.push(\"\");\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n } else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push(\"\");\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = identity.isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n } else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify.stringify(item, itemCtx, () => comment = null);\n reqNewline || (reqNewline = lines.length > linesAtValue || str.includes(\"\\n\"));\n if (i < items.length - 1) {\n str += \",\";\n } else if (ctx.options.trailingComma) {\n if (ctx.options.lineWidth > 0) {\n reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);\n }\n if (reqNewline) {\n str += \",\";\n }\n }\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n } else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\n${indentStep}${indent}${line}` : \"\\n\";\n return `${str}\n${indent}${end}`;\n } else {\n return `${start}${fcPadding}${lines.join(\" \")}${fcPadding}${end}`;\n }\n }\n }\n function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, \"\");\n if (comment) {\n const ic = stringifyComment.indentComment(commentString(comment), indent);\n lines.push(ic.trimStart());\n }\n }\n exports2.stringifyCollection = stringifyCollection;\n }\n});\n\n// node_modules/yaml/dist/nodes/YAMLMap.js\nvar require_YAMLMap = __commonJS({\n \"node_modules/yaml/dist/nodes/YAMLMap.js\"(exports2) {\n \"use strict\";\n var stringifyCollection = require_stringifyCollection();\n var addPairToJSMap = require_addPairToJSMap();\n var Collection = require_Collection();\n var identity = require_identity();\n var Pair = require_Pair();\n var Scalar = require_Scalar();\n function findPair(items, key) {\n const k = identity.isScalar(key) ? key.value : key;\n for (const it of items) {\n if (identity.isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (identity.isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return void 0;\n }\n var YAMLMap = class extends Collection.Collection {\n static get tagName() {\n return \"tag:yaml.org,2002:map\";\n }\n constructor(schema) {\n super(identity.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === \"function\")\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== void 0 || keepUndefined)\n map.items.push(Pair.createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n } else if (obj && typeof obj === \"object\") {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === \"function\") {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (identity.isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== \"object\" || !(\"key\" in pair)) {\n _pair = new Pair.Pair(pair, pair?.value);\n } else\n _pair = new Pair.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n } else if (sortEntries) {\n const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n } else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap.addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!identity.isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: \"\",\n flowChars: { start: \"{\", end: \"}\" },\n itemIndent: ctx.indent || \"\",\n onChompKeep,\n onComment\n });\n }\n };\n exports2.YAMLMap = YAMLMap;\n exports2.findPair = findPair;\n }\n});\n\n// node_modules/yaml/dist/schema/common/map.js\nvar require_map = __commonJS({\n \"node_modules/yaml/dist/schema/common/map.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var YAMLMap = require_YAMLMap();\n var map = {\n collection: \"map\",\n default: true,\n nodeClass: YAMLMap.YAMLMap,\n tag: \"tag:yaml.org,2002:map\",\n resolve(map2, onError) {\n if (!identity.isMap(map2))\n onError(\"Expected a mapping for this tag\");\n return map2;\n },\n createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n };\n exports2.map = map;\n }\n});\n\n// node_modules/yaml/dist/nodes/YAMLSeq.js\nvar require_YAMLSeq = __commonJS({\n \"node_modules/yaml/dist/nodes/YAMLSeq.js\"(exports2) {\n \"use strict\";\n var createNode = require_createNode();\n var stringifyCollection = require_stringifyCollection();\n var Collection = require_Collection();\n var identity = require_identity();\n var Scalar = require_Scalar();\n var toJS = require_toJS();\n var YAMLSeq = class extends Collection.Collection {\n static get tagName() {\n return \"tag:yaml.org,2002:seq\";\n }\n constructor(schema) {\n super(identity.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== \"number\")\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== \"number\")\n return void 0;\n const it = this.items[idx];\n return !keepScalar && identity.isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === \"number\" && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== \"number\")\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS.toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: \"- \",\n flowChars: { start: \"[\", end: \"]\" },\n itemIndent: (ctx.indent || \"\") + \" \",\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === \"function\") {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode.createNode(it, void 0, ctx));\n }\n }\n return seq;\n }\n };\n function asItemIndex(key) {\n let idx = identity.isScalar(key) ? key.value : key;\n if (idx && typeof idx === \"string\")\n idx = Number(idx);\n return typeof idx === \"number\" && Number.isInteger(idx) && idx >= 0 ? idx : null;\n }\n exports2.YAMLSeq = YAMLSeq;\n }\n});\n\n// node_modules/yaml/dist/schema/common/seq.js\nvar require_seq = __commonJS({\n \"node_modules/yaml/dist/schema/common/seq.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var YAMLSeq = require_YAMLSeq();\n var seq = {\n collection: \"seq\",\n default: true,\n nodeClass: YAMLSeq.YAMLSeq,\n tag: \"tag:yaml.org,2002:seq\",\n resolve(seq2, onError) {\n if (!identity.isSeq(seq2))\n onError(\"Expected a sequence for this tag\");\n return seq2;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n };\n exports2.seq = seq;\n }\n});\n\n// node_modules/yaml/dist/schema/common/string.js\nvar require_string = __commonJS({\n \"node_modules/yaml/dist/schema/common/string.js\"(exports2) {\n \"use strict\";\n var stringifyString = require_stringifyString();\n var string = {\n identify: (value) => typeof value === \"string\",\n default: true,\n tag: \"tag:yaml.org,2002:str\",\n resolve: (str) => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n }\n };\n exports2.string = string;\n }\n});\n\n// node_modules/yaml/dist/schema/common/null.js\nvar require_null = __commonJS({\n \"node_modules/yaml/dist/schema/common/null.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var nullTag = {\n identify: (value) => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: \"tag:yaml.org,2002:null\",\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === \"string\" && nullTag.test.test(source) ? source : ctx.options.nullStr\n };\n exports2.nullTag = nullTag;\n }\n});\n\n// node_modules/yaml/dist/schema/core/bool.js\nvar require_bool = __commonJS({\n \"node_modules/yaml/dist/schema/core/bool.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var boolTag = {\n identify: (value) => typeof value === \"boolean\",\n default: true,\n tag: \"tag:yaml.org,2002:bool\",\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: (str) => new Scalar.Scalar(str[0] === \"t\" || str[0] === \"T\"),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === \"t\" || source[0] === \"T\";\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n };\n exports2.boolTag = boolTag;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyNumber.js\nvar require_stringifyNumber = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyNumber.js\"(exports2) {\n \"use strict\";\n function stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === \"bigint\")\n return String(value);\n const num = typeof value === \"number\" ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? \".nan\" : num < 0 ? \"-.inf\" : \".inf\";\n let n = Object.is(value, -0) ? \"-0\" : JSON.stringify(value);\n if (!format && minFractionDigits && (!tag || tag === \"tag:yaml.org,2002:float\") && /^-?\\d/.test(n) && !n.includes(\"e\")) {\n let i = n.indexOf(\".\");\n if (i < 0) {\n i = n.length;\n n += \".\";\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += \"0\";\n }\n return n;\n }\n exports2.stringifyNumber = stringifyNumber;\n }\n});\n\n// node_modules/yaml/dist/schema/core/float.js\nvar require_float = __commonJS({\n \"node_modules/yaml/dist/schema/core/float.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var stringifyNumber = require_stringifyNumber();\n var floatNaN = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === \"nan\" ? NaN : str[0] === \"-\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n };\n var floatExp = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n format: \"EXP\",\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n };\n var float = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str));\n const dot = str.indexOf(\".\");\n if (dot !== -1 && str[str.length - 1] === \"0\")\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n };\n exports2.float = float;\n exports2.floatExp = floatExp;\n exports2.floatNaN = floatNaN;\n }\n});\n\n// node_modules/yaml/dist/schema/core/int.js\nvar require_int = __commonJS({\n \"node_modules/yaml/dist/schema/core/int.js\"(exports2) {\n \"use strict\";\n var stringifyNumber = require_stringifyNumber();\n var intIdentify = (value) => typeof value === \"bigint\" || Number.isInteger(value);\n var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);\n function intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber.stringifyNumber(node);\n }\n var intOct = {\n identify: (value) => intIdentify(value) && value >= 0,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"OCT\",\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: (node) => intStringify(node, 8, \"0o\")\n };\n var int = {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n };\n var intHex = {\n identify: (value) => intIdentify(value) && value >= 0,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"HEX\",\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: (node) => intStringify(node, 16, \"0x\")\n };\n exports2.int = int;\n exports2.intHex = intHex;\n exports2.intOct = intOct;\n }\n});\n\n// node_modules/yaml/dist/schema/core/schema.js\nvar require_schema = __commonJS({\n \"node_modules/yaml/dist/schema/core/schema.js\"(exports2) {\n \"use strict\";\n var map = require_map();\n var _null = require_null();\n var seq = require_seq();\n var string = require_string();\n var bool = require_bool();\n var float = require_float();\n var int = require_int();\n var schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.boolTag,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float\n ];\n exports2.schema = schema;\n }\n});\n\n// node_modules/yaml/dist/schema/json/schema.js\nvar require_schema2 = __commonJS({\n \"node_modules/yaml/dist/schema/json/schema.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var map = require_map();\n var seq = require_seq();\n function intIdentify(value) {\n return typeof value === \"bigint\" || Number.isInteger(value);\n }\n var stringifyJSON = ({ value }) => JSON.stringify(value);\n var jsonScalars = [\n {\n identify: (value) => typeof value === \"string\",\n default: true,\n tag: \"tag:yaml.org,2002:str\",\n resolve: (str) => str,\n stringify: stringifyJSON\n },\n {\n identify: (value) => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: \"tag:yaml.org,2002:null\",\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: (value) => typeof value === \"boolean\",\n default: true,\n tag: \"tag:yaml.org,2002:bool\",\n test: /^true$|^false$/,\n resolve: (str) => str === \"true\",\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: (str) => parseFloat(str),\n stringify: stringifyJSON\n }\n ];\n var jsonError = {\n default: true,\n tag: \"\",\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n };\n var schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n exports2.schema = schema;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/binary.js\nvar require_binary = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/binary.js\"(exports2) {\n \"use strict\";\n var node_buffer = require(\"buffer\");\n var Scalar = require_Scalar();\n var stringifyString = require_stringifyString();\n var binary = {\n identify: (value) => value instanceof Uint8Array,\n // Buffer inherits from Uint8Array\n default: false,\n tag: \"tag:yaml.org,2002:binary\",\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof node_buffer.Buffer === \"function\") {\n return node_buffer.Buffer.from(src, \"base64\");\n } else if (typeof atob === \"function\") {\n const str = atob(src.replace(/[\\n\\r]/g, \"\"));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n } else {\n onError(\"This environment does not support reading binary tags; either Buffer or atob is required\");\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n if (!value)\n return \"\";\n const buf = value;\n let str;\n if (typeof node_buffer.Buffer === \"function\") {\n str = buf instanceof node_buffer.Buffer ? buf.toString(\"base64\") : node_buffer.Buffer.from(buf.buffer).toString(\"base64\");\n } else if (typeof btoa === \"function\") {\n let s = \"\";\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n } else {\n throw new Error(\"This environment does not support writing binary tags; either Buffer or btoa is required\");\n }\n type ?? (type = Scalar.Scalar.BLOCK_LITERAL);\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? \"\\n\" : \" \");\n }\n return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n };\n exports2.binary = binary;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/pairs.js\nvar require_pairs = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/pairs.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Pair = require_Pair();\n var Scalar = require_Scalar();\n var YAMLSeq = require_YAMLSeq();\n function resolvePairs(seq, onError) {\n if (identity.isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (identity.isPair(item))\n continue;\n else if (identity.isMap(item)) {\n if (item.items.length > 1)\n onError(\"Each pair must have its own sequence indicator\");\n const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}\n${pair.key.commentBefore}` : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment ? `${item.comment}\n${cn.comment}` : item.comment;\n }\n item = pair;\n }\n seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n }\n } else\n onError(\"Expected a sequence for this tag\");\n return seq;\n }\n function createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs2 = new YAMLSeq.YAMLSeq(schema);\n pairs2.tag = \"tag:yaml.org,2002:pairs\";\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === \"function\")\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n } else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n } else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n } else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n } else {\n key = it;\n }\n pairs2.items.push(Pair.createPair(key, value, ctx));\n }\n return pairs2;\n }\n var pairs = {\n collection: \"seq\",\n default: false,\n tag: \"tag:yaml.org,2002:pairs\",\n resolve: resolvePairs,\n createNode: createPairs\n };\n exports2.createPairs = createPairs;\n exports2.pairs = pairs;\n exports2.resolvePairs = resolvePairs;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/omap.js\nvar require_omap = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/omap.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var toJS = require_toJS();\n var YAMLMap = require_YAMLMap();\n var YAMLSeq = require_YAMLSeq();\n var pairs = require_pairs();\n var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n this.tag = _YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = /* @__PURE__ */ new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (identity.isPair(pair)) {\n key = toJS.toJS(pair.key, \"\", ctx);\n value = toJS.toJS(pair.value, key, ctx);\n } else {\n key = toJS.toJS(pair, \"\", ctx);\n }\n if (map.has(key))\n throw new Error(\"Ordered maps must not include duplicate keys\");\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n const omap2 = new this();\n omap2.items = pairs$1.items;\n return omap2;\n }\n };\n YAMLOMap.tag = \"tag:yaml.org,2002:omap\";\n var omap = {\n collection: \"seq\",\n identify: (value) => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: \"tag:yaml.org,2002:omap\",\n resolve(seq, onError) {\n const pairs$1 = pairs.resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs$1.items) {\n if (identity.isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n } else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs$1);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n };\n exports2.YAMLOMap = YAMLOMap;\n exports2.omap = omap;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/bool.js\nvar require_bool2 = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/bool.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n function boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n var trueTag = {\n identify: (value) => value === true,\n default: true,\n tag: \"tag:yaml.org,2002:bool\",\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar.Scalar(true),\n stringify: boolStringify\n };\n var falseTag = {\n identify: (value) => value === false,\n default: true,\n tag: \"tag:yaml.org,2002:bool\",\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar.Scalar(false),\n stringify: boolStringify\n };\n exports2.falseTag = falseTag;\n exports2.trueTag = trueTag;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/float.js\nvar require_float2 = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/float.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var stringifyNumber = require_stringifyNumber();\n var floatNaN = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === \"nan\" ? NaN : str[0] === \"-\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n };\n var floatExp = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n format: \"EXP\",\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, \"\")),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n };\n var float = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, \"\")));\n const dot = str.indexOf(\".\");\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, \"\");\n if (f[f.length - 1] === \"0\")\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n };\n exports2.float = float;\n exports2.floatExp = floatExp;\n exports2.floatNaN = floatNaN;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/int.js\nvar require_int2 = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/int.js\"(exports2) {\n \"use strict\";\n var stringifyNumber = require_stringifyNumber();\n var intIdentify = (value) => typeof value === \"bigint\" || Number.isInteger(value);\n function intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === \"-\" || sign === \"+\")\n offset += 1;\n str = str.substring(offset).replace(/_/g, \"\");\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n2 = BigInt(str);\n return sign === \"-\" ? BigInt(-1) * n2 : n2;\n }\n const n = parseInt(str, radix);\n return sign === \"-\" ? -1 * n : n;\n }\n function intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? \"-\" + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber.stringifyNumber(node);\n }\n var intBin = {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"BIN\",\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: (node) => intStringify(node, 2, \"0b\")\n };\n var intOct = {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"OCT\",\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: (node) => intStringify(node, 8, \"0\")\n };\n var int = {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n };\n var intHex = {\n identify: intIdentify,\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"HEX\",\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: (node) => intStringify(node, 16, \"0x\")\n };\n exports2.int = int;\n exports2.intBin = intBin;\n exports2.intHex = intHex;\n exports2.intOct = intOct;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/set.js\nvar require_set = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/set.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Pair = require_Pair();\n var YAMLMap = require_YAMLMap();\n var YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = _YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (identity.isPair(key))\n pair = key;\n else if (key && typeof key === \"object\" && \"key\" in key && \"value\" in key && key.value === null)\n pair = new Pair.Pair(key.key, null);\n else\n pair = new Pair.Pair(key, null);\n const prev = YAMLMap.findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = YAMLMap.findPair(this.items, key);\n return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair;\n }\n set(key, value) {\n if (typeof value !== \"boolean\")\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = YAMLMap.findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n } else if (!prev && value) {\n this.items.push(new Pair.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error(\"Set items must all have null values\");\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set2 = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === \"function\")\n value = replacer.call(iterable, value, value);\n set2.items.push(Pair.createPair(value, null, ctx));\n }\n return set2;\n }\n };\n YAMLSet.tag = \"tag:yaml.org,2002:set\";\n var set = {\n collection: \"map\",\n identify: (value) => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: \"tag:yaml.org,2002:set\",\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (identity.isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError(\"Set items must all have null values\");\n } else\n onError(\"Expected a mapping for this tag\");\n return map;\n }\n };\n exports2.YAMLSet = YAMLSet;\n exports2.set = set;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/timestamp.js\nvar require_timestamp = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/timestamp.js\"(exports2) {\n \"use strict\";\n var stringifyNumber = require_stringifyNumber();\n function parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === \"-\" || sign === \"+\" ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts.replace(/_/g, \"\").split(\":\").reduce((res2, p) => res2 * num(60) + num(p), num(0));\n return sign === \"-\" ? num(-1) * res : res;\n }\n function stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === \"bigint\")\n num = (n) => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber.stringifyNumber(node);\n let sign = \"\";\n if (value < 0) {\n sign = \"-\";\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60];\n if (value < 60) {\n parts.unshift(0);\n } else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60);\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value);\n }\n }\n return sign + parts.map((n) => String(n).padStart(2, \"0\")).join(\":\").replace(/000000\\d*$/, \"\");\n }\n var intTime = {\n identify: (value) => typeof value === \"bigint\" || Number.isInteger(value),\n default: true,\n tag: \"tag:yaml.org,2002:int\",\n format: \"TIME\",\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n };\n var floatTime = {\n identify: (value) => typeof value === \"number\",\n default: true,\n tag: \"tag:yaml.org,2002:float\",\n format: \"TIME\",\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: (str) => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n };\n var timestamp = {\n identify: (value) => value instanceof Date,\n default: true,\n tag: \"tag:yaml.org,2002:timestamp\",\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n 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})?))?)?$\"),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error(\"!!timestamp expects a date, starting with yyyy-mm-dd\");\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + \"00\").substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== \"Z\") {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 6e4 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, \"\") ?? \"\"\n };\n exports2.floatTime = floatTime;\n exports2.intTime = intTime;\n exports2.timestamp = timestamp;\n }\n});\n\n// node_modules/yaml/dist/schema/yaml-1.1/schema.js\nvar require_schema3 = __commonJS({\n \"node_modules/yaml/dist/schema/yaml-1.1/schema.js\"(exports2) {\n \"use strict\";\n var map = require_map();\n var _null = require_null();\n var seq = require_seq();\n var string = require_string();\n var binary = require_binary();\n var bool = require_bool2();\n var float = require_float2();\n var int = require_int2();\n var merge = require_merge();\n var omap = require_omap();\n var pairs = require_pairs();\n var set = require_set();\n var timestamp = require_timestamp();\n var schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.trueTag,\n bool.falseTag,\n int.intBin,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float,\n binary.binary,\n merge.merge,\n omap.omap,\n pairs.pairs,\n set.set,\n timestamp.intTime,\n timestamp.floatTime,\n timestamp.timestamp\n ];\n exports2.schema = schema;\n }\n});\n\n// node_modules/yaml/dist/schema/tags.js\nvar require_tags = __commonJS({\n \"node_modules/yaml/dist/schema/tags.js\"(exports2) {\n \"use strict\";\n var map = require_map();\n var _null = require_null();\n var seq = require_seq();\n var string = require_string();\n var bool = require_bool();\n var float = require_float();\n var int = require_int();\n var schema = require_schema();\n var schema$1 = require_schema2();\n var binary = require_binary();\n var merge = require_merge();\n var omap = require_omap();\n var pairs = require_pairs();\n var schema$2 = require_schema3();\n var set = require_set();\n var timestamp = require_timestamp();\n var schemas = /* @__PURE__ */ new Map([\n [\"core\", schema.schema],\n [\"failsafe\", [map.map, seq.seq, string.string]],\n [\"json\", schema$1.schema],\n [\"yaml11\", schema$2.schema],\n [\"yaml-1.1\", schema$2.schema]\n ]);\n var tagsByName = {\n binary: binary.binary,\n bool: bool.boolTag,\n float: float.float,\n floatExp: float.floatExp,\n floatNaN: float.floatNaN,\n floatTime: timestamp.floatTime,\n int: int.int,\n intHex: int.intHex,\n intOct: int.intOct,\n intTime: timestamp.intTime,\n map: map.map,\n merge: merge.merge,\n null: _null.nullTag,\n omap: omap.omap,\n pairs: pairs.pairs,\n seq: seq.seq,\n set: set.set,\n timestamp: timestamp.timestamp\n };\n var coreKnownTags = {\n \"tag:yaml.org,2002:binary\": binary.binary,\n \"tag:yaml.org,2002:merge\": merge.merge,\n \"tag:yaml.org,2002:omap\": omap.omap,\n \"tag:yaml.org,2002:pairs\": pairs.pairs,\n \"tag:yaml.org,2002:set\": set.set,\n \"tag:yaml.org,2002:timestamp\": timestamp.timestamp\n };\n function getTags(customTags, schemaName, addMergeTag) {\n const schemaTags = schemas.get(schemaName);\n if (schemaTags && !customTags) {\n return addMergeTag && !schemaTags.includes(merge.merge) ? schemaTags.concat(merge.merge) : schemaTags.slice();\n }\n let tags = schemaTags;\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys()).filter((key) => key !== \"yaml11\").map((key) => JSON.stringify(key)).join(\", \");\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n } else if (typeof customTags === \"function\") {\n tags = customTags(tags.slice());\n }\n if (addMergeTag)\n tags = tags.concat(merge.merge);\n return tags.reduce((tags2, tag) => {\n const tagObj = typeof tag === \"string\" ? tagsByName[tag] : tag;\n if (!tagObj) {\n const tagName = JSON.stringify(tag);\n const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(\", \");\n throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n }\n if (!tags2.includes(tagObj))\n tags2.push(tagObj);\n return tags2;\n }, []);\n }\n exports2.coreKnownTags = coreKnownTags;\n exports2.getTags = getTags;\n }\n});\n\n// node_modules/yaml/dist/schema/Schema.js\nvar require_Schema = __commonJS({\n \"node_modules/yaml/dist/schema/Schema.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var map = require_map();\n var seq = require_seq();\n var string = require_string();\n var tags = require_tags();\n var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\n var Schema = class _Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat) ? tags.getTags(compat, \"compat\") : compat ? tags.getTags(null, compat) : null;\n this.name = typeof schema === \"string\" && schema || \"core\";\n this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n this.tags = tags.getTags(customTags, this.name, merge);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, identity.MAP, { value: map.map });\n Object.defineProperty(this, identity.SCALAR, { value: string.string });\n Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n this.sortMapEntries = typeof sortMapEntries === \"function\" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null;\n }\n clone() {\n const copy = Object.create(_Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n };\n exports2.Schema = Schema;\n }\n});\n\n// node_modules/yaml/dist/stringify/stringifyDocument.js\nvar require_stringifyDocument = __commonJS({\n \"node_modules/yaml/dist/stringify/stringifyDocument.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var stringify = require_stringify();\n var stringifyComment = require_stringifyComment();\n function stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n } else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push(\"---\");\n const ctx = stringify.createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift(\"\");\n const cs = commentString(doc.commentBefore);\n lines.unshift(stringifyComment.indentComment(cs, \"\"));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (identity.isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push(\"\");\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(stringifyComment.indentComment(cs, \"\"));\n }\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? void 0 : () => chompKeep = true;\n let body = stringify.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);\n if (contentComment)\n body += stringifyComment.lineComment(body, \"\", commentString(contentComment));\n if ((body[0] === \"|\" || body[0] === \">\") && lines[lines.length - 1] === \"---\") {\n lines[lines.length - 1] = `--- ${body}`;\n } else\n lines.push(body);\n } else {\n lines.push(stringify.stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes(\"\\n\")) {\n lines.push(\"...\");\n lines.push(stringifyComment.indentComment(cs, \"\"));\n } else {\n lines.push(`... ${cs}`);\n }\n } else {\n lines.push(\"...\");\n }\n } else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, \"\");\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== \"\")\n lines.push(\"\");\n lines.push(stringifyComment.indentComment(commentString(dc), \"\"));\n }\n }\n return lines.join(\"\\n\") + \"\\n\";\n }\n exports2.stringifyDocument = stringifyDocument;\n }\n});\n\n// node_modules/yaml/dist/doc/Document.js\nvar require_Document = __commonJS({\n \"node_modules/yaml/dist/doc/Document.js\"(exports2) {\n \"use strict\";\n var Alias = require_Alias();\n var Collection = require_Collection();\n var identity = require_identity();\n var Pair = require_Pair();\n var toJS = require_toJS();\n var Schema = require_Schema();\n var stringifyDocument = require_stringifyDocument();\n var anchors = require_anchors();\n var applyReviver = require_applyReviver();\n var createNode = require_createNode();\n var directives = require_directives();\n var Document = class _Document {\n constructor(value, replacer, options) {\n this.commentBefore = null;\n this.comment = null;\n this.errors = [];\n this.warnings = [];\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n let _replacer = null;\n if (typeof replacer === \"function\" || Array.isArray(replacer)) {\n _replacer = replacer;\n } else if (options === void 0 && replacer) {\n options = replacer;\n replacer = void 0;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: \"warn\",\n prettyErrors: true,\n strict: true,\n stringKeys: false,\n uniqueKeys: true,\n version: \"1.2\"\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n } else\n this.directives = new directives.Directives({ version });\n this.setSchema(version, options);\n this.contents = value === void 0 ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(_Document.prototype, {\n [identity.NODE_TYPE]: { value: identity.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n copy.contents = identity.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchors.anchorNames(this);\n node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? anchors.findNewAnchor(name || \"a\", prev) : name;\n }\n return new Alias.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = void 0;\n if (typeof replacer === \"function\") {\n value = replacer.call({ \"\": value }, \"\", value);\n _replacer = replacer;\n } else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === \"number\" || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n } else if (options === void 0 && replacer) {\n options = replacer;\n replacer = void 0;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(\n this,\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || \"a\"\n );\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode.createNode(value, tag, ctx);\n if (flow && identity.isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (Collection.isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents) ? this.contents.deleteIn(path) : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return identity.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (Collection.isEmptyPath(path))\n return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;\n return identity.isCollection(this.contents) ? this.contents.getIn(path, keepScalar) : void 0;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (Collection.isEmptyPath(path))\n return this.contents !== void 0;\n return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n this.contents = Collection.collectionFromPath(this.schema, [key], value);\n } else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n this.contents = value;\n } else if (this.contents == null) {\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n } else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === \"number\")\n version = String(version);\n let opt;\n switch (version) {\n case \"1.1\":\n if (this.directives)\n this.directives.yaml.version = \"1.1\";\n else\n this.directives = new directives.Directives({ version: \"1.1\" });\n opt = { resolveKnownTags: false, schema: \"yaml-1.1\" };\n break;\n case \"1.2\":\n case \"next\":\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new directives.Directives({ version });\n opt = { resolveKnownTags: true, schema: \"core\" };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: /* @__PURE__ */ new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === \"number\" ? maxAliasCount : 100\n };\n const res = toJS.toJS(this.contents, jsonArg ?? \"\", ctx);\n if (typeof onAnchor === \"function\")\n for (const { count, res: res2 } of ctx.anchors.values())\n onAnchor(res2, count);\n return typeof reviver === \"function\" ? applyReviver.applyReviver(reviver, { \"\": res }, \"\", res) : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error(\"Document with errors cannot be stringified\");\n if (\"indent\" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument.stringifyDocument(this, options);\n }\n };\n function assertCollection(contents) {\n if (identity.isCollection(contents))\n return true;\n throw new Error(\"Expected a YAML collection as document contents\");\n }\n exports2.Document = Document;\n }\n});\n\n// node_modules/yaml/dist/errors.js\nvar require_errors = __commonJS({\n \"node_modules/yaml/dist/errors.js\"(exports2) {\n \"use strict\";\n var YAMLError = class extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n };\n var YAMLParseError = class extends YAMLError {\n constructor(pos, code, message) {\n super(\"YAMLParseError\", pos, code, message);\n }\n };\n var YAMLWarning = class extends YAMLError {\n constructor(pos, code, message) {\n super(\"YAMLWarning\", pos, code, message);\n }\n };\n var prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map((pos) => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\\n\\r]+$/, \"\");\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = \"\\u2026\" + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + \"\\u2026\";\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + \"\\u2026\\n\";\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end?.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = \" \".repeat(ci) + \"^\".repeat(count);\n error.message += `:\n\n${lineStr}\n${pointer}\n`;\n }\n };\n exports2.YAMLError = YAMLError;\n exports2.YAMLParseError = YAMLParseError;\n exports2.YAMLWarning = YAMLWarning;\n exports2.prettifyError = prettifyError;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-props.js\nvar require_resolve_props = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-props.js\"(exports2) {\n \"use strict\";\n function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = \"\";\n let commentSep = \"\";\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== \"space\" && token.type !== \"newline\" && token.type !== \"comma\")\n onError(token.offset, \"MISSING_CHAR\", \"Tags and anchors must be separated from the next token by white space\");\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== \"comment\" && token.type !== \"newline\") {\n onError(tab, \"TAB_AS_INDENT\", \"Tabs are not allowed as indentation\");\n }\n tab = null;\n }\n switch (token.type) {\n case \"space\":\n if (!flow && (indicator !== \"doc-start\" || next?.type !== \"flow-collection\") && token.source.includes(\"\t\")) {\n tab = token;\n }\n hasSpace = true;\n break;\n case \"comment\": {\n if (!hasSpace)\n onError(token, \"MISSING_CHAR\", \"Comments must be separated from other tokens by white space characters\");\n const cb = token.source.substring(1) || \" \";\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = \"\";\n atNewline = false;\n break;\n }\n case \"newline\":\n if (atNewline) {\n if (comment)\n comment += token.source;\n else if (!found || indicator !== \"seq-item-ind\")\n spaceBefore = true;\n } else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case \"anchor\":\n if (anchor)\n onError(token, \"MULTIPLE_ANCHORS\", \"A node can have at most one anchor\");\n if (token.source.endsWith(\":\"))\n onError(token.offset + token.source.length - 1, \"BAD_ALIAS\", \"Anchor ending in : is ambiguous\", true);\n anchor = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case \"tag\": {\n if (tag)\n onError(token, \"MULTIPLE_TAGS\", \"A node can have at most one tag\");\n tag = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n if (anchor || tag)\n onError(token, \"BAD_PROP_ORDER\", `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, \"UNEXPECTED_TOKEN\", `Unexpected ${token.source} in ${flow ?? \"collection\"}`);\n found = token;\n atNewline = indicator === \"seq-item-ind\" || indicator === \"explicit-key-ind\";\n hasSpace = false;\n break;\n case \"comma\":\n if (flow) {\n if (comma)\n onError(token, \"UNEXPECTED_TOKEN\", `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n default:\n onError(token, \"UNEXPECTED_TOKEN\", `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace && next && next.type !== \"space\" && next.type !== \"newline\" && next.type !== \"comma\" && (next.type !== \"scalar\" || next.source !== \"\")) {\n onError(next.offset, \"MISSING_CHAR\", \"Tags and anchors must be separated from the next token by white space\");\n }\n if (tab && (atNewline && tab.indent <= parentIndent || next?.type === \"block-map\" || next?.type === \"block-seq\"))\n onError(tab, \"TAB_AS_INDENT\", \"Tabs are not allowed as indentation\");\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n }\n exports2.resolveProps = resolveProps;\n }\n});\n\n// node_modules/yaml/dist/compose/util-contains-newline.js\nvar require_util_contains_newline = __commonJS({\n \"node_modules/yaml/dist/compose/util-contains-newline.js\"(exports2) {\n \"use strict\";\n function containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case \"alias\":\n case \"scalar\":\n case \"double-quoted-scalar\":\n case \"single-quoted-scalar\":\n if (key.source.includes(\"\\n\"))\n return true;\n if (key.end) {\n for (const st of key.end)\n if (st.type === \"newline\")\n return true;\n }\n return false;\n case \"flow-collection\":\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === \"newline\")\n return true;\n if (it.sep) {\n for (const st of it.sep)\n if (st.type === \"newline\")\n return true;\n }\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n }\n exports2.containsNewline = containsNewline;\n }\n});\n\n// node_modules/yaml/dist/compose/util-flow-indent-check.js\nvar require_util_flow_indent_check = __commonJS({\n \"node_modules/yaml/dist/compose/util-flow-indent-check.js\"(exports2) {\n \"use strict\";\n var utilContainsNewline = require_util_contains_newline();\n function flowIndentCheck(indent, fc, onError) {\n if (fc?.type === \"flow-collection\") {\n const end = fc.end[0];\n if (end.indent === indent && (end.source === \"]\" || end.source === \"}\") && utilContainsNewline.containsNewline(fc)) {\n const msg = \"Flow end indicator should be more indented than parent\";\n onError(end, \"BAD_INDENT\", msg, true);\n }\n }\n }\n exports2.flowIndentCheck = flowIndentCheck;\n }\n});\n\n// node_modules/yaml/dist/compose/util-map-includes.js\nvar require_util_map_includes = __commonJS({\n \"node_modules/yaml/dist/compose/util-map-includes.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n function mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === \"function\" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value;\n return items.some((pair) => isEqual(pair.key, search));\n }\n exports2.mapIncludes = mapIncludes;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-block-map.js\nvar require_resolve_block_map = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-block-map.js\"(exports2) {\n \"use strict\";\n var Pair = require_Pair();\n var YAMLMap = require_YAMLMap();\n var resolveProps = require_resolve_props();\n var utilContainsNewline = require_util_contains_newline();\n var utilFlowIndentCheck = require_util_flow_indent_check();\n var utilMapIncludes = require_util_map_includes();\n var startColMsg = \"All mapping items must start at the same column\";\n function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n const keyProps = resolveProps.resolveProps(start, {\n indicator: \"explicit-key-ind\",\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === \"block-seq\")\n onError(offset, \"BLOCK_AS_IMPLICIT_KEY\", \"A block sequence may not be used as an implicit map key\");\n else if (\"indent\" in key && key.indent !== bm.indent)\n onError(offset, \"BAD_INDENT\", startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += \"\\n\" + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n onError(key ?? start[start.length - 1], \"MULTILINE_IMPLICIT_KEY\", \"Implicit keys need to be on a single line\");\n }\n } else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, \"BAD_INDENT\", startColMsg);\n }\n ctx.atKey = true;\n const keyStart = keyProps.end;\n const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n ctx.atKey = false;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, \"DUPLICATE_KEY\", \"Map keys must be unique\");\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n indicator: \"map-value-ind\",\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === \"block-scalar\"\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === \"block-map\" && !valueProps.hasNewline)\n onError(offset, \"BLOCK_AS_IMPLICIT_KEY\", \"Nested mappings are not allowed in compact mappings\");\n if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, \"KEY_OVER_1024_CHARS\", \"The : indicator must be at most 1024 chars after the start of an implicit block mapping key\");\n }\n const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n } else {\n if (implicitKey)\n onError(keyNode.range, \"MISSING_CHAR\", \"Implicit map keys need to be followed by map values\");\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += \"\\n\" + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, \"IMPOSSIBLE\", \"Map comment with trailing content\");\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n }\n exports2.resolveBlockMap = resolveBlockMap;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-block-seq.js\nvar require_resolve_block_seq = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-block-seq.js\"(exports2) {\n \"use strict\";\n var YAMLSeq = require_YAMLSeq();\n var resolveProps = require_resolve_props();\n var utilFlowIndentCheck = require_util_flow_indent_check();\n function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps.resolveProps(start, {\n indicator: \"seq-item-ind\",\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value?.type === \"block-seq\")\n onError(props.end, \"BAD_INDENT\", \"All sequence items must start at the same column\");\n else\n onError(offset, \"MISSING_CHAR\", \"Sequence item without - indicator\");\n } else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n }\n exports2.resolveBlockSeq = resolveBlockSeq;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-end.js\nvar require_resolve_end = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-end.js\"(exports2) {\n \"use strict\";\n function resolveEnd(end, offset, reqSpace, onError) {\n let comment = \"\";\n if (end) {\n let hasSpace = false;\n let sep = \"\";\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case \"space\":\n hasSpace = true;\n break;\n case \"comment\": {\n if (reqSpace && !hasSpace)\n onError(token, \"MISSING_CHAR\", \"Comments must be separated from other tokens by white space characters\");\n const cb = source.substring(1) || \" \";\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = \"\";\n break;\n }\n case \"newline\":\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, \"UNEXPECTED_TOKEN\", `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n }\n exports2.resolveEnd = resolveEnd;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-flow-collection.js\nvar require_resolve_flow_collection = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-flow-collection.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Pair = require_Pair();\n var YAMLMap = require_YAMLMap();\n var YAMLSeq = require_YAMLSeq();\n var resolveEnd = require_resolve_end();\n var resolveProps = require_resolve_props();\n var utilContainsNewline = require_util_contains_newline();\n var utilMapIncludes = require_util_map_includes();\n var blockMsg = \"Block collections are not allowed within flow collections\";\n var isBlock = (token) => token && (token.type === \"block-map\" || token.type === \"block-seq\");\n function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === \"{\";\n const fcName = isMap ? \"flow map\" : \"flow sequence\";\n const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq);\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps.resolveProps(start, {\n flow: fcName,\n indicator: \"explicit-key-ind\",\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, \"UNEXPECTED_TOKEN\", `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, \"UNEXPECTED_TOKEN\", `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += \"\\n\" + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n onError(\n key,\n // checked by containsNewline()\n \"MULTILINE_IMPLICIT_KEY\",\n \"Implicit keys of flow sequence pairs need to be on a single line\"\n );\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, \"UNEXPECTED_TOKEN\", `Unexpected , in ${fcName}`);\n } else {\n if (!props.comma)\n onError(props.start, \"MISSING_CHAR\", `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = \"\";\n loop: for (const st of start) {\n switch (st.type) {\n case \"comma\":\n case \"space\":\n break;\n case \"comment\":\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (identity.isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += \"\\n\" + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, \"BLOCK_IN_FLOW\", blockMsg);\n } else {\n ctx.atKey = true;\n const keyStart = props.end;\n const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, \"BLOCK_IN_FLOW\", blockMsg);\n ctx.atKey = false;\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n flow: fcName,\n indicator: \"map-value-ind\",\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === \"newline\") {\n onError(st, \"MULTILINE_IMPLICIT_KEY\", \"Implicit keys of flow sequence pairs need to be on a single line\");\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, \"KEY_OVER_1024_CHARS\", \"The : indicator must be at most 1024 chars after the start of an implicit flow sequence key\");\n }\n } else if (value) {\n if (\"source\" in value && value.source?.[0] === \":\")\n onError(value, \"MISSING_CHAR\", `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, \"MISSING_CHAR\", `Missing , or : between ${fcName} items`);\n }\n const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, \"BLOCK_IN_FLOW\", blockMsg);\n } else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += \"\\n\" + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, \"DUPLICATE_KEY\", \"Map keys must be unique\");\n map.items.push(pair);\n } else {\n const map = new YAMLMap.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? \"}\" : \"]\";\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce?.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot ? `${name} must end with a ${expectedEnd}` : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? \"MISSING_CHAR\" : \"BAD_INDENT\", msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += \"\\n\" + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n } else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n }\n exports2.resolveFlowCollection = resolveFlowCollection;\n }\n});\n\n// node_modules/yaml/dist/compose/compose-collection.js\nvar require_compose_collection = __commonJS({\n \"node_modules/yaml/dist/compose/compose-collection.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Scalar = require_Scalar();\n var YAMLMap = require_YAMLMap();\n var YAMLSeq = require_YAMLSeq();\n var resolveBlockMap = require_resolve_block_map();\n var resolveBlockSeq = require_resolve_block_seq();\n var resolveFlowCollection = require_resolve_flow_collection();\n function resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === \"block-map\" ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag) : token.type === \"block-seq\" ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag) : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n if (tagName === \"!\" || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n }\n function composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, \"TAG_RESOLVE_FAILED\", msg));\n if (token.type === \"block-seq\") {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = \"Missing newline after block sequence props\";\n onError(lastProp, \"MISSING_CHAR\", message);\n }\n }\n const expType = token.type === \"block-map\" ? \"map\" : token.type === \"block-seq\" ? \"seq\" : token.start.source === \"{\" ? \"map\" : \"seq\";\n if (!tagToken || !tagName || tagName === \"!\" || tagName === YAMLMap.YAMLMap.tagName && expType === \"map\" || tagName === YAMLSeq.YAMLSeq.tagName && expType === \"seq\") {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt?.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n } else {\n if (kt) {\n onError(tagToken, \"BAD_COLLECTION_TYPE\", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? \"scalar\"}`, true);\n } else {\n onError(tagToken, \"TAG_RESOLVE_FAILED\", `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, (msg) => onError(tagToken, \"TAG_RESOLVE_FAILED\", msg), ctx.options) ?? coll;\n const node = identity.isNode(res) ? res : new Scalar.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n }\n exports2.composeCollection = composeCollection;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-block-scalar.js\nvar require_resolve_block_scalar = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-block-scalar.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n function resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: \"\", type: null, comment: \"\", range: [start, start, start] };\n const type = header.mode === \">\" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === \"\" || content === \"\\r\")\n chompStart = i;\n else\n break;\n }\n if (chompStart === 0) {\n const value2 = header.chomp === \"+\" && lines.length > 0 ? \"\\n\".repeat(Math.max(1, lines.length - 1)) : \"\";\n let end2 = start + header.length;\n if (scalar.source)\n end2 += scalar.source.length;\n return { value: value2, type, comment: header.comment, range: [start, end2, end2] };\n }\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === \"\" || content === \"\\r\") {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n } else {\n if (indent.length < trimIndent) {\n const message = \"Block scalars with more-indented leading empty lines must use an explicit indentation indicator\";\n onError(offset + indent.length, \"MISSING_CHAR\", message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = \"Block scalar values in collections must be indented\";\n onError(offset, \"BAD_INDENT\", message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = \"\";\n let sep = \"\";\n let prevMoreIndented = false;\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + \"\\n\";\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === \"\\r\";\n if (crlf)\n content = content.slice(0, -1);\n if (content && indent.length < trimIndent) {\n const src = header.indent ? \"explicit indentation indicator\" : \"first line\";\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), \"BAD_INDENT\", message);\n indent = \"\";\n }\n if (type === Scalar.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = \"\\n\";\n } else if (indent.length > trimIndent || content[0] === \"\t\") {\n if (sep === \" \")\n sep = \"\\n\";\n else if (!prevMoreIndented && sep === \"\\n\")\n sep = \"\\n\\n\";\n value += sep + indent.slice(trimIndent) + content;\n sep = \"\\n\";\n prevMoreIndented = true;\n } else if (content === \"\") {\n if (sep === \"\\n\")\n value += \"\\n\";\n else\n sep = \"\\n\";\n } else {\n value += sep + content;\n sep = \" \";\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case \"-\":\n break;\n case \"+\":\n for (let i = chompStart; i < lines.length; ++i)\n value += \"\\n\" + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== \"\\n\")\n value += \"\\n\";\n break;\n default:\n value += \"\\n\";\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n function parseBlockScalarHeader({ offset, props }, strict, onError) {\n if (props[0].type !== \"block-scalar-header\") {\n onError(props[0], \"IMPOSSIBLE\", \"Block scalar header not found\");\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = \"\";\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === \"-\" || ch === \"+\"))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, \"UNEXPECTED_TOKEN\", `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = \"\";\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case \"space\":\n hasSpace = true;\n case \"newline\":\n length += token.source.length;\n break;\n case \"comment\":\n if (strict && !hasSpace) {\n const message = \"Comments must be separated from other tokens by white space characters\";\n onError(token, \"MISSING_CHAR\", message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case \"error\":\n onError(token, \"UNEXPECTED_TOKEN\", token.message);\n length += token.source.length;\n break;\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, \"UNEXPECTED_TOKEN\", message);\n const ts = token.source;\n if (ts && typeof ts === \"string\")\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n }\n function splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : [\"\", first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n }\n exports2.resolveBlockScalar = resolveBlockScalar;\n }\n});\n\n// node_modules/yaml/dist/compose/resolve-flow-scalar.js\nvar require_resolve_flow_scalar = __commonJS({\n \"node_modules/yaml/dist/compose/resolve-flow-scalar.js\"(exports2) {\n \"use strict\";\n var Scalar = require_Scalar();\n var resolveEnd = require_resolve_end();\n function resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case \"scalar\":\n _type = Scalar.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case \"single-quoted-scalar\":\n _type = Scalar.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case \"double-quoted-scalar\":\n _type = Scalar.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n default:\n onError(scalar, \"UNEXPECTED_TOKEN\", `Expected a flow scalar value, but found: ${type}`);\n return {\n value: \"\",\n type: null,\n comment: \"\",\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n }\n function plainValue(source, onError) {\n let badChar = \"\";\n switch (source[0]) {\n case \"\t\":\n badChar = \"a tab character\";\n break;\n case \",\":\n badChar = \"flow indicator character ,\";\n break;\n case \"%\":\n badChar = \"directive indicator character %\";\n break;\n case \"|\":\n case \">\": {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case \"@\":\n case \"`\": {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, \"BAD_SCALAR_START\", `Plain value cannot start with ${badChar}`);\n return unfoldLines(source);\n }\n function singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, \"MISSING_CHAR\", \"Missing closing 'quote\");\n return unfoldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n }\n function unfoldLines(source) {\n const line = /(.*?)\\r?\\n/sy;\n let match = line.exec(source);\n if (!match)\n return source;\n let trimEnd, trimBoth;\n try {\n trimEnd = new RegExp(\"(? wsStart ? source.slice(wsStart, i + 1) : ch;\n } else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, \"MISSING_CHAR\", 'Missing closing \"quote');\n return res;\n }\n function foldNewline(source, offset) {\n let fold = \"\";\n let ch = source[offset + 1];\n while (ch === \" \" || ch === \"\t\" || ch === \"\\n\" || ch === \"\\r\") {\n if (ch === \"\\r\" && source[offset + 2] !== \"\\n\")\n break;\n if (ch === \"\\n\")\n fold += \"\\n\";\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = \" \";\n return { fold, offset };\n }\n var escapeCodes = {\n \"0\": \"\\0\",\n // null character\n a: \"\\x07\",\n // bell character\n b: \"\\b\",\n // backspace\n e: \"\\x1B\",\n // escape character\n f: \"\\f\",\n // form feed\n n: \"\\n\",\n // line feed\n r: \"\\r\",\n // carriage return\n t: \"\t\",\n // horizontal tab\n v: \"\\v\",\n // vertical tab\n N: \"\\x85\",\n // Unicode next line\n _: \"\\xA0\",\n // Unicode non-breaking space\n L: \"\\u2028\",\n // Unicode line separator\n P: \"\\u2029\",\n // Unicode paragraph separator\n \" \": \" \",\n '\"': '\"',\n \"/\": \"/\",\n \"\\\\\": \"\\\\\",\n \"\t\": \"\t\"\n };\n function parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n try {\n return String.fromCodePoint(code);\n } catch {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, \"BAD_DQ_ESCAPE\", `Invalid escape sequence ${raw}`);\n return raw;\n }\n }\n exports2.resolveFlowScalar = resolveFlowScalar;\n }\n});\n\n// node_modules/yaml/dist/compose/compose-scalar.js\nvar require_compose_scalar = __commonJS({\n \"node_modules/yaml/dist/compose/compose-scalar.js\"(exports2) {\n \"use strict\";\n var identity = require_identity();\n var Scalar = require_Scalar();\n var resolveBlockScalar = require_resolve_block_scalar();\n var resolveFlowScalar = require_resolve_flow_scalar();\n function composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === \"block-scalar\" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, \"TAG_RESOLVE_FAILED\", msg)) : null;\n let tag;\n if (ctx.options.stringKeys && ctx.atKey) {\n tag = ctx.schema[identity.SCALAR];\n } else if (tagName)\n tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n else if (token.type === \"scalar\")\n tag = findScalarTagByTest(ctx, value, token, onError);\n else\n tag = ctx.schema[identity.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, (msg) => onError(tagToken ?? token, \"TAG_RESOLVE_FAILED\", msg), ctx.options);\n scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, \"TAG_RESOLVE_FAILED\", msg);\n scalar = new Scalar.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n }\n function findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === \"!\")\n return schema[identity.SCALAR];\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 }));\n return kt;\n }\n onError(tagToken, \"TAG_RESOLVE_FAILED\", `Unresolved tag: ${tagName}`, tagName !== \"tag:yaml.org,2002:str\");\n return schema[identity.SCALAR];\n }\n function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === \"key\") && tag2.test?.test(value)) || schema[identity.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, \"TAG_RESOLVE_FAILED\", msg, true);\n }\n }\n return tag;\n }\n exports2.composeScalar = composeScalar;\n }\n});\n\n// node_modules/yaml/dist/compose/util-empty-scalar-position.js\nvar require_util_empty_scalar_position = __commonJS({\n \"node_modules/yaml/dist/compose/util-empty-scalar-position.js\"(exports2) {\n \"use strict\";\n function emptyScalarPosition(offset, before, pos) {\n if (before) {\n pos ?? (pos = before.length);\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case \"space\":\n case \"comment\":\n case \"newline\":\n offset -= st.source.length;\n continue;\n }\n st = before[++i];\n while (st?.type === \"space\") {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n }\n exports2.emptyScalarPosition = emptyScalarPosition;\n }\n});\n\n// node_modules/yaml/dist/compose/compose-node.js\nvar require_compose_node = __commonJS({\n \"node_modules/yaml/dist/compose/compose-node.js\"(exports2) {\n \"use strict\";\n var Alias = require_Alias();\n var identity = require_identity();\n var composeCollection = require_compose_collection();\n var composeScalar = require_compose_scalar();\n var resolveEnd = require_resolve_end();\n var utilEmptyScalarPosition = require_util_empty_scalar_position();\n var CN = { composeNode, composeEmptyNode };\n function composeNode(ctx, token, props, onError) {\n const atKey = ctx.atKey;\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case \"alias\":\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, \"ALIAS_PROPS\", \"An alias node must not specify any properties\");\n break;\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\":\n case \"block-scalar\":\n node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case \"block-map\":\n case \"block-seq\":\n case \"flow-collection\":\n try {\n node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n onError(token, \"RESOURCE_EXHAUSTION\", message);\n }\n break;\n default: {\n const message = token.type === \"error\" ? token.message : `Unsupported token (type: ${token.type})`;\n onError(token, \"UNEXPECTED_TOKEN\", message);\n isSrcToken = false;\n }\n }\n node ?? (node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError));\n if (anchor && node.anchor === \"\")\n onError(anchor, \"BAD_ALIAS\", \"Anchor cannot be an empty string\");\n if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== \"string\" || node.tag && node.tag !== \"tag:yaml.org,2002:str\")) {\n const msg = \"With stringKeys, all keys must be strings\";\n onError(tag ?? token, \"NON_STRING_KEY\", msg);\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === \"scalar\" && token.source === \"\")\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n }\n function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: \"scalar\",\n offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: \"\"\n };\n const node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === \"\")\n onError(anchor, \"BAD_ALIAS\", \"Anchor cannot be an empty string\");\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n }\n function composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias.Alias(source.substring(1));\n if (alias.source === \"\")\n onError(offset, \"BAD_ALIAS\", \"Alias cannot be an empty string\");\n if (alias.source.endsWith(\":\"))\n onError(offset + source.length - 1, \"BAD_ALIAS\", \"Alias ending in : is ambiguous\", true);\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n }\n exports2.composeEmptyNode = composeEmptyNode;\n exports2.composeNode = composeNode;\n }\n});\n\n// node_modules/yaml/dist/compose/compose-doc.js\nvar require_compose_doc = __commonJS({\n \"node_modules/yaml/dist/compose/compose-doc.js\"(exports2) {\n \"use strict\";\n var Document = require_Document();\n var composeNode = require_compose_node();\n var resolveEnd = require_resolve_end();\n var resolveProps = require_resolve_props();\n function composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document.Document(void 0, opts);\n const ctx = {\n atKey: false,\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps.resolveProps(start, {\n indicator: \"doc-start\",\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value && (value.type === \"block-map\" || value.type === \"block-seq\") && !props.hasNewline)\n onError(props.end, \"MISSING_CHAR\", \"Block collection cannot start on same line with directives-end marker\");\n }\n doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n }\n exports2.composeDoc = composeDoc;\n }\n});\n\n// node_modules/yaml/dist/compose/composer.js\nvar require_composer = __commonJS({\n \"node_modules/yaml/dist/compose/composer.js\"(exports2) {\n \"use strict\";\n var node_process = require(\"process\");\n var directives = require_directives();\n var Document = require_Document();\n var errors = require_errors();\n var identity = require_identity();\n var composeDoc = require_compose_doc();\n var resolveEnd = require_resolve_end();\n function getErrorPos(src) {\n if (typeof src === \"number\")\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === \"string\" ? source.length : 1)];\n }\n function parsePrelude(prelude) {\n let comment = \"\";\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case \"#\":\n comment += (comment === \"\" ? \"\" : afterEmptyLine ? \"\\n\\n\" : \"\\n\") + (source.substring(1) || \" \");\n atComment = true;\n afterEmptyLine = false;\n break;\n case \"%\":\n if (prelude[i + 1]?.[0] !== \"#\")\n i += 1;\n atComment = false;\n break;\n default:\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n }\n var Composer = class {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new errors.YAMLWarning(pos, code, message));\n else\n this.errors.push(new errors.YAMLParseError(pos, code, message));\n };\n this.directives = new directives.Directives({ version: options.version || \"1.2\" });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;\n } else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (identity.isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\n${cb}` : comment;\n } else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n for (let i = 0; i < this.errors.length; ++i)\n doc.errors.push(this.errors[i]);\n for (let i = 0; i < this.warnings.length; ++i)\n doc.warnings.push(this.warnings[i]);\n } else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @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.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n if (node_process.env.LOG_STREAM)\n console.dir(token, { depth: null });\n switch (token.type) {\n case \"directive\":\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, \"BAD_DIRECTIVE\", message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case \"document\": {\n const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, \"MISSING_CHAR\", \"Missing directives-end/doc-start indicator line\");\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case \"byte-order-mark\":\n case \"space\":\n break;\n case \"comment\":\n case \"newline\":\n this.prelude.push(token.source);\n break;\n case \"error\": {\n const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;\n const error = new errors.YAMLParseError(getErrorPos(token), \"UNEXPECTED_TOKEN\", msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case \"doc-end\": {\n if (!this.doc) {\n const msg = \"Unexpected doc-end without preceding document\";\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), \"UNEXPECTED_TOKEN\", msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), \"UNEXPECTED_TOKEN\", `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @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.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n } else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document.Document(void 0, opts);\n if (this.atDirectives)\n this.onError(endOffset, \"MISSING_CHAR\", \"Missing directives-end indicator line\");\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n };\n exports2.Composer = Composer;\n }\n});\n\n// node_modules/yaml/dist/parse/cst-scalar.js\nvar require_cst_scalar = __commonJS({\n \"node_modules/yaml/dist/parse/cst-scalar.js\"(exports2) {\n \"use strict\";\n var resolveBlockScalar = require_resolve_block_scalar();\n var resolveFlowScalar = require_resolve_flow_scalar();\n var errors = require_errors();\n var stringifyString = require_stringifyString();\n function resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === \"number\" ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new errors.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\":\n return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n case \"block-scalar\":\n return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n }\n function createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = \"PLAIN\" } = context;\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? \" \".repeat(indent) : \"\",\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: \"newline\", offset: -1, indent, source: \"\\n\" }\n ];\n switch (source[0]) {\n case \"|\":\n case \">\": {\n const he = source.indexOf(\"\\n\");\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + \"\\n\";\n const props = [\n { type: \"block-scalar-header\", offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: \"newline\", offset: -1, indent, source: \"\\n\" });\n return { type: \"block-scalar\", offset, indent, props, source: body };\n }\n case '\"':\n return { type: \"double-quoted-scalar\", offset, indent, source, end };\n case \"'\":\n return { type: \"single-quoted-scalar\", offset, indent, source, end };\n default:\n return { type: \"scalar\", offset, indent, source, end };\n }\n }\n function setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = \"indent\" in token ? token.indent : null;\n if (afterKey && typeof indent === \"number\")\n indent += 2;\n if (!type)\n switch (token.type) {\n case \"single-quoted-scalar\":\n type = \"QUOTE_SINGLE\";\n break;\n case \"double-quoted-scalar\":\n type = \"QUOTE_DOUBLE\";\n break;\n case \"block-scalar\": {\n const header = token.props[0];\n if (header.type !== \"block-scalar-header\")\n throw new Error(\"Invalid block scalar header\");\n type = header.source[0] === \">\" ? \"BLOCK_FOLDED\" : \"BLOCK_LITERAL\";\n break;\n }\n default:\n type = \"PLAIN\";\n }\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? \" \".repeat(indent) : \"\",\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case \"|\":\n case \">\":\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, \"double-quoted-scalar\");\n break;\n case \"'\":\n setFlowScalarValue(token, source, \"single-quoted-scalar\");\n break;\n default:\n setFlowScalarValue(token, source, \"scalar\");\n }\n }\n function setBlockScalarValue(token, source) {\n const he = source.indexOf(\"\\n\");\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + \"\\n\";\n if (token.type === \"block-scalar\") {\n const header = token.props[0];\n if (header.type !== \"block-scalar-header\")\n throw new Error(\"Invalid block scalar header\");\n header.source = head;\n token.source = body;\n } else {\n const { offset } = token;\n const indent = \"indent\" in token ? token.indent : -1;\n const props = [\n { type: \"block-scalar-header\", offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, \"end\" in token ? token.end : void 0))\n props.push({ type: \"newline\", offset: -1, indent, source: \"\\n\" });\n for (const key of Object.keys(token))\n if (key !== \"type\" && key !== \"offset\")\n delete token[key];\n Object.assign(token, { type: \"block-scalar\", indent, props, source: body });\n }\n }\n function addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case \"space\":\n case \"comment\":\n props.push(st);\n break;\n case \"newline\":\n props.push(st);\n return true;\n }\n return false;\n }\n function setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case \"scalar\":\n case \"double-quoted-scalar\":\n case \"single-quoted-scalar\":\n token.type = type;\n token.source = source;\n break;\n case \"block-scalar\": {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === \"block-scalar-header\")\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case \"block-map\":\n case \"block-seq\": {\n const offset = token.offset + source.length;\n const nl = { type: \"newline\", offset, indent: token.indent, source: \"\\n\" };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = \"indent\" in token ? token.indent : -1;\n const end = \"end\" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === \"space\" || st.type === \"comment\" || st.type === \"newline\") : [];\n for (const key of Object.keys(token))\n if (key !== \"type\" && key !== \"offset\")\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n }\n exports2.createScalarToken = createScalarToken;\n exports2.resolveAsScalar = resolveAsScalar;\n exports2.setScalarValue = setScalarValue;\n }\n});\n\n// node_modules/yaml/dist/parse/cst-stringify.js\nvar require_cst_stringify = __commonJS({\n \"node_modules/yaml/dist/parse/cst-stringify.js\"(exports2) {\n \"use strict\";\n var stringify = (cst) => \"type\" in cst ? stringifyToken(cst) : stringifyItem(cst);\n function stringifyToken(token) {\n switch (token.type) {\n case \"block-scalar\": {\n let res = \"\";\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case \"block-map\":\n case \"block-seq\": {\n let res = \"\";\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case \"flow-collection\": {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case \"document\": {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if (\"end\" in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n }\n function stringifyItem({ start, key, sep, value }) {\n let res = \"\";\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n }\n exports2.stringify = stringify;\n }\n});\n\n// node_modules/yaml/dist/parse/cst-visit.js\nvar require_cst_visit = __commonJS({\n \"node_modules/yaml/dist/parse/cst-visit.js\"(exports2) {\n \"use strict\";\n var BREAK = Symbol(\"break visit\");\n var SKIP = Symbol(\"skip children\");\n var REMOVE = Symbol(\"remove item\");\n function visit(cst, visitor) {\n if (\"type\" in cst && cst.type === \"document\")\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n }\n visit.BREAK = BREAK;\n visit.SKIP = SKIP;\n visit.REMOVE = REMOVE;\n visit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && \"items\" in tok) {\n item = tok.items[index];\n } else\n return void 0;\n }\n return item;\n };\n visit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && \"items\" in coll)\n return coll;\n throw new Error(\"Parent collection not found\");\n };\n function _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === \"symbol\")\n return ctrl;\n for (const field of [\"key\", \"value\"]) {\n const token = item[field];\n if (token && \"items\" in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === \"number\")\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === \"function\" && field === \"key\")\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === \"function\" ? ctrl(item, path) : ctrl;\n }\n exports2.visit = visit;\n }\n});\n\n// node_modules/yaml/dist/parse/cst.js\nvar require_cst = __commonJS({\n \"node_modules/yaml/dist/parse/cst.js\"(exports2) {\n \"use strict\";\n var cstScalar = require_cst_scalar();\n var cstStringify = require_cst_stringify();\n var cstVisit = require_cst_visit();\n var BOM = \"\\uFEFF\";\n var DOCUMENT = \"\u0002\";\n var FLOW_END = \"\u0018\";\n var SCALAR = \"\u001f\";\n var isCollection = (token) => !!token && \"items\" in token;\n var isScalar = (token) => !!token && (token.type === \"scalar\" || token.type === \"single-quoted-scalar\" || token.type === \"double-quoted-scalar\" || token.type === \"block-scalar\");\n function prettyToken(token) {\n switch (token) {\n case BOM:\n return \"\";\n case DOCUMENT:\n return \"\";\n case FLOW_END:\n return \"\";\n case SCALAR:\n return \"\";\n default:\n return JSON.stringify(token);\n }\n }\n function tokenType(source) {\n switch (source) {\n case BOM:\n return \"byte-order-mark\";\n case DOCUMENT:\n return \"doc-mode\";\n case FLOW_END:\n return \"flow-error-end\";\n case SCALAR:\n return \"scalar\";\n case \"---\":\n return \"doc-start\";\n case \"...\":\n return \"doc-end\";\n case \"\":\n case \"\\n\":\n case \"\\r\\n\":\n return \"newline\";\n case \"-\":\n return \"seq-item-ind\";\n case \"?\":\n return \"explicit-key-ind\";\n case \":\":\n return \"map-value-ind\";\n case \"{\":\n return \"flow-map-start\";\n case \"}\":\n return \"flow-map-end\";\n case \"[\":\n return \"flow-seq-start\";\n case \"]\":\n return \"flow-seq-end\";\n case \",\":\n return \"comma\";\n }\n switch (source[0]) {\n case \" \":\n case \"\t\":\n return \"space\";\n case \"#\":\n return \"comment\";\n case \"%\":\n return \"directive-line\";\n case \"*\":\n return \"alias\";\n case \"&\":\n return \"anchor\";\n case \"!\":\n return \"tag\";\n case \"'\":\n return \"single-quoted-scalar\";\n case '\"':\n return \"double-quoted-scalar\";\n case \"|\":\n case \">\":\n return \"block-scalar-header\";\n }\n return null;\n }\n exports2.createScalarToken = cstScalar.createScalarToken;\n exports2.resolveAsScalar = cstScalar.resolveAsScalar;\n exports2.setScalarValue = cstScalar.setScalarValue;\n exports2.stringify = cstStringify.stringify;\n exports2.visit = cstVisit.visit;\n exports2.BOM = BOM;\n exports2.DOCUMENT = DOCUMENT;\n exports2.FLOW_END = FLOW_END;\n exports2.SCALAR = SCALAR;\n exports2.isCollection = isCollection;\n exports2.isScalar = isScalar;\n exports2.prettyToken = prettyToken;\n exports2.tokenType = tokenType;\n }\n});\n\n// node_modules/yaml/dist/parse/lexer.js\nvar require_lexer = __commonJS({\n \"node_modules/yaml/dist/parse/lexer.js\"(exports2) {\n \"use strict\";\n var cst = require_cst();\n function isEmpty(ch) {\n switch (ch) {\n case void 0:\n case \" \":\n case \"\\n\":\n case \"\\r\":\n case \"\t\":\n return true;\n default:\n return false;\n }\n }\n var hexDigits = new Set(\"0123456789ABCDEFabcdef\");\n var tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\n var flowIndicatorChars = new Set(\",[]{}\");\n var invalidAnchorChars = new Set(\" ,[]{}\\n\\r\t\");\n var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n var Lexer = class {\n constructor() {\n this.atEnd = false;\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n this.buffer = \"\";\n this.flowKey = false;\n this.flowLevel = 0;\n this.indentNext = 0;\n this.indentValue = 0;\n this.lineEndPos = null;\n this.next = null;\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== \"string\")\n throw TypeError(\"source is not a string\");\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? \"stream\";\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === \" \" || ch === \"\t\")\n ch = this.buffer[++i];\n if (!ch || ch === \"#\" || ch === \"\\n\")\n return true;\n if (ch === \"\\r\")\n return this.buffer[i + 1] === \"\\n\";\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === \" \")\n ch = this.buffer[++indent + offset];\n if (ch === \"\\r\") {\n const next = this.buffer[indent + offset + 1];\n if (next === \"\\n\" || !next && !this.atEnd)\n return offset + indent + 1;\n }\n return ch === \"\\n\" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1;\n }\n if (ch === \"-\" || ch === \".\") {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === \"---\" || dt === \"...\") && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== \"number\" || end !== -1 && end < this.pos) {\n end = this.buffer.indexOf(\"\\n\", this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === \"\\r\")\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case \"stream\":\n return yield* this.parseStream();\n case \"line-start\":\n return yield* this.parseLineStart();\n case \"block-start\":\n return yield* this.parseBlockStart();\n case \"doc\":\n return yield* this.parseDocument();\n case \"flow\":\n return yield* this.parseFlowCollection();\n case \"quoted-scalar\":\n return yield* this.parseQuotedScalar();\n case \"block-scalar\":\n return yield* this.parseBlockScalar();\n case \"plain-scalar\":\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext(\"stream\");\n if (line[0] === cst.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === \"%\") {\n let dirEnd = line.length;\n let cs = line.indexOf(\"#\");\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === \" \" || ch === \"\t\") {\n dirEnd = cs - 1;\n break;\n } else {\n cs = line.indexOf(\"#\", cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === \" \" || ch === \"\t\")\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n);\n this.pushNewline();\n return \"stream\";\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return \"stream\";\n }\n yield cst.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext(\"line-start\");\n if (ch === \"-\" || ch === \".\") {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext(\"line-start\");\n const s = this.peek(3);\n if ((s === \"---\" || s === \"...\") && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === \"---\" ? \"doc\" : \"stream\";\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext(\"block-start\");\n if ((ch0 === \"-\" || ch0 === \"?\" || ch0 === \":\") && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return \"block-start\";\n }\n return \"doc\";\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext(\"doc\");\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case \"#\":\n yield* this.pushCount(line.length - n);\n case void 0:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case \"{\":\n case \"[\":\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return \"flow\";\n case \"}\":\n case \"]\":\n yield* this.pushCount(1);\n return \"doc\";\n case \"*\":\n yield* this.pushUntil(isNotAnchorChar);\n return \"doc\";\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case \"|\":\n case \">\":\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n } else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext(\"flow\");\n if (indent !== -1 && indent < this.indentNext && line[0] !== \"#\" || indent === 0 && (line.startsWith(\"---\") || line.startsWith(\"...\")) && isEmpty(line[3])) {\n const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === \"]\" || line[0] === \"}\");\n if (!atFlowEndMarker) {\n this.flowLevel = 0;\n yield cst.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === \",\") {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case void 0:\n return \"flow\";\n case \"#\":\n yield* this.pushCount(line.length - n);\n return \"flow\";\n case \"{\":\n case \"[\":\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return \"flow\";\n case \"}\":\n case \"]\":\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? \"flow\" : \"doc\";\n case \"*\":\n yield* this.pushUntil(isNotAnchorChar);\n return \"flow\";\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case \":\": {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === \",\") {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return \"flow\";\n }\n }\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n } else {\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === \"\\\\\")\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf(\"\\n\", this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf(\"\\n\", cs);\n }\n if (nl !== -1) {\n end = nl - (qb[nl - 1] === \"\\r\" ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext(\"quoted-scalar\");\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? \"flow\" : \"doc\";\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === \"+\")\n this.blockScalarKeep = true;\n else if (ch > \"0\" && ch <= \"9\")\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== \"-\")\n break;\n }\n return yield* this.pushUntil((ch) => isEmpty(ch) || ch === \"#\");\n }\n *parseBlockScalar() {\n let nl = this.pos - 1;\n let indent = 0;\n let ch;\n loop: for (let i2 = this.pos; ch = this.buffer[i2]; ++i2) {\n switch (ch) {\n case \" \":\n indent += 1;\n break;\n case \"\\n\":\n nl = i2;\n indent = 0;\n break;\n case \"\\r\": {\n const next = this.buffer[i2 + 1];\n if (!next && !this.atEnd)\n return this.setNext(\"block-scalar\");\n if (next === \"\\n\")\n break;\n }\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext(\"block-scalar\");\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf(\"\\n\", cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext(\"block-scalar\");\n nl = this.buffer.length;\n }\n }\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === \" \")\n ch = this.buffer[++i];\n if (ch === \"\t\") {\n while (ch === \"\t\" || ch === \" \" || ch === \"\\r\" || ch === \"\\n\")\n ch = this.buffer[++i];\n nl = i - 1;\n } else if (!this.blockScalarKeep) {\n do {\n let i2 = nl - 1;\n let ch2 = this.buffer[i2];\n if (ch2 === \"\\r\")\n ch2 = this.buffer[--i2];\n const lastChar = i2;\n while (ch2 === \" \")\n ch2 = this.buffer[--i2];\n if (ch2 === \"\\n\" && i2 >= this.pos && i2 + 1 + indent > lastChar)\n nl = i2;\n else\n break;\n } while (true);\n }\n yield cst.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while (ch = this.buffer[++i]) {\n if (ch === \":\") {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || inFlow && flowIndicatorChars.has(next))\n break;\n end = i;\n } else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === \"\\r\") {\n if (next === \"\\n\") {\n i += 1;\n ch = \"\\n\";\n next = this.buffer[i + 1];\n } else\n end = i;\n }\n if (next === \"#\" || inFlow && flowIndicatorChars.has(next))\n break;\n if (ch === \"\\n\") {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2);\n }\n } else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext(\"plain-scalar\");\n yield cst.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? \"flow\" : \"doc\";\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n } else if (allowEmpty)\n yield \"\";\n return 0;\n }\n *pushIndicators() {\n let n = 0;\n loop: while (true) {\n switch (this.charAt(0)) {\n case \"!\":\n n += yield* this.pushTag();\n n += yield* this.pushSpaces(true);\n continue loop;\n case \"&\":\n n += yield* this.pushUntil(isNotAnchorChar);\n n += yield* this.pushSpaces(true);\n continue loop;\n case \"-\":\n case \"?\":\n case \":\": {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n continue loop;\n }\n }\n }\n break loop;\n }\n return n;\n }\n *pushTag() {\n if (this.charAt(1) === \"<\") {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== \">\")\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === \">\" ? i + 1 : i, false);\n } else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === \"%\" && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[i += 3];\n } else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === \"\\n\")\n return yield* this.pushCount(1);\n else if (ch === \"\\r\" && this.charAt(1) === \"\\n\")\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === \" \" || allowTabs && ch === \"\t\");\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n };\n exports2.Lexer = Lexer;\n }\n});\n\n// node_modules/yaml/dist/parse/line-counter.js\nvar require_line_counter = __commonJS({\n \"node_modules/yaml/dist/parse/line-counter.js\"(exports2) {\n \"use strict\";\n var LineCounter = class {\n constructor() {\n this.lineStarts = [];\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = low + high >> 1;\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n };\n exports2.LineCounter = LineCounter;\n }\n});\n\n// node_modules/yaml/dist/parse/parser.js\nvar require_parser = __commonJS({\n \"node_modules/yaml/dist/parse/parser.js\"(exports2) {\n \"use strict\";\n var node_process = require(\"process\");\n var cst = require_cst();\n var lexer = require_lexer();\n function includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n }\n function findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case \"space\":\n case \"comment\":\n case \"newline\":\n break;\n default:\n return i;\n }\n }\n return -1;\n }\n function isFlowToken(token) {\n switch (token?.type) {\n case \"alias\":\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\":\n case \"flow-collection\":\n return true;\n default:\n return false;\n }\n }\n function getPrevProps(parent) {\n switch (parent.type) {\n case \"document\":\n return parent.start;\n case \"block-map\": {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case \"block-seq\":\n return parent.items[parent.items.length - 1].start;\n default:\n return [];\n }\n }\n function getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case \"doc-start\":\n case \"explicit-key-ind\":\n case \"map-value-ind\":\n case \"seq-item-ind\":\n case \"newline\":\n break loop;\n }\n }\n while (prev[++i]?.type === \"space\") {\n }\n return prev.splice(i, prev.length);\n }\n function arrayPushArray(target, source) {\n if (source.length < 1e5)\n Array.prototype.push.apply(target, source);\n else\n for (let i = 0; i < source.length; ++i)\n target.push(source[i]);\n }\n function fixFlowSeqItems(fc) {\n if (fc.start.type === \"flow-seq-start\") {\n for (const it of fc.items) {\n if (it.sep && !it.value && !includesToken(it.start, \"explicit-key-ind\") && !includesToken(it.sep, \"map-value-ind\")) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n arrayPushArray(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n } else\n arrayPushArray(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n }\n var Parser = class {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n this.atNewLine = true;\n this.atScalar = false;\n this.indent = 0;\n this.offset = 0;\n this.onKeyLine = false;\n this.stack = [];\n this.source = \"\";\n this.type = \"\";\n this.lexer = new lexer.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (node_process.env.LOG_TOKENS)\n console.log(\"|\", cst.prettyToken(source));\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = cst.tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: \"error\", offset: this.offset, message, source });\n this.offset += source.length;\n } else if (type === \"scalar\") {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = \"scalar\";\n } else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case \"newline\":\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case \"space\":\n if (this.atNewLine && source[0] === \" \")\n this.indent += source.length;\n break;\n case \"explicit-key-ind\":\n case \"map-value-ind\":\n case \"seq-item-ind\":\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case \"doc-mode\":\n case \"flow-error-end\":\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === \"doc-end\" && top?.type !== \"doc-end\") {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: \"doc-end\",\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case \"document\":\n return yield* this.document(top);\n case \"alias\":\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\":\n return yield* this.scalar(top);\n case \"block-scalar\":\n return yield* this.blockScalar(top);\n case \"block-map\":\n return yield* this.blockMap(top);\n case \"block-seq\":\n return yield* this.blockSequence(top);\n case \"flow-collection\":\n return yield* this.flowCollection(top);\n case \"doc-end\":\n return yield* this.documentEnd(top);\n }\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n if (!token) {\n const message = \"Tried to pop an empty stack\";\n yield { type: \"error\", offset: this.offset, source: \"\", message };\n } else if (this.stack.length === 0) {\n yield token;\n } else {\n const top = this.peek(1);\n if (token.type === \"block-scalar\") {\n token.indent = \"indent\" in top ? top.indent : 0;\n } else if (token.type === \"flow-collection\" && top.type === \"document\") {\n token.indent = 0;\n }\n if (token.type === \"flow-collection\")\n fixFlowSeqItems(token);\n switch (top.type) {\n case \"document\":\n top.value = token;\n break;\n case \"block-scalar\":\n top.props.push(token);\n break;\n case \"block-map\": {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n } else if (it.sep) {\n it.value = token;\n } else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case \"block-seq\": {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case \"flow-collection\": {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === \"document\" || top.type === \"block-map\" || top.type === \"block-seq\") && (token.type === \"block-map\" || token.type === \"block-seq\")) {\n const last = token.items[token.items.length - 1];\n if (last && !last.sep && !last.value && last.start.length > 0 && findNonEmptyIndex(last.start) === -1 && (token.indent === 0 || last.start.every((st) => st.type !== \"comment\" || st.indent < token.indent))) {\n if (top.type === \"document\")\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case \"directive-line\":\n yield { type: \"directive\", offset: this.offset, source: this.source };\n return;\n case \"byte-order-mark\":\n case \"space\":\n case \"comment\":\n case \"newline\":\n yield this.sourceToken;\n return;\n case \"doc-mode\":\n case \"doc-start\": {\n const doc = {\n type: \"document\",\n offset: this.offset,\n start: []\n };\n if (this.type === \"doc-start\")\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: \"error\",\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case \"doc-start\": {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n } else\n doc.start.push(this.sourceToken);\n return;\n }\n case \"anchor\":\n case \"tag\":\n case \"space\":\n case \"comment\":\n case \"newline\":\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: \"error\",\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === \"map-value-ind\") {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n } else\n sep = [this.sourceToken];\n const map = {\n type: \"block-map\",\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n } else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case \"space\":\n case \"comment\":\n case \"newline\":\n scalar.props.push(this.sourceToken);\n return;\n case \"scalar\":\n scalar.source = this.source;\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf(\"\\n\") + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf(\"\\n\", nl) + 1;\n }\n }\n yield* this.pop();\n break;\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n switch (this.type) {\n case \"newline\":\n this.onKeyLine = false;\n if (it.value) {\n const end = \"end\" in it.value ? it.value.end : void 0;\n const last = Array.isArray(end) ? end[end.length - 1] : void 0;\n if (last?.type === \"comment\")\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n } else if (it.sep) {\n it.sep.push(this.sourceToken);\n } else {\n it.start.push(this.sourceToken);\n }\n return;\n case \"space\":\n case \"comment\":\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n } else if (it.sep) {\n it.sep.push(this.sourceToken);\n } else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== \"seq-item-ind\";\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case \"newline\":\n nl.push(i);\n break;\n case \"space\":\n break;\n case \"comment\":\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case \"anchor\":\n case \"tag\":\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n } else if (it.sep) {\n it.sep.push(this.sourceToken);\n } else {\n it.start.push(this.sourceToken);\n }\n return;\n case \"explicit-key-ind\":\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n } else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n } else {\n this.stack.push({\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case \"map-value-ind\":\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, \"newline\")) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n } else {\n const start2 = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start: start2, key: null, sep: [this.sourceToken] }]\n });\n }\n } else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n } else if (includesToken(it.sep, \"map-value-ind\")) {\n this.stack.push({\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n } else if (isFlowToken(it.key) && !includesToken(it.sep, \"newline\")) {\n const start2 = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n delete it.key;\n delete it.sep;\n this.stack.push({\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start: start2, key, sep }]\n });\n } else if (start.length > 0) {\n it.sep = it.sep.concat(start, this.sourceToken);\n } else {\n it.sep.push(this.sourceToken);\n }\n } else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n } else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n } else if (includesToken(it.sep, \"map-value-ind\")) {\n this.stack.push({\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n } else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case \"alias\":\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\": {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n } else if (it.sep) {\n this.stack.push(fs);\n } else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (bv.type === \"block-seq\") {\n if (!it.explicitKey && it.sep && !includesToken(it.sep, \"newline\")) {\n yield* this.pop({\n type: \"error\",\n offset: this.offset,\n message: \"Unexpected block-seq-ind on same line with key\",\n source: this.source\n });\n return;\n }\n } else if (atMapIndent) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case \"newline\":\n if (it.value) {\n const end = \"end\" in it.value ? it.value.end : void 0;\n const last = Array.isArray(end) ? end[end.length - 1] : void 0;\n if (last?.type === \"comment\")\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n } else\n it.start.push(this.sourceToken);\n return;\n case \"space\":\n case \"comment\":\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case \"anchor\":\n case \"tag\":\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case \"seq-item-ind\":\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, \"seq-item-ind\"))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === \"flow-error-end\") {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top?.type === \"flow-collection\");\n } else if (fc.end.length === 0) {\n switch (this.type) {\n case \"comma\":\n case \"explicit-key-ind\":\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case \"map-value-ind\":\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case \"space\":\n case \"comment\":\n case \"newline\":\n case \"anchor\":\n case \"tag\":\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case \"alias\":\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\": {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case \"flow-map-end\":\n case \"flow-seq-end\":\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n } else {\n const parent = this.peek(2);\n if (parent.type === \"block-map\" && (this.type === \"map-value-ind\" && parent.indent === fc.indent || this.type === \"newline\" && !parent.items[parent.items.length - 1].sep)) {\n yield* this.pop();\n yield* this.step();\n } else if (this.type === \"map-value-ind\" && parent.type !== \"flow-collection\") {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: \"block-map\",\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n } else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf(\"\\n\") + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf(\"\\n\", nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case \"alias\":\n case \"scalar\":\n case \"single-quoted-scalar\":\n case \"double-quoted-scalar\":\n return this.flowScalar(this.type);\n case \"block-scalar-header\":\n return {\n type: \"block-scalar\",\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: \"\"\n };\n case \"flow-map-start\":\n case \"flow-seq-start\":\n return {\n type: \"flow-collection\",\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case \"seq-item-ind\":\n return {\n type: \"block-seq\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case \"explicit-key-ind\": {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case \"map-value-ind\": {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: \"block-map\",\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== \"comment\")\n return false;\n if (this.indent <= indent)\n return false;\n return start.every((st) => st.type === \"newline\" || st.type === \"space\");\n }\n *documentEnd(docEnd) {\n if (this.type !== \"doc-mode\") {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === \"newline\")\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case \"comma\":\n case \"doc-start\":\n case \"doc-end\":\n case \"flow-seq-end\":\n case \"flow-map-end\":\n case \"map-value-ind\":\n yield* this.pop();\n yield* this.step();\n break;\n case \"newline\":\n this.onKeyLine = false;\n case \"space\":\n case \"comment\":\n default:\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === \"newline\")\n yield* this.pop();\n }\n }\n };\n exports2.Parser = Parser;\n }\n});\n\n// node_modules/yaml/dist/public-api.js\nvar require_public_api = __commonJS({\n \"node_modules/yaml/dist/public-api.js\"(exports2) {\n \"use strict\";\n var composer = require_composer();\n var Document = require_Document();\n var errors = require_errors();\n var log = require_log();\n var identity = require_identity();\n var lineCounter = require_line_counter();\n var parser = require_parser();\n function parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter$1 = options.lineCounter || prettyErrors && new lineCounter.LineCounter() || null;\n return { lineCounter: lineCounter$1, prettyErrors };\n }\n function parseAllDocuments(source, options = {}) {\n const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter2?.addNewLine);\n const composer$1 = new composer.Composer(options);\n const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n if (prettyErrors && lineCounter2)\n for (const doc of docs) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter2));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter2));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer$1.streamInfo());\n }\n function parseDocument(source, options = {}) {\n const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter2?.addNewLine);\n const composer$1 = new composer.Composer(options);\n let doc = null;\n for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== \"silent\") {\n doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), \"MULTIPLE_DOCS\", \"Source contains multiple documents; please use YAML.parseAllDocuments()\"));\n break;\n }\n }\n if (prettyErrors && lineCounter2) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter2));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter2));\n }\n return doc;\n }\n function parse(src, reviver, options) {\n let _reviver = void 0;\n if (typeof reviver === \"function\") {\n _reviver = reviver;\n } else if (options === void 0 && reviver && typeof reviver === \"object\") {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== \"silent\")\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n }\n function stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === \"function\" || Array.isArray(replacer)) {\n _replacer = replacer;\n } else if (options === void 0 && replacer) {\n options = replacer;\n }\n if (typeof options === \"string\")\n options = options.length;\n if (typeof options === \"number\") {\n const indent = Math.round(options);\n options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === void 0) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return void 0;\n }\n if (identity.isDocument(value) && !_replacer)\n return value.toString(options);\n return new Document.Document(value, _replacer, options).toString(options);\n }\n exports2.parse = parse;\n exports2.parseAllDocuments = parseAllDocuments;\n exports2.parseDocument = parseDocument;\n exports2.stringify = stringify;\n }\n});\n\n// node_modules/yaml/dist/index.js\nvar require_dist = __commonJS({\n \"node_modules/yaml/dist/index.js\"(exports2) {\n \"use strict\";\n var composer = require_composer();\n var Document = require_Document();\n var Schema = require_Schema();\n var errors = require_errors();\n var Alias = require_Alias();\n var identity = require_identity();\n var Pair = require_Pair();\n var Scalar = require_Scalar();\n var YAMLMap = require_YAMLMap();\n var YAMLSeq = require_YAMLSeq();\n var cst = require_cst();\n var lexer = require_lexer();\n var lineCounter = require_line_counter();\n var parser = require_parser();\n var publicApi = require_public_api();\n var visit = require_visit();\n exports2.Composer = composer.Composer;\n exports2.Document = Document.Document;\n exports2.Schema = Schema.Schema;\n exports2.YAMLError = errors.YAMLError;\n exports2.YAMLParseError = errors.YAMLParseError;\n exports2.YAMLWarning = errors.YAMLWarning;\n exports2.Alias = Alias.Alias;\n exports2.isAlias = identity.isAlias;\n exports2.isCollection = identity.isCollection;\n exports2.isDocument = identity.isDocument;\n exports2.isMap = identity.isMap;\n exports2.isNode = identity.isNode;\n exports2.isPair = identity.isPair;\n exports2.isScalar = identity.isScalar;\n exports2.isSeq = identity.isSeq;\n exports2.Pair = Pair.Pair;\n exports2.Scalar = Scalar.Scalar;\n exports2.YAMLMap = YAMLMap.YAMLMap;\n exports2.YAMLSeq = YAMLSeq.YAMLSeq;\n exports2.CST = cst;\n exports2.Lexer = lexer.Lexer;\n exports2.LineCounter = lineCounter.LineCounter;\n exports2.Parser = parser.Parser;\n exports2.parse = publicApi.parse;\n exports2.parseAllDocuments = publicApi.parseAllDocuments;\n exports2.parseDocument = publicApi.parseDocument;\n exports2.stringify = publicApi.stringify;\n exports2.visit = visit.visit;\n exports2.visitAsync = visit.visitAsync;\n }\n});\n\n// extensions/drupal/index.cjs\nvar YAML = require_dist();\nvar pluginId = \"drupal\";\nvar phpFile = (file) => /\\.(php|module|install|theme|inc)$/.test(file);\nvar simple = (name) => name.replace(/^\\\\/, \"\").split(\"\\\\\").pop();\nvar lineAt = (source, offset) => source.slice(0, offset).split(\"\\n\").length;\nvar clean = (value) => typeof value === \"string\" ? value.replace(/^\\\\/, \"\") : \"\";\nfunction codeMask(source) {\n const chars = source.split(\"\");\n const blank = (from, to) => {\n for (let n = from; n < to; n++) if (chars[n] !== \"\\n\" && chars[n] !== \"\\r\") chars[n] = \" \";\n };\n for (let i = 0; i < source.length; ) {\n const start = i;\n if (source.startsWith(\"//\", i) || source[i] === \"#\" && source[i + 1] !== \"[\") {\n const end = source.indexOf(\"\\n\", i);\n i = end < 0 ? source.length : end;\n } else if (source.startsWith(\"/*\", i)) {\n const end = source.indexOf(\"*/\", i + 2);\n i = end < 0 ? source.length : end + 2;\n } else if (['\"', \"'\", \"`\"].includes(source[i])) {\n const quote = source[i++];\n while (i < source.length) {\n if (source[i] === \"\\\\\") {\n i += 2;\n continue;\n }\n if (source[i++] === quote) break;\n }\n i = Math.min(i, source.length);\n } else if (source.startsWith(\"<<<\", i)) {\n const header = /^<<<[ \\t]*(?:['\"]([A-Za-z_]\\w*)['\"]|([A-Za-z_]\\w*))[ \\t]*\\r?\\n/.exec(source.slice(i));\n if (!header) {\n i++;\n continue;\n }\n const rest = source.slice(i + header[0].length);\n const end = new RegExp(\"^[ \\\\t]*\" + (header[1] || header[2]) + \"(?=[;\\\\s]|$)\", \"m\").exec(rest);\n i = end ? i + header[0].length + end.index + end[0].length : source.length;\n } else {\n i++;\n continue;\n }\n blank(start, i);\n }\n return chars.join(\"\");\n}\nfunction yaml(source) {\n const doc = YAML.parseDocument(source, { uniqueKeys: true, maxAliasCount: 50 });\n if (doc.errors.length) return {};\n return doc.toJS({ maxAliasCount: 50 }) || {};\n}\nfunction synthetic(file, line, kind, name, key, language) {\n return {\n id: `plugin:${pluginId}:${file}:${key}`,\n kind,\n name,\n qualifiedName: `${file}::${key}`,\n filePath: file,\n language,\n startLine: line,\n endLine: line,\n startColumn: 0,\n endColumn: 0,\n updatedAt: 0\n };\n}\nfunction keyLine(source, key) {\n const lines = source.split(\"\\n\");\n const i = lines.findIndex((line) => line.trim().startsWith(key + \":\") || line.trim().startsWith(\"'\" + key + \"':\"));\n return i < 0 ? 1 : i + 1;\n}\nfunction routeNodes(file, source) {\n const routes = yaml(source);\n return Object.entries(routes).flatMap(([id, route]) => {\n if (!route || typeof route !== \"object\" || typeof route.path !== \"string\" || !route.path) return [];\n const methods = Array.isArray(route.methods) ? ` [${route.methods.join(\",\")}]` : \"\";\n return [synthetic(file, keyLine(source, id), \"route\", route.path + methods, `route:${id}`, \"yaml\")];\n });\n}\nfunction serviceNodes(file, source) {\n return Object.entries(yaml(source).services || {}).flatMap(([id, definition]) => {\n if (id.startsWith(\"_\") || (!definition || typeof definition !== \"object\")) return [];\n return [synthetic(file, keyLine(source, id), \"variable\", `service:${id}`, `service:${id}`, \"yaml\")];\n });\n}\nfunction pluginDeclarations(file, source) {\n const nodes = [];\n const code = codeMask(source);\n let previous = 0;\n for (const cls of source.matchAll(/\\b(?:final\\s+|abstract\\s+)?class\\s+(\\w+)/g)) {\n if (code[cls.index] === \" \") continue;\n const prelude = source.slice(previous, cls.index);\n previous = cls.index + cls[0].length;\n const annotation = /@(Block|FieldType|FieldFormatter|FieldWidget|Action|QueueWorker|Condition|Filter|MenuLink|MigrateSource|MigrateProcess|MigrateDestination|Views\\w*|SearchPlugin|RenderElement|FormElement)\\s*\\([\\s\\S]*?\\bid\\s*=\\s*[\"']([^\"']+)[\"']/g;\n const attribute = /#\\[\\s*(?:[\\w\\\\]+\\\\)?(Block|FieldType|FieldFormatter|FieldWidget|Action|QueueWorker|Condition|Filter|MenuLink|MigrateSource|MigrateProcess|MigrateDestination|Views\\w*|SearchPlugin|RenderElement|FormElement)\\s*\\([\\s\\S]*?(?:\\bid\\s*:\\s*)?[\"']([^\"']+)[\"']/g;\n const matches = [...prelude.matchAll(annotation), ...prelude.matchAll(attribute)];\n for (const match of matches) {\n const kind = match[1], id = match[2];\n const node = synthetic(file, lineAt(source, cls.index), \"component\", `${kind}:${id}`, `plugin:${kind}:${id}`, \"php\");\n node.docstring = `Drupal ${kind} plugin implemented by ${cls[1]}`;\n nodes.push(node);\n }\n }\n return nodes;\n}\nfunction detect(ctx) {\n try {\n const c = JSON.parse(ctx.readFile(\"composer.json\") || \"{}\");\n if (c.name?.startsWith(\"drupal/\") || c.type?.startsWith(\"drupal-\") || Object.keys({ ...c.require, ...c[\"require-dev\"] }).some((n) => n.startsWith(\"drupal/\"))) return true;\n } catch {\n }\n return ctx.getAllFiles().some((f) => f.endsWith(\".info.yml\"));\n}\nmodule.exports = () => ({\n frameworks: [{\n name: \"drupal\",\n languages: [\"php\", \"yaml\"],\n detect,\n resolve: () => null,\n extract(file, source) {\n const nodes = file.endsWith(\".routing.yml\") ? routeNodes(file, source) : file.endsWith(\".services.yml\") ? serviceNodes(file, source) : phpFile(file) ? pluginDeclarations(file, source) : [];\n return { nodes, references: [] };\n }\n }],\n synthPasses: [{ name: \"wiring\", languages: [\"php\"], async run(ctx, yieldToLoop) {\n if (!detect(ctx)) return [];\n const edges = [];\n const files = ctx.getAllFiles().slice().sort();\n const nodesInFile = /* @__PURE__ */ new Map();\n const sourceCache = /* @__PURE__ */ new Map();\n const read = (f) => {\n if (!sourceCache.has(f)) sourceCache.set(f, ctx.readFile(f) || \"\");\n return sourceCache.get(f);\n };\n const nodes = (f) => {\n if (!nodesInFile.has(f)) nodesInFile.set(f, ctx.getNodesInFile(f));\n return nodesInFile.get(f);\n };\n const classes = /* @__PURE__ */ new Map();\n const services = /* @__PURE__ */ new Map();\n const hooks = /* @__PURE__ */ new Map();\n const subscribers = /* @__PURE__ */ new Map();\n const pluginClasses = /* @__PURE__ */ new Map();\n const unique = (list) => list.length === 1 ? list[0] : null;\n function add(map, name, value) {\n if (!map.has(name)) map.set(name, []);\n map.get(name).push(value);\n }\n function edge(from, to, label, file, line, kind = \"calls\") {\n if (!from || !to || from.id === to.id) return;\n edges.push({\n source: from.id,\n target: to.id,\n kind,\n line,\n provenance: \"heuristic\",\n metadata: { synthesizedBy: pluginId, label, registeredAt: `${file}:${line}` }\n });\n }\n function enclosing(file, line) {\n return nodes(file).filter((n) => [\"function\", \"method\"].includes(n.kind) && n.startLine <= line && n.endLine >= line).sort((a, b) => a.endLine - a.startLine - (b.endLine - b.startLine))[0];\n }\n function fullClass(name, file) {\n if (!name) return \"\";\n if (name.startsWith(\"\\\\\")) return clean(name);\n const source = read(file);\n const first = name.split(\"\\\\\")[0];\n for (const u of source.matchAll(/^\\s*use\\s+([\\w\\\\]+)(?:\\s+as\\s+(\\w+))?\\s*;/gm)) {\n if ((u[2] || simple(u[1])) === first) return clean(u[1]) + name.slice(first.length);\n }\n const ns = /\\bnamespace\\s+([\\w\\\\]+)\\s*[;{]/.exec(source)?.[1];\n return ns ? `${ns}\\\\${name}` : name;\n }\n function classNode(name, file, absolute = false) {\n return unique(classes.get(absolute ? clean(name) : fullClass(name, file)) || []);\n }\n function method(cls, name) {\n return cls && unique(nodes(cls.filePath).filter((n) => n.kind === \"method\" && n.name === name && n.startLine >= cls.startLine && n.endLine <= cls.endLine));\n }\n function service(id) {\n const seen2 = /* @__PURE__ */ new Set();\n while (id && !seen2.has(id)) {\n seen2.add(id);\n const defs = services.get(id) || [];\n const definition = unique(defs);\n if (!definition) return null;\n if (!definition.alias) return definition;\n id = definition.alias;\n }\n return null;\n }\n function eventName(expression, file) {\n const literal = /^['\"]([^'\"]+)['\"]$/.exec(expression.trim());\n if (literal) return literal[1];\n const constant = /^([\\w\\\\]+)::(\\w+)$/.exec(expression.trim());\n if (!constant) return null;\n const name = fullClass(constant[1], file);\n const cls = classNode(name, file, true);\n if (constant[2] === \"class\") return name;\n if (cls) {\n const source = read(cls.filePath);\n const value = new RegExp(\"\\\\bconst\\\\s+\" + constant[2] + `\\\\s*=\\\\s*[\"\\\\']([^\"\\\\']+)[\"\\\\']`).exec(source);\n if (value) return value[1];\n }\n return name + \"::\" + constant[2];\n }\n for (const file of files.filter(phpFile)) {\n const source = read(file);\n const ns = /\\bnamespace\\s+([\\w\\\\]+)\\s*[;{]/.exec(source)?.[1];\n for (const cls of nodes(file).filter((n) => n.kind === \"class\")) add(classes, ns ? ns + \"\\\\\" + cls.name : cls.name, cls);\n await yieldToLoop();\n }\n for (const file of files.filter((f) => f.endsWith(\".services.yml\"))) {\n const definitions = yaml(read(file)).services || {};\n for (const [id, def] of Object.entries(definitions)) {\n if (id.startsWith(\"_\")) continue;\n if (typeof def === \"string\" && def.startsWith(\"@\")) {\n add(services, id, { alias: def.slice(1) });\n continue;\n }\n if (!def || typeof def !== \"object\") continue;\n const cls = typeof def.class === \"string\" ? classNode(def.class, file, true) : null;\n add(services, id, {\n file,\n def,\n cls,\n alias: typeof def.alias === \"string\" ? def.alias.replace(/^@/, \"\") : null,\n node: nodes(file).find((n) => n.id === `plugin:drupal:${file}:service:${id}`)\n });\n }\n await yieldToLoop();\n }\n for (const [id, definitions] of services) {\n if (definitions.length !== 1) continue;\n const def = service(id);\n if (!def) continue;\n edge(def.node, def.cls, \"Drupal service implementation\", def.file, def.node?.startLine || 1, \"references\");\n for (const arg of Array.isArray(def.def.arguments) ? def.def.arguments : []) {\n if (typeof arg !== \"string\" || !/^@\\??[^@]/.test(arg)) continue;\n const dependency = service(arg.replace(/^@\\??/, \"\"));\n edge(def.cls || def.node, dependency?.cls || dependency?.node, \"Drupal service injection\", def.file, def.node?.startLine || 1, \"references\");\n }\n }\n for (const file of files.filter((f) => f.endsWith(\".routing.yml\"))) {\n for (const [id, route] of Object.entries(yaml(read(file)))) {\n if (!route || typeof route !== \"object\") continue;\n const from = nodes(file).find((n) => n.id === `plugin:drupal:${file}:route:${id}`);\n for (const key of [\"_controller\", \"_form\"]) {\n const value = route.defaults?.[key];\n if (typeof value !== \"string\") continue;\n const [type, member] = value.split(/:{1,2}/);\n const cls = type.includes(\"\\\\\") ? classNode(type, file, true) : service(type)?.cls;\n const target = member ? method(cls, member) : key === \"_form\" ? method(cls, \"buildForm\") || cls : method(cls, \"__invoke\") || cls;\n edge(from, target, \"Drupal route handler\", file, from?.startLine || 1);\n }\n }\n await yieldToLoop();\n }\n for (const file of files.filter(phpFile)) {\n const source = read(file), lines = source.split(\"\\n\");\n for (const n of nodes(file)) {\n if (n.id.startsWith(\"plugin:drupal:\") && n.kind === \"component\") {\n const cls = nodes(file).find((c) => c.kind === \"class\" && c.startLine <= n.startLine && c.endLine >= n.startLine);\n edge(n, cls, \"Drupal plugin implementation\", file, n.startLine, \"references\");\n const id = n.name.slice(n.name.indexOf(\":\") + 1);\n if (cls) add(pluginClasses, id, cls);\n }\n if (![\"method\", \"function\"].includes(n.kind)) continue;\n const priorNodeEnd = Math.max(0, ...nodes(file).filter((p) => [\"method\", \"function\"].includes(p.kind) && p.endLine < n.startLine).map((p) => p.endLine));\n const prelude = lines.slice(priorNodeEnd, n.startLine).join(\"\\n\");\n const hookAttribute = /#\\[\\s*(?:[\\w\\\\]+\\\\)?Hook\\s*\\(\\s*['\"]([^'\"]+)['\"]/g;\n for (const h of prelude.matchAll(hookAttribute)) add(hooks, h[1], n);\n if (n.kind === \"function\" && /\\.(module|install|theme|inc)$/.test(file)) {\n const documented = /Implements\\s+hook_(\\w+)\\s*\\(/i.exec(prelude)?.[1];\n if (documented) add(hooks, documented, n);\n else {\n const module2 = file.split(\"/\").pop().split(\".\")[0], prefix = module2 + \"_\";\n const suffix = n.name.startsWith(prefix) ? n.name.slice(prefix.length) : \"\";\n if (suffix && ctx.getNodesByName(\"hook_\" + suffix).some((d) => d.kind === \"function\" && d.filePath.endsWith(\".api.php\"))) add(hooks, suffix, n);\n }\n }\n if (n.name === \"getSubscribedEvents\") {\n const cls = nodes(file).find((c) => c.kind === \"class\" && n.startLine >= c.startLine && n.endLine <= c.endLine);\n if (!cls || !/EventSubscriberInterface/.test(source.slice(0, source.indexOf(\"{\", source.indexOf(\"class \" + cls.name))))) continue;\n const body = lines.slice(n.startLine - 1, n.endLine).join(\"\\n\");\n const registration = /(?:\\$events\\s*\\[([^\\]]+)\\]\\s*(?:\\[\\])?\\s*=|(['\"][^'\"]+['\"]|[\\w\\\\]+::\\w+)\\s*=>)\\s*\\[?\\s*['\"](\\w+)['\"]/g;\n for (const r of body.matchAll(registration)) {\n const event = eventName(r[1] || r[2], file), handler = method(cls, r[3]);\n if (event && handler) add(subscribers, event, { handler, file, line: n.startLine + lineAt(body, r.index) - 1 });\n }\n }\n }\n await yieldToLoop();\n }\n for (const file of files.filter(phpFile)) {\n const source = read(file);\n const code = codeMask(source);\n const patterns = [\n { re: /(?:->invokeAll|->alter)\\s*\\(\\s*['\"]([^'\"]+)['\"]/g, kind: \"hook\" },\n { re: /(?:\\\\?Drupal::service|\\$container->get)\\s*\\(\\s*['\"]([^'\"]+)['\"]/g, kind: \"service\" },\n { re: /->createInstance\\s*\\(\\s*['\"]([^'\"]+)['\"]/g, kind: \"plugin\" },\n { re: /->dispatch\\s*\\(\\s*[^,\\n]+,\\s*([^\\)\\n]+)\\)/g, kind: \"event\" }\n ];\n for (const { re, kind } of patterns) for (const m of source.matchAll(re)) {\n if (code[m.index] === \" \") continue;\n const line = lineAt(source, m.index), from = enclosing(file, line);\n if (!from) continue;\n if (kind === \"hook\") {\n const hook = m[0].startsWith(\"->alter\") ? m[1] + \"_alter\" : m[1];\n for (const handler of hooks.get(hook) || []) edge(from, handler, `Drupal hook ${hook}`, file, line);\n } else if (kind === \"service\") {\n const target = service(m[1]);\n edge(from, target?.cls || target?.node, \"Drupal service lookup\", file, line, \"references\");\n } else if (kind === \"plugin\") {\n edge(from, unique(pluginClasses.get(m[1]) || []), \"Drupal plugin construction\", file, line, \"instantiates\");\n } else {\n const event = eventName(m[1], file);\n for (const target of subscribers.get(event) || []) edge(from, target.handler, `Drupal event ${event}`, target.file, target.line);\n }\n }\n await yieldToLoop();\n }\n const seen = /* @__PURE__ */ new Set();\n return edges.filter((e) => {\n const key = `${e.source}:${e.target}:${e.kind}:${e.line}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n } }]\n});\n"}} \ No newline at end of file diff --git a/marketplace/public/app.js b/marketplace/public/app.js index 78506300a..c265187b3 100644 --- a/marketplace/public/app.js +++ b/marketplace/public/app.js @@ -34,6 +34,8 @@ async function api(path, options) { function project() { return state.snapshot?.projects.find(p => p.id === state.project); } function installed(id) { return project()?.extensions.find(e => e.name === `managed:${id}`); } function selected(extension) { return state.selections[extension.id]?.release || extension; } +function releaseKnown(id) { return !state.snapshot || !!state.selections[id]?.release; } +function releaseVersion(extension) { return releaseKnown(extension.id) ? extension.version : state.selections[extension.id]?.error ? 'No compatible release' : 'Checking compatibility…'; } function compatibility(extension) { if (!state.snapshot) return 'Connect a project to select a compatible stable release.'; const choice = state.selections[extension.id]; @@ -77,7 +79,7 @@ function progress() { function card(extension) { extension = selected(extension); const current = installed(extension.id); - return `
${extension.id === 'drupal' ? icon : escape(extension.name.slice(0, 1))}

${escape(extension.name)}

v${escape(extension.version)}

${escape(extension.description)}

${extension.id === 'drupal' ? 'PHPDrupal 8–11' : ''}${extension.capabilities.map(c => `${c === 'frameworks' ? 'Framework' : 'Semantic analysis'}`).join('')}
${extension.id === 'drupal' ? '
/your-routeControllerService
' : ''}

${escape(compatibility(extension))}

`; + return `
${extension.id === 'drupal' ? icon : escape(extension.name.slice(0, 1))}

${escape(extension.name)}

${releaseKnown(extension.id) ? `v${escape(extension.version)}` : 'Checking…'}

${escape(extension.description)}

${extension.id === 'drupal' ? 'PHPDrupal 8–11' : ''}${extension.capabilities.map(c => `${c === 'frameworks' ? 'Framework' : 'Semantic analysis'}`).join('')}
${extension.id === 'drupal' ? '
/your-routeControllerService
' : ''}

${escape(compatibility(extension))}

`; } function renderCatalog() { app.innerHTML = `
THE CODEGRAPH MARKETPLACE

Make your graph
speak your framework.

Add the connections that matter to your codebase.
Discover extensions, install in a click, and keep
your intelligence local.

${connectionPanel()}
${progress()}
${state.tab === 'installed' ? 'YOUR EXTENSIONS' : 'EXTEND WHAT YOUR GRAPH UNDERSTANDS'}FRAMEWORK + SEMANTIC EXTENSIONS
◉ Source code stays on your machine↻ Updates you control◇ Open extension API
`; @@ -93,7 +95,8 @@ function renderDetail(id) { const e = item && selected(item); if (!e) { app.innerHTML = '

Extension not found

Back to marketplace
'; return; } const current = installed(id); - app.innerHTML = `
${id === 'drupal' ? icon : escape(e.name.slice(0,1))}

${escape(e.name)}

${escape(e.description)}

${e.capabilities.map(c => `${c === 'frameworks' ? 'Framework support' : 'Semantic analysis'}`).join('')}
${escape(e.readme)}
`; + const known = releaseKnown(id); + app.innerHTML = `
${id === 'drupal' ? icon : escape(e.name.slice(0,1))}

${escape(e.name)}

${escape(e.description)}

${e.capabilities.map(c => `${c === 'frameworks' ? 'Framework support' : 'Semantic analysis'}`).join('')}
${escape(e.readme)}
`; } function renderPublish() { app.innerHTML = `
← Marketplace

Share what you know.

Give CodeGraph the framework knowledge your team needs. Upload a versioned extension and publish it to the community.

Upload the .cgext file from CodeGraph’s extension pack command.

Published versions are immutable.
Community publication does not confer official status.

`; diff --git a/scripts/build-extensions.mjs b/scripts/build-extensions.mjs index 437f28ed2..c86097a52 100644 --- a/scripts/build-extensions.mjs +++ b/scripts/build-extensions.mjs @@ -1,8 +1,11 @@ import { build } from 'esbuild'; -import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { mkdirSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs'; await build({ entryPoints: ['extensions/drupal/index.cjs'], bundle: true, platform: 'node', target: 'node22', format: 'cjs', outfile: 'extensions/drupal/dist/index.cjs' }); const pkg = JSON.parse(readFileSync('extensions/drupal/package.json', 'utf8')); const artifact = { format: 'codegraph-extension-1', package: pkg, files: { 'dist/index.cjs': readFileSync('extensions/drupal/dist/index.cjs', 'utf8') } }; mkdirSync('dist/extensions', { recursive: true }); writeFileSync('dist/extensions/drupal.cgext', JSON.stringify(artifact)); +writeFileSync(`dist/extensions/drupal-${pkg.version}.cgext`, JSON.stringify(artifact)); +// Historical bytes remain installable and reviewable after the source evolves. +copyFileSync('extensions/drupal/releases/drupal-0.1.0.cgext', 'dist/extensions/drupal-0.1.0.cgext'); console.log('Built official Drupal extension'); diff --git a/scripts/validation/drupal-accuracy.test.cjs b/scripts/validation/drupal-accuracy.test.cjs index 827bb0889..baf59f0aa 100644 --- a/scripts/validation/drupal-accuracy.test.cjs +++ b/scripts/validation/drupal-accuracy.test.cjs @@ -15,9 +15,15 @@ test('Drupal declarations and event registrations distinguish executable wiring namespace Drupal\\sample; class Calls { public function good() { \\Drupal::service('sample.dep'); $dispatcher->dispatch($event, 'done'); } + public function constantEvent() { $dispatcher->dispatch($event, Events::DONE); } + public function legacy() { $dispatcher->dispatch('done', new Event($one, $two)); } public function bad() { NotDrupal::service('sample.dep'); $dispatcher->dispatch($event, 'fake'); } } class Dependency {} +class Events { + // const DONE = 'fake'; + const DONE = 'done'; +} `, 'Subscriber.php':`e.source===source&&e.target===target&&e.label===label),JSON.stringify({source,target,label,edges})); + for(const [source,target,label] of [['good','Dependency','Drupal service lookup'],['good','onDone','Drupal event done'],['legacy','onDone','Drupal event done'],['constantEvent','onDone','Drupal event done'],['dispatch','actualHook','Drupal hook done']])assert.ok(edges.some(e=>e.source===source&&e.target===target&&e.label===label),JSON.stringify({source,target,label,edges})); assert.deepEqual(edges.filter(e=>e.source==='bad'||e.target==='onFake'||e.target==='notHook'),[],'Unrelated static receiver and commented/string declarations are not wiring'); assert.deepEqual(db.prepare("SELECT name FROM nodes WHERE kind='component' AND id LIKE 'plugin:drupal:%' ORDER BY name").all().map(n=>n.name),['Block:real']); }finally{db.close();} diff --git a/scripts/validation/extensions-compatibility.cjs b/scripts/validation/extensions-compatibility.cjs index 1cb0154da..045d8f6e6 100644 --- a/scripts/validation/extensions-compatibility.cjs +++ b/scripts/validation/extensions-compatibility.cjs @@ -94,6 +94,21 @@ async function cli(args, expected = 0) { assert.equal(await page.evaluate(() => state.snapshot.error), undefined); await expectGraph(roots[1], '1.10.0'); assert.deepEqual(await graph(roots[0]), []); checks.push('one browser Install selects 1.10.0 over incompatible 9.0.0 and preview; actual Python graph refreshed only in chosen destination'); + // Hold actual bridge resolution to inspect the transient destination state. + await page.evaluate(() => { + const originalRpc = rpc; + const gate = new Promise(resolve => window.releaseSelection = resolve); + rpc = (type, value) => type === 'command' && value?.action === 'resolve' ? gate.then(() => originalRpc(type, value)) : originalRpc(type, value); + window.pendingSelection = refreshSelections().finally(() => { rpc = originalRpc; }); + }); + await page.screenshot({ path: path.join(out, 'metadata-pending.png'), fullPage: true }); + assert.equal(await page.locator('[data-installed-version]').innerText(), '1.10.0'); + assert.equal(await page.locator('[data-selected-version]').innerText(), 'Checking compatibility…'); + assert.equal(await page.locator('a[href^="/api/download/"]').count(), 0); + await page.evaluate(async () => { releaseSelection(); await pendingSelection; }); + assert.equal(await page.locator('[data-selected-version]').innerText(), '1.10.0'); + assert.equal(await page.locator('[data-installed-version]').innerText(), '1.10.0'); + checks.push('pending compatibility refresh never shows incompatible catalog version as selected; installed and selected versions remain distinct'); await page.screenshot({ path: path.join(out, 'desktop-installed.png'), fullPage: true }); const config = fs.readFileSync(path.join(roots[1], 'codegraph.json'), 'utf8'); const noChoice = await page.evaluate(async () => {