From 77370d0c21778ea5364a1322e5d1f76311d778bd Mon Sep 17 00:00:00 2001 From: Jason3S Date: Sat, 2 Dec 2023 12:05:43 +0000 Subject: [PATCH] feat: Update CSpell version (8.1.0) --- action-src/package.json | 6 +- action/lib/main_root.js | 21292 +++++++++------- .../@cspell/cspell-bundled-dicts/package.json | 22 +- action/package.json | 2 +- pnpm-lock.yaml | 273 +- 5 files changed, 11693 insertions(+), 9902 deletions(-) diff --git a/action-src/package.json b/action-src/package.json index c9dba0828..07a8fe269 100644 --- a/action-src/package.json +++ b/action-src/package.json @@ -26,12 +26,12 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", - "@cspell/cspell-bundled-dicts": "^8.0.0", + "@cspell/cspell-bundled-dicts": "^8.1.0", "@octokit/core": "^5.0.2", "@octokit/plugin-rest-endpoint-methods": "^10.2.0", "@octokit/rest": "^20.0.2", - "cspell": "^8.0.0", - "cspell-glob": "^8.0.0", + "cspell": "^8.1.0", + "cspell-glob": "^8.1.0", "vscode-uri": "^3.0.8" }, "files": [ diff --git a/action/lib/main_root.js b/action/lib/main_root.js index 3d1239060..fe1737adb 100644 --- a/action/lib/main_root.js +++ b/action/lib/main_root.js @@ -100,11 +100,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os5 = __importStar(require("os")); + var os6 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand2(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os5.EOL); + process.stdout.write(cmd.toString() + os6.EOL); } exports.issueCommand = issueCommand2; function issue(name, message = "") { @@ -520,8 +520,8 @@ var require_file_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; - var fs11 = __importStar(require("fs")); - var os5 = __importStar(require("os")); + var fs12 = __importStar(require("fs")); + var os6 = __importStar(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -529,10 +529,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs11.existsSync(filePath)) { + if (!fs12.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs11.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os5.EOL}`, { + fs12.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os6.EOL}`, { encoding: "utf8" }); } @@ -546,7 +546,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; + return `${key}<<${delimiter}${os6.EOL}${convertedValue}${os6.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -821,9 +821,9 @@ var require_tunnel = __commonJS({ for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i]; if (typeof overrides === "object") { - var keys2 = Object.keys(overrides); - for (var j = 0, keyLen = keys2.length; j < keyLen; ++j) { - var k = keys2[j]; + var keys3 = Object.keys(overrides); + for (var j = 0, keyLen = keys3.length; j < keyLen; ++j) { + var k = keys3[j]; if (overrides[k] !== void 0) { target[k] = overrides[k]; } @@ -1154,7 +1154,7 @@ var require_util = __commonJS({ var { InvalidArgumentError } = require_errors(); var { Blob: Blob2 } = require("buffer"); var nodeUtil = require("util"); - var { stringify: stringify2 } = require("querystring"); + var { stringify: stringify4 } = require("querystring"); var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { } @@ -1168,7 +1168,7 @@ var require_util = __commonJS({ if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - const stringified = stringify2(queryParams); + const stringified = stringify4(queryParams); if (stringified) { url += "?" + stringified; } @@ -1206,14 +1206,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path26 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path27 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path26 && !path26.startsWith("/")) { - path26 = `/${path26}`; + if (path27 && !path27.startsWith("/")) { + path27 = `/${path27}`; } - url = new URL(origin + path26); + url = new URL(origin + path27); } return url; } @@ -2825,19 +2825,19 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "../node_modules/.pnpm/@fastify+busboy@2.1.0/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module2) { "use strict"; - module2.exports = function basename7(path26) { - if (typeof path26 !== "string") { + module2.exports = function basename6(path27) { + if (typeof path27 !== "string") { return ""; } - for (var i = path26.length - 1; i >= 0; --i) { - switch (path26.charCodeAt(i)) { + for (var i = path27.length - 1; i >= 0; --i) { + switch (path27.charCodeAt(i)) { case 47: case 92: - path26 = path26.slice(i + 1); - return path26 === ".." || path26 === "." ? "" : path26; + path27 = path27.slice(i + 1); + return path27 === ".." || path27 === "." ? "" : path27; } } - return path26 === ".." || path26 === "." ? "" : path26; + return path27 === ".." || path27 === "." ? "" : path27; }; } }); @@ -2846,12 +2846,12 @@ var require_basename = __commonJS({ var require_multipart = __commonJS({ "../node_modules/.pnpm/@fastify+busboy@2.1.0/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module2) { "use strict"; - var { Readable: Readable3 } = require("node:stream"); + var { Readable: Readable2 } = require("node:stream"); var { inherits } = require("node:util"); var Dicer = require_Dicer(); var parseParams = require_parseParams(); var decodeText = require_decodeText(); - var basename7 = require_basename(); + var basename6 = require_basename(); var getLimit = require_getLimit(); var RE_BOUNDARY = /^boundary$/i; var RE_FIELD = /^form-data$/i; @@ -2968,7 +2968,7 @@ var require_multipart = __commonJS({ } else if (RE_FILENAME.test(parsed[i][0])) { filename = parsed[i][1]; if (!preservePath) { - filename = basename7(filename); + filename = basename6(filename); } } } @@ -3111,11 +3111,11 @@ var require_multipart = __commonJS({ part.resume(); } function FileStream(opts) { - Readable3.call(this, opts); + Readable2.call(this, opts); this.bytesRead = 0; this.truncated = false; } - inherits(FileStream, Readable3); + inherits(FileStream, Readable2); FileStream.prototype._read = function(n) { }; module2.exports = Multipart; @@ -4179,8 +4179,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve13, reject) => { - res = resolve13; + const promise = new Promise((resolve12, reject) => { + res = resolve12; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -4343,7 +4343,7 @@ var require_util2 = __commonJS({ const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } - var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); + var hasOwn2 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); module2.exports = { isAborted, isCancelled, @@ -4376,7 +4376,7 @@ var require_util2 = __commonJS({ makeIterator, isValidHeaderName, isValidHeaderValue, - hasOwn, + hasOwn: hasOwn2, isErrorLike, fullyReadBody, bytesMatch, @@ -4413,7 +4413,7 @@ var require_webidl = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/fetch/webidl.js"(exports, module2) { "use strict"; var { types } = require("util"); - var { hasOwn, toUSVString } = require_util2(); + var { hasOwn: hasOwn2, toUSVString } = require_util2(); var webidl = {}; webidl.converters = {}; webidl.util = {}; @@ -4578,16 +4578,16 @@ var require_webidl = __commonJS({ } const result = {}; if (!types.isProxy(O)) { - const keys3 = Object.keys(O); - for (const key of keys3) { + const keys4 = Object.keys(O); + for (const key of keys4) { const typedKey = keyConverter(key); const typedValue = valueConverter(O[key]); result[typedKey] = typedValue; } return result; } - const keys2 = Reflect.ownKeys(O); - for (const key of keys2) { + const keys3 = Reflect.ownKeys(O); + for (const key of keys3) { const desc = Reflect.getOwnPropertyDescriptor(O, key); if (desc?.enumerable) { const typedKey = keyConverter(key); @@ -4624,7 +4624,7 @@ var require_webidl = __commonJS({ for (const options of converters) { const { key, defaultValue, required, converter } = options; if (required === true) { - if (!hasOwn(dictionary, key)) { + if (!hasOwn2(dictionary, key)) { throw webidl.errors.exception({ header: "Dictionary", message: `Missing required key "${key}".` @@ -4632,7 +4632,7 @@ var require_webidl = __commonJS({ } } let value = dictionary[key]; - const hasDefault = hasOwn(options, "defaultValue"); + const hasDefault = hasOwn2(options, "defaultValue"); if (hasDefault && value !== null) { value = value ?? defaultValue; } @@ -5681,8 +5681,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } }); - const busboyResolve = new Promise((resolve13, reject) => { - busboy.on("finish", resolve13); + const busboyResolve = new Promise((resolve12, reject) => { + busboy.on("finish", resolve12); busboy.on("error", (err) => reject(new TypeError(err))); }); if (this.body !== null) @@ -5815,7 +5815,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path26, + path: path27, method, body, headers, @@ -5829,11 +5829,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path26 !== "string") { + if (typeof path27 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path26[0] !== "/" && !(path26.startsWith("http://") || path26.startsWith("https://")) && method !== "CONNECT") { + } else if (path27[0] !== "/" && !(path27.startsWith("http://") || path27.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path26) !== null) { + } else if (invalidPathRegex.exec(path27) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5896,7 +5896,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path26, query) : path26; + this.path = query ? util.buildURL(path27, query) : path27; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -5914,9 +5914,9 @@ var require_request = __commonJS({ processHeader(this, headers[i], headers[i + 1]); } } else if (headers && typeof headers === "object") { - const keys2 = Object.keys(headers); - for (let i = 0; i < keys2.length; i++) { - const key = keys2[i]; + const keys3 = Object.keys(headers); + for (let i = 0; i < keys3.length; i++) { + const key = keys3[i]; processHeader(this, key, headers[key]); } } else if (headers != null) { @@ -6062,9 +6062,9 @@ var require_request = __commonJS({ processHeader(request, headers[i], headers[i + 1], true); } } else if (headers && typeof headers === "object") { - const keys2 = Object.keys(headers); - for (let i = 0; i < keys2.length; i++) { - const key = keys2[i]; + const keys3 = Object.keys(headers); + for (let i = 0; i < keys3.length; i++) { + const key = keys3[i]; processHeader(request, key, headers[key], true); } } else if (headers != null) { @@ -6227,9 +6227,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve12(data); }); }); } @@ -6267,12 +6267,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve13(data); + ) : resolve12(data); }); }); } @@ -6913,9 +6913,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path26 = search ? `${pathname}${search}` : pathname; + const path27 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path26; + this.opts.path = path27; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7024,7 +7024,7 @@ var require_client = __commonJS({ var assert22 = require("assert"); var net = require("net"); var http = require("http"); - var { pipeline: pipeline5 } = require("stream"); + var { pipeline: pipeline3 } = require("stream"); var util = require_util(); var timers = require_timers(); var Request = require_request(); @@ -7322,16 +7322,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve13) => { + return new Promise((resolve12) => { if (!this[kSize]) { - resolve13(null); + resolve12(null); } else { - this[kClosedResolve] = resolve13; + this[kClosedResolve] = resolve12; } }); } async [kDestroy](err) { - return new Promise((resolve13) => { + return new Promise((resolve12) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; @@ -7342,7 +7342,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve13(); + resolve12(); }; if (this[kHTTP2Session] != null) { util.destroy(this[kHTTP2Session], err); @@ -7922,7 +7922,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve13, reject) => { + const socket = await new Promise((resolve12, reject) => { client[kConnector]({ host, hostname, @@ -7934,7 +7934,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve13(socket2); + resolve12(socket2); } }); }); @@ -8145,7 +8145,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path26, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path27, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8195,7 +8195,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path26} HTTP/1.1\r + let header = `${method} ${path27} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8258,7 +8258,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path26, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path27, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); @@ -8304,7 +8304,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path26; + headers[HTTP2_HEADER_PATH] = path27; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8445,7 +8445,7 @@ upgrade: ${upgrade}\r let onPipeData = function(chunk) { request.onBodySent(chunk); }; - const pipe2 = pipeline5( + const pipe2 = pipeline3( body, h2stream, (err) => { @@ -8561,12 +8561,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve13, reject) => { + const waitForDrain = () => new Promise((resolve12, reject) => { assert22(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve13; + callback = resolve12; } }); if (client[kHTTPConnVersion] === "h2") { @@ -8911,8 +8911,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { return Promise.all(this[kClients].map((c) => c.close())); } else { - return new Promise((resolve13) => { - this[kClosedResolve] = resolve13; + return new Promise((resolve12) => { + this[kClosedResolve] = resolve12; }); } } @@ -9354,7 +9354,7 @@ var require_readable = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/api/readable.js"(exports, module2) { "use strict"; var assert22 = require("assert"); - var { Readable: Readable3 } = require("stream"); + var { Readable: Readable2 } = require("stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require_errors(); var util = require_util(); var { ReadableStreamFrom, toUSVString } = require_util(); @@ -9366,7 +9366,7 @@ var require_readable = __commonJS({ var kContentType = Symbol("kContentType"); var noop = () => { }; - module2.exports = class BodyReadable extends Readable3 { + module2.exports = class BodyReadable extends Readable2 { constructor({ resume, abort, @@ -9483,7 +9483,7 @@ var require_readable = __commonJS({ if (this.closed) { return Promise.resolve(null); } - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); }) : noop; @@ -9492,7 +9492,7 @@ var require_readable = __commonJS({ if (signal && signal.aborted) { reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); } else { - resolve13(null); + resolve12(null); } }).on("error", noop).on("data", function(chunk) { limit -= chunk.length; @@ -9514,11 +9514,11 @@ var require_readable = __commonJS({ throw new TypeError("unusable"); } assert22(!stream[kConsume]); - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { stream[kConsume] = { type, stream, - resolve: resolve13, + resolve: resolve12, reject, length: 0, body: [] @@ -9553,12 +9553,12 @@ var require_readable = __commonJS({ } } function consumeEnd(consume2) { - const { type, body, resolve: resolve13, stream, length } = consume2; + const { type, body, resolve: resolve12, stream, length } = consume2; try { if (type === "text") { - resolve13(toUSVString(Buffer.concat(body))); + resolve12(toUSVString(Buffer.concat(body))); } else if (type === "json") { - resolve13(JSON.parse(Buffer.concat(body))); + resolve12(JSON.parse(Buffer.concat(body))); } else if (type === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; @@ -9566,12 +9566,12 @@ var require_readable = __commonJS({ dst.set(buf, pos); pos += buf.byteLength; } - resolve13(dst.buffer); + resolve12(dst.buffer); } else if (type === "blob") { if (!Blob2) { Blob2 = require("buffer").Blob; } - resolve13(new Blob2(body, { type: stream[kContentType] })); + resolve12(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { @@ -9697,7 +9697,7 @@ var require_abort_signal = __commonJS({ var require_api_request = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/api/api-request.js"(exports, module2) { "use strict"; - var Readable3 = require_readable(); + var Readable2 = require_readable(); var { InvalidArgumentError, RequestAbortedError @@ -9771,7 +9771,7 @@ var require_api_request = __commonJS({ } const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; - const body = new Readable3({ resume, abort, contentType, highWaterMark }); + const body = new Readable2({ resume, abort, contentType, highWaterMark }); this.callback = null; this.res = body; if (callback !== null) { @@ -9826,9 +9826,9 @@ var require_api_request = __commonJS({ }; function request(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve12(data); }); }); } @@ -10001,9 +10001,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve12(data); }); }); } @@ -10026,7 +10026,7 @@ var require_api_pipeline = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/api/api-pipeline.js"(exports, module2) { "use strict"; var { - Readable: Readable3, + Readable: Readable2, Duplex, PassThrough: PassThrough2 } = require("stream"); @@ -10040,7 +10040,7 @@ var require_api_pipeline = __commonJS({ var { addSignal, removeSignal } = require_abort_signal(); var assert22 = require("assert"); var kResume = Symbol("resume"); - var PipelineRequest = class extends Readable3 { + var PipelineRequest = class extends Readable2 { constructor() { super({ autoDestroy: true }); this[kResume] = null; @@ -10057,7 +10057,7 @@ var require_api_pipeline = __commonJS({ callback(err); } }; - var PipelineResponse = class extends Readable3 { + var PipelineResponse = class extends Readable2 { constructor(resume) { super({ autoDestroy: true }); this[kResume] = resume; @@ -10206,7 +10206,7 @@ var require_api_pipeline = __commonJS({ util.destroy(ret, err); } }; - function pipeline5(opts, handler) { + function pipeline3(opts, handler) { try { const pipelineHandler = new PipelineHandler(opts, handler); this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); @@ -10215,7 +10215,7 @@ var require_api_pipeline = __commonJS({ return new PassThrough2().destroy(err); } } - module2.exports = pipeline5; + module2.exports = pipeline3; } }); @@ -10284,9 +10284,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve12(data); }); }); } @@ -10375,9 +10375,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve12(data); }); }); } @@ -10537,20 +10537,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path26) { - if (typeof path26 !== "string") { - return path26; + function safeUrl(path27) { + if (typeof path27 !== "string") { + return path27; } - const pathSegments = path26.split("?"); + const pathSegments = path27.split("?"); if (pathSegments.length !== 2) { - return path26; + return path27; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path26, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path26); + function matchKey(mockDispatch2, { path: path27, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path27); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10568,7 +10568,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path26 }) => matchValue(safeUrl(path26), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path27 }) => matchValue(safeUrl(path27), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10605,9 +10605,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path26, method, body, headers, query } = opts; + const { path: path27, method, body, headers, query } = opts; return { - path: path26, + path: path27, method, body, headers, @@ -11026,9 +11026,9 @@ var require_pluralizer = __commonJS({ } pluralize(count3) { const one = count3 === 1; - const keys2 = one ? singulars : plurals; + const keys3 = one ? singulars : plurals; const noun = one ? this.singular : this.plural; - return { ...keys2, count: count3, noun }; + return { ...keys3, count: count3, noun }; } }; } @@ -11056,10 +11056,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path26, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path27, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path26, + Path: path27, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -11217,7 +11217,7 @@ var require_proxy_agent = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/proxy-agent.js"(exports, module2) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); - var { URL: URL6 } = require("url"); + var { URL: URL5 } = require("url"); var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); @@ -11266,7 +11266,7 @@ var require_proxy_agent = __commonJS({ this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL6(opts.uri); + const resolvedUrl = new URL5(opts.uri); const { origin, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); @@ -11321,7 +11321,7 @@ var require_proxy_agent = __commonJS({ }); } dispatch(opts, handler) { - const { host } = new URL6(opts.origin); + const { host } = new URL5(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( @@ -11737,9 +11737,9 @@ var require_headers = __commonJS({ appendHeader(headers, header[0], header[1]); } } else if (typeof object === "object" && object !== null) { - const keys2 = Object.keys(object); - for (let i = 0; i < keys2.length; ++i) { - appendHeader(headers, keys2[i], object[keys2[i]]); + const keys3 = Object.keys(object); + for (let i = 0; i < keys3.length; ++i) { + appendHeader(headers, keys3[i], object[keys3[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -13159,7 +13159,7 @@ var require_fetch = __commonJS({ } = require_constants(); var { kHeadersList } = require_symbols(); var EE = require("events"); - var { Readable: Readable3, pipeline: pipeline5 } = require("stream"); + var { Readable: Readable2, pipeline: pipeline3 } = require("stream"); var { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util(); var { dataURLProcessor, serializeAMimeType } = require_dataURL(); var { TransformStream } = require("stream/web"); @@ -13200,7 +13200,7 @@ var require_fetch = __commonJS({ this.emit("terminated", error3); } }; - function fetch2(input, init = {}) { + function fetch(input, init = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); const p = createDeferredPromise(); let requestObject; @@ -13997,7 +13997,7 @@ var require_fetch = __commonJS({ async function dispatch({ body }) { const url = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve13, reject) => agent.dispatch( + return new Promise((resolve12, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -14038,8 +14038,8 @@ var require_fetch = __commonJS({ headers[kHeadersList].append(key, val); } } else { - const keys2 = Object.keys(headersList); - for (const key of keys2) { + const keys3 = Object.keys(headersList); + for (const key of keys3) { const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); @@ -14049,7 +14049,7 @@ var require_fetch = __commonJS({ headers[kHeadersList].append(key, val); } } - this.body = new Readable3({ read: resume }); + this.body = new Readable2({ read: resume }); const decoders = []; const willFollow = request.redirect === "follow" && location && redirectStatusSet.has(status); if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { @@ -14073,11 +14073,11 @@ var require_fetch = __commonJS({ } } } - resolve13({ + resolve12({ status, statusText, headersList: headers[kHeadersList], - body: decoders.length ? pipeline5(this.body, ...decoders, () => { + body: decoders.length ? pipeline3(this.body, ...decoders, () => { }) : this.body.on("error", () => { }) }); @@ -14116,7 +14116,7 @@ var require_fetch = __commonJS({ const val = headersList[n + 1].toString("latin1"); headers[kHeadersList].append(key, val); } - resolve13({ + resolve12({ status, statusText: STATUS_CODES[status], headersList: headers[kHeadersList], @@ -14129,7 +14129,7 @@ var require_fetch = __commonJS({ } } module2.exports = { - fetch: fetch2, + fetch, Fetch, fetching, finalizeAndReportTiming @@ -14523,7 +14523,7 @@ var require_util4 = __commonJS({ var { serializeAMimeType, parseMIMEType } = require_dataURL(); var { types } = require("util"); var { StringDecoder } = require("string_decoder"); - var { btoa } = require("buffer"); + var { btoa: btoa2 } = require("buffer"); var staticPropertyDescriptors = { enumerable: true, writable: false, @@ -14615,9 +14615,9 @@ var require_util4 = __commonJS({ dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)); + dataURL += btoa2(decoder.write(chunk)); } - dataURL += btoa(decoder.end()); + dataURL += btoa2(decoder.end()); return dataURL; } case "Text": { @@ -15351,8 +15351,8 @@ var require_cache = __commonJS({ * @returns {requestResponseList} */ #batchCacheOperations(operations) { - const cache2 = this.#relevantRequestResponseList; - const backupCache = [...cache2]; + const cache4 = this.#relevantRequestResponseList; + const backupCache = [...cache4]; const addedItems = []; const resultList = []; try { @@ -15379,9 +15379,9 @@ var require_cache = __commonJS({ return []; } for (const requestResponse of requestResponses) { - const idx2 = cache2.indexOf(requestResponse); + const idx2 = cache4.indexOf(requestResponse); assert22(idx2 !== -1); - cache2.splice(idx2, 1); + cache4.splice(idx2, 1); } } else if (operation.type === "put") { if (operation.response == null) { @@ -15411,11 +15411,11 @@ var require_cache = __commonJS({ } requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { - const idx2 = cache2.indexOf(requestResponse); + const idx2 = cache4.indexOf(requestResponse); assert22(idx2 !== -1); - cache2.splice(idx2, 1); + cache4.splice(idx2, 1); } - cache2.push([operation.request, operation.response]); + cache4.push([operation.request, operation.response]); addedItems.push([operation.request, operation.response]); } resultList.push([operation.request, operation.response]); @@ -15555,13 +15555,13 @@ var require_cachestorage = __commonJS({ if (options.cacheName != null) { if (this.#caches.has(options.cacheName)) { const cacheList = this.#caches.get(options.cacheName); - const cache2 = new Cache(kConstruct, cacheList); - return await cache2.match(request, options); + const cache4 = new Cache(kConstruct, cacheList); + return await cache4.match(request, options); } } else { for (const cacheList of this.#caches.values()) { - const cache2 = new Cache(kConstruct, cacheList); - const response = await cache2.match(request, options); + const cache4 = new Cache(kConstruct, cacheList); + const response = await cache4.match(request, options); if (response !== void 0) { return response; } @@ -15589,12 +15589,12 @@ var require_cachestorage = __commonJS({ webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); cacheName = webidl.converters.DOMString(cacheName); if (this.#caches.has(cacheName)) { - const cache3 = this.#caches.get(cacheName); - return new Cache(kConstruct, cache3); + const cache5 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache5); } - const cache2 = []; - this.#caches.set(cacheName, cache2); - return new Cache(kConstruct, cache2); + const cache4 = []; + this.#caches.set(cacheName, cache4); + return new Cache(kConstruct, cache4); } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete @@ -15613,8 +15613,8 @@ var require_cachestorage = __commonJS({ */ async keys() { webidl.brandCheck(this, _CacheStorage); - const keys2 = this.#caches.keys(); - return [...keys2]; + const keys3 = this.#caches.keys(); + return [...keys3]; } }; Object.defineProperties(CacheStorage.prototype, { @@ -15681,8 +15681,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path26) { - for (const char of path26) { + function validateCookiePath(path27) { + for (const char of path27) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -15735,7 +15735,7 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie max-age"); } } - function stringify2(cookie) { + function stringify4(cookie) { if (cookie.name.length === 0) { return null; } @@ -15800,7 +15800,7 @@ var require_util6 = __commonJS({ } module2.exports = { isCTLExcludingHtab, - stringify: stringify2, + stringify: stringify4, getHeadersList }; } @@ -15951,7 +15951,7 @@ var require_cookies = __commonJS({ "../node_modules/.pnpm/undici@5.28.2/node_modules/undici/lib/cookies/index.js"(exports, module2) { "use strict"; var { parseSetCookie } = require_parse(); - var { stringify: stringify2, getHeadersList } = require_util6(); + var { stringify: stringify4, getHeadersList } = require_util6(); var { webidl } = require_webidl(); var { Headers } = require_headers(); function getCookies(headers) { @@ -15993,9 +15993,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify2(cookie); + const str = stringify4(cookie); if (str) { - headers.append("Set-Cookie", stringify2(cookie)); + headers.append("Set-Cookie", stringify4(cookie)); } } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ @@ -17374,11 +17374,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path26 = opts.path; + let path27 = opts.path; if (!opts.path.startsWith("/")) { - path26 = `/${path26}`; + path27 = `/${path27}`; } - url = new URL(util.parseOrigin(url).origin + path26); + url = new URL(util.parseOrigin(url).origin + path27); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -17401,7 +17401,7 @@ var require_undici = __commonJS({ module2.exports.getGlobalDispatcher = getGlobalDispatcher; if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { let fetchImpl = null; - module2.exports.fetch = async function fetch2(resource) { + module2.exports.fetch = async function fetch(resource) { if (!fetchImpl) { fetchImpl = require_fetch().fetch; } @@ -17491,11 +17491,11 @@ var require_lib = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -17511,7 +17511,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -17597,26 +17597,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve13) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve12) => __awaiter(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve13(output.toString()); + resolve12(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve13) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve12) => __awaiter(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve13(Buffer.concat(chunks)); + resolve12(Buffer.concat(chunks)); }); })); }); @@ -17825,14 +17825,14 @@ var require_lib = __commonJS({ */ requestRaw(info4, data) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve13(res); + resolve12(res); } } this.requestRawWithCallback(info4, data, callbackForResult); @@ -18017,12 +18017,12 @@ var require_lib = __commonJS({ return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve13) => setTimeout(() => resolve13(), ms)); + return new Promise((resolve12) => setTimeout(() => resolve12(), ms)); }); } _processResponse(res, options) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve13, reject) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve12, reject) => __awaiter(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -18030,7 +18030,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve13(response); + resolve12(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -18069,7 +18069,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve13(response); + resolve12(response); } })); }); @@ -18086,11 +18086,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18106,7 +18106,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18190,11 +18190,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18210,7 +18210,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18288,11 +18288,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18308,7 +18308,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18317,7 +18317,7 @@ var require_summary = __commonJS({ exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; var os_1 = require("os"); var fs_1 = require("fs"); - var { access, appendFile, writeFile } = fs_1.promises; + var { access, appendFile, writeFile: writeFile3 } = fs_1.promises; exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var Summary = class { @@ -18375,7 +18375,7 @@ var require_summary = __commonJS({ return __awaiter(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; + const writeFunc = overwrite ? writeFile3 : appendFile; yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); return this.emptyBuffer(); }); @@ -18610,7 +18610,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path26 = __importStar(require("path")); + var path27 = __importStar(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18620,7 +18620,7 @@ var require_path_utils = __commonJS({ } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path26.sep); + return pth.replace(/[/\\]/g, path27.sep); } exports.toPlatformPath = toPlatformPath; } @@ -18660,11 +18660,11 @@ var require_core = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18680,7 +18680,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18690,8 +18690,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os5 = __importStar(require("os")); - var path26 = __importStar(require("path")); + var os6 = __importStar(require("os")); + var path27 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -18719,7 +18719,7 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path26.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path27.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath; function getInput3(name, options) { @@ -18758,7 +18758,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os5.EOL); + process.stdout.write(os6.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput2; @@ -18792,7 +18792,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info4(message) { - process.stdout.write(message + os5.EOL); + process.stdout.write(message + os6.EOL); } exports.info = info4; function startGroup(name) { @@ -18874,8 +18874,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path26 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path26} does not exist${os_1.EOL}`); + const path27 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path27} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -18951,11 +18951,11 @@ var require_utils3 = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve12) { + resolve12(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve12, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18971,7 +18971,7 @@ var require_utils3 = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19441,7 +19441,7 @@ var require_dist_node2 = __commonJS({ return template3.replace(/\/$/, ""); } } - function parse4(options) { + function parse5(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -19465,7 +19465,7 @@ var require_dist_node2 = __commonJS({ if (!isBinaryRequest) { if (options.mediaType.format) { headers.accept = headers.accept.split(/,/).map( - (format7) => format7.replace( + (format6) => format6.replace( /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}` ) @@ -19475,8 +19475,8 @@ var require_dist_node2 = __commonJS({ if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format7 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format7}`; + const format6 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format6}`; }).join(","); } } @@ -19505,7 +19505,7 @@ var require_dist_node2 = __commonJS({ ); } function endpointWithDefaults(defaults, route, options) { - return parse4(merge4(defaults, route, options)); + return parse5(merge4(defaults, route, options)); } function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge4(oldDefaults, newDefaults); @@ -19514,7 +19514,7 @@ var require_dist_node2 = __commonJS({ DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), merge: merge4.bind(null, DEFAULTS2), - parse: parse4 + parse: parse5 }); } var endpoint = withDefaults(null, DEFAULTS); @@ -19761,16 +19761,16 @@ var require_dist_node5 = __commonJS({ let headers = {}; let status; let url; - let { fetch: fetch2 } = globalThis; + let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch2 = requestOptions.request.fetch; + fetch = requestOptions.request.fetch; } - if (!fetch2) { + if (!fetch) { throw new Error( "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" ); } - return fetch2(requestOptions.url, { + return fetch(requestOptions.url, { method: requestOptions.method, body: requestOptions.body, headers: requestOptions.headers, @@ -22286,9 +22286,9 @@ var require_dist_node9 = __commonJS({ set(target, methodName, value) { return target.cache[methodName] = value; }, - get({ octokit, scope, cache: cache2 }, methodName) { - if (cache2[methodName]) { - return cache2[methodName]; + get({ octokit, scope, cache: cache4 }, methodName) { + if (cache4[methodName]) { + return cache4[methodName]; } const method = endpointMethodsMap.get(scope).get(methodName); if (!method) { @@ -22296,7 +22296,7 @@ var require_dist_node9 = __commonJS({ } const { endpointDefaults, decorations } = method; if (decorations) { - cache2[methodName] = decorate( + cache4[methodName] = decorate( octokit, scope, methodName, @@ -22304,9 +22304,9 @@ var require_dist_node9 = __commonJS({ decorations ); } else { - cache2[methodName] = octokit.request.defaults(endpointDefaults); + cache4[methodName] = octokit.request.defaults(endpointDefaults); } - return cache2[methodName]; + return cache4[methodName]; } }; function endpointsToMethods(octokit) { @@ -22956,7 +22956,7 @@ var require_stringify = __commonJS({ "use strict"; var utils = require_utils5(); module2.exports = (ast, options = {}) => { - let stringify2 = (node, parent = {}) => { + let stringify4 = (node, parent = {}) => { let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); let invalidNode = node.invalid === true && options.escapeInvalid === true; let output = ""; @@ -22971,12 +22971,12 @@ var require_stringify = __commonJS({ } if (node.nodes) { for (let child of node.nodes) { - output += stringify2(child); + output += stringify4(child); } } return output; }; - return stringify2(ast); + return stringify4(ast); }; } }); @@ -23234,7 +23234,7 @@ var require_fill_range = __commonJS({ ; return index > 0; }; - var stringify2 = (start, end, options) => { + var stringify4 = (start, end, options) => { if (typeof start === "string" || typeof end === "string") { return true; } @@ -23336,8 +23336,8 @@ var require_fill_range = __commonJS({ step = Math.max(Math.abs(step), 1); let padded = zeros(startString) || zeros(endString) || zeros(stepString); let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify2(start, end, options) === false; - let format7 = options.transform || transform2(toNumber); + let toNumber = padded === false && stringify4(start, end, options) === false; + let format6 = options.transform || transform2(toNumber); if (options.toRegex && step === 1) { return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); } @@ -23349,7 +23349,7 @@ var require_fill_range = __commonJS({ if (options.toRegex === true && step > 1) { push(a); } else { - range.push(pad(format7(a, index), maxLen, toNumber)); + range.push(pad(format6(a, index), maxLen, toNumber)); } a = descending ? a - step : a + step; index++; @@ -23363,7 +23363,7 @@ var require_fill_range = __commonJS({ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { return invalidRange(start, end, options); } - let format7 = options.transform || ((val) => String.fromCharCode(val)); + let format6 = options.transform || ((val) => String.fromCharCode(val)); let a = `${start}`.charCodeAt(0); let b = `${end}`.charCodeAt(0); let descending = a > b; @@ -23375,7 +23375,7 @@ var require_fill_range = __commonJS({ let range = []; let index = 0; while (descending ? a >= b : a <= b) { - range.push(format7(a, index)); + range.push(format6(a, index)); a = descending ? a - step : a + step; index++; } @@ -23471,7 +23471,7 @@ var require_expand = __commonJS({ "../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js"(exports, module2) { "use strict"; var fill = require_fill_range(); - var stringify2 = require_stringify(); + var stringify4 = require_stringify(); var utils = require_utils5(); var append = (queue = "", stash = "", enclose = false) => { let result = []; @@ -23508,7 +23508,7 @@ var require_expand = __commonJS({ q = p.queue; } if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify2(node, options))); + q.push(append(q.pop(), stringify4(node, options))); return; } if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { @@ -23522,7 +23522,7 @@ var require_expand = __commonJS({ } let range = fill(...args, options); if (range.length === 0) { - range = stringify2(node, options); + range = stringify4(node, options); } q.push(append(q.pop(), range)); node.nodes = []; @@ -23668,7 +23668,7 @@ var require_constants5 = __commonJS({ var require_parse2 = __commonJS({ "../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports, module2) { "use strict"; - var stringify2 = require_stringify(); + var stringify4 = require_stringify(); var { MAX_LENGTH, CHAR_BACKSLASH, @@ -23698,7 +23698,7 @@ var require_parse2 = __commonJS({ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants5(); - var parse4 = (input, options = {}) => { + var parse5 = (input, options = {}) => { if (typeof input !== "string") { throw new TypeError("Expected a string"); } @@ -23843,7 +23843,7 @@ var require_parse2 = __commonJS({ if (block.ranges > 0) { block.ranges = 0; let open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify2(block) }]; + block.nodes = [open, { type: "text", value: stringify4(block) }]; } push({ type: "comma", value }); block.commas++; @@ -23904,7 +23904,7 @@ var require_parse2 = __commonJS({ push({ type: "eos" }); return ast; }; - module2.exports = parse4; + module2.exports = parse5; } }); @@ -23912,10 +23912,10 @@ var require_parse2 = __commonJS({ var require_braces = __commonJS({ "../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js"(exports, module2) { "use strict"; - var stringify2 = require_stringify(); + var stringify4 = require_stringify(); var compile = require_compile(); var expand = require_expand(); - var parse4 = require_parse2(); + var parse5 = require_parse2(); var braces = (input, options = {}) => { let output = []; if (Array.isArray(input)) { @@ -23935,12 +23935,12 @@ var require_braces = __commonJS({ } return output; }; - braces.parse = (input, options = {}) => parse4(input, options); + braces.parse = (input, options = {}) => parse5(input, options); braces.stringify = (input, options = {}) => { if (typeof input === "string") { - return stringify2(braces.parse(input, options), options); + return stringify4(braces.parse(input, options), options); } - return stringify2(input, options); + return stringify4(input, options); }; braces.compile = (input, options = {}) => { if (typeof input === "string") { @@ -23975,7 +23975,7 @@ var require_braces = __commonJS({ var require_constants6 = __commonJS({ "../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module2) { "use strict"; - var path26 = require("path"); + var path27 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -24145,7 +24145,7 @@ var require_constants6 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path26.sep, + SEP: path27.sep, /** * Create EXTGLOB_CHARS */ @@ -24172,7 +24172,7 @@ var require_constants6 = __commonJS({ var require_utils6 = __commonJS({ "../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports) { "use strict"; - var path26 = require("path"); + var path27 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -24201,7 +24201,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path26.sep === "\\"; + return win32 === true || path27.sep === "\\"; }; exports.escapeLast = (input, char, lastIdx) => { const idx2 = input.lastIndexOf(char, lastIdx); @@ -24593,7 +24593,7 @@ var require_parse3 = __commonJS({ var syntaxError = (type, char) => { return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; }; - var parse4 = (input, options) => { + var parse5 = (input, options) => { if (typeof input !== "string") { throw new TypeError("Expected a string"); } @@ -24743,7 +24743,7 @@ var require_parse3 = __commonJS({ output = token.close = `)$))${extglobStar}`; } if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse4(rest, { ...options, fastpaths: false }).output; + const expression = parse5(rest, { ...options, fastpaths: false }).output; output = token.close = `)${expression})${extglobStar})`; } if (token.prev.type === "bos") { @@ -25272,7 +25272,7 @@ var require_parse3 = __commonJS({ } return state; }; - parse4.fastpaths = (input, options) => { + parse5.fastpaths = (input, options) => { const opts = { ...options }; const max4 = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; const len = input.length; @@ -25341,7 +25341,7 @@ var require_parse3 = __commonJS({ } return source; }; - module2.exports = parse4; + module2.exports = parse5; } }); @@ -25349,9 +25349,9 @@ var require_parse3 = __commonJS({ var require_picomatch = __commonJS({ "../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module2) { "use strict"; - var path26 = require("path"); + var path27 = require("path"); var scan3 = require_scan(); - var parse4 = require_parse3(); + var parse5 = require_parse3(); var utils = require_utils6(); var constants = require_constants6(); var isObject = (val) => val && typeof val === "object" && !Array.isArray(val); @@ -25417,11 +25417,11 @@ var require_picomatch = __commonJS({ return { isMatch: false, output: "" }; } const opts = options || {}; - const format7 = opts.format || (posix4 ? utils.toPosixSlashes : null); + const format6 = opts.format || (posix4 ? utils.toPosixSlashes : null); let match2 = input === glob2; - let output = match2 && format7 ? format7(input) : input; + let output = match2 && format6 ? format6(input) : input; if (match2 === false) { - output = format7 ? format7(input) : input; + output = format6 ? format6(input) : input; match2 = output === glob2; } if (match2 === false || opts.capture === true) { @@ -25435,13 +25435,13 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob2, options, posix4 = utils.isWindows(options)) => { const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path26.basename(input)); + return regex.test(path27.basename(input)); }; picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); picomatch.parse = (pattern, options) => { if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse4(pattern, { ...options, fastpaths: false }); + return parse5(pattern, { ...options, fastpaths: false }); }; picomatch.scan = (input, options) => scan3(input, options); picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { @@ -25467,10 +25467,10 @@ var require_picomatch = __commonJS({ } let parsed = { negated: false, fastpaths: true }; if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse4.fastpaths(input, options); + parsed.output = parse5.fastpaths(input, options); } if (!parsed.output) { - parsed = parse4(input, options); + parsed = parse5(input, options); } return picomatch.compileRe(parsed, options, returnOutput, returnState); }; @@ -25591,9 +25591,9 @@ var require_micromatch = __commonJS({ if (!utils.isObject(obj)) { throw new TypeError("Expected the first argument to be an object"); } - let keys2 = micromatch(Object.keys(obj), patterns, options); + let keys3 = micromatch(Object.keys(obj), patterns, options); let res = {}; - for (let key of keys2) + for (let key of keys3) res[key] = obj[key]; return res; }; @@ -25706,7 +25706,7 @@ var require_esprima = __commonJS({ var jsx_parser_1 = __webpack_require__(3); var parser_1 = __webpack_require__(8); var tokenizer_1 = __webpack_require__(15); - function parse4(code, options, delegate) { + function parse5(code, options, delegate) { var commentHandler = null; var proxyDelegate = function(node, metadata) { if (delegate) { @@ -25751,17 +25751,17 @@ var require_esprima = __commonJS({ } return ast; } - exports2.parse = parse4; + exports2.parse = parse5; function parseModule(code, options, delegate) { var parsingOptions = options || {}; parsingOptions.sourceType = "module"; - return parse4(code, parsingOptions, delegate); + return parse5(code, parsingOptions, delegate); } exports2.parseModule = parseModule; function parseScript(code, options, delegate) { var parsingOptions = options || {}; parsingOptions.sourceType = "script"; - return parse4(code, parsingOptions, delegate); + return parse5(code, parsingOptions, delegate); } exports2.parseScript = parseScript; function tokenize(code, options, delegate) { @@ -26038,7 +26038,7 @@ var require_esprima = __commonJS({ var character_1 = __webpack_require__(4); var JSXNode = __webpack_require__(5); var jsx_syntax_1 = __webpack_require__(6); - var Node2 = __webpack_require__(7); + var Node = __webpack_require__(7); var parser_1 = __webpack_require__(8); var token_1 = __webpack_require__(13); var xhtml_entities_1 = __webpack_require__(14); @@ -26354,7 +26354,7 @@ var require_esprima = __commonJS({ this.throwUnexpectedToken(token); } var raw = this.getTokenRaw(token); - return this.finalize(node, new Node2.Literal(token.value, raw)); + return this.finalize(node, new Node.Literal(token.value, raw)); }; JSXParser2.prototype.parseJSXExpressionAttribute = function() { var node = this.createJSXNode(); @@ -27380,7 +27380,7 @@ var require_esprima = __commonJS({ var assert_1 = __webpack_require__(9); var error_handler_1 = __webpack_require__(10); var messages_1 = __webpack_require__(11); - var Node2 = __webpack_require__(7); + var Node = __webpack_require__(7); var scanner_1 = __webpack_require__(12); var syntax_1 = __webpack_require__(2); var token_1 = __webpack_require__(13); @@ -27797,7 +27797,7 @@ var require_esprima = __commonJS({ if ((this.context.isModule || this.context.await) && this.lookahead.value === "await") { this.tolerateUnexpectedToken(this.lookahead); } - expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node2.Identifier(this.nextToken().value)); + expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); break; case 6: case 8: @@ -27808,21 +27808,21 @@ var require_esprima = __commonJS({ this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node2.Literal(token.value, raw)); + expr = this.finalize(node, new Node.Literal(token.value, raw)); break; case 1: this.context.isAssignmentTarget = false; this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node2.Literal(token.value === "true", raw)); + expr = this.finalize(node, new Node.Literal(token.value === "true", raw)); break; case 5: this.context.isAssignmentTarget = false; this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node2.Literal(null, raw)); + expr = this.finalize(node, new Node.Literal(null, raw)); break; case 10: expr = this.parseTemplateLiteral(); @@ -27846,7 +27846,7 @@ var require_esprima = __commonJS({ this.scanner.index = this.startMarker.index; token = this.nextRegexToken(); raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node2.RegexLiteral(token.regex, raw, token.pattern, token.flags)); + expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); break; default: expr = this.throwUnexpectedToken(this.nextToken()); @@ -27856,7 +27856,7 @@ var require_esprima = __commonJS({ if (!this.context.strict && this.context.allowYield && this.matchKeyword("yield")) { expr = this.parseIdentifierName(); } else if (!this.context.strict && this.matchKeyword("let")) { - expr = this.finalize(node, new Node2.Identifier(this.nextToken().value)); + expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); } else { this.context.isAssignmentTarget = false; this.context.isBindingElement = false; @@ -27864,7 +27864,7 @@ var require_esprima = __commonJS({ expr = this.parseFunctionExpression(); } else if (this.matchKeyword("this")) { this.nextToken(); - expr = this.finalize(node, new Node2.ThisExpression()); + expr = this.finalize(node, new Node.ThisExpression()); } else if (this.matchKeyword("class")) { expr = this.parseClassExpression(); } else { @@ -27881,7 +27881,7 @@ var require_esprima = __commonJS({ var node = this.createNode(); this.expect("..."); var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); - return this.finalize(node, new Node2.SpreadElement(arg)); + return this.finalize(node, new Node.SpreadElement(arg)); }; Parser2.prototype.parseArrayInitializer = function() { var node = this.createNode(); @@ -27907,7 +27907,7 @@ var require_esprima = __commonJS({ } } this.expect("]"); - return this.finalize(node, new Node2.ArrayExpression(elements)); + return this.finalize(node, new Node.ArrayExpression(elements)); }; Parser2.prototype.parsePropertyMethod = function(params) { this.context.isAssignmentTarget = false; @@ -27934,7 +27934,7 @@ var require_esprima = __commonJS({ var params = this.parseFormalParameters(); var method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node2.FunctionExpression(null, params.params, method, isGenerator)); + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); }; Parser2.prototype.parsePropertyMethodAsyncFunction = function() { var node = this.createNode(); @@ -27946,7 +27946,7 @@ var require_esprima = __commonJS({ var method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; this.context.await = previousAwait; - return this.finalize(node, new Node2.AsyncFunctionExpression(null, params.params, method)); + return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); }; Parser2.prototype.parseObjectPropertyKey = function() { var node = this.createNode(); @@ -27959,13 +27959,13 @@ var require_esprima = __commonJS({ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); } var raw = this.getTokenRaw(token); - key = this.finalize(node, new Node2.Literal(token.value, raw)); + key = this.finalize(node, new Node.Literal(token.value, raw)); break; case 3: case 1: case 5: case 4: - key = this.finalize(node, new Node2.Identifier(token.value)); + key = this.finalize(node, new Node.Identifier(token.value)); break; case 7: if (token.value === "[") { @@ -27998,7 +27998,7 @@ var require_esprima = __commonJS({ this.nextToken(); computed = this.match("["); isAsync = !this.hasLineTerminator && id === "async" && !this.match(":") && !this.match("(") && !this.match("*") && !this.match(","); - key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node2.Identifier(id)); + key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); } else if (this.match("*")) { this.nextToken(); } else { @@ -28041,13 +28041,13 @@ var require_esprima = __commonJS({ value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); method = true; } else if (token.type === 3) { - var id = this.finalize(node, new Node2.Identifier(token.value)); + var id = this.finalize(node, new Node.Identifier(token.value)); if (this.match("=")) { this.context.firstCoverInitializedNameError = this.lookahead; this.nextToken(); shorthand = true; var init = this.isolateCoverGrammar(this.parseAssignmentExpression); - value = this.finalize(node, new Node2.AssignmentPattern(id, init)); + value = this.finalize(node, new Node.AssignmentPattern(id, init)); } else { shorthand = true; value = id; @@ -28056,7 +28056,7 @@ var require_esprima = __commonJS({ this.throwUnexpectedToken(this.nextToken()); } } - return this.finalize(node, new Node2.Property(kind, key, computed, value, method, shorthand)); + return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); }; Parser2.prototype.parseObjectInitializer = function() { var node = this.createNode(); @@ -28070,7 +28070,7 @@ var require_esprima = __commonJS({ } } this.expect("}"); - return this.finalize(node, new Node2.ObjectExpression(properties)); + return this.finalize(node, new Node.ObjectExpression(properties)); }; Parser2.prototype.parseTemplateHead = function() { assert_1.assert(this.lookahead.head, "Template literal must start with a template head"); @@ -28078,7 +28078,7 @@ var require_esprima = __commonJS({ var token = this.nextToken(); var raw = token.value; var cooked = token.cooked; - return this.finalize(node, new Node2.TemplateElement({ raw, cooked }, token.tail)); + return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail)); }; Parser2.prototype.parseTemplateElement = function() { if (this.lookahead.type !== 10) { @@ -28088,7 +28088,7 @@ var require_esprima = __commonJS({ var token = this.nextToken(); var raw = token.value; var cooked = token.cooked; - return this.finalize(node, new Node2.TemplateElement({ raw, cooked }, token.tail)); + return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail)); }; Parser2.prototype.parseTemplateLiteral = function() { var node = this.createNode(); @@ -28101,7 +28101,7 @@ var require_esprima = __commonJS({ quasi = this.parseTemplateElement(); quasis.push(quasi); } - return this.finalize(node, new Node2.TemplateLiteral(quasis, expressions)); + return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); }; Parser2.prototype.reinterpretExpressionAsPattern = function(expr) { switch (expr.type) { @@ -28215,7 +28215,7 @@ var require_esprima = __commonJS({ } } if (!arrow) { - expr = this.finalize(this.startNode(startToken), new Node2.SequenceExpression(expressions)); + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); } } if (!arrow) { @@ -28282,7 +28282,7 @@ var require_esprima = __commonJS({ if (!this.isIdentifierName(token)) { this.throwUnexpectedToken(token); } - return this.finalize(node, new Node2.Identifier(token.value)); + return this.finalize(node, new Node.Identifier(token.value)); }; Parser2.prototype.parseNewExpression = function() { var node = this.createNode(); @@ -28293,14 +28293,14 @@ var require_esprima = __commonJS({ this.nextToken(); if (this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === "target") { var property = this.parseIdentifierName(); - expr = new Node2.MetaProperty(id, property); + expr = new Node.MetaProperty(id, property); } else { this.throwUnexpectedToken(this.lookahead); } } else { var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); var args = this.match("(") ? this.parseArguments() : []; - expr = new Node2.NewExpression(callee, args); + expr = new Node.NewExpression(callee, args); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } @@ -28339,7 +28339,7 @@ var require_esprima = __commonJS({ if (this.matchKeyword("super") && this.context.inFunctionBody) { expr = this.createNode(); this.nextToken(); - expr = this.finalize(expr, new Node2.Super()); + expr = this.finalize(expr, new Node.Super()); if (!this.match("(") && !this.match(".") && !this.match("[")) { this.throwUnexpectedToken(this.lookahead); } @@ -28352,13 +28352,13 @@ var require_esprima = __commonJS({ this.context.isAssignmentTarget = true; this.expect("."); var property = this.parseIdentifierName(); - expr = this.finalize(this.startNode(startToken), new Node2.StaticMemberExpression(expr, property)); + expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); } else if (this.match("(")) { var asyncArrow = maybeAsync && startToken.lineNumber === this.lookahead.lineNumber; this.context.isBindingElement = false; this.context.isAssignmentTarget = false; var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); - expr = this.finalize(this.startNode(startToken), new Node2.CallExpression(expr, args)); + expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); if (asyncArrow && this.match("=>")) { for (var i = 0; i < args.length; ++i) { this.reinterpretExpressionAsPattern(args[i]); @@ -28375,10 +28375,10 @@ var require_esprima = __commonJS({ this.expect("["); var property = this.isolateCoverGrammar(this.parseExpression); this.expect("]"); - expr = this.finalize(this.startNode(startToken), new Node2.ComputedMemberExpression(expr, property)); + expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); } else if (this.lookahead.type === 10 && this.lookahead.head) { var quasi = this.parseTemplateLiteral(); - expr = this.finalize(this.startNode(startToken), new Node2.TaggedTemplateExpression(expr, quasi)); + expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); } else { break; } @@ -28392,7 +28392,7 @@ var require_esprima = __commonJS({ if (!this.match("[") && !this.match(".")) { this.throwUnexpectedToken(this.lookahead); } - return this.finalize(node, new Node2.Super()); + return this.finalize(node, new Node.Super()); }; Parser2.prototype.parseLeftHandSideExpression = function() { assert_1.assert(this.context.allowIn, "callee of new expression always allow in keyword."); @@ -28405,16 +28405,16 @@ var require_esprima = __commonJS({ this.expect("["); var property = this.isolateCoverGrammar(this.parseExpression); this.expect("]"); - expr = this.finalize(node, new Node2.ComputedMemberExpression(expr, property)); + expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); } else if (this.match(".")) { this.context.isBindingElement = false; this.context.isAssignmentTarget = true; this.expect("."); var property = this.parseIdentifierName(); - expr = this.finalize(node, new Node2.StaticMemberExpression(expr, property)); + expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); } else if (this.lookahead.type === 10 && this.lookahead.head) { var quasi = this.parseTemplateLiteral(); - expr = this.finalize(node, new Node2.TaggedTemplateExpression(expr, quasi)); + expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); } else { break; } @@ -28435,7 +28435,7 @@ var require_esprima = __commonJS({ this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); } var prefix = true; - expr = this.finalize(node, new Node2.UpdateExpression(token.value, expr, prefix)); + expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } else { @@ -28452,7 +28452,7 @@ var require_esprima = __commonJS({ this.context.isBindingElement = false; var operator = this.nextToken().value; var prefix = false; - expr = this.finalize(this.startNode(startToken), new Node2.UpdateExpression(operator, expr, prefix)); + expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); } } } @@ -28462,7 +28462,7 @@ var require_esprima = __commonJS({ var node = this.createNode(); this.nextToken(); var argument = this.parseUnaryExpression(); - return this.finalize(node, new Node2.AwaitExpression(argument)); + return this.finalize(node, new Node.AwaitExpression(argument)); }; Parser2.prototype.parseUnaryExpression = function() { var expr; @@ -28470,7 +28470,7 @@ var require_esprima = __commonJS({ var node = this.startNode(this.lookahead); var token = this.nextToken(); expr = this.inheritCoverGrammar(this.parseUnaryExpression); - expr = this.finalize(node, new Node2.UnaryExpression(token.value, expr)); + expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); if (this.context.strict && expr.operator === "delete" && expr.argument.type === syntax_1.Syntax.Identifier) { this.tolerateError(messages_1.Messages.StrictDelete); } @@ -28492,7 +28492,7 @@ var require_esprima = __commonJS({ this.context.isBindingElement = false; var left = expr; var right = this.isolateCoverGrammar(this.parseExponentiationExpression); - expr = this.finalize(this.startNode(startToken), new Node2.BinaryExpression("**", left, right)); + expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression("**", left, right)); } return expr; }; @@ -28534,7 +28534,7 @@ var require_esprima = __commonJS({ left = stack.pop(); markers.pop(); var node = this.startNode(markers[markers.length - 1]); - stack.push(this.finalize(node, new Node2.BinaryExpression(operator, left, right))); + stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); } stack.push(this.nextToken().value); precedences.push(prec); @@ -28549,7 +28549,7 @@ var require_esprima = __commonJS({ var lastLineStart = lastMarker && lastMarker.lineStart; var node = this.startNode(marker, lastLineStart); var operator = stack[i - 1]; - expr = this.finalize(node, new Node2.BinaryExpression(operator, stack[i - 2], expr)); + expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); i -= 2; lastMarker = marker; } @@ -28567,7 +28567,7 @@ var require_esprima = __commonJS({ this.context.allowIn = previousAllowIn; this.expect(":"); var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); - expr = this.finalize(this.startNode(startToken), new Node2.ConditionalExpression(expr, consequent, alternate)); + expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } @@ -28599,7 +28599,7 @@ var require_esprima = __commonJS({ default: break; } - options.simple = options.simple && param instanceof Node2.Identifier; + options.simple = options.simple && param instanceof Node.Identifier; }; Parser2.prototype.reinterpretAsCoverFormalsList = function(expr) { var params = [expr]; @@ -28711,7 +28711,7 @@ var require_esprima = __commonJS({ if (this.context.strict && list.stricted) { this.tolerateUnexpectedToken(list.stricted, list.message); } - expr = isAsync ? this.finalize(node, new Node2.AsyncArrowFunctionExpression(list.params, body, expression)) : this.finalize(node, new Node2.ArrowFunctionExpression(list.params, body, expression)); + expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; this.context.allowYield = previousAllowYield; @@ -28740,7 +28740,7 @@ var require_esprima = __commonJS({ token = this.nextToken(); var operator = token.value; var right = this.isolateCoverGrammar(this.parseAssignmentExpression); - expr = this.finalize(this.startNode(startToken), new Node2.AssignmentExpression(operator, expr, right)); + expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); this.context.firstCoverInitializedNameError = null; } } @@ -28760,7 +28760,7 @@ var require_esprima = __commonJS({ this.nextToken(); expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); } - expr = this.finalize(this.startNode(startToken), new Node2.SequenceExpression(expressions)); + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); } return expr; }; @@ -28814,7 +28814,7 @@ var require_esprima = __commonJS({ block.push(this.parseStatementListItem()); } this.expect("}"); - return this.finalize(node, new Node2.BlockStatement(block)); + return this.finalize(node, new Node.BlockStatement(block)); }; Parser2.prototype.parseLexicalBinding = function(kind, options) { var node = this.createNode(); @@ -28839,7 +28839,7 @@ var require_esprima = __commonJS({ this.expect("="); init = this.isolateCoverGrammar(this.parseAssignmentExpression); } - return this.finalize(node, new Node2.VariableDeclarator(id, init)); + return this.finalize(node, new Node.VariableDeclarator(id, init)); }; Parser2.prototype.parseBindingList = function(kind, options) { var list = [this.parseLexicalBinding(kind, options)]; @@ -28862,13 +28862,13 @@ var require_esprima = __commonJS({ assert_1.assert(kind === "let" || kind === "const", "Lexical declaration must be either let or const"); var declarations = this.parseBindingList(kind, options); this.consumeSemicolon(); - return this.finalize(node, new Node2.VariableDeclaration(declarations, kind)); + return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); }; Parser2.prototype.parseBindingRestElement = function(params, kind) { var node = this.createNode(); this.expect("..."); var arg = this.parsePattern(params, kind); - return this.finalize(node, new Node2.RestElement(arg)); + return this.finalize(node, new Node.RestElement(arg)); }; Parser2.prototype.parseArrayPattern = function(params, kind) { var node = this.createNode(); @@ -28891,7 +28891,7 @@ var require_esprima = __commonJS({ } } this.expect("]"); - return this.finalize(node, new Node2.ArrayPattern(elements)); + return this.finalize(node, new Node.ArrayPattern(elements)); }; Parser2.prototype.parsePropertyPattern = function(params, kind) { var node = this.createNode(); @@ -28903,13 +28903,13 @@ var require_esprima = __commonJS({ if (this.lookahead.type === 3) { var keyToken = this.lookahead; key = this.parseVariableIdentifier(); - var init = this.finalize(node, new Node2.Identifier(keyToken.value)); + var init = this.finalize(node, new Node.Identifier(keyToken.value)); if (this.match("=")) { params.push(keyToken); shorthand = true; this.nextToken(); var expr = this.parseAssignmentExpression(); - value = this.finalize(this.startNode(keyToken), new Node2.AssignmentPattern(init, expr)); + value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); } else if (!this.match(":")) { params.push(keyToken); shorthand = true; @@ -28924,7 +28924,7 @@ var require_esprima = __commonJS({ this.expect(":"); value = this.parsePatternWithDefault(params, kind); } - return this.finalize(node, new Node2.Property("init", key, computed, value, method, shorthand)); + return this.finalize(node, new Node.Property("init", key, computed, value, method, shorthand)); }; Parser2.prototype.parseObjectPattern = function(params, kind) { var node = this.createNode(); @@ -28937,7 +28937,7 @@ var require_esprima = __commonJS({ } } this.expect("}"); - return this.finalize(node, new Node2.ObjectPattern(properties)); + return this.finalize(node, new Node.ObjectPattern(properties)); }; Parser2.prototype.parsePattern = function(params, kind) { var pattern; @@ -28963,7 +28963,7 @@ var require_esprima = __commonJS({ this.context.allowYield = true; var right = this.isolateCoverGrammar(this.parseAssignmentExpression); this.context.allowYield = previousAllowYield; - pattern = this.finalize(this.startNode(startToken), new Node2.AssignmentPattern(pattern, right)); + pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); } return pattern; }; @@ -28987,7 +28987,7 @@ var require_esprima = __commonJS({ } else if ((this.context.isModule || this.context.await) && token.type === 3 && token.value === "await") { this.tolerateUnexpectedToken(token); } - return this.finalize(node, new Node2.Identifier(token.value)); + return this.finalize(node, new Node.Identifier(token.value)); }; Parser2.prototype.parseVariableDeclaration = function(options) { var node = this.createNode(); @@ -29005,7 +29005,7 @@ var require_esprima = __commonJS({ } else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) { this.expect("="); } - return this.finalize(node, new Node2.VariableDeclarator(id, init)); + return this.finalize(node, new Node.VariableDeclarator(id, init)); }; Parser2.prototype.parseVariableDeclarationList = function(options) { var opt = { inFor: options.inFor }; @@ -29022,18 +29022,18 @@ var require_esprima = __commonJS({ this.expectKeyword("var"); var declarations = this.parseVariableDeclarationList({ inFor: false }); this.consumeSemicolon(); - return this.finalize(node, new Node2.VariableDeclaration(declarations, "var")); + return this.finalize(node, new Node.VariableDeclaration(declarations, "var")); }; Parser2.prototype.parseEmptyStatement = function() { var node = this.createNode(); this.expect(";"); - return this.finalize(node, new Node2.EmptyStatement()); + return this.finalize(node, new Node.EmptyStatement()); }; Parser2.prototype.parseExpressionStatement = function() { var node = this.createNode(); var expr = this.parseExpression(); this.consumeSemicolon(); - return this.finalize(node, new Node2.ExpressionStatement(expr)); + return this.finalize(node, new Node.ExpressionStatement(expr)); }; Parser2.prototype.parseIfClause = function() { if (this.context.strict && this.matchKeyword("function")) { @@ -29050,7 +29050,7 @@ var require_esprima = __commonJS({ var test = this.parseExpression(); if (!this.match(")") && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); - consequent = this.finalize(this.createNode(), new Node2.EmptyStatement()); + consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(")"); consequent = this.parseIfClause(); @@ -29059,7 +29059,7 @@ var require_esprima = __commonJS({ alternate = this.parseIfClause(); } } - return this.finalize(node, new Node2.IfStatement(test, consequent, alternate)); + return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); }; Parser2.prototype.parseDoWhileStatement = function() { var node = this.createNode(); @@ -29079,7 +29079,7 @@ var require_esprima = __commonJS({ this.nextToken(); } } - return this.finalize(node, new Node2.DoWhileStatement(body, test)); + return this.finalize(node, new Node.DoWhileStatement(body, test)); }; Parser2.prototype.parseWhileStatement = function() { var node = this.createNode(); @@ -29089,7 +29089,7 @@ var require_esprima = __commonJS({ var test = this.parseExpression(); if (!this.match(")") && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node2.EmptyStatement()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(")"); var previousInIteration = this.context.inIteration; @@ -29097,7 +29097,7 @@ var require_esprima = __commonJS({ body = this.parseStatement(); this.context.inIteration = previousInIteration; } - return this.finalize(node, new Node2.WhileStatement(test, body)); + return this.finalize(node, new Node.WhileStatement(test, body)); }; Parser2.prototype.parseForStatement = function() { var init = null; @@ -29123,27 +29123,27 @@ var require_esprima = __commonJS({ if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) { this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, "for-in"); } - init = this.finalize(init, new Node2.VariableDeclaration(declarations, "var")); + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); this.nextToken(); left = init; right = this.parseExpression(); init = null; } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) { - init = this.finalize(init, new Node2.VariableDeclaration(declarations, "var")); + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); this.nextToken(); left = init; right = this.parseAssignmentExpression(); init = null; forIn = false; } else { - init = this.finalize(init, new Node2.VariableDeclaration(declarations, "var")); + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); this.expect(";"); } } else if (this.matchKeyword("const") || this.matchKeyword("let")) { init = this.createNode(); var kind = this.nextToken().value; if (!this.context.strict && this.lookahead.value === "in") { - init = this.finalize(init, new Node2.Identifier(kind)); + init = this.finalize(init, new Node.Identifier(kind)); this.nextToken(); left = init; right = this.parseExpression(); @@ -29154,13 +29154,13 @@ var require_esprima = __commonJS({ var declarations = this.parseBindingList(kind, { inFor: true }); this.context.allowIn = previousAllowIn; if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword("in")) { - init = this.finalize(init, new Node2.VariableDeclaration(declarations, kind)); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); this.nextToken(); left = init; right = this.parseExpression(); init = null; } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) { - init = this.finalize(init, new Node2.VariableDeclaration(declarations, kind)); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); this.nextToken(); left = init; right = this.parseAssignmentExpression(); @@ -29168,7 +29168,7 @@ var require_esprima = __commonJS({ forIn = false; } else { this.consumeSemicolon(); - init = this.finalize(init, new Node2.VariableDeclaration(declarations, kind)); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); } } } else { @@ -29203,7 +29203,7 @@ var require_esprima = __commonJS({ this.nextToken(); initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); } - init = this.finalize(this.startNode(initStartToken), new Node2.SequenceExpression(initSeq)); + init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); } this.expect(";"); } @@ -29221,7 +29221,7 @@ var require_esprima = __commonJS({ var body; if (!this.match(")") && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node2.EmptyStatement()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(")"); var previousInIteration = this.context.inIteration; @@ -29229,7 +29229,7 @@ var require_esprima = __commonJS({ body = this.isolateCoverGrammar(this.parseStatement); this.context.inIteration = previousInIteration; } - return typeof left === "undefined" ? this.finalize(node, new Node2.ForStatement(init, test, update, body)) : forIn ? this.finalize(node, new Node2.ForInStatement(left, right, body)) : this.finalize(node, new Node2.ForOfStatement(left, right, body)); + return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init, test, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body)); }; Parser2.prototype.parseContinueStatement = function() { var node = this.createNode(); @@ -29247,7 +29247,7 @@ var require_esprima = __commonJS({ if (label === null && !this.context.inIteration) { this.throwError(messages_1.Messages.IllegalContinue); } - return this.finalize(node, new Node2.ContinueStatement(label)); + return this.finalize(node, new Node.ContinueStatement(label)); }; Parser2.prototype.parseBreakStatement = function() { var node = this.createNode(); @@ -29265,7 +29265,7 @@ var require_esprima = __commonJS({ if (label === null && !this.context.inIteration && !this.context.inSwitch) { this.throwError(messages_1.Messages.IllegalBreak); } - return this.finalize(node, new Node2.BreakStatement(label)); + return this.finalize(node, new Node.BreakStatement(label)); }; Parser2.prototype.parseReturnStatement = function() { if (!this.context.inFunctionBody) { @@ -29276,7 +29276,7 @@ var require_esprima = __commonJS({ var hasArgument = !this.match(";") && !this.match("}") && !this.hasLineTerminator && this.lookahead.type !== 2 || this.lookahead.type === 8 || this.lookahead.type === 10; var argument = hasArgument ? this.parseExpression() : null; this.consumeSemicolon(); - return this.finalize(node, new Node2.ReturnStatement(argument)); + return this.finalize(node, new Node.ReturnStatement(argument)); }; Parser2.prototype.parseWithStatement = function() { if (this.context.strict) { @@ -29289,12 +29289,12 @@ var require_esprima = __commonJS({ var object = this.parseExpression(); if (!this.match(")") && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node2.EmptyStatement()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(")"); body = this.parseStatement(); } - return this.finalize(node, new Node2.WithStatement(object, body)); + return this.finalize(node, new Node.WithStatement(object, body)); }; Parser2.prototype.parseSwitchCase = function() { var node = this.createNode(); @@ -29314,7 +29314,7 @@ var require_esprima = __commonJS({ } consequent.push(this.parseStatementListItem()); } - return this.finalize(node, new Node2.SwitchCase(test, consequent)); + return this.finalize(node, new Node.SwitchCase(test, consequent)); }; Parser2.prototype.parseSwitchStatement = function() { var node = this.createNode(); @@ -29342,7 +29342,7 @@ var require_esprima = __commonJS({ } this.expect("}"); this.context.inSwitch = previousInSwitch; - return this.finalize(node, new Node2.SwitchStatement(discriminant, cases)); + return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); }; Parser2.prototype.parseLabelledStatement = function() { var node = this.createNode(); @@ -29373,10 +29373,10 @@ var require_esprima = __commonJS({ body = this.parseStatement(); } delete this.context.labelSet[key]; - statement = new Node2.LabeledStatement(id, body); + statement = new Node.LabeledStatement(id, body); } else { this.consumeSemicolon(); - statement = new Node2.ExpressionStatement(expr); + statement = new Node.ExpressionStatement(expr); } return this.finalize(node, statement); }; @@ -29388,7 +29388,7 @@ var require_esprima = __commonJS({ } var argument = this.parseExpression(); this.consumeSemicolon(); - return this.finalize(node, new Node2.ThrowStatement(argument)); + return this.finalize(node, new Node.ThrowStatement(argument)); }; Parser2.prototype.parseCatchClause = function() { var node = this.createNode(); @@ -29414,7 +29414,7 @@ var require_esprima = __commonJS({ } this.expect(")"); var body = this.parseBlock(); - return this.finalize(node, new Node2.CatchClause(param, body)); + return this.finalize(node, new Node.CatchClause(param, body)); }; Parser2.prototype.parseFinallyClause = function() { this.expectKeyword("finally"); @@ -29429,13 +29429,13 @@ var require_esprima = __commonJS({ if (!handler && !finalizer) { this.throwError(messages_1.Messages.NoCatchOrFinally); } - return this.finalize(node, new Node2.TryStatement(block, handler, finalizer)); + return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); }; Parser2.prototype.parseDebuggerStatement = function() { var node = this.createNode(); this.expectKeyword("debugger"); this.consumeSemicolon(); - return this.finalize(node, new Node2.DebuggerStatement()); + return this.finalize(node, new Node.DebuggerStatement()); }; Parser2.prototype.parseStatement = function() { var statement; @@ -29540,7 +29540,7 @@ var require_esprima = __commonJS({ this.context.inIteration = previousInIteration; this.context.inSwitch = previousInSwitch; this.context.inFunctionBody = previousInFunctionBody; - return this.finalize(node, new Node2.BlockStatement(body)); + return this.finalize(node, new Node.BlockStatement(body)); }; Parser2.prototype.validateParam = function(options, param, name) { var key = "$" + name; @@ -29581,7 +29581,7 @@ var require_esprima = __commonJS({ if (!this.match(")")) { this.throwError(messages_1.Messages.ParameterAfterRestParameter); } - return this.finalize(node, new Node2.RestElement(arg)); + return this.finalize(node, new Node.RestElement(arg)); }; Parser2.prototype.parseFormalParameter = function(options) { var params = []; @@ -29589,7 +29589,7 @@ var require_esprima = __commonJS({ for (var i = 0; i < params.length; i++) { this.validateParam(options, params[i], params[i].value); } - options.simple = options.simple && param instanceof Node2.Identifier; + options.simple = options.simple && param instanceof Node.Identifier; options.params.push(param); }; Parser2.prototype.parseFormalParameters = function(firstRestricted) { @@ -29689,7 +29689,7 @@ var require_esprima = __commonJS({ this.context.allowStrictDirective = previousAllowStrictDirective; this.context.await = previousAllowAwait; this.context.allowYield = previousAllowYield; - return isAsync ? this.finalize(node, new Node2.AsyncFunctionDeclaration(id, params, body)) : this.finalize(node, new Node2.FunctionDeclaration(id, params, body, isGenerator)); + return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); }; Parser2.prototype.parseFunctionExpression = function() { var node = this.createNode(); @@ -29747,7 +29747,7 @@ var require_esprima = __commonJS({ this.context.allowStrictDirective = previousAllowStrictDirective; this.context.await = previousAllowAwait; this.context.allowYield = previousAllowYield; - return isAsync ? this.finalize(node, new Node2.AsyncFunctionExpression(id, params, body)) : this.finalize(node, new Node2.FunctionExpression(id, params, body, isGenerator)); + return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); }; Parser2.prototype.parseDirective = function() { var token = this.lookahead; @@ -29755,7 +29755,7 @@ var require_esprima = __commonJS({ var expr = this.parseExpression(); var directive = expr.type === syntax_1.Syntax.Literal ? this.getTokenRaw(token).slice(1, -1) : null; this.consumeSemicolon(); - return this.finalize(node, directive ? new Node2.Directive(expr, directive) : new Node2.ExpressionStatement(expr)); + return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); }; Parser2.prototype.parseDirectivePrologues = function() { var firstRestricted = null; @@ -29814,7 +29814,7 @@ var require_esprima = __commonJS({ } var method = this.parsePropertyMethod(formalParameters); this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node2.FunctionExpression(null, formalParameters.params, method, isGenerator)); + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); }; Parser2.prototype.parseSetterMethod = function() { var node = this.createNode(); @@ -29824,12 +29824,12 @@ var require_esprima = __commonJS({ var formalParameters = this.parseFormalParameters(); if (formalParameters.params.length !== 1) { this.tolerateError(messages_1.Messages.BadSetterArity); - } else if (formalParameters.params[0] instanceof Node2.RestElement) { + } else if (formalParameters.params[0] instanceof Node.RestElement) { this.tolerateError(messages_1.Messages.BadSetterRestParameter); } var method = this.parsePropertyMethod(formalParameters); this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node2.FunctionExpression(null, formalParameters.params, method, isGenerator)); + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); }; Parser2.prototype.parseGeneratorMethod = function() { var node = this.createNode(); @@ -29840,7 +29840,7 @@ var require_esprima = __commonJS({ this.context.allowYield = false; var method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node2.FunctionExpression(null, params.params, method, isGenerator)); + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); }; Parser2.prototype.isStartOfExpression = function() { var start = true; @@ -29874,7 +29874,7 @@ var require_esprima = __commonJS({ } this.context.allowYield = previousAllowYield; } - return this.finalize(node, new Node2.YieldExpression(argument, delegate)); + return this.finalize(node, new Node.YieldExpression(argument, delegate)); }; Parser2.prototype.parseClassElement = function(hasConstructor) { var token = this.lookahead; @@ -29962,7 +29962,7 @@ var require_esprima = __commonJS({ kind = "constructor"; } } - return this.finalize(node, new Node2.MethodDefinition(key, computed, value, kind, isStatic)); + return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); }; Parser2.prototype.parseClassElementList = function() { var body = []; @@ -29981,7 +29981,7 @@ var require_esprima = __commonJS({ Parser2.prototype.parseClassBody = function() { var node = this.createNode(); var elementList = this.parseClassElementList(); - return this.finalize(node, new Node2.ClassBody(elementList)); + return this.finalize(node, new Node.ClassBody(elementList)); }; Parser2.prototype.parseClassDeclaration = function(identifierIsOptional) { var node = this.createNode(); @@ -29996,7 +29996,7 @@ var require_esprima = __commonJS({ } var classBody = this.parseClassBody(); this.context.strict = previousStrict; - return this.finalize(node, new Node2.ClassDeclaration(id, superClass, classBody)); + return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); }; Parser2.prototype.parseClassExpression = function() { var node = this.createNode(); @@ -30011,7 +30011,7 @@ var require_esprima = __commonJS({ } var classBody = this.parseClassBody(); this.context.strict = previousStrict; - return this.finalize(node, new Node2.ClassExpression(id, superClass, classBody)); + return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); }; Parser2.prototype.parseModule = function() { this.context.strict = true; @@ -30022,7 +30022,7 @@ var require_esprima = __commonJS({ while (this.lookahead.type !== 2) { body.push(this.parseStatementListItem()); } - return this.finalize(node, new Node2.Module(body)); + return this.finalize(node, new Node.Module(body)); }; Parser2.prototype.parseScript = function() { var node = this.createNode(); @@ -30030,7 +30030,7 @@ var require_esprima = __commonJS({ while (this.lookahead.type !== 2) { body.push(this.parseStatementListItem()); } - return this.finalize(node, new Node2.Script(body)); + return this.finalize(node, new Node.Script(body)); }; Parser2.prototype.parseModuleSpecifier = function() { var node = this.createNode(); @@ -30039,7 +30039,7 @@ var require_esprima = __commonJS({ } var token = this.nextToken(); var raw = this.getTokenRaw(token); - return this.finalize(node, new Node2.Literal(token.value, raw)); + return this.finalize(node, new Node.Literal(token.value, raw)); }; Parser2.prototype.parseImportSpecifier = function() { var node = this.createNode(); @@ -30062,7 +30062,7 @@ var require_esprima = __commonJS({ this.throwUnexpectedToken(this.nextToken()); } } - return this.finalize(node, new Node2.ImportSpecifier(local, imported)); + return this.finalize(node, new Node.ImportSpecifier(local, imported)); }; Parser2.prototype.parseNamedImports = function() { this.expect("{"); @@ -30079,7 +30079,7 @@ var require_esprima = __commonJS({ Parser2.prototype.parseImportDefaultSpecifier = function() { var node = this.createNode(); var local = this.parseIdentifierName(); - return this.finalize(node, new Node2.ImportDefaultSpecifier(local)); + return this.finalize(node, new Node.ImportDefaultSpecifier(local)); }; Parser2.prototype.parseImportNamespaceSpecifier = function() { var node = this.createNode(); @@ -30089,7 +30089,7 @@ var require_esprima = __commonJS({ } this.nextToken(); var local = this.parseIdentifierName(); - return this.finalize(node, new Node2.ImportNamespaceSpecifier(local)); + return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); }; Parser2.prototype.parseImportDeclaration = function() { if (this.context.inFunctionBody) { @@ -30129,7 +30129,7 @@ var require_esprima = __commonJS({ src = this.parseModuleSpecifier(); } this.consumeSemicolon(); - return this.finalize(node, new Node2.ImportDeclaration(specifiers, src)); + return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); }; Parser2.prototype.parseExportSpecifier = function() { var node = this.createNode(); @@ -30139,7 +30139,7 @@ var require_esprima = __commonJS({ this.nextToken(); exported = this.parseIdentifierName(); } - return this.finalize(node, new Node2.ExportSpecifier(local, exported)); + return this.finalize(node, new Node.ExportSpecifier(local, exported)); }; Parser2.prototype.parseExportDeclaration = function() { if (this.context.inFunctionBody) { @@ -30152,20 +30152,20 @@ var require_esprima = __commonJS({ this.nextToken(); if (this.matchKeyword("function")) { var declaration = this.parseFunctionDeclaration(true); - exportDeclaration = this.finalize(node, new Node2.ExportDefaultDeclaration(declaration)); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else if (this.matchKeyword("class")) { var declaration = this.parseClassDeclaration(true); - exportDeclaration = this.finalize(node, new Node2.ExportDefaultDeclaration(declaration)); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else if (this.matchContextualKeyword("async")) { var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); - exportDeclaration = this.finalize(node, new Node2.ExportDefaultDeclaration(declaration)); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else { if (this.matchContextualKeyword("from")) { this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); } var declaration = this.match("{") ? this.parseObjectInitializer() : this.match("[") ? this.parseArrayInitializer() : this.parseAssignmentExpression(); this.consumeSemicolon(); - exportDeclaration = this.finalize(node, new Node2.ExportDefaultDeclaration(declaration)); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } } else if (this.match("*")) { this.nextToken(); @@ -30176,7 +30176,7 @@ var require_esprima = __commonJS({ this.nextToken(); var src = this.parseModuleSpecifier(); this.consumeSemicolon(); - exportDeclaration = this.finalize(node, new Node2.ExportAllDeclaration(src)); + exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); } else if (this.lookahead.type === 4) { var declaration = void 0; switch (this.lookahead.value) { @@ -30192,10 +30192,10 @@ var require_esprima = __commonJS({ default: this.throwUnexpectedToken(this.lookahead); } - exportDeclaration = this.finalize(node, new Node2.ExportNamedDeclaration(declaration, [], null)); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); } else if (this.matchAsyncFunction()) { var declaration = this.parseFunctionDeclaration(); - exportDeclaration = this.finalize(node, new Node2.ExportNamedDeclaration(declaration, [], null)); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); } else { var specifiers = []; var source = null; @@ -30219,7 +30219,7 @@ var require_esprima = __commonJS({ } else { this.consumeSemicolon(); } - exportDeclaration = this.finalize(node, new Node2.ExportNamedDeclaration(null, specifiers, source)); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); } return exportDeclaration; }; @@ -31898,13 +31898,13 @@ var require_esprima = __commonJS({ // ../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js var require_util8 = __commonJS({ "../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports) { - function isArray2(arg) { + function isArray3(arg) { if (Array.isArray) { return Array.isArray(arg); } return objectToString(arg) === "[object Array]"; } - exports.isArray = isArray2; + exports.isArray = isArray3; function isBoolean(arg) { return typeof arg === "boolean"; } @@ -32690,10 +32690,10 @@ var require_has_own_prop = __commonJS({ // ../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/common.js var require_common = __commonJS({ "../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/common.js"(exports, module2) { - var hasOwnProperty2 = require_has_own_prop(); + var hasOwnProperty4 = require_has_own_prop(); var { isObject, - isArray: isArray2, + isArray: isArray3, isString: isString4, isNumber } = require_util8(); @@ -32733,7 +32733,7 @@ var require_common = __commonJS({ }); var copy_comments_by_kind = (target, source, target_key, source_key, prefix, remove_source) => { const source_prop = symbol(prefix, source_key); - if (!hasOwnProperty2(source, source_prop)) { + if (!hasOwnProperty4(source, source_prop)) { return; } const target_prop = target_key === source_key ? source_prop : symbol(prefix, target_key); @@ -32760,7 +32760,7 @@ var require_common = __commonJS({ } SYMBOL_PREFIXES.forEach((prefix) => { const target_prop = symbol(prefix, to); - if (!hasOwnProperty2(array, target_prop)) { + if (!hasOwnProperty4(array, target_prop)) { copy_comments_by_kind(array, array, to, from, prefix, true); return; } @@ -32778,12 +32778,12 @@ var require_common = __commonJS({ } }); }; - var assign2 = (target, source, keys2) => { - keys2.forEach((key) => { + var assign3 = (target, source, keys3) => { + keys3.forEach((key) => { if (!isString4(key) && !isNumber(key)) { return; } - if (!hasOwnProperty2(source, key)) { + if (!hasOwnProperty4(source, key)) { return; } target[key] = source[key]; @@ -32814,22 +32814,22 @@ var require_common = __commonJS({ copy_comments, swap_comments, assign_non_prop_comments, - assign(target, source, keys2) { + assign(target, source, keys3) { if (!isObject(target)) { throw new TypeError("Cannot convert undefined or null to object"); } if (!isObject(source)) { return target; } - if (keys2 === UNDEFINED) { - keys2 = Object.keys(source); + if (keys3 === UNDEFINED) { + keys3 = Object.keys(source); assign_non_prop_comments(target, source); - } else if (!isArray2(keys2)) { + } else if (!isArray3(keys3)) { throw new TypeError("keys must be array or undefined"); - } else if (keys2.length === 0) { + } else if (keys3.length === 0) { assign_non_prop_comments(target, source); } - return assign2(target, source, keys2); + return assign3(target, source, keys3); } }; } @@ -32838,7 +32838,7 @@ var require_common = __commonJS({ // ../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/array.js var require_array = __commonJS({ "../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/array.js"(exports, module2) { - var { isArray: isArray2 } = require_util8(); + var { isArray: isArray3 } = require_util8(); var { sort } = require_src(); var { SYMBOL_PREFIXES, @@ -32969,7 +32969,7 @@ var require_array = __commonJS({ move_comments(ret, this, 0, this.length, 0); items.forEach((item) => { const prev = length; - length += isArray2(item) ? item.length : 1; + length += isArray3(item) ? item.length : 1; if (!(item instanceof _CommentArray)) { return; } @@ -33268,7 +33268,7 @@ var require_parse4 = __commonJS({ } } var isObject = (subject) => Object(subject) === subject; - var parse4 = (code, rev, no_comments) => { + var parse5 = (code, rev, no_comments) => { clean6(); tokens = tokenize(code); reviver = rev; @@ -33297,7 +33297,7 @@ var require_parse4 = __commonJS({ return result; }; module2.exports = { - parse: parse4, + parse: parse5, tokenize }; } @@ -33308,7 +33308,7 @@ var require_repeat_string = __commonJS({ "../node_modules/.pnpm/repeat-string@1.6.1/node_modules/repeat-string/index.js"(exports, module2) { "use strict"; var res = ""; - var cache2; + var cache4; module2.exports = repeat; function repeat(str, num) { if (typeof str !== "string") { @@ -33319,8 +33319,8 @@ var require_repeat_string = __commonJS({ if (num === 2) return str + str; var max4 = str.length * num; - if (cache2 !== str || typeof cache2 === "undefined") { - cache2 = str; + if (cache4 !== str || typeof cache4 === "undefined") { + cache4 = str; res = ""; } else if (res.length >= max4) { return res.substr(0, max4); @@ -33343,7 +33343,7 @@ var require_repeat_string = __commonJS({ var require_stringify2 = __commonJS({ "../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/stringify.js"(exports, module2) { var { - isArray: isArray2, + isArray: isArray3, isObject, isFunction, isNumber, @@ -33440,7 +33440,7 @@ var require_stringify2 = __commonJS({ deeper_gap ); inside += before || LF2 + deeper_gap; - inside += stringify2(i, value, deeper_gap) || STR_NULL; + inside += stringify4(i, value, deeper_gap) || STR_NULL; inside += process_comments(value, AFTER_VALUE(i), deeper_gap); after_comma = process_comments(value, AFTER(i), deeper_gap); } @@ -33459,9 +33459,9 @@ var require_stringify2 = __commonJS({ let inside = EMPTY; let after_comma = EMPTY; let first3 = true; - const keys2 = isArray2(replacer) ? replacer : Object.keys(value); + const keys3 = isArray3(replacer) ? replacer : Object.keys(value); const iteratee = (key) => { - const sv = stringify2(key, value, deeper_gap); + const sv = stringify4(key, value, deeper_gap); if (sv === UNDEFINED) { return; } @@ -33478,7 +33478,7 @@ var require_stringify2 = __commonJS({ inside += quote(key) + process_comments(value, AFTER_PROP(key), deeper_gap) + COLON + process_comments(value, AFTER_COLON(key), deeper_gap) + SPACE + sv + process_comments(value, AFTER_VALUE(key), deeper_gap); after_comma = process_comments(value, AFTER(key), deeper_gap); }; - keys2.forEach(iteratee); + keys3.forEach(iteratee); inside += join4( after_comma, process_comments(value, PREFIX_AFTER, deeper_gap), @@ -33486,7 +33486,7 @@ var require_stringify2 = __commonJS({ ); return CURLY_BRACKET_OPEN + join_content(inside, value, gap) + CURLY_BRACKET_CLOSE; }; - function stringify2(key, holder, gap) { + function stringify4(key, holder, gap) { let value = holder[key]; if (isObject(value) && isFunction(value.toJSON)) { value = value.toJSON(key); @@ -33503,7 +33503,7 @@ var require_stringify2 = __commonJS({ case "null": return String(value); case "object": - return isArray2(value) ? array_stringify(value, gap) : object_stringify(value, gap); + return isArray3(value) ? array_stringify(value, gap) : object_stringify(value, gap); default: } } @@ -33526,12 +33526,12 @@ var require_stringify2 = __commonJS({ if (!indent_) { return JSON.stringify(value, replacer_); } - if (!isFunction(replacer_) && !isArray2(replacer_)) { + if (!isFunction(replacer_) && !isArray3(replacer_)) { replacer_ = null; } replacer = replacer_; indent = indent_; - const str = is_primitive_object(value) ? JSON.stringify(value) : stringify2("", { "": value }, EMPTY); + const str = is_primitive_object(value) ? JSON.stringify(value) : stringify4("", { "": value }, EMPTY); clean6(); return isObject(value) ? process_comments(value, PREFIX_BEFORE_ALL, EMPTY).trimLeft() + str + process_comments(value, PREFIX_AFTER_ALL, EMPTY).trimRight() : str; }; @@ -33541,6099 +33541,7226 @@ var require_stringify2 = __commonJS({ // ../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/index.js var require_src2 = __commonJS({ "../node_modules/.pnpm/comment-json@4.2.3/node_modules/comment-json/src/index.js"(exports, module2) { - var { parse: parse4, tokenize } = require_parse4(); - var stringify2 = require_stringify2(); + var { parse: parse5, tokenize } = require_parse4(); + var stringify4 = require_stringify2(); var { CommentArray } = require_array(); - var { assign: assign2 } = require_common(); + var { assign: assign3 } = require_common(); module2.exports = { - parse: parse4, - stringify: stringify2, + parse: parse5, + stringify: stringify4, tokenize, CommentArray, - assign: assign2 + assign: assign3 }; } }); -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/cacheWrapper.js -var require_cacheWrapper = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/cacheWrapper.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/identity.js +var require_identity = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/identity.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.cacheWrapper = cacheWrapper; - exports.cacheWrapperSync = cacheWrapperSync; - async function cacheWrapper(cache2, key, fn) { - const cached = cache2.get(key); - if (cached !== void 0) { - return cached; - } - const result = await fn(); - cache2.set(key, result); - return result; + var ALIAS = Symbol.for("yaml.alias"); + var DOC = Symbol.for("yaml.document"); + var MAP = Symbol.for("yaml.map"); + var PAIR = Symbol.for("yaml.pair"); + var SCALAR = Symbol.for("yaml.scalar"); + var SEQ = Symbol.for("yaml.seq"); + var NODE_TYPE = Symbol.for("yaml.node.type"); + var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS; + var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC; + var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP; + var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR; + var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR; + var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ; + function isCollection(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; + } + function isNode(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; + } + var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + exports.ALIAS = ALIAS; + exports.DOC = DOC; + exports.MAP = MAP; + exports.NODE_TYPE = NODE_TYPE; + exports.PAIR = PAIR; + exports.SCALAR = SCALAR; + exports.SEQ = SEQ; + exports.hasAnchor = hasAnchor; + exports.isAlias = isAlias; + exports.isCollection = isCollection; + exports.isDocument = isDocument; + exports.isMap = isMap; + exports.isNode = isNode; + exports.isPair = isPair; + exports.isScalar = isScalar; + exports.isSeq = isSeq; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/visit.js +var require_visit = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/visit.js"(exports) { + "use strict"; + var identity = require_identity(); + var BREAK = Symbol("break visit"); + var SKIP = Symbol("skip children"); + var REMOVE = Symbol("remove node"); + function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + visit_(null, node, visitor_, Object.freeze([])); + } + visit.BREAK = BREAK; + visit.SKIP = SKIP; + visit.REMOVE = REMOVE; + function visit_(key, node, visitor, path27) { + const ctrl = callVisitor(key, node, visitor, path27); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path27, ctrl); + return visit_(key, ctrl, visitor, path27); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node)) { + path27 = Object.freeze(path27.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path27); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node)) { + path27 = Object.freeze(path27.concat(node)); + const ck = visit_("key", node.key, visitor, path27); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_("value", node.value, visitor, path27); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; + } + async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + await visitAsync_(null, node, visitor_, Object.freeze([])); + } + visitAsync.BREAK = BREAK; + visitAsync.SKIP = SKIP; + visitAsync.REMOVE = REMOVE; + async function visitAsync_(key, node, visitor, path27) { + const ctrl = await callVisitor(key, node, visitor, path27); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path27, ctrl); + return visitAsync_(key, ctrl, visitor, path27); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node)) { + path27 = Object.freeze(path27.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path27); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node)) { + path27 = Object.freeze(path27.concat(node)); + const ck = await visitAsync_("key", node.key, visitor, path27); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_("value", node.value, visitor, path27); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; + } + function initVisitor(visitor) { + if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; + } + function callVisitor(key, node, visitor, path27) { + if (typeof visitor === "function") + return visitor(key, node, path27); + if (identity.isMap(node)) + return visitor.Map?.(key, node, path27); + if (identity.isSeq(node)) + return visitor.Seq?.(key, node, path27); + if (identity.isPair(node)) + return visitor.Pair?.(key, node, path27); + if (identity.isScalar(node)) + return visitor.Scalar?.(key, node, path27); + if (identity.isAlias(node)) + return visitor.Alias?.(key, node, path27); + return void 0; } - function cacheWrapperSync(cache2, key, fn) { - const cached = cache2.get(key); - if (cached !== void 0) { - return cached; + function replaceNode(key, path27, node) { + const parent = path27[path27.length - 1]; + if (identity.isCollection(parent)) { + parent.items[key] = node; + } else if (identity.isPair(parent)) { + if (key === "key") + parent.key = node; + else + parent.value = node; + } else if (identity.isDocument(parent)) { + parent.contents = node; + } else { + const pt = identity.isAlias(parent) ? "alias" : "scalar"; + throw new Error(`Cannot replace node with ${pt} parent`); } - const result = fn(); - cache2.set(key, result); - return result; } + exports.visit = visit; + exports.visitAsync = visitAsync; } }); -// ../node_modules/.pnpm/resolve-from@4.0.0/node_modules/resolve-from/index.js -var require_resolve_from = __commonJS({ - "../node_modules/.pnpm/resolve-from@4.0.0/node_modules/resolve-from/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/directives.js +var require_directives = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/directives.js"(exports) { "use strict"; - var path26 = require("path"); - var Module = require("module"); - var fs11 = require("fs"); - var resolveFrom2 = (fromDir, moduleId, silent) => { - if (typeof fromDir !== "string") { - throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``); + var identity = require_identity(); + var visit = require_visit(); + var escapeChars2 = { + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + }; + var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars2[ch]); + var Directives = class _Directives { + constructor(yaml, tags) { + this.docStart = null; + this.docEnd = false; + this.yaml = Object.assign({}, _Directives.defaultYaml, yaml); + this.tags = Object.assign({}, _Directives.defaultTags, tags); } - if (typeof moduleId !== "string") { - throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); + clone() { + const copy = new _Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; } - try { - fromDir = fs11.realpathSync(fromDir); - } catch (err) { - if (err.code === "ENOENT") { - fromDir = path26.resolve(fromDir); - } else if (silent) { - return null; - } else { - throw err; + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new _Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case "1.1": + this.atNextDocument = true; + break; + case "1.2": + this.atNextDocument = false; + this.yaml = { + explicit: _Directives.defaultYaml.explicit, + version: "1.2" + }; + this.tags = Object.assign({}, _Directives.defaultTags); + break; } + return res; } - const fromFile = path26.join(fromDir, "noop.js"); - const resolveFileName = () => Module._resolveFilename(moduleId, { - id: fromFile, - filename: fromFile, - paths: Module._nodeModulePaths(fromDir) - }); - if (silent) { - try { - return resolveFileName(); - } catch (err) { - return null; + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" }; + this.tags = Object.assign({}, _Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case "%TAG": { + if (parts.length !== 2) { + onError(0, "%TAG directive should contain exactly two parts"); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case "%YAML": { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, "%YAML directive should contain exactly one part"); + return false; + } + const [version4] = parts; + if (version4 === "1.1" || version4 === "1.2") { + this.yaml.version = version4; + return true; + } else { + const isValid = /^\d+\.\d+$/.test(version4); + onError(6, `Unsupported YAML version ${version4}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; } } - return resolveFileName(); - }; - module2.exports = (fromDir, moduleId) => resolveFrom2(fromDir, moduleId); - module2.exports.silent = (fromDir, moduleId) => resolveFrom2(fromDir, moduleId, true); - } -}); - -// ../node_modules/.pnpm/callsites@3.1.0/node_modules/callsites/index.js -var require_callsites = __commonJS({ - "../node_modules/.pnpm/callsites@3.1.0/node_modules/callsites/index.js"(exports, module2) { - "use strict"; - var callsites = () => { - const _prepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = (_, stack2) => stack2; - const stack = new Error().stack.slice(1); - Error.prepareStackTrace = _prepareStackTrace; - return stack; - }; - module2.exports = callsites; - module2.exports.default = callsites; - } -}); - -// ../node_modules/.pnpm/parent-module@1.0.1/node_modules/parent-module/index.js -var require_parent_module = __commonJS({ - "../node_modules/.pnpm/parent-module@1.0.1/node_modules/parent-module/index.js"(exports, module2) { - "use strict"; - var callsites = require_callsites(); - module2.exports = (filepath) => { - const stacks = callsites(); - if (!filepath) { - return stacks[2].getFileName(); - } - let seenVal = false; - stacks.shift(); - for (const stack of stacks) { - const parentFilepath = stack.getFileName(); - if (typeof parentFilepath !== "string") { - continue; + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === "!") + return "!"; + if (source[0] !== "!") { + onError(`Not a valid tag: ${source}`); + return null; } - if (parentFilepath === filepath) { - seenVal = true; - continue; + if (source[1] === "<") { + const verbatim = source.slice(2, -1); + if (verbatim === "!" || verbatim === "!!") { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== ">") + onError("Verbatim tags must end with a >"); + return verbatim; } - if (parentFilepath === "module.js") { - continue; + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } catch (error3) { + onError(String(error3)); + return null; + } } - if (seenVal && parentFilepath !== filepath) { - return parentFilepath; + if (handle === "!") + return source; + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === "!" ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) { + const tags = {}; + visit.visit(doc.contents, (_key, node) => { + if (identity.isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === "!!" && prefix === "tag:yaml.org,2002:") + continue; + if (!doc || tagNames.some((tn) => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); } + return lines.join("\n"); } }; + Directives.defaultYaml = { explicit: false, version: "1.2" }; + Directives.defaultTags = { "!!": "tag:yaml.org,2002:" }; + exports.Directives = Directives; } }); -// ../node_modules/.pnpm/import-fresh@3.3.0/node_modules/import-fresh/index.js -var require_import_fresh = __commonJS({ - "../node_modules/.pnpm/import-fresh@3.3.0/node_modules/import-fresh/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/anchors.js +var require_anchors = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/anchors.js"(exports) { "use strict"; - var path26 = require("path"); - var resolveFrom2 = require_resolve_from(); - var parentModule = require_parent_module(); - module2.exports = (moduleId) => { - if (typeof moduleId !== "string") { - throw new TypeError("Expected a string"); + var identity = require_identity(); + var visit = require_visit(); + function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); } - const parentPath = parentModule(__filename); - const cwd = parentPath ? path26.dirname(parentPath) : __dirname; - const filePath = resolveFrom2(cwd, moduleId); - const oldModule = require.cache[filePath]; - if (oldModule && oldModule.parent) { - let i = oldModule.parent.children.length; - while (i--) { - if (oldModule.parent.children[i].id === filePath) { - oldModule.parent.children.splice(i, 1); - } + return true; + } + function anchorNames(root) { + const anchors = /* @__PURE__ */ new Set(); + visit.visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); } + }); + return anchors; + } + function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; } - delete require.cache[filePath]; - const parent = require.cache[parentPath]; - return parent === void 0 ? require(filePath) : parent.require(filePath); - }; + } + function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = /* @__PURE__ */ new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + if (!prevAnchors) + prevAnchors = anchorNames(doc); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === "object" && ref.anchor && (identity.isScalar(ref.node) || identity.isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } else { + const error3 = new Error("Failed to resolve repeated object (this should not happen)"); + error3.source = source; + throw error3; + } + } + }, + sourceObjects + }; + } + exports.anchorIsValid = anchorIsValid; + exports.anchorNames = anchorNames; + exports.createNodeAnchors = createNodeAnchors; + exports.findNewAnchor = findNewAnchor; } }); -// ../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js -var require_is_arrayish = __commonJS({ - "../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/applyReviver.js +var require_applyReviver = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/applyReviver.js"(exports) { "use strict"; - module2.exports = function isArrayish(obj) { - if (!obj) { - return false; + function applyReviver(reviver, obj, key, val) { + if (val && typeof val === "object") { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v12 = applyReviver(reviver, val, String(i), v0); + if (v12 === void 0) + delete val[i]; + else if (v12 !== v0) + val[i] = v12; + } + } else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v12 = applyReviver(reviver, val, k, v0); + if (v12 === void 0) + val.delete(k); + else if (v12 !== v0) + val.set(k, v12); + } + } else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v12 = applyReviver(reviver, val, v0, v0); + if (v12 === void 0) + val.delete(v0); + else if (v12 !== v0) { + val.delete(v0); + val.add(v12); + } + } + } else { + for (const [k, v0] of Object.entries(val)) { + const v12 = applyReviver(reviver, val, k, v0); + if (v12 === void 0) + delete val[k]; + else if (v12 !== v0) + val[k] = v12; + } + } } - return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; - }; + return reviver.call(obj, key, val); + } + exports.applyReviver = applyReviver; } }); -// ../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js -var require_error_ex = __commonJS({ - "../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/toJS.js +var require_toJS = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/toJS.js"(exports) { "use strict"; - var util = require("util"); - var isArrayish = require_is_arrayish(); - var errorEx = function errorEx2(name, properties) { - if (!name || name.constructor !== String) { - properties = name || {}; - name = Error.name; - } - var errorExError = function ErrorEXError(message) { - if (!this) { - return new ErrorEXError(message); - } - message = message instanceof Error ? message.message : message || this.message; - Error.call(this, message); - Error.captureStackTrace(this, errorExError); - this.name = name; - Object.defineProperty(this, "message", { - configurable: true, - enumerable: false, - get: function() { - var newMessage = message.split(/\r?\n/g); - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - var modifier = properties[key]; - if ("message" in modifier) { - newMessage = modifier.message(this[key], newMessage) || newMessage; - if (!isArrayish(newMessage)) { - newMessage = [newMessage]; - } - } - } - return newMessage.join("\n"); - }, - set: function(v) { - message = v; - } - }); - var overwrittenStack = null; - var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack"); - var stackGetter = stackDescriptor.get; - var stackValue = stackDescriptor.value; - delete stackDescriptor.value; - delete stackDescriptor.writable; - stackDescriptor.set = function(newstack) { - overwrittenStack = newstack; - }; - stackDescriptor.get = function() { - var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); - if (!overwrittenStack) { - stack[0] = this.name + ": " + this.message; - } - var lineCount = 1; - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - var modifier = properties[key]; - if ("line" in modifier) { - var line = modifier.line(this[key]); - if (line) { - stack.splice(lineCount++, 0, " " + line); - } - } - if ("stack" in modifier) { - modifier.stack(this[key], stack); - } - } - return stack.join("\n"); + var identity = require_identity(); + function toJS(value, arg, ctx) { + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + if (!ctx || !identity.hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: void 0 }; + ctx.anchors.set(value, data); + ctx.onCreate = (res2) => { + data.res = res2; + delete ctx.onCreate; }; - Object.defineProperty(this, "stack", stackDescriptor); - }; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(errorExError.prototype, Error.prototype); - Object.setPrototypeOf(errorExError, Error); - } else { - util.inherits(errorExError, Error); + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; } - return errorExError; - }; - errorEx.append = function(str, def) { - return { - message: function(v, message) { - v = v || def; - if (v) { - message[0] += " " + str.replace("%s", v.toString()); - } - return message; - } - }; - }; - errorEx.line = function(str, def) { - return { - line: function(v) { - v = v || def; - if (v) { - return str.replace("%s", v.toString()); - } - return null; - } - }; - }; - module2.exports = errorEx; + if (typeof value === "bigint" && !ctx?.keep) + return Number(value); + return value; + } + exports.toJS = toJS; } }); -// ../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js -var require_json_parse_even_better_errors = __commonJS({ - "../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Node.js +var require_Node = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Node.js"(exports) { "use strict"; - var hexify = (char) => { - const h = char.charCodeAt(0).toString(16).toUpperCase(); - return "0x" + (h.length % 2 ? "0" : "") + h; - }; - var parseError = (e, txt, context) => { - if (!txt) { - return { - message: e.message + " while parsing empty string", - position: 0 - }; - } - const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i); - const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; - const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message; - if (errIdx !== null && errIdx !== void 0) { - const start = errIdx <= context ? 0 : errIdx - context; - const end = errIdx + context >= txt.length ? txt.length : errIdx + context; - const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "..."); - const near = txt === slice ? "" : "near "; - return { - message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, - position: errIdx - }; - } else { - return { - message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, - position: 0 + var applyReviver = require_applyReviver(); + var identity = require_identity(); + var toJS = require_toJS(); + var NodeBase = class { + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!identity.isDocument(doc)) + throw new TypeError("A document argument is required"); + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 }; + const res = toJS.toJS(this, "", ctx); + if (typeof onAnchor === "function") + for (const { count: count3, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count3); + return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res; } }; - var JSONParseError = class extends SyntaxError { - constructor(er, txt, context, caller) { - context = context || 20; - const metadata = parseError(er, txt, context); - super(metadata.message); - Object.assign(this, metadata); - this.code = "EJSONPARSE"; - this.systemError = er; - Error.captureStackTrace(this, caller || this.constructor); - } - get name() { - return this.constructor.name; - } - set name(n) { - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - }; - var kIndent = Symbol.for("indent"); - var kNewline = Symbol.for("newline"); - var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/; - var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/; - var parseJson2 = (txt, reviver, context) => { - const parseText = stripBOM(txt); - context = context || 20; - try { - const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""]; - const result = JSON.parse(parseText, reviver); - if (result && typeof result === "object") { - result[kNewline] = newline; - result[kIndent] = indent; - } - return result; - } catch (e) { - if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { - const isEmptyArray = Array.isArray(txt) && txt.length === 0; - throw Object.assign(new TypeError( - `Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}` - ), { - code: "EJSONPARSE", - systemError: e - }); - } - throw new JSONParseError(e, parseText, context, parseJson2); - } - }; - var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, ""); - module2.exports = parseJson2; - parseJson2.JSONParseError = JSONParseError; - parseJson2.noExceptions = (txt, reviver) => { - try { - return JSON.parse(stripBOM(txt), reviver); - } catch (e) { - } - }; + exports.NodeBase = NodeBase; } }); -// ../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js -var require_build = __commonJS({ - "../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Alias.js +var require_Alias = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Alias.js"(exports) { "use strict"; - exports.__esModule = true; - exports.LinesAndColumns = void 0; - var LF2 = "\n"; - var CR = "\r"; - var LinesAndColumns = ( - /** @class */ - function() { - function LinesAndColumns2(string) { - this.string = string; - var offsets = [0]; - for (var offset = 0; offset < string.length; ) { - switch (string[offset]) { - case LF2: - offset += LF2.length; - offsets.push(offset); - break; - case CR: - offset += CR.length; - if (string[offset] === LF2) { - offset += LF2.length; - } - offsets.push(offset); - break; - default: - offset++; - break; - } - } - this.offsets = offsets; - } - LinesAndColumns2.prototype.locationForIndex = function(index) { - if (index < 0 || index > this.string.length) { - return null; - } - var line = 0; - var offsets = this.offsets; - while (offsets[line + 1] <= index) { - line++; - } - var column = index - offsets[line]; - return { line, column }; - }; - LinesAndColumns2.prototype.indexForLocation = function(location) { - var line = location.line, column = location.column; - if (line < 0 || line >= this.offsets.length) { - return null; + var anchors = require_anchors(); + var visit = require_visit(); + var identity = require_identity(); + var Node = require_Node(); + var toJS = require_toJS(); + var Alias = class extends Node.NodeBase { + constructor(source) { + super(identity.ALIAS); + this.source = source; + Object.defineProperty(this, "tag", { + set() { + throw new Error("Alias nodes cannot have tags"); } - if (column < 0 || column > this.lengthOfLine(line)) { - return null; + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc) { + let found = void 0; + visit.visit(doc, { + Node: (_key, node) => { + if (node === this) + return visit.visit.BREAK; + if (node.anchor === this.source) + found = node; } - return this.offsets[line] + column; - }; - LinesAndColumns2.prototype.lengthOfLine = function(line) { - var offset = this.offsets[line]; - var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]; - return nextOffset - offset; - }; - return LinesAndColumns2; - }() - ); - exports.LinesAndColumns = LinesAndColumns; - exports["default"] = LinesAndColumns; + }); + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors: anchors2, doc, maxAliasCount } = ctx; + const source = this.resolve(doc); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data = anchors2.get(source); + if (!data) { + toJS.toJS(source, null, ctx); + data = anchors2.get(source); + } + if (!data || data.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, source, anchors2); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + throw new ReferenceError(msg); + } + } + return data.res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchors.anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } + }; + function getAliasCount(doc, node, anchors2) { + if (identity.isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors2 && source && anchors2.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } else if (identity.isCollection(node)) { + let count3 = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors2); + if (c > count3) + count3 = c; + } + return count3; + } else if (identity.isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors2); + const vc = getAliasCount(doc, node.value, anchors2); + return Math.max(kc, vc); + } + return 1; + } + exports.Alias = Alias; } }); -// ../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js -var require_js_tokens = __commonJS({ - "../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) { - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; - exports.matchToToken = function(match2) { - var token = { type: "invalid", value: match2[0], closed: void 0 }; - if (match2[1]) - token.type = "string", token.closed = !!(match2[3] || match2[4]); - else if (match2[5]) - token.type = "comment"; - else if (match2[6]) - token.type = "comment", token.closed = !!match2[7]; - else if (match2[8]) - token.type = "regex"; - else if (match2[9]) - token.type = "number"; - else if (match2[10]) - token.type = "name"; - else if (match2[11]) - token.type = "punctuator"; - else if (match2[12]) - token.type = "whitespace"; - return token; +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Scalar.js +var require_Scalar = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Scalar.js"(exports) { + "use strict"; + var identity = require_identity(); + var Node = require_Node(); + var toJS = require_toJS(); + var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object"; + var Scalar = class extends Node.NodeBase { + constructor(value) { + super(identity.SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } }; + Scalar.BLOCK_FOLDED = "BLOCK_FOLDED"; + Scalar.BLOCK_LITERAL = "BLOCK_LITERAL"; + Scalar.PLAIN = "PLAIN"; + Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE"; + Scalar.QUOTE_SINGLE = "QUOTE_SINGLE"; + exports.Scalar = Scalar; + exports.isScalarValue = isScalarValue; } }); -// ../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/identifier.js -var require_identifier = __commonJS({ - "../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/createNode.js +var require_createNode = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/createNode.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.isIdentifierChar = isIdentifierChar; - exports.isIdentifierName = isIdentifierName; - exports.isIdentifierStart = isIdentifierStart; - var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; - var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; - var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - function isInAstralSet(code, set) { - let pos = 65536; - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) - return false; - pos += set[i + 1]; - if (pos >= code) - return true; - } - return false; - } - function isIdentifierStart(code) { - if (code < 65) - return code === 36; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - return isInAstralSet(code, astralIdentifierStartCodes); - } - function isIdentifierChar(code) { - if (code < 48) - return code === 36; - if (code < 58) - return true; - if (code < 65) - return false; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + var Alias = require_Alias(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var defaultTagPrefix = "tag:yaml.org,2002:"; + function findTagObject(value, tagName, tags) { + if (tagName) { + const match2 = tags.filter((t) => t.tag === tagName); + const tagObj = match2.find((t) => !t.format) ?? match2[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find((t) => t.identify?.(value) && !t.format); + } + function createNode(value, tagName, ctx) { + if (identity.isDocument(value)) + value = value.contents; + if (identity.isNode(value)) + return value; + if (identity.isPair(value)) { + const map3 = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map3.items.push(value); + return map3; + } + if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) { + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + let ref = void 0; + if (aliasDuplicateObjects && value && typeof value === "object") { + ref = sourceObjects.get(value); + if (ref) { + if (!ref.anchor) + ref.anchor = onAnchor(value); + return new Alias.Alias(ref.anchor); + } else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); - } - function isIdentifierName(name) { - let isFirst = true; - for (let i = 0; i < name.length; i++) { - let cp = name.charCodeAt(i); - if ((cp & 64512) === 55296 && i + 1 < name.length) { - const trail = name.charCodeAt(++i); - if ((trail & 64512) === 56320) { - cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); - } + if (tagName?.startsWith("!!")) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === "function") { + value = value.toJSON(); } - if (isFirst) { - isFirst = false; - if (!isIdentifierStart(cp)) { - return false; - } - } else if (!isIdentifierChar(cp)) { - return false; + if (!value || typeof value !== "object") { + const node2 = new Scalar.Scalar(value); + if (ref) + ref.node = node2; + return node2; } + tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : schema[identity.MAP]; } - return !isFirst; - } - } -}); - -// ../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/keyword.js -var require_keyword = __commonJS({ - "../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.isKeyword = isKeyword; - exports.isReservedWord = isReservedWord; - exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; - exports.isStrictBindReservedWord = isStrictBindReservedWord; - exports.isStrictReservedWord = isStrictReservedWord; - var reservedWords = { - keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] - }; - var keywords = new Set(reservedWords.keyword); - var reservedWordsStrictSet = new Set(reservedWords.strict); - var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); - function isReservedWord(word, inModule) { - return inModule && word === "await" || word === "enum"; - } - function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); - } - function isStrictBindOnlyReservedWord(word) { - return reservedWordsStrictBindSet.has(word); - } - function isStrictBindReservedWord(word, inModule) { - return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); - } - function isKeyword(word) { - return keywords.has(word); + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + 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); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; } + exports.createNode = createNode; } }); -// ../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js -var require_lib2 = __commonJS({ - "../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Collection.js +var require_Collection = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Collection.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - Object.defineProperty(exports, "isIdentifierChar", { - enumerable: true, - get: function() { - return _identifier.isIdentifierChar; + var createNode = require_createNode(); + var identity = require_identity(); + var Node = require_Node(); + function collectionFromPath(schema, path27, value) { + let v = value; + for (let i = path27.length - 1; i >= 0; --i) { + const k = path27[i]; + if (typeof k === "number" && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + v = /* @__PURE__ */ new Map([[k, v]]); + } } - }); - Object.defineProperty(exports, "isIdentifierName", { - enumerable: true, - get: function() { - return _identifier.isIdentifierName; + return createNode.createNode(v, void 0, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error("This should not happen, please report a bug."); + }, + schema, + sourceObjects: /* @__PURE__ */ new Map() + }); + } + var isEmptyPath = (path27) => path27 == null || typeof path27 === "object" && !!path27[Symbol.iterator]().next().done; + var Collection = class extends Node.NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, "schema", { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); } - }); - Object.defineProperty(exports, "isIdentifierStart", { - enumerable: true, - get: function() { - return _identifier.isIdentifierStart; + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; } - }); - Object.defineProperty(exports, "isKeyword", { - enumerable: true, - get: function() { - return _keyword.isKeyword; + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path27, value) { + if (isEmptyPath(path27)) + this.add(value); + else { + const [key, ...rest] = path27; + const node = this.get(key, true); + if (identity.isCollection(node)) + node.addIn(rest, value); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } } - }); - Object.defineProperty(exports, "isReservedWord", { - enumerable: true, - get: function() { - return _keyword.isReservedWord; + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path27) { + const [key, ...rest] = path27; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (identity.isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); } - }); - Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindOnlyReservedWord; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path27, keepScalar) { + const [key, ...rest] = path27; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && identity.isScalar(node) ? node.value : node; + else + return identity.isCollection(node) ? node.getIn(rest, keepScalar) : void 0; } - }); - Object.defineProperty(exports, "isStrictBindReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindReservedWord; + hasAllNullValues(allowScalar) { + return this.items.every((node) => { + if (!identity.isPair(node)) + return false; + const n = node.value; + return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); } - }); - Object.defineProperty(exports, "isStrictReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictReservedWord; + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path27) { + const [key, ...rest] = path27; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return identity.isCollection(node) ? node.hasIn(rest) : false; } - }); - var _identifier = require_identifier(); - var _keyword = require_keyword(); - } -}); - -// ../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js -var require_escape_string_regexp = __commonJS({ - "../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports, module2) { - "use strict"; - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - module2.exports = function(str) { - if (typeof str !== "string") { - throw new TypeError("Expected a string"); + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path27, value) { + const [key, ...rest] = path27; + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (identity.isCollection(node)) + node.setIn(rest, value); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } } - return str.replace(matchOperatorsRe, "\\$&"); }; + Collection.maxFlowStringSingleLineLength = 60; + exports.Collection = Collection; + exports.collectionFromPath = collectionFromPath; + exports.isEmptyPath = isEmptyPath; } }); -// ../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js -var require_color_name = __commonJS({ - "../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyComment.js +var require_stringifyComment = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) { "use strict"; - module2.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] - }; + var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#"); + function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; + } + var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment; + exports.indentComment = indentComment; + exports.lineComment = lineComment; + exports.stringifyComment = stringifyComment; } }); -// ../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js -var require_conversions = __commonJS({ - "../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module2) { - var cssKeywords = require_color_name(); - var reverseKeywords = {}; - for (key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } - } - var key; - var convert = module2.exports = { - rgb: { channels: 3, labels: "rgb" }, - hsl: { channels: 3, labels: "hsl" }, - hsv: { channels: 3, labels: "hsv" }, - hwb: { channels: 3, labels: "hwb" }, - cmyk: { channels: 4, labels: "cmyk" }, - xyz: { channels: 3, labels: "xyz" }, - lab: { channels: 3, labels: "lab" }, - lch: { channels: 3, labels: "lch" }, - hex: { channels: 1, labels: ["hex"] }, - keyword: { channels: 1, labels: ["keyword"] }, - ansi16: { channels: 1, labels: ["ansi16"] }, - ansi256: { channels: 1, labels: ["ansi256"] }, - hcg: { channels: 3, labels: ["h", "c", "g"] }, - apple: { channels: 3, labels: ["r16", "g16", "b16"] }, - gray: { channels: 1, labels: ["gray"] } - }; - for (model in convert) { - if (convert.hasOwnProperty(model)) { - if (!("channels" in convert[model])) { - throw new Error("missing channels property: " + model); - } - if (!("labels" in convert[model])) { - throw new Error("missing channel labels property: " + model); - } - if (convert[model].labels.length !== convert[model].channels) { - throw new Error("channel and label counts mismatch: " + model); - } - channels = convert[model].channels; - labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], "channels", { value: channels }); - Object.defineProperty(convert[model], "labels", { value: labels }); - } - } - var channels; - var labels; - var model; - convert.rgb.hsl = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min3 = Math.min(r, g, b); - var max4 = Math.max(r, g, b); - var delta = max4 - min3; - var h; - var s; - var l; - if (max4 === min3) { - h = 0; - } else if (r === max4) { - h = (g - b) / delta; - } else if (g === max4) { - h = 2 + (b - r) / delta; - } else if (b === max4) { - h = 4 + (r - g) / delta; - } - h = Math.min(h * 60, 360); - if (h < 0) { - h += 360; - } - l = (min3 + max4) / 2; - if (max4 === min3) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max4 + min3); - } else { - s = delta / (2 - max4 - min3); - } - return [h, s * 100, l * 100]; - }; - convert.rgb.hsv = function(rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function(c) { - return (v - c) / 6 / diff + 1 / 2; - }; - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = 1 / 3 + rdif - bdif; - } else if (b === v) { - h = 2 / 3 + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/foldFlowLines.js +var require_foldFlowLines = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) { + "use strict"; + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split2 = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) + end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; } - } - return [ - h * 360, - s * 100, - v * 100 - ]; - }; - convert.rgb.hwb = function(rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - return [h, w * 100, b * 100]; - }; - convert.rgb.cmyk = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - return [c * 100, m * 100, y * 100, k * 100]; - }; - function comparativeDistance(x, y) { - return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); - } - convert.rgb.keyword = function(rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - var currentClosestDistance = Infinity; - var currentClosestKeyword; - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - var distance = comparativeDistance(rgb, value); - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - return currentClosestKeyword; - }; - convert.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; - }; - convert.rgb.xyz = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; - g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; - b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; - var x = r * 0.4124 + g * 0.3576 + b * 0.1805; - var y = r * 0.2126 + g * 0.7152 + b * 0.0722; - var z = r * 0.0193 + g * 0.1192 + b * 0.9505; - return [x * 100, y * 100, z * 100]; - }; - convert.rgb.lab = function(rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; - l = 116 * y - 16; - a = 500 * (x - y); - b = 200 * (y - z); - return [l, a, b]; - }; - convert.hsl.rgb = function(hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - t1 = 2 * l - t2; - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + if (ch === "\n") { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split2 = void 0; } else { - val = t1; - } - rgb[i] = val * 255; - } - return rgb; - }; - convert.hsl.hsv = function(hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - l *= 2; - s *= l <= 1 ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); - return [h, sv * 100, v * 100]; - }; - convert.hsv.rgb = function(hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - s * f); - var t = 255 * v * (1 - s * (1 - f)); - v *= 255; - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } - }; - convert.hsv.hsl = function(hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= lmin <= 1 ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - return [h, sl * 100, l * 100]; - }; - convert.hwb.rgb = function(hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - if ((i & 1) !== 0) { - f = 1 - f; - } - n = wh + f * (v - wh); - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: - r = v; - g = n; - b = wh; - break; - case 1: - r = n; - g = v; - b = wh; - break; - case 2: - r = wh; - g = v; - b = n; - break; - case 3: - r = wh; - g = n; - b = v; - break; - case 4: - r = n; - g = wh; - b = v; - break; - case 5: - r = v; - g = wh; - b = n; - break; - } - return [r * 255, g * 255, b * 255]; - }; - convert.cmyk.rgb = function(cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.rgb = function(xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - r = x * 3.2406 + y * -1.5372 + z * -0.4986; - g = x * -0.9689 + y * 1.8758 + z * 0.0415; - b = x * 0.0557 + y * -0.204 + z * 1.057; - r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; - g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; - b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.lab = function(xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; - l = 116 * y - 16; - a = 500 * (x - y); - b = 200 * (y - z); - return [l, a, b]; - }; - convert.lab.xyz = function(lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; - x *= 95.047; - y *= 100; - z *= 108.883; - return [x, y, z]; - }; - convert.lab.lch = function(lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; - } - c = Math.sqrt(a * a + b * b); - return [l, c, h]; - }; - convert.lch.lab = function(lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - return [l, a, b]; - }; - convert.rgb.ansi16 = function(args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; - value = Math.round(value / 50); - if (value === 0) { - return 30; - } - var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); - if (value === 2) { - ansi += 60; - } - return ansi; - }; - convert.hsv.ansi16 = function(args) { - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); - }; - convert.rgb.ansi256 = function(args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - if (r === g && g === b) { - if (r < 8) { - return 16; - } - if (r > 248) { - return 231; - } - return Math.round((r - 8) / 247 * 24) + 232; - } - var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); - return ansi; - }; - convert.ansi16.rgb = function(args) { - var color = args % 10; - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - color = color / 10.5 * 255; - return [color, color, color]; - } - var mult = (~~(args > 50) + 1) * 0.5; - var r = (color & 1) * mult * 255; - var g = (color >> 1 & 1) * mult * 255; - var b = (color >> 2 & 1) * mult * 255; - return [r, g, b]; - }; - convert.ansi256.rgb = function(args) { - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - args -= 16; - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = rem % 6 / 5 * 255; - return [r, g, b]; - }; - convert.rgb.hex = function(args) { - var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); - var string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.hex.rgb = function(args) { - var match2 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match2) { - return [0, 0, 0]; - } - var colorString = match2[0]; - if (match2[0].length === 3) { - colorString = colorString.split("").map(function(char) { - return char + char; - }).join(""); - } - var integer = parseInt(colorString, 16); - var r = integer >> 16 & 255; - var g = integer >> 8 & 255; - var b = integer & 255; - return [r, g, b]; - }; - convert.rgb.hcg = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max4 = Math.max(Math.max(r, g), b); - var min3 = Math.min(Math.min(r, g), b); - var chroma = max4 - min3; - var grayscale; - var hue; - if (chroma < 1) { - grayscale = min3 / (1 - chroma); - } else { - grayscale = 0; - } - if (chroma <= 0) { - hue = 0; - } else if (max4 === r) { - hue = (g - b) / chroma % 6; - } else if (max4 === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - hue /= 6; - hue %= 1; - return [hue * 360, chroma * 100, grayscale * 100]; - }; - convert.hsl.hcg = function(hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - if (l < 0.5) { - c = 2 * s * l; - } else { - c = 2 * s * (1 - l); - } - if (c < 1) { - f = (l - 0.5 * c) / (1 - c); - } - return [hsl[0], c * 100, f * 100]; - }; - convert.hsv.hcg = function(hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var c = s * v; - var f = 0; - if (c < 1) { - f = (v - c) / (1 - c); - } - return [hsv[0], c * 100, f * 100]; - }; - convert.hcg.rgb = function(hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - if (c === 0) { - return [g * 255, g * 255, g * 255]; - } - var pure = [0, 0, 0]; - var hi = h % 1 * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; - pure[1] = v; - pure[2] = 0; - break; - case 1: - pure[0] = w; - pure[1] = 1; - pure[2] = 0; - break; - case 2: - pure[0] = 0; - pure[1] = 1; - pure[2] = v; - break; - case 3: - pure[0] = 0; - pure[1] = w; - pure[2] = 1; - break; - case 4: - pure[0] = v; - pure[1] = 0; - pure[2] = 1; - break; - default: - pure[0] = 1; - pure[1] = 0; - pure[2] = w; - } - mg = (1 - c) * g; - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; - }; - convert.hcg.hsv = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1 - c); - var f = 0; - if (v > 0) { - f = c / v; - } - return [hcg[0], f * 100, v * 100]; - }; - convert.hcg.hsl = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var l = g * (1 - c) + 0.5 * c; - var s = 0; - if (l > 0 && l < 0.5) { - s = c / (2 * l); - } else if (l >= 0.5 && l < 1) { - s = c / (2 * (1 - l)); + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") + split2 = i; + } + if (i >= end) { + if (split2) { + folds.push(split2); + end = split2 + endStep; + split2 = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split2 = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) + res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } } - return [hcg[0], s * 100, l * 100]; - }; - convert.hcg.hwb = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; - }; - convert.hwb.hcg = function(hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - if (c < 1) { - g = (v - c) / (1 - c); + return res; + } + function consumeMoreIndentedLines(text, i) { + let ch = text[i + 1]; + while (ch === " " || ch === " ") { + do { + ch = text[i += 1]; + } while (ch && ch !== "\n"); + ch = text[i + 1]; } - return [hwb[0], c * 100, g * 100]; - }; - convert.apple.rgb = function(apple) { - return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; - }; - convert.rgb.apple = function(rgb) { - return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; - }; - convert.gray.rgb = function(args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; - }; - convert.gray.hsl = convert.gray.hsv = function(args) { - return [0, 0, args[0]]; - }; - convert.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }; - convert.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }; - convert.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }; - convert.gray.hex = function(gray) { - var val = Math.round(gray[0] / 100 * 255) & 255; - var integer = (val << 16) + (val << 8) + val; - var string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.rgb.gray = function(rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; - }; + return i; + } + exports.FOLD_BLOCK = FOLD_BLOCK; + exports.FOLD_FLOW = FOLD_FLOW; + exports.FOLD_QUOTED = FOLD_QUOTED; + exports.foldFlowLines = foldFlowLines; } }); -// ../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js -var require_route = __commonJS({ - "../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module2) { - var conversions = require_conversions(); - function buildGraph() { - var graph = {}; - var models = Object.keys(conversions); - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyString.js +var require_stringifyString = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyString.js"(exports) { + "use strict"; + var Scalar = require_Scalar(); + var foldFlowLines = require_foldFlowLines(); + var getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth + }); + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } } - return graph; + return true; } - function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; - graph[fromModel].distance = 0; - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); + function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") + switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") + str += "\\x" + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") + str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; } - } } - return graph; + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); } - function link(from, to) { - return function(args) { - return to(from(args)); - }; + function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value)) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } - function wrapConversion(toModel, graph) { - var path26 = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path26.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - fn.conversion = path26; - return fn; - } - module2.exports = function(fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - if (node.parent === null) { - continue; + function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); + } + var blockEndNewlines; + try { + blockEndNewlines = new RegExp("(^|(?\n"; + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== "\n" && ch !== " " && ch !== " ") + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf("\n"); + if (endNlPos === -1) { + chomp = "-"; + } else if (value === end || endNlPos !== end.length - 1) { + chomp = "+"; + if (onChompKeep) + onChompKeep(); + } else { + chomp = ""; + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === "\n") + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === " ") + startWithSpace = true; + else if (ch === "\n") + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? "2" : "1"; + let header = (literal ? "|" : ">") + (startWithSpace ? indentSize : "") + chomp; + if (comment) { + header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " ")); + if (onComment) + onComment(); + } + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${start}${value}${end}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true)); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { + return quotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === "") { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.Scalar.BLOCK_FOLDED: + case Scalar.Scalar.BLOCK_LITERAL: + return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; } - conversion[toModel] = wrapConversion(toModel, graph); + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = implicitKey && defaultKeyType || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); } - return conversion; - }; + return res; + } + exports.stringifyString = stringifyString; } }); -// ../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js -var require_color_convert = __commonJS({ - "../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module2) { - var conversions = require_conversions(); - var route = require_route(); - var convert = {}; - var models = Object.keys(conversions); - function wrapRaw(fn) { - var wrappedFn = function(args) { - if (args === void 0 || args === null) { - return args; - } - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - return fn(args); +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringify.js +var require_stringify3 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringify.js"(exports) { + "use strict"; + var anchors = require_anchors(); + var identity = require_identity(); + var stringifyComment = require_stringifyComment(); + var stringifyString = require_stringifyString(); + function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment.stringifyComment, + defaultKeyType: null, + defaultStringType: "PLAIN", + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: "false", + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: "null", + simpleKeys: false, + singleQuote: null, + trueStr: "true", + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case "block": + inFlow = false; + break; + case "flow": + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: /* @__PURE__ */ new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? " " : "", + indent: "", + indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ", + inFlow, + options: opt }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; + } + function getTagObject(tags, item) { + if (item.tag) { + const match2 = tags.filter((t) => t.tag === item.tag); + if (match2.length > 0) + return match2.find((t) => t.format === item.format) ?? match2[0]; + } + let tagObj = void 0; + let obj; + if (identity.isScalar(item)) { + obj = item.value; + const match2 = tags.filter((t) => t.identify?.(obj)); + tagObj = match2.find((t) => t.format === item.format) ?? match2.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? typeof obj; + throw new Error(`Tag not resolved for ${name} value`); } - return wrappedFn; + return tagObj; } - function wrapRounded(fn) { - var wrappedFn = function(args) { - if (args === void 0 || args === null) { - return args; - } - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - var result = fn(args); - if (typeof result === "object") { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - return result; - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - models.forEach(function(fromModel) { - convert[fromModel] = {}; - Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); - Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); - var routes = route(fromModel); - var routeModels = Object.keys(routes); - routeModels.forEach(function(toModel) { - var fn = routes[toModel]; - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); - }); - module2.exports = convert; + function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) { + if (!doc.directives) + return ""; + const props = []; + const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor; + if (anchor && anchors.anchorIsValid(anchor)) { + anchors$1.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag; + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(" "); + } + function stringify4(item, ctx, onComment, onChompKeep) { + if (identity.isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (identity.isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = /* @__PURE__ */ new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = void 0; + const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o }); + if (!tagObj) + tagObj = getTagObject(ctx.doc.schema.tags, node); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const 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); + if (!props) + return str; + return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + exports.createStringifyContext = createStringifyContext; + exports.stringify = stringify4; } }); -// ../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js -var require_ansi_styles = __commonJS({ - "../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyPair.js +var require_stringifyPair = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) { "use strict"; - var colorConvert = require_color_convert(); - var wrapAnsi162 = (fn, offset) => function() { - const code = fn.apply(colorConvert, arguments); - return `\x1B[${code + offset}m`; - }; - var wrapAnsi2562 = (fn, offset) => function() { - const code = fn.apply(colorConvert, arguments); - return `\x1B[${38 + offset};5;${code}m`; - }; - var wrapAnsi16m2 = (fn, offset) => function() { - const rgb = fn.apply(colorConvert, arguments); - return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; - }; - function assembleStyles2() { - const codes3 = /* @__PURE__ */ new Map(); - const styles3 = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - styles3.color.grey = styles3.color.gray; - for (const groupName of Object.keys(styles3)) { - const group = styles3[groupName]; - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - styles3[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles3[styleName]; - codes3.set(style[0], style[1]); - } - Object.defineProperty(styles3, groupName, { - value: group, - enumerable: false - }); - Object.defineProperty(styles3, "codes", { - value: codes3, - enumerable: false - }); + var identity = require_identity(); + var Scalar = require_Scalar(); + var stringify4 = require_stringify3(); + var stringifyComment = require_stringifyComment(); + function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = identity.isNode(key) && key.comment || null; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (identity.isCollection(key)) { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + 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")); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify4.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === "" ? "?" : explicitKey ? `? ${str}` : str; + } + } else if (allNullValues && !simpleKeys || value == null && explicitKey) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str; } - const ansi2ansi = (n) => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - styles3.color.close = "\x1B[39m"; - styles3.bgColor.close = "\x1B[49m"; - styles3.color.ansi = { - ansi: wrapAnsi162(ansi2ansi, 0) - }; - styles3.color.ansi256 = { - ansi256: wrapAnsi2562(ansi2ansi, 0) - }; - styles3.color.ansi16m = { - rgb: wrapAnsi16m2(rgb2rgb, 0) - }; - styles3.bgColor.ansi = { - ansi: wrapAnsi162(ansi2ansi, 10) - }; - styles3.bgColor.ansi256 = { - ansi256: wrapAnsi2562(ansi2ansi, 10) - }; - styles3.bgColor.ansi16m = { - rgb: wrapAnsi16m2(rgb2rgb, 10) - }; - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== "object") { - continue; - } - const suite = colorConvert[key]; - if (key === "ansi16") { - key = "ansi"; - } - if ("ansi16" in suite) { - styles3.color.ansi[key] = wrapAnsi162(suite.ansi16, 0); - styles3.bgColor.ansi[key] = wrapAnsi162(suite.ansi16, 10); - } - if ("ansi256" in suite) { - styles3.color.ansi256[key] = wrapAnsi2562(suite.ansi256, 0); - styles3.bgColor.ansi256[key] = wrapAnsi2562(suite.ansi256, 10); - } - if ("rgb" in suite) { - styles3.color.ansi16m[key] = wrapAnsi16m2(suite.rgb, 0); - styles3.bgColor.ansi16m[key] = wrapAnsi16m2(suite.rgb, 10); + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str} +${indent}:`; + } else { + str = `${str}:`; + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (identity.isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === "object") + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && identity.isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) { + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify4.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true); + let ws = " "; + if (keyComment || vsb || vcb) { + ws = vsb ? "\n" : ""; + if (vcb) { + const cs = commentString(vcb); + ws += ` +${stringifyComment.indentComment(cs, ctx.indent)}`; + } + if (valueStr === "" && !ctx.inFlow) { + if (ws === "\n") + ws = "\n\n"; + } else { + ws += ` +${ctx.indent}`; + } + } else if (!explicitKey && identity.isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf("\n"); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === "&" || vs0 === "!")) { + let sp0 = valueStr.indexOf(" "); + if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") { + sp0 = valueStr.indexOf(" ", sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = ` +${ctx.indent}`; } + } else if (valueStr === "" || valueStr[0] === "\n") { + ws = ""; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } else if (valueComment && !valueCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); + } else if (chompKeep && onChompKeep) { + onChompKeep(); } - return styles3; + return str; } - Object.defineProperty(module2, "exports", { - enumerable: true, - get: assembleStyles2 - }); + exports.stringifyPair = stringifyPair; } }); -// ../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js -var require_has_flag = __commonJS({ - "../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/log.js +var require_log = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/log.js"(exports) { "use strict"; - module2.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf("--"); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); - }; + function debug3(logLevel, ...messages2) { + if (logLevel === "debug") + console.log(...messages2); + } + function warn(logLevel, warning3) { + if (logLevel === "debug" || logLevel === "warn") { + if (typeof process !== "undefined" && process.emitWarning) + process.emitWarning(warning3); + else + console.warn(warning3); + } + } + exports.debug = debug3; + exports.warn = warn; } }); -// ../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js -var require_supports_color = __commonJS({ - "../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/addPairToJSMap.js +var require_addPairToJSMap = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) { "use strict"; - var os5 = require("os"); - var hasFlag2 = require_has_flag(); - var env3 = process.env; - var forceColor; - if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) { - forceColor = false; - } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) { - forceColor = true; - } - if ("FORCE_COLOR" in env3) { - forceColor = env3.FORCE_COLOR.length === 0 || parseInt(env3.FORCE_COLOR, 10) !== 0; - } - function translateLevel2(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - function supportsColor2(stream) { - if (forceColor === false) { - return 0; - } - if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) { - return 3; - } - if (hasFlag2("color=256")) { - return 2; - } - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - const min3 = forceColor ? 1 : 0; - if (process.platform === "win32") { - const osRelease = os5.release().split("."); - if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env3) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") { - return 1; - } - return min3; - } - if ("TEAMCITY_VERSION" in env3) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0; - } - if (env3.COLORTERM === "truecolor") { - return 3; - } - if ("TERM_PROGRAM" in env3) { - const version4 = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env3.TERM_PROGRAM) { - case "iTerm.app": - return version4 >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; + var log = require_log(); + var stringify4 = require_stringify3(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var toJS = require_toJS(); + var MERGE_KEY = "<<"; + function addPairToJSMap(ctx, map3, { key, value }) { + if (ctx?.doc.schema.merge && isMergeKey(key)) { + value = identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (identity.isSeq(value)) + for (const it of value.items) + mergeToJSMap(ctx, map3, it); + else if (Array.isArray(value)) + for (const it of value) + mergeToJSMap(ctx, map3, it); + else + mergeToJSMap(ctx, map3, value); + } else { + const jsKey = toJS.toJS(key, "", ctx); + if (map3 instanceof Map) { + map3.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map3 instanceof Set) { + map3.add(jsKey); + } else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS.toJS(value, stringKey, ctx); + if (stringKey in map3) + Object.defineProperty(map3, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map3[stringKey] = jsValue; + } + } + return map3; + } + var isMergeKey = (key) => key === MERGE_KEY || identity.isScalar(key) && key.value === MERGE_KEY && (!key.type || key.type === Scalar.Scalar.PLAIN); + function mergeToJSMap(ctx, map3, value) { + const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (!identity.isMap(source)) + throw new Error("Merge sources must be maps or map aliases"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value2] of srcMap) { + if (map3 instanceof Map) { + if (!map3.has(key)) + map3.set(key, value2); + } else if (map3 instanceof Set) { + map3.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map3, key)) { + Object.defineProperty(map3, key, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); } } - if (/-256(color)?$/i.test(env3.TERM)) { - return 2; + return map3; + } + function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ""; + if (typeof jsKey !== "object") + return String(jsKey); + if (identity.isNode(key) && ctx?.doc) { + const strCtx = stringify4.createStringifyContext(ctx.doc, {}); + strCtx.anchors = /* @__PURE__ */ new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + 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.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); + } + exports.addPairToJSMap = addPairToJSMap; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Pair.js +var require_Pair = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/Pair.js"(exports) { + "use strict"; + var createNode = require_createNode(); + var stringifyPair = require_stringifyPair(); + var addPairToJSMap = require_addPairToJSMap(); + var identity = require_identity(); + function createPair(key, value, ctx) { + const k = createNode.createNode(key, void 0, ctx); + const v = createNode.createNode(value, void 0, ctx); + return new Pair(k, v); + } + var Pair = class _Pair { + constructor(key, value = null) { + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR }); + this.key = key; + this.value = value; } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) { - return 1; + clone(schema) { + let { key, value } = this; + if (identity.isNode(key)) + key = key.clone(schema); + if (identity.isNode(value)) + value = value.clone(schema); + return new _Pair(key, value); } - if ("COLORTERM" in env3) { - return 1; + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return addPairToJSMap.addPairToJSMap(ctx, pair, this); } - if (env3.TERM === "dumb") { - return min3; + toString(ctx, onComment, onChompKeep) { + return ctx?.doc ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this); } - return min3; - } - function getSupportLevel(stream) { - const level = supportsColor2(stream); - return translateLevel2(level); - } - module2.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) }; + exports.Pair = Pair; + exports.createPair = createPair; } }); -// ../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js -var require_templates = __commonJS({ - "../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyCollection.js +var require_stringifyCollection = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) { "use strict"; - var TEMPLATE_REGEX2 = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; - var STYLE_REGEX2 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; - var STRING_REGEX2 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; - var ESCAPE_REGEX2 = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - var ESCAPES2 = /* @__PURE__ */ new Map([ - ["n", "\n"], - ["r", "\r"], - ["t", " "], - ["b", "\b"], - ["f", "\f"], - ["v", "\v"], - ["0", "\0"], - ["\\", "\\"], - ["e", "\x1B"], - ["a", "\x07"] - ]); - function unescape3(c) { - if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - return ESCAPES2.get(c) || c; - } - function parseArguments2(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if (matches = chunk.match(STRING_REGEX2)) { - results.push(matches[2].replace(ESCAPE_REGEX2, (m, escape, chr) => escape ? unescape3(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - return results; + var Collection = require_Collection(); + var identity = require_identity(); + var stringify4 = require_stringify3(); + var stringifyComment = require_stringifyComment(); + function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify5 = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify5(collection, ctx, options); + } + function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment2 = null; + if (identity.isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment2 = item.comment; + } else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str2 = stringify4.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + if (comment2) + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); + if (chompKeep && comment2) + chompKeep = false; + lines.push(blockItemPrefix + str2); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? ` +${indent}${line}` : "\n"; + } + } + if (comment) { + str += "\n" + stringifyComment.indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str; } - function parseStyle2(style) { - STYLE_REGEX2.lastIndex = 0; - const results = []; - let matches; - while ((matches = STYLE_REGEX2.exec(style)) !== null) { - const name = matches[1]; - if (matches[2]) { - const args = parseArguments2(name, matches[2]); - results.push([name].concat(args)); + function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment2 = null; + if (identity.isNode(item)) { + if (item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment2 = item.comment; + } else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = identity.isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment2 = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } else if (item.value == null && ik?.comment) { + comment2 = ik.comment; + } + } + if (comment2) + reqNewline = true; + let str2 = stringify4.stringify(item, itemCtx, () => comment2 = null); + if (i < items.length - 1) + str2 += ","; + if (comment2) + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); + if (!reqNewline && (lines.length > linesAtValue || str2.includes("\n"))) + reqNewline = true; + lines.push(str2); + linesAtValue = lines.length; + } + let str; + const { start, end } = flowChars; + if (lines.length === 0) { + str = start + end; + } else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = len > Collection.Collection.maxFlowStringSingleLineLength; + } + if (reqNewline) { + str = start; + for (const line of lines) + str += line ? ` +${indentStep}${indent}${line}` : "\n"; + str += ` +${indent}${end}`; } else { - results.push([name]); + str = `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; } } - return results; - } - function buildStyle(chalk2, styles3) { - const enabled = {}; - for (const layer of styles3) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } + if (comment) { + str += stringifyComment.lineComment(str, indent, commentString(comment)); + if (onComment) + onComment(); } - let current = chalk2; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - return current; - } - module2.exports = (chalk2, tmp) => { - const styles3 = []; - const chunks = []; - let chunk = []; - tmp.replace(TEMPLATE_REGEX2, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape3(escapeChar)); - } else if (style) { - const str = chunk.join(""); - chunk = []; - chunks.push(styles3.length === 0 ? str : buildStyle(chalk2, styles3)(str)); - styles3.push({ inverse, styles: parseStyle2(style) }); - } else if (close) { - if (styles3.length === 0) { - throw new Error("Found extraneous } in Chalk template literal"); - } - chunks.push(buildStyle(chalk2, styles3)(chunk.join(""))); - chunk = []; - styles3.pop(); - } else { - chunk.push(chr); - } - }); - chunks.push(chunk.join("")); - if (styles3.length > 0) { - const errMsg = `Chalk template literal is missing ${styles3.length} closing bracket${styles3.length === 1 ? "" : "s"} (\`}\`)`; - throw new Error(errMsg); + return str; + } + function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ""); + if (comment) { + const ic = stringifyComment.indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); } - return chunks.join(""); - }; + } + exports.stringifyCollection = stringifyCollection; } }); -// ../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js -var require_chalk = __commonJS({ - "../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/YAMLMap.js +var require_YAMLMap = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/YAMLMap.js"(exports) { "use strict"; - var escapeStringRegexp = require_escape_string_regexp(); - var ansiStyles2 = require_ansi_styles(); - var stdoutColor2 = require_supports_color().stdout; - var template3 = require_templates(); - var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); - var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"]; - var skipModels = /* @__PURE__ */ new Set(["gray"]); - var styles3 = /* @__PURE__ */ Object.create(null); - function applyOptions2(obj, options) { - options = options || {}; - const scLevel = stdoutColor2 ? stdoutColor2.level : 0; - obj.level = options.level === void 0 ? scLevel : options.level; - obj.enabled = "enabled" in options ? options.enabled : obj.level > 0; - } - function Chalk(options) { - if (!this || !(this instanceof Chalk) || this.template) { - const chalk2 = {}; - applyOptions2(chalk2, options); - chalk2.template = function() { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk2.template].concat(args)); - }; - Object.setPrototypeOf(chalk2, Chalk.prototype); - Object.setPrototypeOf(chalk2.template, chalk2); - chalk2.template.constructor = Chalk; - return chalk2.template; - } - applyOptions2(this, options); - } - if (isSimpleWindowsTerm) { - ansiStyles2.blue.open = "\x1B[94m"; - } - for (const key of Object.keys(ansiStyles2)) { - ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles2[key].close), "g"); - styles3[key] = { - get() { - const codes3 = ansiStyles2[key]; - return build.call(this, this._styles ? this._styles.concat(codes3) : [codes3], this._empty, key); + var stringifyCollection = require_stringifyCollection(); + var addPairToJSMap = require_addPairToJSMap(); + var Collection = require_Collection(); + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + function findPair(items, key) { + const k = identity.isScalar(key) ? key.value : key; + for (const it of items) { + if (identity.isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (identity.isScalar(it.key) && it.key.value === k) + return it; } - }; - } - styles3.visible = { - get() { - return build.call(this, this._styles || [], true, "visible"); - } - }; - ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.color.close), "g"); - for (const model of Object.keys(ansiStyles2.color.ansi)) { - if (skipModels.has(model)) { - continue; } - styles3[model] = { - get() { - const level = this.level; - return function() { - const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments); - const codes3 = { - open, - close: ansiStyles2.color.close, - closeRe: ansiStyles2.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes3) : [codes3], this._empty, model); - }; - } - }; + return void 0; } - ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.bgColor.close), "g"); - for (const model of Object.keys(ansiStyles2.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; + var YAMLMap = class extends Collection.Collection { + static get tagName() { + return "tag:yaml.org,2002:map"; } - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles3[bgModel] = { - get() { - const level = this.level; - return function() { - const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments); - const codes3 = { - open, - close: ansiStyles2.bgColor.close, - closeRe: ansiStyles2.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes3) : [codes3], this._empty, model); - }; - } - }; - } - var proto2 = Object.defineProperties(() => { - }, styles3); - function build(_styles, _empty, key) { - const builder2 = function() { - return applyStyle2.apply(builder2, arguments); - }; - builder2._styles = _styles; - builder2._empty = _empty; - const self = this; - Object.defineProperty(builder2, "level", { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; + constructor(schema) { + super(identity.MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map3 = new this(schema); + const add = (key, value) => { + if (typeof replacer === "function") + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== void 0 || keepUndefined) + map3.items.push(Pair.createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) + add(key, obj[key]); } - }); - Object.defineProperty(builder2, "enabled", { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; + if (typeof schema.sortMapEntries === "function") { + map3.items.sort(schema.sortMapEntries); } - }); - builder2.hasGrey = this.hasGrey || key === "gray" || key === "grey"; - builder2.__proto__ = proto2; - return builder2; - } - function applyStyle2() { - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - if (argsLen === 0) { - return ""; + return map3; } - if (argsLen > 1) { - for (let a = 1; a < argsLen; a++) { - str += " " + args[a]; + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (identity.isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== "object" || !("key" in pair)) { + _pair = new Pair.Pair(pair, pair?.value); + } else + _pair = new Pair.Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } else { + this.items.push(_pair); } } - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? "" : str; + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; } - const originalDim = ansiStyles2.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles2.dim.open = ""; + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0; } - for (const code of this._styles.slice().reverse()) { - str = code.open + str.replace(code.closeRe, code.open) + code.close; - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + has(key) { + return !!findPair(this.items, key); } - ansiStyles2.dim.open = originalDim; - return str; - } - function chalkTag(chalk2, strings) { - if (!Array.isArray(strings)) { - return [].slice.call(arguments, 1).join(" "); + set(key, value) { + this.add(new Pair.Pair(key, value), true); } - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&")); - parts.push(String(strings.raw[i])); + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map3 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map3); + for (const item of this.items) + addPairToJSMap.addPairToJSMap(ctx, map3, item); + return map3; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!identity.isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: "", + flowChars: { start: "{", end: "}" }, + itemIndent: ctx.indent || "", + onChompKeep, + onComment + }); } - return template3(chalk2, parts.join("")); - } - Object.defineProperties(Chalk.prototype, styles3); - module2.exports = Chalk(); - module2.exports.supportsColor = stdoutColor2; - module2.exports.default = module2.exports; + }; + exports.YAMLMap = YAMLMap; + exports.findPair = findPair; } }); -// ../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js -var require_lib3 = __commonJS({ - "../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/map.js +var require_map = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/map.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = highlight; - exports.shouldHighlight = shouldHighlight; - var _jsTokens = require_js_tokens(); - var _helperValidatorIdentifier = require_lib2(); - var _chalk = _interopRequireWildcard(require_chalk(), true); - function _getRequireWildcardCache(e) { - if ("function" != typeof WeakMap) - return null; - var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache = function(e2) { - return e2 ? t : r; - })(e); - } - function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) - return e; - if (null === e || "object" != typeof e && "function" != typeof e) - return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) - return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; - } - return n.default = e, t && t.set(e, n), n; - } - var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); - function getDefs(chalk2) { - return { - keyword: chalk2.cyan, - capitalized: chalk2.yellow, - jsxIdentifier: chalk2.yellow, - punctuator: chalk2.yellow, - number: chalk2.magenta, - string: chalk2.green, - regex: chalk2.magenta, - comment: chalk2.grey, - invalid: chalk2.white.bgRed.bold - }; - } - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - var BRACKET = /^[()[\]{}]$/; - var tokenize; - { - const JSX_TAG = /^[a-z][\w-]*$/i; - const getTokenType = function(token, offset, text) { - if (token.type === "name") { - if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { - return "keyword"; - } - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == " colorize(str)).join("\n"); - } else { - highlighted += value; - } - } - return highlighted; - } - function shouldHighlight(options) { - return _chalk.default.level > 0 || options.forceColor; - } - var chalkWithForcedColor = void 0; - function getChalk(forceColor) { - if (forceColor) { - var _chalkWithForcedColor; - (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ - enabled: true, - level: 1 - }); - return chalkWithForcedColor; - } - return _chalk.default; - } - { - exports.getChalk = (options) => getChalk(options.forceColor); - } - function highlight(code, options = {}) { - if (code !== "" && shouldHighlight(options)) { - const defs = getDefs(getChalk(options.forceColor)); - return highlightTokens(defs, code); - } else { - return code; - } - } + var identity = require_identity(); + var YAMLMap = require_YAMLMap(); + var map3 = { + collection: "map", + default: true, + nodeClass: YAMLMap.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve(map4, onError) { + if (!identity.isMap(map4)) + onError("Expected a mapping for this tag"); + return map4; + }, + createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) + }; + exports.map = map3; } }); -// ../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js -var require_lib4 = __commonJS({ - "../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/YAMLSeq.js +var require_YAMLSeq = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.codeFrameColumns = codeFrameColumns; - exports.default = _default; - var _highlight = require_lib3(); - var _chalk = _interopRequireWildcard(require_chalk(), true); - function _getRequireWildcardCache(e) { - if ("function" != typeof WeakMap) - return null; - var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache = function(e2) { - return e2 ? t : r; - })(e); - } - function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) - return e; - if (null === e || "object" != typeof e && "function" != typeof e) - return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) - return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; - } - return n.default = e, t && t.set(e, n), n; - } - var chalkWithForcedColor = void 0; - function getChalk(forceColor) { - if (forceColor) { - var _chalkWithForcedColor; - (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ - enabled: true, - level: 1 - }); - return chalkWithForcedColor; + var createNode = require_createNode(); + var stringifyCollection = require_stringifyCollection(); + var Collection = require_Collection(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var toJS = require_toJS(); + var YAMLSeq = class extends Collection.Collection { + static get tagName() { + return "tag:yaml.org,2002:seq"; + } + constructor(schema) { + super(identity.SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); } - return _chalk.default; - } - var deprecationWarningShown = false; - function getDefs(chalk2) { - return { - gutter: chalk2.grey, - marker: chalk2.red.bold, - message: chalk2.red.bold - }; - } - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - if (startLine === -1) { - start = 0; - } - if (endLine === -1) { - end = source.length; - } - const lineDiff = endLine - startLine; - const markerLines = {}; - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx2 = asItemIndex(key); + if (typeof idx2 !== "number") + return false; + const del = this.items.splice(idx2, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx2 = asItemIndex(key); + if (typeof idx2 !== "number") + return void 0; + const it = this.items[idx2]; + return !keepScalar && identity.isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx2 = asItemIndex(key); + return typeof idx2 === "number" && idx2 < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx2 = asItemIndex(key); + if (typeof idx2 !== "number") + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx2]; + if (identity.isScalar(prev) && Scalar.isScalarValue(value)) + prev.value = value; + else + this.items[idx2] = value; } - return { - start, - end, - markerLines - }; - } - function codeFrameColumns(rawLines, loc, opts = {}) { - const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); - const chalk2 = getChalk(opts.forceColor); - const defs = getDefs(chalk2); - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; - }; - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} |`; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - if (hasMarker) { - let markerLine = ""; - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); - } else { - return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; - } - }).join("\n"); - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} -${frame}`; + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS.toJS(item, String(i++), ctx)); + return seq; } - if (highlighted) { - return chalk2.reset(frame); - } else { - return frame; + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: "- ", + flowChars: { start: "[", end: "]" }, + itemIndent: (ctx.indent || "") + " ", + onChompKeep, + onComment + }); } - } - function _default(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === "function") { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode.createNode(it, void 0, ctx)); + } } + return seq; } - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); + }; + function asItemIndex(key) { + let idx2 = identity.isScalar(key) ? key.value : key; + if (idx2 && typeof idx2 === "string") + idx2 = Number(idx2); + return typeof idx2 === "number" && Number.isInteger(idx2) && idx2 >= 0 ? idx2 : null; } + exports.YAMLSeq = YAMLSeq; } }); -// ../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js -var require_parse_json = __commonJS({ - "../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/seq.js +var require_seq = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/seq.js"(exports) { "use strict"; - var errorEx = require_error_ex(); - var fallback = require_json_parse_even_better_errors(); - var { default: LinesAndColumns } = require_build(); - var { codeFrameColumns } = require_lib4(); - var JSONError = errorEx("JSONError", { - fileName: errorEx.append("in %s"), - codeFrame: errorEx.append("\n\n%s\n") - }); - var parseJson2 = (string, reviver, filename) => { - if (typeof reviver === "string") { - filename = reviver; - reviver = null; - } - try { - try { - return JSON.parse(string, reviver); - } catch (error3) { - fallback(string, reviver); - throw error3; - } - } catch (error3) { - error3.message = error3.message.replace(/\n/g, ""); - const indexMatch = error3.message.match(/in JSON at position (\d+) while parsing/); - const jsonError = new JSONError(error3); - if (filename) { - jsonError.fileName = filename; - } - if (indexMatch && indexMatch.length > 0) { - const lines = new LinesAndColumns(string); - const index = Number(indexMatch[1]); - const location = lines.locationForIndex(index); - const codeFrame = codeFrameColumns( - string, - { start: { line: location.line + 1, column: location.column + 1 } }, - { highlightCode: true } - ); - jsonError.codeFrame = codeFrame; - } - throw jsonError; + var identity = require_identity(); + var YAMLSeq = require_YAMLSeq(); + var seq = { + collection: "seq", + default: true, + nodeClass: YAMLSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve(seq2, onError) { + if (!identity.isSeq(seq2)) + onError("Expected a sequence for this tag"); + return seq2; + }, + createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx) + }; + exports.seq = seq; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/string.js +var require_string = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/string.js"(exports) { + "use strict"; + var stringifyString = require_stringifyString(); + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str) => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); } }; - parseJson2.JSONError = JSONError; - module2.exports = parseJson2; + exports.string = string; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js -var require_common2 = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/null.js +var require_null = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/common/null.js"(exports) { "use strict"; - function isNothing(subject) { - return typeof subject === "undefined" || subject === null; - } - function isObject(subject) { - return typeof subject === "object" && subject !== null; - } - function toArray3(sequence) { - if (Array.isArray(sequence)) - return sequence; - else if (isNothing(sequence)) - return []; - return [sequence]; - } - function extend(target, source) { - var index, length, key, sourceKeys; - if (source) { - sourceKeys = Object.keys(source); - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; + var Scalar = require_Scalar(); + var nullTag = { + identify: (value) => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar.Scalar(null), + stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr + }; + exports.nullTag = nullTag; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/bool.js +var require_bool = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/bool.js"(exports) { + "use strict"; + var Scalar = require_Scalar(); + var boolTag = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === "t" || source[0] === "T"; + if (value === sv) + return source; } + return value ? ctx.options.trueStr : ctx.options.falseStr; } - return target; - } - function repeat(string, count3) { - var result = "", cycle; - for (cycle = 0; cycle < count3; cycle += 1) { - result += string; - } - return result; - } - function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; - } - module2.exports.isNothing = isNothing; - module2.exports.isObject = isObject; - module2.exports.toArray = toArray3; - module2.exports.repeat = repeat; - module2.exports.isNegativeZero = isNegativeZero; - module2.exports.extend = extend; + }; + exports.boolTag = boolTag; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js -var require_exception = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyNumber.js +var require_stringifyNumber = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) { "use strict"; - function formatError(exception, compact) { - var where = "", message = exception.reason || "(unknown reason)"; - if (!exception.mark) - return message; - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; - if (!compact && exception.mark.snippet) { - where += "\n\n" + exception.mark.snippet; - } - return message + " " + where; - } - function YAMLException(reason, mark) { - Error.call(this); - this.name = "YAMLException"; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error().stack || ""; + function stringifyNumber({ format: format6, minFractionDigits, tag, value }) { + if (typeof value === "bigint") + return String(value); + const num = typeof value === "number" ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format6 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += "0"; } + return n; } - YAMLException.prototype = Object.create(Error.prototype); - YAMLException.prototype.constructor = YAMLException; - YAMLException.prototype.toString = function toString(compact) { - return this.name + ": " + formatError(this, compact); + exports.stringifyNumber = stringifyNumber; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/float.js +var require_float = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/float.js"(exports) { + "use strict"; + var Scalar = require_Scalar(); + var stringifyNumber = require_stringifyNumber(); + var floatNaN = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/, + resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber + }; + var floatExp = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str)); + const dot = str.indexOf("."); + if (dot !== -1 && str[str.length - 1] === "0") + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber.stringifyNumber }; - module2.exports = YAMLException; + exports.float = float; + exports.floatExp = floatExp; + exports.floatNaN = floatNaN; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js -var require_snippet = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/int.js +var require_int = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/int.js"(exports) { "use strict"; - var common = require_common2(); - function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ""; - var tail = ""; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - if (position - lineStart > maxHalfLength) { - head = " ... "; - lineStart = position - maxHalfLength + head.length; - } - if (lineEnd - position > maxHalfLength) { - tail = " ..."; - lineEnd = position + maxHalfLength - tail.length; - } - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, - pos: position - lineStart + head.length - // relative position - }; - } - function padStart(string, max4) { - return common.repeat(" ", max4 - string.length) + string; - } - function makeSnippet(mark, options) { - options = Object.create(options || null); - if (!mark.buffer) - return null; - if (!options.maxLength) - options.maxLength = 79; - if (typeof options.indent !== "number") - options.indent = 1; - if (typeof options.linesBefore !== "number") - options.linesBefore = 3; - if (typeof options.linesAfter !== "number") - options.linesAfter = 2; - var re = /\r?\n|\r|\0/g; - var lineStarts = [0]; - var lineEnds = []; - var match2; - var foundLineNo = -1; - while (match2 = re.exec(mark.buffer)) { - lineEnds.push(match2.index); - lineStarts.push(match2.index + match2[0].length); - if (mark.position <= match2.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - if (foundLineNo < 0) - foundLineNo = lineStarts.length - 1; - var result = "", i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) - break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; - } - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; - result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) - break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; - } - return result.replace(/\n$/, ""); - } - module2.exports = makeSnippet; + var stringifyNumber = require_stringifyNumber(); + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix); + function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber.stringifyNumber(node); + } + var intOct = { + identify: (value) => intIdentify(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: (node) => intStringify(node, 8, "0o") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber + }; + var intHex = { + identify: (value) => intIdentify(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: (node) => intStringify(node, 16, "0x") + }; + exports.int = int; + exports.intHex = intHex; + exports.intOct = intOct; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js -var require_type = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/schema.js +var require_schema = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/core/schema.js"(exports) { "use strict"; - var YAMLException = require_exception(); - var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" - ]; - var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" + var map3 = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema = [ + map3.map, + seq.seq, + string.string, + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float ]; - function compileStyleAliases(map3) { - var result = {}; - if (map3 !== null) { - Object.keys(map3).forEach(function(style) { - map3[style].forEach(function(alias) { - result[String(alias)] = style; - }); - }); - } - return result; - } - function Type(tag, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - this.options = options; - this.tag = tag; - this.kind = options["kind"] || null; - this.resolve = options["resolve"] || function() { - return true; - }; - this.construct = options["construct"] || function(data) { - return data; - }; - this.instanceOf = options["instanceOf"] || null; - this.predicate = options["predicate"] || null; - this.represent = options["represent"] || null; - this.representName = options["representName"] || null; - this.defaultStyle = options["defaultStyle"] || null; - this.multi = options["multi"] || false; - this.styleAliases = compileStyleAliases(options["styleAliases"] || null); - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } - } - module2.exports = Type; + exports.schema = schema; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js -var require_schema = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/json/schema.js +var require_schema2 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/json/schema.js"(exports) { "use strict"; - var YAMLException = require_exception(); - var Type = require_type(); - function compileList(schema, name) { - var result = []; - schema[name].forEach(function(currentType) { - var newIndex = result.length; - result.forEach(function(previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { - newIndex = previousIndex; - } - }); - result[newIndex] = currentType; - }); - return result; - } - function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi["fallback"].push(type); - } else { - result[type.kind][type.tag] = result["fallback"][type.tag] = type; - } - } - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); + var Scalar = require_Scalar(); + var map3 = require_map(); + var seq = require_seq(); + function intIdentify(value) { + return typeof value === "bigint" || Number.isInteger(value); + } + var stringifyJSON = ({ value }) => JSON.stringify(value); + var jsonScalars = [ + { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str) => str, + stringify: stringifyJSON + }, + { + identify: (value) => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON } - return result; - } - function Schema(definition) { - return this.extend(definition); - } - Schema.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - if (definition instanceof Type) { - explicit.push(definition); - } else if (Array.isArray(definition)) { - explicit = explicit.concat(definition); - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - if (definition.implicit) - implicit = implicit.concat(definition.implicit); - if (definition.explicit) - explicit = explicit.concat(definition.explicit); - } else { - throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + ]; + var jsonError = { + default: true, + tag: "", + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; } - implicit.forEach(function(type) { - if (!(type instanceof Type)) { - throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type.loadKind && type.loadKind !== "scalar") { - throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); - } - if (type.multi) { - throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); - } - }); - explicit.forEach(function(type) { - if (!(type instanceof Type)) { - throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - }); - var result = Object.create(Schema.prototype); - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - result.compiledImplicit = compileList(result, "implicit"); - result.compiledExplicit = compileList(result, "explicit"); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - return result; }; - module2.exports = Schema; + var schema = [map3.map, seq.seq].concat(jsonScalars, jsonError); + exports.schema = schema; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js -var require_str = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/binary.js +var require_binary = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) { "use strict"; - var Type = require_type(); - module2.exports = new Type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: function(data) { - return data !== null ? data : ""; + var Scalar = require_Scalar(); + var stringifyString = require_stringifyString(); + var binary = { + identify: (value) => value instanceof Uint8Array, + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } else { + onError("This environment does not support reading binary tags; either Buffer or atob is required"); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + const buf = value; + let str; + if (typeof Buffer === "function") { + str = buf instanceof Buffer ? buf.toString("base64") : Buffer.from(buf.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) + type = Scalar.Scalar.BLOCK_LITERAL; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + } + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); } - }); + }; + exports.binary = binary; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js -var require_seq = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +var require_pairs = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) { "use strict"; - var Type = require_type(); - module2.exports = new Type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: function(data) { - return data !== null ? data : []; - } - }); + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + var YAMLSeq = require_YAMLSeq(); + function resolvePairs(seq, onError) { + if (identity.isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (identity.isPair(item)) + continue; + else if (identity.isMap(item)) { + if (item.items.length > 1) + onError("Each pair must have its own sequence indicator"); + const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore} +${pair.key.commentBefore}` : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment ? `${item.comment} +${cn.comment}` : item.comment; + } + item = pair; + } + seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item); + } + } else + onError("Expected a sequence for this tag"); + return seq; + } + function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs2 = new YAMLSeq.YAMLSeq(schema); + pairs2.tag = "tag:yaml.org,2002:pairs"; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === "function") + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys3 = Object.keys(it); + if (keys3.length === 1) { + key = keys3[0]; + value = it[key]; + } else { + throw new TypeError(`Expected tuple with one key, not ${keys3.length} keys`); + } + } else { + key = it; + } + pairs2.items.push(Pair.createPair(key, value, ctx)); + } + return pairs2; + } + var pairs = { + collection: "seq", + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: resolvePairs, + createNode: createPairs + }; + exports.createPairs = createPairs; + exports.pairs = pairs; + exports.resolvePairs = resolvePairs; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js -var require_map = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/omap.js +var require_omap = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) { "use strict"; - var Type = require_type(); - module2.exports = new Type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: function(data) { - return data !== null ? data : {}; + var identity = require_identity(); + var toJS = require_toJS(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var pairs = require_pairs(); + var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.YAMLMap.prototype.set.bind(this); + this.tag = _YAMLOMap.tag; } - }); + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map3 = /* @__PURE__ */ new Map(); + if (ctx?.onCreate) + ctx.onCreate(map3); + for (const pair of this.items) { + let key, value; + if (identity.isPair(pair)) { + key = toJS.toJS(pair.key, "", ctx); + value = toJS.toJS(pair.value, key, ctx); + } else { + key = toJS.toJS(pair, "", ctx); + } + if (map3.has(key)) + throw new Error("Ordered maps must not include duplicate keys"); + map3.set(key, value); + } + return map3; + } + static from(schema, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema, iterable, ctx); + const omap2 = new this(); + omap2.items = pairs$1.items; + return omap2; + } + }; + YAMLOMap.tag = "tag:yaml.org,2002:omap"; + var omap = { + collection: "seq", + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve(seq, onError) { + const pairs$1 = pairs.resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs$1.items) { + if (identity.isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs$1); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) + }; + exports.YAMLOMap = YAMLOMap; + exports.omap = omap; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js -var require_failsafe = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/bool.js +var require_bool2 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) { "use strict"; - var Schema = require_schema(); - module2.exports = new Schema({ - explicit: [ - require_str(), - require_seq(), - require_map() - ] - }); + var Scalar = require_Scalar(); + function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; + } + var trueTag = { + identify: (value) => value === true, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar.Scalar(true), + stringify: boolStringify + }; + var falseTag = { + identify: (value) => value === false, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => new Scalar.Scalar(false), + stringify: boolStringify + }; + exports.falseTag = falseTag; + exports.trueTag = trueTag; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js -var require_null = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/float.js +var require_float2 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) { "use strict"; - var Type = require_type(); - function resolveYamlNull(data) { - if (data === null) - return true; - var max4 = data.length; - return max4 === 1 && data === "~" || max4 === 4 && (data === "null" || data === "Null" || data === "NULL"); - } - function constructYamlNull() { - return null; - } - function isNull(object) { - return object === null; - } - module2.exports = new Type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function() { - return "~"; - }, - lowercase: function() { - return "null"; - }, - uppercase: function() { - return "NULL"; - }, - camelcase: function() { - return "Null"; - }, - empty: function() { - return ""; + var Scalar = require_Scalar(); + var stringifyNumber = require_stringifyNumber(); + var floatNaN = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber + }; + var floatExp = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ""))); + const dot = str.indexOf("."); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ""); + if (f[f.length - 1] === "0") + node.minFractionDigits = f.length; } + return node; }, - defaultStyle: "lowercase" - }); + stringify: stringifyNumber.stringifyNumber + }; + exports.float = float; + exports.floatExp = floatExp; + exports.floatNaN = floatNaN; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js -var require_bool = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/int.js +var require_int2 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) { "use strict"; - var Type = require_type(); - function resolveYamlBoolean(data) { - if (data === null) - return false; - var max4 = data.length; - return max4 === 4 && (data === "true" || data === "True" || data === "TRUE") || max4 === 5 && (data === "false" || data === "False" || data === "FALSE"); - } - function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; - } - function isBoolean(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; - } - module2.exports = new Type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function(object) { - return object ? "true" : "false"; - }, - uppercase: function(object) { - return object ? "TRUE" : "FALSE"; - }, - camelcase: function(object) { - return object ? "True" : "False"; + var stringifyNumber = require_stringifyNumber(); + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === "-" || sign === "+") + offset += 1; + str = str.substring(offset).replace(/_/g, ""); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; } - }, - defaultStyle: "lowercase" - }); + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber.stringifyNumber(node); + } + var intBin = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: (node) => intStringify(node, 2, "0b") + }; + var intOct = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: (node) => intStringify(node, 8, "0") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber + }; + var intHex = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: (node) => intStringify(node, 16, "0x") + }; + exports.int = int; + exports.intBin = intBin; + exports.intHex = intHex; + exports.intOct = intOct; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js -var require_int = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/set.js +var require_set = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) { "use strict"; - var common = require_common2(); - var Type = require_type(); - function isHexCode(c) { - return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; - } - function isOctCode(c) { - return 48 <= c && c <= 55; - } - function isDecCode(c) { - return 48 <= c && c <= 57; - } - function resolveYamlInteger(data) { - if (data === null) - return false; - var max4 = data.length, index = 0, hasDigits = false, ch; - if (!max4) - return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; - } - if (ch === "0") { - if (index + 1 === max4) - return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max4; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (ch !== "0" && ch !== "1") - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; - } - if (ch === "x") { - index++; - for (; index < max4; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isHexCode(data.charCodeAt(index))) - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; - } - if (ch === "o") { - index++; - for (; index < max4; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isOctCode(data.charCodeAt(index))) - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; - } - } - if (ch === "_") - return false; - for (; index < max4; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - if (!hasDigits || ch === "_") - return false; - return true; - } - function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); + var identity = require_identity(); + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap { + constructor(schema) { + super(schema); + this.tag = _YAMLSet.tag; + } + add(key) { + let pair; + if (identity.isPair(key)) + pair = key; + else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) + pair = new Pair.Pair(key.key, null); + else + pair = new Pair.Pair(key, null); + const prev = YAMLMap.findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") - sign = -1; - value = value.slice(1); - ch = value[0]; + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = YAMLMap.findPair(this.items, key); + return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = YAMLMap.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new Pair.Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error("Set items must all have null values"); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set2 = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === "function") + value = replacer.call(iterable, value, value); + set2.items.push(Pair.createPair(value, null, ctx)); + } + return set2; + } + }; + YAMLSet.tag = "tag:yaml.org,2002:set"; + var set = { + collection: "map", + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map3, onError) { + if (identity.isMap(map3)) { + if (map3.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map3); + else + onError("Set items must all have null values"); + } else + onError("Expected a mapping for this tag"); + return map3; } - if (value === "0") - return 0; - if (ch === "0") { - if (value[1] === "b") - return sign * parseInt(value.slice(2), 2); - if (value[1] === "x") - return sign * parseInt(value.slice(2), 16); - if (value[1] === "o") - return sign * parseInt(value.slice(2), 8); - } - return sign * parseInt(value, 10); - } - function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); - } - module2.exports = new Type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, - octal: function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, - decimal: function(obj) { - return obj.toString(10); - }, - /* eslint-disable max-len */ - hexadecimal: function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - } + }; + exports.YAMLSet = YAMLSet; + exports.set = set; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +var require_timestamp = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) { + "use strict"; + var stringifyNumber = require_stringifyNumber(); + function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === "-" || sign === "+" ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0)); + return sign === "-" ? num(-1) * res : res; + } + function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === "bigint") + num = (n) => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber.stringifyNumber(node); + let sign = ""; + if (value < 0) { + sign = "-"; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; + if (value < 60) { + parts.unshift(0); + } else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); + } + } + return sign + parts.map((n) => String(n).padStart(2, "0")).join(":").replace(/000000\d*$/, ""); + } + var intTime = { + identify: (value) => typeof value === "bigint" || Number.isInteger(value), + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: (str) => parseSexagesimal(str, false), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), + resolve(str) { + const match2 = str.match(timestamp.test); + if (!match2) + throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd"); + const [, year, month, day, hour, minute, second] = match2.map(Number); + const millisec = match2[7] ? Number((match2[7] + "00").substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match2[8]; + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 6e4 * d; + } + return new Date(date); }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } - }); + stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + exports.floatTime = floatTime; + exports.intTime = intTime; + exports.timestamp = timestamp; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js -var require_float = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/schema.js +var require_schema3 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) { "use strict"; - var common = require_common2(); - var Type = require_type(); - var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" - ); - function resolveYamlFloat(data) { - if (data === null) - return false; - if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === "_") { - return false; - } - return true; - } - function constructYamlFloat(data) { - var value, sign; - value = data.replace(/_/g, "").toLowerCase(); - sign = value[0] === "-" ? -1 : 1; - if ("+-".indexOf(value[0]) >= 0) { - value = value.slice(1); - } - if (value === ".inf") { - return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - } else if (value === ".nan") { - return NaN; - } - return sign * parseFloat(value, 10); - } - var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { - case "lowercase": - return ".nan"; - case "uppercase": - return ".NAN"; - case "camelcase": - return ".NaN"; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case "lowercase": - return ".inf"; - case "uppercase": - return ".INF"; - case "camelcase": - return ".Inf"; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case "lowercase": - return "-.inf"; - case "uppercase": - return "-.INF"; - case "camelcase": - return "-.Inf"; - } - } else if (common.isNegativeZero(object)) { - return "-0.0"; - } - res = object.toString(10); - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; - } - function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); - } - module2.exports = new Type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" - }); + var map3 = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var binary = require_binary(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var omap = require_omap(); + var pairs = require_pairs(); + var set = require_set(); + var timestamp = require_timestamp(); + var schema = [ + map3.map, + seq.seq, + string.string, + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp + ]; + exports.schema = schema; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js -var require_json = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/tags.js +var require_tags = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/tags.js"(exports) { "use strict"; - module2.exports = require_failsafe().extend({ - implicit: [ - require_null(), - require_bool(), - require_int(), - require_float() - ] - }); + var map3 = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema = require_schema(); + var schema$1 = require_schema2(); + var binary = require_binary(); + var omap = require_omap(); + var pairs = require_pairs(); + var schema$2 = require_schema3(); + var set = require_set(); + var timestamp = require_timestamp(); + var schemas = /* @__PURE__ */ new Map([ + ["core", schema.schema], + ["failsafe", [map3.map, seq.seq, string.string]], + ["json", schema$1.schema], + ["yaml11", schema$2.schema], + ["yaml-1.1", schema$2.schema] + ]); + var tagsByName = { + binary: binary.binary, + bool: bool.boolTag, + float: float.float, + floatExp: float.floatExp, + floatNaN: float.floatNaN, + floatTime: timestamp.floatTime, + int: int.int, + intHex: int.intHex, + intOct: int.intOct, + intTime: timestamp.intTime, + map: map3.map, + null: _null.nullTag, + omap: omap.omap, + pairs: pairs.pairs, + seq: seq.seq, + set: set.set, + timestamp: timestamp.timestamp + }; + var coreKnownTags = { + "tag:yaml.org,2002:binary": binary.binary, + "tag:yaml.org,2002:omap": omap.omap, + "tag:yaml.org,2002:pairs": pairs.pairs, + "tag:yaml.org,2002:set": set.set, + "tag:yaml.org,2002:timestamp": timestamp.timestamp + }; + function getTags(customTags, schemaName) { + let tags = schemas.get(schemaName); + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys3 = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys3} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } else if (typeof customTags === "function") { + tags = customTags(tags.slice()); + } + return tags.map((tag) => { + if (typeof tag !== "string") + return tag; + const tagObj = tagsByName[tag]; + if (tagObj) + return tagObj; + const keys3 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys3}`); + }); + } + exports.coreKnownTags = coreKnownTags; + exports.getTags = getTags; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js -var require_core2 = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/Schema.js +var require_Schema = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/schema/Schema.js"(exports) { "use strict"; - module2.exports = require_json(); + var identity = require_identity(); + var map3 = require_map(); + var seq = require_seq(); + var string = require_string(); + var tags = require_tags(); + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + constructor({ compat, customTags, merge: merge4, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null; + this.merge = !!merge4; + this.name = typeof schema === "string" && schema || "core"; + this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; + this.tags = tags.getTags(customTags, this.name); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, identity.MAP, { value: map3.map }); + Object.defineProperty(this, identity.SCALAR, { value: string.string }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); + this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; + } + clone() { + const copy = Object.create(_Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } + }; + exports.Schema = Schema; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js -var require_timestamp = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyDocument.js +var require_stringifyDocument = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) { "use strict"; - var Type = require_type(); - var YAML_DATE_REGEXP = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" - ); - var YAML_TIMESTAMP_REGEXP = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" - ); - function resolveYamlTimestamp(data) { - if (data === null) - return false; - if (YAML_DATE_REGEXP.exec(data) !== null) - return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) - return true; - return false; + var identity = require_identity(); + var stringify4 = require_stringify3(); + var stringifyComment = require_stringifyComment(); + function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push("---"); + const ctx = stringify4.createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(""); + const cs = commentString(doc.commentBefore); + lines.unshift(stringifyComment.indentComment(cs, "")); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (identity.isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(""); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(stringifyComment.indentComment(cs, "")); + } + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? void 0 : () => chompKeep = true; + let body = stringify4.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep); + if (contentComment) + body += stringifyComment.lineComment(body, "", commentString(contentComment)); + if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") { + lines[lines.length - 1] = `--- ${body}`; + } else + lines.push(body); + } else { + lines.push(stringify4.stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes("\n")) { + lines.push("..."); + lines.push(stringifyComment.indentComment(cs, "")); + } else { + lines.push(`... ${cs}`); + } + } else { + lines.push("..."); + } + } else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ""); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") + lines.push(""); + lines.push(stringifyComment.indentComment(commentString(dc), "")); + } + } + return lines.join("\n") + "\n"; } - function constructYamlTimestamp(data) { - var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match2 = YAML_DATE_REGEXP.exec(data); - if (match2 === null) - match2 = YAML_TIMESTAMP_REGEXP.exec(data); - if (match2 === null) - throw new Error("Date resolve error"); - year = +match2[1]; - month = +match2[2] - 1; - day = +match2[3]; - if (!match2[4]) { - return new Date(Date.UTC(year, month, day)); - } - hour = +match2[4]; - minute = +match2[5]; - second = +match2[6]; - if (match2[7]) { - fraction = match2[7].slice(0, 3); - while (fraction.length < 3) { - fraction += "0"; - } - fraction = +fraction; - } - if (match2[9]) { - tz_hour = +match2[10]; - tz_minute = +(match2[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 6e4; - if (match2[9] === "-") - delta = -delta; - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (delta) - date.setTime(date.getTime() - delta); - return date; - } - function representYamlTimestamp(object) { - return object.toISOString(); - } - module2.exports = new Type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp - }); + exports.stringifyDocument = stringifyDocument; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js -var require_merge = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/Document.js +var require_Document = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/doc/Document.js"(exports) { "use strict"; - var Type = require_type(); - function resolveYamlMerge(data) { - return data === "<<" || data === null; + var Alias = require_Alias(); + var Collection = require_Collection(); + var identity = require_identity(); + var Pair = require_Pair(); + var toJS = require_toJS(); + var Schema = require_Schema(); + var stringifyDocument = require_stringifyDocument(); + var anchors = require_anchors(); + var applyReviver = require_applyReviver(); + var createNode = require_createNode(); + var directives = require_directives(); + var Document = class _Document { + constructor(value, replacer, options) { + this.commentBefore = null; + this.comment = null; + this.errors = []; + this.warnings = []; + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC }); + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: "warn", + prettyErrors: true, + strict: true, + uniqueKeys: true, + version: "1.2" + }, options); + this.options = opt; + let { version: version4 } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version4 = this.directives.yaml.version; + } else + this.directives = new directives.Directives({ version: version4 }); + this.setSchema(version4, options); + this.contents = value === void 0 ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(_Document.prototype, { + [identity.NODE_TYPE]: { value: identity.DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + copy.contents = identity.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path27, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path27, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchors.anchorNames(this); + node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name; + } + return new Alias.Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = void 0; + if (typeof replacer === "function") { + value = replacer.call({ "": value }, "", value); + _replacer = replacer; + } else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === "number" || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors( + this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || "a" + ); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode.createNode(value, tag, ctx); + if (flow && identity.isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair.Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path27) { + if (Collection.isEmptyPath(path27)) { + if (this.contents == null) + return false; + this.contents = null; + return true; + } + return assertCollection(this.contents) ? this.contents.deleteIn(path27) : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return identity.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path27, keepScalar) { + if (Collection.isEmptyPath(path27)) + return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents; + return identity.isCollection(this.contents) ? this.contents.getIn(path27, keepScalar) : void 0; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return identity.isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path27) { + if (Collection.isEmptyPath(path27)) + return this.contents !== void 0; + return identity.isCollection(this.contents) ? this.contents.hasIn(path27) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + this.contents = Collection.collectionFromPath(this.schema, [key], value); + } else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path27, value) { + if (Collection.isEmptyPath(path27)) { + this.contents = value; + } else if (this.contents == null) { + this.contents = Collection.collectionFromPath(this.schema, Array.from(path27), value); + } else if (assertCollection(this.contents)) { + this.contents.setIn(path27, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version4, options = {}) { + if (typeof version4 === "number") + version4 = String(version4); + let opt; + switch (version4) { + case "1.1": + if (this.directives) + this.directives.yaml.version = "1.1"; + else + this.directives = new directives.Directives({ version: "1.1" }); + opt = { merge: true, resolveKnownTags: false, schema: "yaml-1.1" }; + break; + case "1.2": + case "next": + if (this.directives) + this.directives.yaml.version = version4; + else + this.directives = new directives.Directives({ version: version4 }); + opt = { merge: false, resolveKnownTags: true, schema: "core" }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version4); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema.Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 + }; + const res = toJS.toJS(this.contents, jsonArg ?? "", ctx); + if (typeof onAnchor === "function") + for (const { count: count3, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count3); + return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error("Document with errors cannot be stringified"); + if ("indent" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument.stringifyDocument(this, options); + } + }; + function assertCollection(contents) { + if (identity.isCollection(contents)) + return true; + throw new Error("Expected a YAML collection as document contents"); } - module2.exports = new Type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge - }); + exports.Document = Document; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js -var require_binary = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/errors.js +var require_errors2 = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/errors.js"(exports) { "use strict"; - var Type = require_type(); - var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; - function resolveYamlBinary(data) { - if (data === null) - return false; - var code, idx2, bitlen = 0, max4 = data.length, map3 = BASE64_MAP; - for (idx2 = 0; idx2 < max4; idx2++) { - code = map3.indexOf(data.charAt(idx2)); - if (code > 64) - continue; - if (code < 0) - return false; - bitlen += 6; - } - return bitlen % 8 === 0; - } - function constructYamlBinary(data) { - var idx2, tailbits, input = data.replace(/[\r\n=]/g, ""), max4 = input.length, map3 = BASE64_MAP, bits = 0, result = []; - for (idx2 = 0; idx2 < max4; idx2++) { - if (idx2 % 4 === 0 && idx2) { - result.push(bits >> 16 & 255); - result.push(bits >> 8 & 255); - result.push(bits & 255); - } - bits = bits << 6 | map3.indexOf(input.charAt(idx2)); - } - tailbits = max4 % 4 * 6; - if (tailbits === 0) { - result.push(bits >> 16 & 255); - result.push(bits >> 8 & 255); - result.push(bits & 255); - } else if (tailbits === 18) { - result.push(bits >> 10 & 255); - result.push(bits >> 2 & 255); - } else if (tailbits === 12) { - result.push(bits >> 4 & 255); - } - return new Uint8Array(result); - } - function representYamlBinary(object) { - var result = "", bits = 0, idx2, tail, max4 = object.length, map3 = BASE64_MAP; - for (idx2 = 0; idx2 < max4; idx2++) { - if (idx2 % 3 === 0 && idx2) { - result += map3[bits >> 18 & 63]; - result += map3[bits >> 12 & 63]; - result += map3[bits >> 6 & 63]; - result += map3[bits & 63]; - } - bits = (bits << 8) + object[idx2]; - } - tail = max4 % 3; - if (tail === 0) { - result += map3[bits >> 18 & 63]; - result += map3[bits >> 12 & 63]; - result += map3[bits >> 6 & 63]; - result += map3[bits & 63]; - } else if (tail === 2) { - result += map3[bits >> 10 & 63]; - result += map3[bits >> 4 & 63]; - result += map3[bits << 2 & 63]; - result += map3[64]; - } else if (tail === 1) { - result += map3[bits >> 2 & 63]; - result += map3[bits << 4 & 63]; - result += map3[64]; - result += map3[64]; + var YAMLError = class extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; } - return result; - } - function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; - } - module2.exports = new Type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary - }); + }; + var YAMLParseError = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLParseError", pos, code, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLWarning", pos, code, message); + } + }; + var prettifyError = (src, lc) => (error3) => { + if (error3.pos[0] === -1) + return; + error3.linePos = error3.pos.map((pos) => lc.linePos(pos)); + const { line, col } = error3.linePos[0]; + error3.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\n\r]+$/, ""); + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = "\u2026" + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + "\u2026"; + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + "\u2026\n"; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count3 = 1; + const end = error3.linePos[1]; + if (end && end.line === line && end.col > col) { + count3 = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = " ".repeat(ci) + "^".repeat(count3); + error3.message += `: + +${lineStr} +${pointer} +`; + } + }; + exports.YAMLError = YAMLError; + exports.YAMLParseError = YAMLParseError; + exports.YAMLWarning = YAMLWarning; + exports.prettifyError = prettifyError; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js -var require_omap = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-props.js +var require_resolve_props = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-props.js"(exports) { "use strict"; - var Type = require_type(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var _toString = Object.prototype.toString; - function resolveYamlOmap(data) { - if (data === null) - return true; - var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - if (_toString.call(pair) !== "[object Object]") - return false; - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) - pairHasKey = true; + function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ""; + let commentSep = ""; + let hasNewline = false; + let hasNewlineAfterProp = false; + let reqSpace = false; + let anchor = null; + let tag = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== "space" && token.type !== "newline" && token.type !== "comma") + onError(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + reqSpace = false; + } + switch (token.type) { + case "space": + if (!flow && atNewline && indicator !== "doc-start" && token.source[0] === " ") + onError(token, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + hasSpace = true; + break; + case "comment": { + if (!hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = token.source.substring(1) || " "; + if (!comment) + comment = cb; else - return false; + comment += commentSep + cb; + commentSep = ""; + atNewline = false; + break; + } + case "newline": + if (atNewline) { + if (comment) + comment += token.source; + else + spaceBefore = true; + } else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + hasNewlineAfterProp = true; + hasSpace = true; + break; + case "anchor": + if (anchor) + onError(token, "MULTIPLE_ANCHORS", "A node can have at most one anchor"); + if (token.source.endsWith(":")) + onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true); + anchor = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case "tag": { + if (tag) + onError(token, "MULTIPLE_TAGS", "A node can have at most one tag"); + tag = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; } + case indicator: + if (anchor || tag) + onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow ?? "collection"}`); + found = token; + atNewline = false; + hasSpace = false; + break; + case "comma": + if (flow) { + if (comma) + onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; } - if (!pairHasKey) - return false; - if (objectKeys.indexOf(pairKey) === -1) - objectKeys.push(pairKey); - else - return false; } - return true; - } - function constructYamlOmap(data) { - return data !== null ? data : []; + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) + onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + hasNewlineAfterProp, + anchor, + tag, + end, + start: start ?? end + }; } - module2.exports = new Type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap - }); + exports.resolveProps = resolveProps; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js -var require_pairs = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-contains-newline.js +var require_util_contains_newline = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-contains-newline.js"(exports) { "use strict"; - var Type = require_type(); - var _toString = Object.prototype.toString; - function resolveYamlPairs(data) { - if (data === null) - return true; - var index, length, pair, keys2, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString.call(pair) !== "[object Object]") + function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case "alias": + case "scalar": + case "double-quoted-scalar": + case "single-quoted-scalar": + if (key.source.includes("\n")) + return true; + if (key.end) { + for (const st of key.end) + if (st.type === "newline") + return true; + } return false; - keys2 = Object.keys(pair); - if (keys2.length !== 1) + case "flow-collection": + for (const it of key.items) { + for (const st of it.start) + if (st.type === "newline") + return true; + if (it.sep) { + for (const st of it.sep) + if (st.type === "newline") + return true; + } + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } return false; - result[index] = [keys2[0], pair[keys2[0]]]; - } - return true; - } - function constructYamlPairs(data) { - if (data === null) - return []; - var index, length, pair, keys2, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys2 = Object.keys(pair); - result[index] = [keys2[0], pair[keys2[0]]]; + default: + return true; } - return result; } - module2.exports = new Type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs - }); + exports.containsNewline = containsNewline; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js -var require_set = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-flow-indent-check.js +var require_util_flow_indent_check = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) { "use strict"; - var Type = require_type(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - function resolveYamlSet(data) { - if (data === null) - return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) - return false; + var utilContainsNewline = require_util_contains_newline(); + function flowIndentCheck(indent, fc, onError) { + if (fc?.type === "flow-collection") { + const end = fc.end[0]; + if (end.indent === indent && (end.source === "]" || end.source === "}") && utilContainsNewline.containsNewline(fc)) { + const msg = "Flow end indicator should be more indented than parent"; + onError(end, "BAD_INDENT", msg, true); } } - return true; } - function constructYamlSet(data) { - return data !== null ? data : {}; - } - module2.exports = new Type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet - }); + exports.flowIndentCheck = flowIndentCheck; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js -var require_default = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-map-includes.js +var require_util_map_includes = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-map-includes.js"(exports) { "use strict"; - module2.exports = require_core2().extend({ - implicit: [ - require_timestamp(), - require_merge() - ], - explicit: [ - require_binary(), - require_omap(), - require_pairs(), - require_set() - ] - }); + var identity = require_identity(); + function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value && !(a.value === "<<" && ctx.schema.merge); + return items.some((pair) => isEqual(pair.key, search)); + } + exports.mapIncludes = mapIncludes; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js -var require_loader = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-map.js +var require_resolve_block_map = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-map.js"(exports) { "use strict"; - var common = require_common2(); - var YAMLException = require_exception(); - var makeSnippet = require_snippet(); - var DEFAULT_SCHEMA = require_default(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var CONTEXT_FLOW_IN = 1; - var CONTEXT_FLOW_OUT = 2; - var CONTEXT_BLOCK_IN = 3; - var CONTEXT_BLOCK_OUT = 4; - var CHOMPING_CLIP = 1; - var CHOMPING_STRIP = 2; - var CHOMPING_KEEP = 3; - var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; - var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; - var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; - var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - function _class(obj) { - return Object.prototype.toString.call(obj); - } - function is_EOL(c) { - return c === 10 || c === 13; - } - function is_WHITE_SPACE(c) { - return c === 9 || c === 32; - } - function is_WS_OR_EOL(c) { - return c === 9 || c === 32 || c === 10 || c === 13; - } - function is_FLOW_INDICATOR(c) { - return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; - } - function fromHexCode(c) { - var lc; - if (48 <= c && c <= 57) { - return c - 48; - } - lc = c | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; - } - return -1; - } - function escapedHexLen(c) { - if (c === 120) { - return 2; - } - if (c === 117) { - return 4; - } - if (c === 85) { - return 8; - } - return 0; - } - function fromDecimalCode(c) { - if (48 <= c && c <= 57) { - return c - 48; - } - return -1; - } - function simpleEscapeSequence(c) { - return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; - } - function charFromCodepoint(c) { - if (c <= 65535) { - return String.fromCharCode(c); - } - return String.fromCharCode( - (c - 65536 >> 10) + 55296, - (c - 65536 & 1023) + 56320 - ); - } - var simpleEscapeCheck = new Array(256); - var simpleEscapeMap = new Array(256); - for (i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); - } - var i; - function State(input, options) { - this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || DEFAULT_SCHEMA; - this.onWarning = options["onWarning"] || null; - this.legacy = options["legacy"] || false; - this.json = options["json"] || false; - this.listener = options["listener"] || null; - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - this.firstTabInLine = -1; - this.documents = []; - } - function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), - // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - mark.snippet = makeSnippet(mark); - return new YAMLException(message, mark); - } - function throwError(state, message) { - throw generateError(state, message); - } - function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } - } - var directiveHandlers = { - YAML: function handleYamlDirective(state, name, args) { - var match2, major, minor; - if (state.version !== null) { - throwError(state, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state, "YAML directive accepts exactly one argument"); - } - match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match2 === null) { - throwError(state, "ill-formed argument of the YAML directive"); - } - major = parseInt(match2[1], 10); - minor = parseInt(match2[2], 10); - if (major !== 1) { - throwError(state, "unacceptable YAML version of the document"); - } - state.version = args[0]; - state.checkLineBreaks = minor < 2; - if (minor !== 1 && minor !== 2) { - throwWarning(state, "unsupported YAML version of the document"); - } - }, - TAG: function handleTagDirective(state, name, args) { - var handle, prefix; - if (args.length !== 2) { - throwError(state, "TAG directive accepts exactly two arguments"); - } - handle = args[0]; - prefix = args[1]; - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); - } - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); - } - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, "tag prefix is malformed: " + prefix); - } - state.tagMap[handle] = prefix; - } - }; - function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - if (start < end) { - _result = state.input.slice(start, end); - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { - throwError(state, "expected valid JSON character"); + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var resolveProps = require_resolve_props(); + var utilContainsNewline = require_util_contains_newline(); + var utilFlowIndentCheck = require_util_flow_indent_check(); + var utilMapIncludes = require_util_map_includes(); + var startColMsg = "All mapping items must start at the same column"; + function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; + const map3 = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep: sep6, value } = collItem; + const keyProps = resolveProps.resolveProps(start, { + indicator: "explicit-key-ind", + next: key ?? sep6?.[0], + offset, + onError, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === "block-seq") + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key"); + else if ("indent" in key && key.indent !== bm.indent) + onError(offset, "BAD_INDENT", startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep6) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map3.comment) + map3.comment += "\n" + keyProps.comment; + else + map3.comment = keyProps.comment; } + continue; + } + if (keyProps.hasNewlineAfterProp || utilContainsNewline.containsNewline(key)) { + onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line"); + } + } else if (keyProps.found?.indent !== bm.indent) { + onError(offset, "BAD_INDENT", startColMsg); + } + const keyStart = keyProps.end; + const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + const valueProps = resolveProps.resolveProps(sep6 ?? [], { + indicator: "map-value-ind", + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: !key || key.type === "block-scalar" + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === "block-map" && !valueProps.hasNewline) + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"); + if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"); + } + const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep6, null, valueProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map3.items.push(pair); + } else { + if (implicitKey) + onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, "the stream contains non-printable characters"); + const pair = new Pair.Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map3.items.push(pair); } - state.result += _result; } + if (commentEnd && commentEnd < offset) + onError(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); + map3.range = [bm.offset, offset, commentEnd ?? offset]; + return map3; } - function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - if (!common.isObject(source)) { - throwError(state, "cannot merge mappings; the provided source object is unacceptable"); - } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; + exports.resolveBlockMap = resolveBlockMap; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-seq.js +var require_resolve_block_seq = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) { + "use strict"; + var YAMLSeq = require_YAMLSeq(); + var resolveProps = require_resolve_props(); + var utilFlowIndentCheck = require_util_flow_indent_check(); + function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps.resolveProps(start, { + indicator: "seq-item-ind", + next: value, + offset, + onError, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value && value.type === "block-seq") + onError(props.end, "BAD_INDENT", "All sequence items must start at the same column"); + else + onError(offset, "MISSING_CHAR", "Sequence item without - indicator"); + } else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } } + const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; } - function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { - var index, quantity; - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, "nested arrays are not supported inside keys"); - } - if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { - keyNode[index] = "[object Object]"; + exports.resolveBlockSeq = resolveBlockSeq; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-end.js +var require_resolve_end = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-end.js"(exports) { + "use strict"; + function resolveEnd(end, offset, reqSpace, onError) { + let comment = ""; + if (end) { + let hasSpace = false; + let sep6 = ""; + for (const token of end) { + const { source, type } = token; + switch (type) { + case "space": + hasSpace = true; + break; + case "comment": { + if (reqSpace && !hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = source.substring(1) || " "; + if (!comment) + comment = cb; + else + comment += sep6 + cb; + sep6 = ""; + break; + } + case "newline": + if (comment) + sep6 += source; + hasSpace = true; + break; + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); } + offset += source.length; } } - if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { - keyNode = "[object Object]"; - } - keyNode = String(keyNode); - if (_result === null) { - _result = {}; - } - if (keyTag === "tag:yaml.org,2002:merge") { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); + return { comment, offset }; + } + exports.resolveEnd = resolveEnd; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-flow-collection.js +var require_resolve_flow_collection = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) { + "use strict"; + var identity = require_identity(); + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var resolveEnd = require_resolve_end(); + var resolveProps = require_resolve_props(); + var utilContainsNewline = require_util_contains_newline(); + var utilMapIncludes = require_util_map_includes(); + var blockMsg = "Block collections are not allowed within flow collections"; + var isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq"); + function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === "{"; + const fcName = isMap ? "flow map" : "flow sequence"; + const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep: sep6, value } = collItem; + const props = resolveProps.resolveProps(start, { + flow: fcName, + indicator: "explicit-key-ind", + next: key ?? sep6?.[0], + offset, + onError, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep6 && !value) { + if (i === 0 && props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += "\n" + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; } + if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key)) + onError( + key, + // checked by containsNewline() + "MULTILINE_IMPLICIT_KEY", + "Implicit keys of flow sequence pairs need to be on a single line" + ); + } + if (i === 0) { + if (props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); } else { - mergeMappings(state, _result, valueNode, overridableKeys); + if (!props.comma) + onError(props.start, "MISSING_CHAR", `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ""; + loop: + for (const st of start) { + switch (st.type) { + case "comma": + case "space": + break; + case "comment": + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (identity.isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += "\n" + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } } - } else { - if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, "duplicated mapping key"); - } - if (keyNode === "__proto__") { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); + if (!isMap && !sep6 && !props.found) { + const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep6, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); } else { - _result[keyNode] = valueNode; + const keyStart = props.end; + const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg); + const valueProps = resolveProps.resolveProps(sep6 ?? [], { + flow: fcName, + indicator: "map-value-ind", + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep6) + for (const st of sep6) { + if (st === valueProps.found) + break; + if (st.type === "newline") { + onError(st, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line"); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key"); + } + } else if (value) { + if ("source" in value && value.source && value.source[0] === ":") + onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`); + else + onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); + } + const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep6, null, valueProps, onError) : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map3 = coll; + if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + map3.items.push(pair); + } else { + const map3 = new YAMLMap.YAMLMap(ctx.schema); + map3.flow = true; + map3.items.push(pair); + coll.items.push(map3); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; } - delete overridableKeys[keyNode]; } - return _result; - } - function readLineBreak(state) { - var ch; - ch = state.input.charCodeAt(state.position); - if (ch === 10) { - state.position++; - } else if (ch === 13) { - state.position++; - if (state.input.charCodeAt(state.position) === 10) { - state.position++; + const expectedEnd = isMap ? "}" : "]"; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce && ce.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot ? `${name} must end with a ${expectedEnd}` : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += "\n" + end.comment; + else + coll.comment = end.comment; } + coll.range = [fc.offset, cePos, end.offset]; } else { - throwError(state, "a line break is expected"); + coll.range = [fc.offset, cePos, cePos]; } - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; + return coll; } - function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 9 && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; + exports.resolveFlowCollection = resolveFlowCollection; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-collection.js +var require_compose_collection = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-collection.js"(exports) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var resolveBlockMap = require_resolve_block_map(); + var resolveBlockSeq = require_resolve_block_seq(); + var resolveFlowCollection = require_resolve_flow_collection(); + function resolveCollection(CN, ctx, token, onError, tagName, tag) { + 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); + const Coll = coll.constructor; + if (tagName === "!" || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; + } + function composeCollection(CN, ctx, token, tagToken, onError) { + const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)); + const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq"; + if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq" || !expType) { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt && kt.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } else { + if (kt?.collection) { + onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true); + } else { + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true); } - ch = state.input.charCodeAt(++state.position); + return resolveCollection(CN, ctx, token, onError, tagName); } - if (allowComments && ch === 35) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 10 && ch !== 13 && ch !== 0); - } - if (is_EOL(ch)) { - readLineBreak(state); - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - while (ch === 32) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll; + const node = identity.isNode(res) ? res : new Scalar.Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; + } + exports.composeCollection = composeCollection; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-scalar.js +var require_resolve_block_scalar = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) { + "use strict"; + var Scalar = require_Scalar(); + function resolveBlockScalar(scalar, strict, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, strict, onError); + if (!header) + return { value: "", type: null, comment: "", range: [start, start, start] }; + const type = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === "" || content === "\r") + chompStart = i; + else + break; + } + if (chompStart === 0) { + const value2 = header.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : ""; + let end2 = start + header.length; + if (scalar.source) + end2 += scalar.source.length; + return { value: value2, type, comment: header.comment, range: [start, end2, end2] }; + } + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === "" || content === "\r") { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; } else { + if (indent.length < trimIndent) { + const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + onError(offset + indent.length, "MISSING_CHAR", message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; break; } + offset += indent.length + content.length + 1; } - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, "deficient indentation"); + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; } - return lineBreaks; - } - function testDocumentSeparator(state) { - var _position = state.position, ch; - ch = state.input.charCodeAt(_position); - if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { - _position += 3; - ch = state.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + let value = ""; + let sep6 = ""; + let prevMoreIndented = false; + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + "\n"; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === "\r"; + if (crlf) + content = content.slice(0, -1); + if (content && indent.length < trimIndent) { + const src = header.indent ? "explicit indentation indicator" : "first line"; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); + indent = ""; + } + if (type === Scalar.Scalar.BLOCK_LITERAL) { + value += sep6 + indent.slice(trimIndent) + content; + sep6 = "\n"; + } else if (indent.length > trimIndent || content[0] === " ") { + if (sep6 === " ") + sep6 = "\n"; + else if (!prevMoreIndented && sep6 === "\n") + sep6 = "\n\n"; + value += sep6 + indent.slice(trimIndent) + content; + sep6 = "\n"; + prevMoreIndented = true; + } else if (content === "") { + if (sep6 === "\n") + value += "\n"; + else + sep6 = "\n"; + } else { + value += sep6 + content; + sep6 = " "; + prevMoreIndented = false; } } - return false; - } - function writeFoldedLines(state, count3) { - if (count3 === 1) { - state.result += " "; - } else if (count3 > 1) { - state.result += common.repeat("\n", count3 - 1); + switch (header.chomp) { + case "-": + break; + case "+": + for (let i = chompStart; i < lines.length; ++i) + value += "\n" + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== "\n") + value += "\n"; + break; + default: + value += "\n"; } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; } - function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; - ch = state.input.charCodeAt(state.position); - if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { - return false; - } - if (ch === 63 || ch === 45) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } + function parseBlockScalarHeader({ offset, props }, strict, onError) { + if (props[0].type !== "block-scalar-header") { + onError(props[0], "IMPOSSIBLE", "Block scalar header not found"); + return null; } - state.kind = "scalar"; - state.result = ""; - captureStart = captureEnd = state.position; - hasPendingContent = false; - while (ch !== 0) { - if (ch === 58) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ""; + let error3 = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === "-" || ch === "+")) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error3 === -1) + error3 = offset + i; + } + } + if (error3 !== -1) + onError(error3, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ""; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case "space": + hasSpace = true; + case "newline": + length += token.source.length; break; - } - } else if (ch === 35) { - preceding = state.input.charCodeAt(state.position - 1); - if (is_WS_OR_EOL(preceding)) { + case "comment": + if (strict && !hasSpace) { + const message = "Comments must be separated from other tokens by white space characters"; + onError(token, "MISSING_CHAR", message); + } + length += token.source.length; + comment = token.source.substring(1); break; - } - } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; + case "error": + onError(token, "UNEXPECTED_TOKEN", token.message); + length += token.source.length; break; + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, "UNEXPECTED_TOKEN", message); + const ts = token.source; + if (ts && typeof ts === "string") + length += ts.length; } } - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - ch = state.input.charCodeAt(++state.position); } - captureSegment(state, captureStart, captureEnd, false); - if (state.result) { - return true; - } - state.kind = _kind; - state.result = _result; - return false; + return { mode, indent, chomp, comment, length }; } - function readSingleQuotedScalar(state, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state.input.charCodeAt(state.position); - if (ch !== 39) { - return false; - } - state.kind = "scalar"; - state.result = ""; - state.position++; - captureStart = captureEnd = state.position; - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 39) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - if (ch === 39) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, "unexpected end of the document within a single quoted scalar"); - } else { - state.position++; - captureEnd = state.position; - } - } - throwError(state, "unexpected end of the stream within a single quoted scalar"); + function splitLines(source) { + const split2 = source.split(/\n( *)/); + const first3 = split2[0]; + const m = first3.match(/^( *)/); + const line0 = m?.[1] ? [m[1], first3.slice(m[1].length)] : ["", first3]; + const lines = [line0]; + for (let i = 1; i < split2.length; i += 2) + lines.push([split2[i], split2[i + 1]]); + return lines; } - function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 34) { - return false; - } - state.kind = "scalar"; - state.result = ""; - state.position++; - captureStart = captureEnd = state.position; - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 34) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - } else if (ch === 92) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - } else { - throwError(state, "expected hexadecimal character"); - } - } - state.result += charFromCodepoint(hexResult); - state.position++; - } else { - throwError(state, "unknown escape sequence"); - } - captureStart = captureEnd = state.position; - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, "unexpected end of the document within a double quoted scalar"); - } else { - state.position++; - captureEnd = state.position; - } - } - throwError(state, "unexpected end of the stream within a double quoted scalar"); - } - function readFlowCollection(state, nodeIndent) { - var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 91) { - terminator = 93; - isMapping = false; - _result = []; - } else if (ch === 123) { - terminator = 125; - isMapping = true; - _result = {}; - } else { - return false; + exports.resolveBlockScalar = resolveBlockScalar; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-flow-scalar.js +var require_resolve_flow_scalar = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) { + "use strict"; + var Scalar = require_Scalar(); + var resolveEnd = require_resolve_end(); + function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case "scalar": + _type = Scalar.Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case "single-quoted-scalar": + _type = Scalar.Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case "double-quoted-scalar": + _type = Scalar.Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + default: + onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); + return { + value: "", + type: null, + comment: "", + range: [offset, offset + source.length, offset + source.length] + }; } - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(++state.position); - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? "mapping" : "sequence"; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, "missed comma between flow collection entries"); - } else if (ch === 44) { - throwError(state, "expected the node content, but found ','"); - } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - if (ch === 63) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - _line = state.line; - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if ((isExplicitPair || state.line === _line) && ch === 58) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; + } + function plainValue(source, onError) { + let badChar = ""; + switch (source[0]) { + case " ": + badChar = "a tab character"; + break; + case ",": + badChar = "flow indicator character ,"; + break; + case "%": + badChar = "directive indicator character %"; + break; + case "|": + case ">": { + badChar = `block scalar indicator ${source[0]}`; + break; } - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if (ch === 44) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; + case "@": + case "`": { + badChar = `reserved character ${source[0]}`; + break; } } - throwError(state, "unexpected end of the stream within a flow collection"); + if (badChar) + onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`); + return foldLines(source); } - function readBlockScalar(state, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 124) { - folding = false; - } else if (ch === 62) { - folding = true; - } else { - return false; - } - state.kind = "scalar"; - state.result = ""; - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - if (ch === 43 || ch === 45) { - if (CHOMPING_CLIP === chomping) { - chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, "repeat of a chomping mode identifier"); - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, "repeat of an indentation width identifier"); - } + function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, "MISSING_CHAR", "Missing closing 'quote"); + return foldLines(source.slice(1, -1)).replace(/''/g, "'"); + } + function foldLines(source) { + let first3, line; + try { + first3 = new RegExp("(.*?)(? textIndent) { - textIndent = state.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; + const last = /[ \t]*(.*)/sy; + last.lastIndex = pos; + match2 = last.exec(source); + return res + sep6 + (match2?.[1] ?? ""); + } + function doubleQuotedValue(source, onError) { + let res = ""; + for (let i = 1; i < source.length - 1; ++i) { + const ch = source[i]; + if (ch === "\r" && source[i + 1] === "\n") continue; - } - if (state.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { - state.result += "\n"; - } - } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat("\n", emptyLines + 1); - } else if (emptyLines === 0) { - if (didReadContent) { - state.result += " "; - } + if (ch === "\n") { + const { fold, offset } = foldNewline(source, i); + res += fold; + i = offset; + } else if (ch === "\\") { + let next = source[++i]; + const cc = escapeCodes[next]; + if (cc) + res += cc; + else if (next === "\n") { + next = source[i + 1]; + while (next === " " || next === " ") + next = source[++i + 1]; + } else if (next === "\r" && source[i + 1] === "\n") { + next = source[++i + 1]; + while (next === " " || next === " ") + next = source[++i + 1]; + } else if (next === "x" || next === "u" || next === "U") { + const length = { x: 2, u: 4, U: 8 }[next]; + res += parseCharCode(source, i + 1, length, onError); + i += length; } else { - state.result += common.repeat("\n", emptyLines); - } + const raw = source.substr(i - 1, 2); + onError(i - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); + res += raw; + } + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = source[i + 1]; + while (next === " " || next === " ") + next = source[++i + 1]; + if (next !== "\n" && !(next === "\r" && source[i + 2] === "\n")) + res += i > wsStart ? source.slice(wsStart, i + 1) : ch; } else { - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state.input.charCodeAt(++state.position); + res += ch; } - captureSegment(state, captureStart, state.position, false); } - return true; + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, "MISSING_CHAR", 'Missing closing "quote'); + return res; } - function readBlockSequence(state, nodeIndent) { - var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; - if (state.firstTabInLine !== -1) - return false; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, "tab characters must not be used in indentation"); - } - if (ch !== 45) { - break; - } - following = state.input.charCodeAt(state.position + 1); - if (!is_WS_OR_EOL(following)) { - break; - } - detected = true; - state.position++; - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { - throwError(state, "bad indentation of a sequence entry"); - } else if (state.lineIndent < nodeIndent) { + function foldNewline(source, offset) { + let fold = ""; + let ch = source[offset + 1]; + while (ch === " " || ch === " " || ch === "\n" || ch === "\r") { + if (ch === "\r" && source[offset + 2] !== "\n") break; + if (ch === "\n") + fold += "\n"; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = " "; + return { fold, offset }; + } + var escapeCodes = { + "0": "\0", + a: "\x07", + b: "\b", + e: "\x1B", + f: "\f", + n: "\n", + r: "\r", + t: " ", + v: "\v", + N: "\x85", + _: "\xA0", + L: "\u2028", + P: "\u2029", + " ": " ", + '"': '"', + "/": "/", + "\\": "\\", + " ": " " + }; + function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); + return raw; + } + return String.fromCodePoint(code); + } + exports.resolveFlowScalar = resolveFlowScalar; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-scalar.js +var require_compose_scalar = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-scalar.js"(exports) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var resolveBlockScalar = require_resolve_block_scalar(); + var resolveFlowScalar = require_resolve_flow_scalar(); + function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(token, ctx.options.strict, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; + const tag = tagToken && tagName ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) : token.type === "scalar" ? findScalarTagByTest(ctx, value, token, onError) : ctx.schema[identity.SCALAR]; + let scalar; + try { + const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options); + scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res); + } catch (error3) { + const msg = error3 instanceof Error ? error3.message : String(error3); + onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg); + scalar = new Scalar.Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; + } + function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === "!") + return schema[identity.SCALAR]; + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; } } - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = "sequence"; - state.result = _result; - return true; + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + return kt; } - return false; + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); + return schema[identity.SCALAR]; } - function readBlockMapping(state, nodeIndent, flowIndent) { - var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; - if (state.firstTabInLine !== -1) - return false; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, "tab characters must not be used in indentation"); - } - following = state.input.charCodeAt(state.position + 1); - _line = state.line; - if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { - if (ch === 63) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - detected = true; - atExplicitKey = true; - allowCompact = true; - } else if (atExplicitKey) { - atExplicitKey = false; - allowCompact = true; - } else { - throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); - } - state.position += 1; - ch = following; - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - break; - } - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (ch === 58) { - ch = state.input.charCodeAt(++state.position); - if (!is_WS_OR_EOL(ch)) { - throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); - } - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - } else if (detected) { - throwError(state, "can not read an implicit mapping pair; a colon is missed"); - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; - } - } else if (detected) { - throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; - } - } - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { - throwError(state, "bad indentation of a mapping entry"); - } else if (state.lineIndent < nodeIndent) { - break; + function findScalarTagByTest({ directives, schema }, value, token, onError) { + const tag = schema.tags.find((tag2) => tag2.default && tag2.test?.test(value)) || schema[identity.SCALAR]; + if (schema.compat) { + const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, "TAG_RESOLVE_FAILED", msg, true); } } - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = "mapping"; - state.result = _result; - } - return detected; + return tag; } - function readTagProperty(state) { - var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 33) - return false; - if (state.tag !== null) { - throwError(state, "duplication of a tag property"); - } - ch = state.input.charCodeAt(++state.position); - if (ch === 60) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; - ch = state.input.charCodeAt(++state.position); - } else { - tagHandle = "!"; - } - _position = state.position; - if (isVerbatim) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0 && ch !== 62); - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, "unexpected end of the stream within a verbatim tag"); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (ch === 33) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, "named tag handle cannot contain such characters"); - } - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, "tag suffix cannot contain exclamation marks"); - } + exports.composeScalar = composeScalar; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-empty-scalar-position.js +var require_util_empty_scalar_position = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) { + "use strict"; + function emptyScalarPosition(offset, before, pos) { + if (before) { + if (pos === null) + pos = before.length; + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case "space": + case "comment": + case "newline": + offset -= st.source.length; + continue; } - ch = state.input.charCodeAt(++state.position); - } - tagName = state.input.slice(_position, state.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, "tag suffix cannot contain flow indicator characters"); + st = before[++i]; + while (st?.type === "space") { + offset += st.source.length; + st = before[++i]; + } + break; } } - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, "tag name cannot contain such characters: " + tagName); - } - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, "tag name is malformed: " + tagName); - } - if (isVerbatim) { - state.tag = tagName; - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - } else if (tagHandle === "!") { - state.tag = "!" + tagName; - } else if (tagHandle === "!!") { - state.tag = "tag:yaml.org,2002:" + tagName; - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - return true; + return offset; } - function readAnchorProperty(state) { - var _position, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 38) - return false; - if (state.anchor !== null) { - throwError(state, "duplication of an anchor property"); - } - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (state.position === _position) { - throwError(state, "name of an anchor node must contain at least one character"); + exports.emptyScalarPosition = emptyScalarPosition; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-node.js +var require_compose_node = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-node.js"(exports) { + "use strict"; + var Alias = require_Alias(); + var composeCollection = require_compose_collection(); + var composeScalar = require_compose_scalar(); + var resolveEnd = require_resolve_end(); + var utilEmptyScalarPosition = require_util_empty_scalar_position(); + var CN = { composeNode, composeEmptyNode }; + function composeNode(ctx, token, props, onError) { + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case "alias": + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, "ALIAS_PROPS", "An alias node must not specify any properties"); + break; + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "block-scalar": + node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case "block-map": + case "block-seq": + case "flow-collection": + node = composeCollection.composeCollection(CN, ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + default: { + const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`; + onError(token, "UNEXPECTED_TOKEN", message); + node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError); + isSrcToken = false; + } + } + if (anchor && node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === "scalar" && token.source === "") + node.comment = comment; + else + node.commentBefore = comment; + } + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; + } + function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: "scalar", + offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos), + indent: -1, + source: "" + }; + const node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; + } + function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias.Alias(source.substring(1)); + if (alias.source === "") + onError(offset, "BAD_ALIAS", "Alias cannot be an empty string"); + if (alias.source.endsWith(":")) + onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true); + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; + } + exports.composeEmptyNode = composeEmptyNode; + exports.composeNode = composeNode; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-doc.js +var require_compose_doc = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/compose-doc.js"(exports) { + "use strict"; + var Document = require_Document(); + var composeNode = require_compose_node(); + var resolveEnd = require_resolve_end(); + var resolveProps = require_resolve_props(); + function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document.Document(void 0, opts); + const ctx = { + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps.resolveProps(start, { + indicator: "doc-start", + next: value ?? end?.[0], + offset, + onError, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) + onError(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); } - state.anchor = state.input.slice(_position, state.position); - return true; + doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd.resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; } - function readAlias(state) { - var _position, alias, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 42) - return false; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (state.position === _position) { - throwError(state, "name of an alias node must contain at least one character"); - } - alias = state.input.slice(_position, state.position); - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); + exports.composeDoc = composeDoc; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/composer.js +var require_composer = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/compose/composer.js"(exports) { + "use strict"; + var directives = require_directives(); + var Document = require_Document(); + var errors = require_errors2(); + var identity = require_identity(); + var composeDoc = require_compose_doc(); + var resolveEnd = require_resolve_end(); + function getErrorPos(src) { + if (typeof src === "number") + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === "string" ? source.length : 1)]; + } + function parsePrelude(prelude) { + let comment = ""; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case "#": + comment += (comment === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " "); + atComment = true; + afterEmptyLine = false; + break; + case "%": + if (prelude[i + 1]?.[0] !== "#") + i += 1; + atComment = false; + break; + default: + if (!atComment) + afterEmptyLine = true; + atComment = false; + } } - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; + return { comment, afterEmptyLine }; } - function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; - if (state.listener !== null) { - state.listener("open", state); - } - state.tag = null; - state.anchor = null; - state.kind = null; - state.result = null; - allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; - if (allowToSeek) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } + var Composer = class { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning3) => { + const pos = getErrorPos(source); + if (warning3) + this.warnings.push(new errors.YAMLWarning(pos, code, message)); + else + this.errors.push(new errors.YAMLParseError(pos, code, message)); + }; + this.directives = new directives.Directives({ version: options.version || "1.2" }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment} +${comment}` : comment; + } else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (identity.isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment} +${cb}` : comment; } else { - allowBlockCollections = false; + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment} +${cb}` : comment; } } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; + if (afterDoc) { + Array.prototype.push.apply(doc.errors, this.errors); + Array.prototype.push.apply(doc.warnings, this.warnings); } else { - flowIndent = parentIndent + 1; - } - blockIndent = state.position - state.lineStart; - if (indentStatus === 1) { - if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - } else if (readAlias(state)) { - hasContent = true; - if (state.tag !== null || state.anchor !== null) { - throwError(state, "alias node should not have any properties"); - } - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - if (state.tag === null) { - state.tag = "?"; - } - } - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + doc.errors = this.errors; + doc.warnings = this.warnings; } + this.prelude = []; + this.errors = []; + this.warnings = []; } - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } else if (state.tag === "?") { - if (state.result !== null && state.kind !== "scalar") { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - if (type.resolve(state.result)) { - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + if (process.env.LOG_STREAM) + console.dir(token, { depth: null }); + switch (token.type) { + case "directive": + this.directives.add(token.source, (offset, message, warning3) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, "BAD_DIRECTIVE", message, warning3); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case "document": { + const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; break; } - } - } else if (state.tag !== "!") { - if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { - type = state.typeMap[state.kind || "fallback"][state.tag]; - } else { - type = null; - typeList = state.typeMap.multi[state.kind || "fallback"]; - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; + case "byte-order-mark": + case "space": + break; + case "comment": + case "newline": + this.prelude.push(token.source); + break; + case "error": { + const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message; + const error3 = new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg); + if (this.atDirectives || !this.doc) + this.errors.push(error3); + else + this.doc.errors.push(error3); + break; + } + case "doc-end": { + if (!this.doc) { + const msg = "Unexpected doc-end without preceding document"; + this.errors.push(new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg)); break; } + this.doc.directives.docEnd = true; + const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc} +${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; } + default: + this.errors.push(new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`)); } - if (!type) { - throwError(state, "unknown tag !<" + state.tag + ">"); - } - if (state.result !== null && type.kind !== state.kind) { - throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - if (!type.resolve(state.result, state.tag)) { - throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document.Document(void 0, opts); + if (this.atDirectives) + this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line"); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; } } - if (state.listener !== null) { - state.listener("close", state); + }; + exports.Composer = Composer; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-scalar.js +var require_cst_scalar = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-scalar.js"(exports) { + "use strict"; + var resolveBlockScalar = require_resolve_block_scalar(); + var resolveFlowScalar = require_resolve_flow_scalar(); + var errors = require_errors2(); + var stringifyString = require_stringifyString(); + function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === "number" ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new errors.YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return resolveFlowScalar.resolveFlowScalar(token, strict, _onError); + case "block-scalar": + return resolveBlockScalar.resolveBlockScalar(token, strict, _onError); + } } - return state.tag !== null || state.anchor !== null || hasContent; + return null; } - function readDocument2(state) { - var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = /* @__PURE__ */ Object.create(null); - state.anchorMap = /* @__PURE__ */ Object.create(null); - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if (state.lineIndent > 0 || ch !== 37) { - break; - } - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - if (directiveName.length < 1) { - throwError(state, "directive name must not be less than one character in length"); - } - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (ch === 35) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0 && !is_EOL(ch)); + function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = "PLAIN" } = context; + const source = stringifyString.stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? " ".repeat(indent) : "", + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: "newline", offset: -1, indent, source: "\n" } + ]; + switch (source[0]) { + case "|": + case ">": { + const he = source.indexOf("\n"); + const head = source.substring(0, he); + const body = source.substring(he + 1) + "\n"; + const props = [ + { type: "block-scalar-header", offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: "newline", offset: -1, indent, source: "\n" }); + return { type: "block-scalar", offset, indent, props, source: body }; + } + case '"': + return { type: "double-quoted-scalar", offset, indent, source, end }; + case "'": + return { type: "single-quoted-scalar", offset, indent, source, end }; + default: + return { type: "scalar", offset, indent, source, end }; + } + } + function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = "indent" in token ? token.indent : null; + if (afterKey && typeof indent === "number") + indent += 2; + if (!type) + switch (token.type) { + case "single-quoted-scalar": + type = "QUOTE_SINGLE"; break; - } - if (is_EOL(ch)) + case "double-quoted-scalar": + type = "QUOTE_DOUBLE"; + break; + case "block-scalar": { + const header = token.props[0]; + if (header.type !== "block-scalar-header") + throw new Error("Invalid block scalar header"); + type = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; break; - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); } - directiveArgs.push(state.input.slice(_position, state.position)); + default: + type = "PLAIN"; } - if (ch !== 0) - readLineBreak(state); - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); + const source = stringifyString.stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? " ".repeat(indent) : "", + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case "|": + case ">": + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, "double-quoted-scalar"); + break; + case "'": + setFlowScalarValue(token, source, "single-quoted-scalar"); + break; + default: + setFlowScalarValue(token, source, "scalar"); + } + } + function setBlockScalarValue(token, source) { + const he = source.indexOf("\n"); + const head = source.substring(0, he); + const body = source.substring(he + 1) + "\n"; + if (token.type === "block-scalar") { + const header = token.props[0]; + if (header.type !== "block-scalar-header") + throw new Error("Invalid block scalar header"); + header.source = head; + token.source = body; + } else { + const { offset } = token; + const indent = "indent" in token ? token.indent : -1; + const props = [ + { type: "block-scalar-header", offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0)) + props.push({ type: "newline", offset: -1, indent, source: "\n" }); + for (const key of Object.keys(token)) + if (key !== "type" && key !== "offset") + delete token[key]; + Object.assign(token, { type: "block-scalar", indent, props, source: body }); + } + } + function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case "space": + case "comment": + props.push(st); + break; + case "newline": + props.push(st); + return true; + } + return false; + } + function setFlowScalarValue(token, source, type) { + switch (token.type) { + case "scalar": + case "double-quoted-scalar": + case "single-quoted-scalar": + token.type = type; + token.source = source; + break; + case "block-scalar": { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === "block-scalar-header") + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; } - } - skipSeparationSpace(state, true, -1); - if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } else if (hasDirectives) { - throwError(state, "directives end mark is expected"); - } - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, "non-ASCII line breaks are interpreted as content"); - } - state.documents.push(state.result); - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (state.input.charCodeAt(state.position) === 46) { - state.position += 3; - skipSeparationSpace(state, true, -1); + case "block-map": + case "block-seq": { + const offset = token.offset + source.length; + const nl = { type: "newline", offset, indent: token.indent, source: "\n" }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = "indent" in token ? token.indent : -1; + const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === "space" || st.type === "comment" || st.type === "newline") : []; + for (const key of Object.keys(token)) + if (key !== "type" && key !== "offset") + delete token[key]; + Object.assign(token, { type, indent, source, end }); } - return; - } - if (state.position < state.length - 1) { - throwError(state, "end of the stream or a document separator is expected"); - } else { - return; } } - function loadDocuments(input, options) { - input = String(input); - options = options || {}; - if (input.length !== 0) { - if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { - input += "\n"; + exports.createScalarToken = createScalarToken; + exports.resolveAsScalar = resolveAsScalar; + exports.setScalarValue = setScalarValue; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-stringify.js +var require_cst_stringify = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-stringify.js"(exports) { + "use strict"; + var stringify4 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst); + function stringifyToken(token) { + switch (token.type) { + case "block-scalar": { + let res = ""; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case "block-map": + case "block-seq": { + let res = ""; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case "flow-collection": { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case "document": { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); + default: { + let res = token.source; + if ("end" in token && token.end) + for (const st of token.end) + res += st.source; + return res; } } - var state = new State(input, options); - var nullpos = input.indexOf("\0"); - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, "null byte is not allowed in input"); - } - state.input += "\0"; - while (state.input.charCodeAt(state.position) === 32) { - state.lineIndent += 1; - state.position += 1; - } - while (state.position < state.length - 1) { - readDocument2(state); - } - return state.documents; } - function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { - options = iterator; - iterator = null; - } - var documents = loadDocuments(input, options); - if (typeof iterator !== "function") { - return documents; + function stringifyItem({ start, key, sep: sep6, value }) { + let res = ""; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep6) + for (const st of sep6) + res += st.source; + if (value) + res += stringifyToken(value); + return res; + } + exports.stringify = stringify4; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-visit.js +var require_cst_visit = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst-visit.js"(exports) { + "use strict"; + var BREAK = Symbol("break visit"); + var SKIP = Symbol("skip children"); + var REMOVE = Symbol("remove item"); + function visit(cst, visitor) { + if ("type" in cst && cst.type === "document") + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); + } + visit.BREAK = BREAK; + visit.SKIP = SKIP; + visit.REMOVE = REMOVE; + visit.itemAtPath = (cst, path27) => { + let item = cst; + for (const [field, index] of path27) { + const tok = item?.[field]; + if (tok && "items" in tok) { + item = tok.items[index]; + } else + return void 0; } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); + return item; + }; + visit.parentCollection = (cst, path27) => { + const parent = visit.itemAtPath(cst, path27.slice(0, -1)); + const field = path27[path27.length - 1][0]; + const coll = parent?.[field]; + if (coll && "items" in coll) + return coll; + throw new Error("Parent collection not found"); + }; + function _visit(path27, item, visitor) { + let ctrl = visitor(item, path27); + if (typeof ctrl === "symbol") + return ctrl; + for (const field of ["key", "value"]) { + const token = item[field]; + if (token && "items" in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path27.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === "function" && field === "key") + ctrl = ctrl(item, path27); + } } + return typeof ctrl === "function" ? ctrl(item, path27) : ctrl; } - function load2(input, options) { - var documents = loadDocuments(input, options); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; + exports.visit = visit; + } +}); + +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst.js +var require_cst = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/cst.js"(exports) { + "use strict"; + var cstScalar = require_cst_scalar(); + var cstStringify = require_cst_stringify(); + var cstVisit = require_cst_visit(); + var BOM = "\uFEFF"; + var DOCUMENT = ""; + var FLOW_END = ""; + var SCALAR = ""; + var isCollection = (token) => !!token && "items" in token; + var isScalar = (token) => !!token && (token.type === "scalar" || token.type === "single-quoted-scalar" || token.type === "double-quoted-scalar" || token.type === "block-scalar"); + function prettyToken(token) { + switch (token) { + case BOM: + return ""; + case DOCUMENT: + return ""; + case FLOW_END: + return ""; + case SCALAR: + return ""; + default: + return JSON.stringify(token); + } + } + function tokenType(source) { + switch (source) { + case BOM: + return "byte-order-mark"; + case DOCUMENT: + return "doc-mode"; + case FLOW_END: + return "flow-error-end"; + case SCALAR: + return "scalar"; + case "---": + return "doc-start"; + case "...": + return "doc-end"; + case "": + case "\n": + case "\r\n": + return "newline"; + case "-": + return "seq-item-ind"; + case "?": + return "explicit-key-ind"; + case ":": + return "map-value-ind"; + case "{": + return "flow-map-start"; + case "}": + return "flow-map-end"; + case "[": + return "flow-seq-start"; + case "]": + return "flow-seq-end"; + case ",": + return "comma"; + } + switch (source[0]) { + case " ": + case " ": + return "space"; + case "#": + return "comment"; + case "%": + return "directive-line"; + case "*": + return "alias"; + case "&": + return "anchor"; + case "!": + return "tag"; + case "'": + return "single-quoted-scalar"; + case '"': + return "double-quoted-scalar"; + case "|": + case ">": + return "block-scalar-header"; } - throw new YAMLException("expected a single document in the stream, but found more"); + return null; } - module2.exports.loadAll = loadAll; - module2.exports.load = load2; + exports.createScalarToken = cstScalar.createScalarToken; + exports.resolveAsScalar = cstScalar.resolveAsScalar; + exports.setScalarValue = cstScalar.setScalarValue; + exports.stringify = cstStringify.stringify; + exports.visit = cstVisit.visit; + exports.BOM = BOM; + exports.DOCUMENT = DOCUMENT; + exports.FLOW_END = FLOW_END; + exports.SCALAR = SCALAR; + exports.isCollection = isCollection; + exports.isScalar = isScalar; + exports.prettyToken = prettyToken; + exports.tokenType = tokenType; } }); -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js -var require_dumper = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports, module2) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/lexer.js +var require_lexer = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/lexer.js"(exports) { "use strict"; - var common = require_common2(); - var YAMLException = require_exception(); - var DEFAULT_SCHEMA = require_default(); - var _toString = Object.prototype.toString; - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var CHAR_BOM = 65279; - var CHAR_TAB = 9; - var CHAR_LINE_FEED = 10; - var CHAR_CARRIAGE_RETURN = 13; - var CHAR_SPACE = 32; - var CHAR_EXCLAMATION = 33; - var CHAR_DOUBLE_QUOTE = 34; - var CHAR_SHARP = 35; - var CHAR_PERCENT = 37; - var CHAR_AMPERSAND = 38; - var CHAR_SINGLE_QUOTE = 39; - var CHAR_ASTERISK = 42; - var CHAR_COMMA = 44; - var CHAR_MINUS = 45; - var CHAR_COLON = 58; - var CHAR_EQUALS = 61; - var CHAR_GREATER_THAN = 62; - var CHAR_QUESTION = 63; - var CHAR_COMMERCIAL_AT = 64; - var CHAR_LEFT_SQUARE_BRACKET = 91; - var CHAR_RIGHT_SQUARE_BRACKET = 93; - var CHAR_GRAVE_ACCENT = 96; - var CHAR_LEFT_CURLY_BRACKET = 123; - var CHAR_VERTICAL_LINE = 124; - var CHAR_RIGHT_CURLY_BRACKET = 125; - var ESCAPE_SEQUENCES = {}; - ESCAPE_SEQUENCES[0] = "\\0"; - ESCAPE_SEQUENCES[7] = "\\a"; - ESCAPE_SEQUENCES[8] = "\\b"; - ESCAPE_SEQUENCES[9] = "\\t"; - ESCAPE_SEQUENCES[10] = "\\n"; - ESCAPE_SEQUENCES[11] = "\\v"; - ESCAPE_SEQUENCES[12] = "\\f"; - ESCAPE_SEQUENCES[13] = "\\r"; - ESCAPE_SEQUENCES[27] = "\\e"; - ESCAPE_SEQUENCES[34] = '\\"'; - ESCAPE_SEQUENCES[92] = "\\\\"; - ESCAPE_SEQUENCES[133] = "\\N"; - ESCAPE_SEQUENCES[160] = "\\_"; - ESCAPE_SEQUENCES[8232] = "\\L"; - ESCAPE_SEQUENCES[8233] = "\\P"; - var DEPRECATED_BOOLEANS_SYNTAX = [ - "y", - "Y", - "yes", - "Yes", - "YES", - "on", - "On", - "ON", - "n", - "N", - "no", - "No", - "NO", - "off", - "Off", - "OFF" - ]; - var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - function compileStyleMap(schema, map3) { - var result, keys2, index, length, tag, style, type; - if (map3 === null) - return {}; - result = {}; - keys2 = Object.keys(map3); - for (index = 0, length = keys2.length; index < length; index += 1) { - tag = keys2[index]; - style = String(map3[tag]); - if (tag.slice(0, 2) === "!!") { - tag = "tag:yaml.org,2002:" + tag.slice(2); - } - type = schema.compiledTypeMap["fallback"][tag]; - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - result[tag] = style; + var cst = require_cst(); + function isEmpty2(ch) { + switch (ch) { + case void 0: + case " ": + case "\n": + case "\r": + case " ": + return true; + default: + return false; } - return result; } - function encodeHex(character) { - var string, handle, length; - string = character.toString(16).toUpperCase(); - if (character <= 255) { - handle = "x"; - length = 2; - } else if (character <= 65535) { - handle = "u"; - length = 4; - } else if (character <= 4294967295) { - handle = "U"; - length = 8; - } else { - throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); - } - return "\\" + handle + common.repeat("0", length - string.length) + string; - } - var QUOTING_TYPE_SINGLE = 1; - var QUOTING_TYPE_DOUBLE = 2; - function State(options) { - this.schema = options["schema"] || DEFAULT_SCHEMA; - this.indent = Math.max(1, options["indent"] || 2); - this.noArrayIndent = options["noArrayIndent"] || false; - this.skipInvalid = options["skipInvalid"] || false; - this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; - this.styleMap = compileStyleMap(this.schema, options["styles"] || null); - this.sortKeys = options["sortKeys"] || false; - this.lineWidth = options["lineWidth"] || 80; - this.noRefs = options["noRefs"] || false; - this.noCompatMode = options["noCompatMode"] || false; - this.condenseFlow = options["condenseFlow"] || false; - this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options["forceQuotes"] || false; - this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - this.tag = null; - this.result = ""; - this.duplicates = []; - this.usedDuplicates = null; - } - function indentString(string, spaces) { - var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; - while (position < length) { - next = string.indexOf("\n", position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - if (line.length && line !== "\n") - result += ind; - result += line; + var hexDigits = "0123456789ABCDEFabcdef".split(""); + var tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""); + var invalidFlowScalarChars = ",[]{}".split(""); + var invalidAnchorChars = " ,[]{}\n\r ".split(""); + var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch); + var Lexer = class { + constructor() { + this.atEnd = false; + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + this.buffer = ""; + this.flowKey = false; + this.flowLevel = 0; + this.indentNext = 0; + this.indentValue = 0; + this.lineEndPos = null; + this.next = null; + this.pos = 0; } - return result; - } - function generateNextLine(state, level) { - return "\n" + common.repeat(" ", state.indent * level); - } - function testImplicitResolving(state, str) { - var index, length, type; - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - if (type.resolve(str)) { + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? "stream"; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === " " || ch === " ") + ch = this.buffer[++i]; + if (!ch || ch === "#" || ch === "\n") return true; - } + if (ch === "\r") + return this.buffer[i + 1] === "\n"; + return false; } - return false; - } - function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; - } - function isPrintable(c) { - return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; - } - function isNsCharOrWhitespace(c) { - return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; - } - function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - (inblock ? ( - // c = flow-in - cIsNsCharOrWhitespace - ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar - ); - } - function isPlainSafeFirst(c) { - return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; - } - function isPlainSafeLast(c) { - return !isWhitespace(c) && c !== CHAR_COLON; - } - function codePointAt(string, pos) { - var first3 = string.charCodeAt(pos), second; - if (first3 >= 55296 && first3 <= 56319 && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 56320 && second <= 57343) { - return (first3 - 55296) * 1024 + second - 56320 + 65536; + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === " ") + ch = this.buffer[++indent + offset]; + if (ch === "\r") { + const next = this.buffer[indent + offset + 1]; + if (next === "\n" || !next && !this.atEnd) + return offset + indent + 1; + } + return ch === "\n" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1; + } + if (ch === "-" || ch === ".") { + const dt = this.buffer.substr(offset, 3); + if ((dt === "---" || dt === "...") && isEmpty2(this.buffer[offset + 3])) + return -1; } + return offset; } - return first3; - } - function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); - } - var STYLE_PLAIN = 1; - var STYLE_SINGLE = 2; - var STYLE_LITERAL = 3; - var STYLE_FOLDED = 4; - var STYLE_DOUBLE = 5; - function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; - var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); - if (singleLineOnly || forceQuotes) { - for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; + getLine() { + let end = this.lineEndPos; + if (typeof end !== "number" || end !== -1 && end < this.pos) { + end = this.buffer.indexOf("\n", this.pos); + this.lineEndPos = end; } - } else { - for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. - i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); - } - if (!hasLineBreak && !hasFoldableLine) { - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - function writeScalar(state, string, level, iskey, inblock) { - state.dump = function() { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; - } - } - var indent = state.indent * Math.max(1, level); - var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; - function testAmbiguity(string2) { - return testImplicitResolving(state, string2); - } - switch (chooseScalarStyle( - string, - singleLineOnly, - state.indent, - lineWidth, - testAmbiguity, - state.quotingType, - state.forceQuotes && !iskey, - inblock - )) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException("impossible error: invalid scalar style"); - } - }(); - } - function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; - var clip = string[string.length - 1] === "\n"; - var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); - var chomp = keep ? "+" : clip ? "" : "-"; - return indentIndicator + chomp + "\n"; - } - function dropEndingNewline(string) { - return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; - } - function foldString(string, width) { - var lineRe = /(\n+)([^\n]*)/g; - var result = function() { - var nextLF = string.indexOf("\n"); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }(); - var prevMoreIndented = string[0] === "\n" || string[0] === " "; - var moreIndented; - var match2; - while (match2 = lineRe.exec(string)) { - var prefix = match2[1], line = match2[2]; - moreIndented = line[0] === " "; - result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); - prevMoreIndented = moreIndented; + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === "\r") + end -= 1; + return this.buffer.substring(this.pos, end); } - return result; - } - function foldLine(line, width) { - if (line === "" || line[0] === " ") - return line; - var breakRe = / [^ ]/g; - var match2; - var start = 0, end, curr = 0, next = 0; - var result = ""; - while (match2 = breakRe.exec(line)) { - next = match2.index; - if (next - start > width) { - end = curr > start ? curr : next; - result += "\n" + line.slice(start, end); - start = end + 1; - } - curr = next; - } - result += "\n"; - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + "\n" + line.slice(curr + 1); - } else { - result += line.slice(start); - } - return result.slice(1); - } - function escapeString(string) { - var result = ""; - var char = 0; - var escapeSeq; - for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 65536) - result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } + hasChars(n) { + return this.pos + n <= this.buffer.length; } - return result; - } - function writeFlowSequence(state, level, object) { - var _result = "", _tag = state.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { - if (_result !== "") - _result += "," + (!state.condenseFlow ? " " : ""); - _result += state.dump; - } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; } - state.tag = _tag; - state.dump = "[" + _result + "]"; - } - function writeBlockSequence(state, level, object, compact) { - var _result = "", _tag = state.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { - if (!compact || _result !== "") { - _result += generateNextLine(state, level); + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case "stream": + return yield* this.parseStream(); + case "line-start": + return yield* this.parseLineStart(); + case "block-start": + return yield* this.parseBlockStart(); + case "doc": + return yield* this.parseDocument(); + case "flow": + return yield* this.parseFlowCollection(); + case "quoted-scalar": + return yield* this.parseQuotedScalar(); + case "block-scalar": + return yield* this.parseBlockScalar(); + case "plain-scalar": + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext("stream"); + if (line[0] === cst.BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === "%") { + let dirEnd = line.length; + const cs = line.indexOf("#"); + if (cs !== -1) { + const ch = line[cs - 1]; + if (ch === " " || ch === " ") + dirEnd = cs - 1; } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += "-"; - } else { - _result += "- "; + while (true) { + const ch = line[dirEnd - 1]; + if (ch === " " || ch === " ") + dirEnd -= 1; + else + break; } - _result += state.dump; - } - } - state.tag = _tag; - state.dump = _result || "[]"; - } - function writeFlowMapping(state, level, object) { - var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ""; - if (_result !== "") - pairBuffer += ", "; - if (state.condenseFlow) - pairBuffer += '"'; - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state, level, objectKey, false, false)) { - continue; - } - if (state.dump.length > 1024) - pairBuffer += "? "; - pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); - if (!writeNode(state, level, objectValue, false, false)) { - continue; + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); + this.pushNewline(); + return "stream"; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return "stream"; + } + yield cst.DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext("line-start"); + if (ch === "-" || ch === ".") { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext("line-start"); + const s = this.peek(3); + if (s === "---" && isEmpty2(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return "doc"; + } else if (s === "..." && isEmpty2(this.charAt(3))) { + yield* this.pushCount(3); + return "stream"; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty2(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext("block-start"); + if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty2(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return yield* this.parseBlockStart(); + } + return "doc"; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext("doc"); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case "#": + yield* this.pushCount(line.length - n); + case void 0: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + return "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "doc"; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case "|": + case ">": + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); } - pairBuffer += state.dump; - _result += pairBuffer; - } - state.tag = _tag; - state.dump = "{" + _result + "}"; - } - function writeBlockMapping(state, level, object, compact) { - var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; - if (state.sortKeys === true) { - objectKeyList.sort(); - } else if (typeof state.sortKeys === "function") { - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - throw new YAMLException("sortKeys must be a boolean or a function"); } - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ""; - if (!compact || _result !== "") { - pairBuffer += generateNextLine(state, level); - } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; - } - explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += "?"; + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; } else { - pairBuffer += "? "; + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext("flow"); + if (indent !== -1 && indent < this.indentNext && line[0] !== "#" || indent === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty2(line[3])) { + const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}"); + if (!atFlowEndMarker) { + this.flowLevel = 0; + yield cst.FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ",") { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case void 0: + return "flow"; + case "#": + yield* this.pushCount(line.length - n); + return "flow"; + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? "flow" : "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "flow"; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ":": { + const next = this.charAt(1); + if (this.flowKey || isEmpty2(next) || next === ",") { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return "flow"; + } } + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); } - pairBuffer += state.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; - } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ":"; + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); } else { - pairBuffer += ": "; - } - pairBuffer += state.dump; - _result += pairBuffer; - } - state.tag = _tag; - state.dump = _result || "{}"; - } - function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - typeList = explicit ? state.explicitTypes : state.implicitTypes; - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = "?"; - } - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - if (_toString.call(type.represent) === "[object Function]") { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - state.dump = _result; + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === "\\") + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); } - return true; } + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf("\n", this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf("\n", cs); + } + if (nl !== -1) { + end = nl - (qb[nl - 1] === "\r" ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext("quoted-scalar"); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? "flow" : "doc"; } - return false; - } - function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - if (block) { - block = state.flowLevel < 0 || state.flowLevel > level; - } - var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { - compact = false; - } - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = "*ref_" + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === "[object Object]") { - if (block && Object.keys(state.dump).length !== 0) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + " " + state.dump; + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === "+") + this.blockScalarKeep = true; + else if (ch > "0" && ch <= "9") + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== "-") + break; + } + return yield* this.pushUntil((ch) => isEmpty2(ch) || ch === "#"); + } + *parseBlockScalar() { + let nl = this.pos - 1; + let indent = 0; + let ch; + loop: + for (let i = this.pos; ch = this.buffer[i]; ++i) { + switch (ch) { + case " ": + indent += 1; + break; + case "\n": + nl = i; + indent = 0; + break; + case "\r": { + const next = this.buffer[i + 1]; + if (!next && !this.atEnd) + return this.setNext("block-scalar"); + if (next === "\n") + break; + } + default: + break loop; } } - } else if (type === "[object Array]") { - if (block && state.dump.length !== 0) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + state.dump; + if (!ch && !this.atEnd) + return this.setNext("block-scalar"); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else + this.indentNext += this.blockScalarIndent; + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf("\n", cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext("block-scalar"); + nl = this.buffer.length; + } + } + if (!this.blockScalarKeep) { + do { + let i = nl - 1; + let ch2 = this.buffer[i]; + if (ch2 === "\r") + ch2 = this.buffer[--i]; + const lastChar = i; + while (ch2 === " " || ch2 === " ") + ch2 = this.buffer[--i]; + if (ch2 === "\n" && i >= this.pos && i + 1 + indent > lastChar) + nl = i; + else + break; + } while (true); + } + yield cst.SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while (ch = this.buffer[++i]) { + if (ch === ":") { + const next = this.buffer[i + 1]; + if (isEmpty2(next) || inFlow && next === ",") + break; + end = i; + } else if (isEmpty2(ch)) { + let next = this.buffer[i + 1]; + if (ch === "\r") { + if (next === "\n") { + i += 1; + ch = "\n"; + next = this.buffer[i + 1]; + } else + end = i; } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + " " + state.dump; + if (next === "#" || inFlow && invalidFlowScalarChars.includes(next)) + break; + if (ch === "\n") { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); } - } - } else if (type === "[object String]") { - if (state.tag !== "?") { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === "[object Undefined]") { - return false; - } else { - if (state.skipInvalid) - return false; - throw new YAMLException("unacceptable kind of an object to dump " + type); - } - if (state.tag !== null && state.tag !== "?") { - tagStr = encodeURI( - state.tag[0] === "!" ? state.tag.slice(1) : state.tag - ).replace(/!/g, "%21"); - if (state.tag[0] === "!") { - tagStr = "!" + tagStr; - } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { - tagStr = "!!" + tagStr.slice(18); } else { - tagStr = "!<" + tagStr + ">"; + if (inFlow && invalidFlowScalarChars.includes(ch)) + break; + end = i; } - state.dump = tagStr + " " + state.dump; } + if (!ch && !this.atEnd) + return this.setNext("plain-scalar"); + yield cst.SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? "flow" : "doc"; } - return true; - } - function getDuplicateReferences(object, state) { - var objects = [], duplicatesIndexes = [], index, length; - inspectNode(object, objects, duplicatesIndexes); - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; } - state.usedDuplicates = new Array(length); - } - function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, index, length; - if (object !== null && typeof object === "object") { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } else if (allowEmpty) + yield ""; + return 0; + } + *pushIndicators() { + switch (this.charAt(0)) { + case "!": + return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "&": + return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "-": + case "?": + case ":": { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty2(ch1) || inFlow && invalidFlowScalarChars.includes(ch1)) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); } } } + return 0; } - } - function dump(input, options) { - options = options || {}; - var state = new State(options); - if (!state.noRefs) - getDuplicateReferences(input, state); - var value = input; - if (state.replacer) { - value = state.replacer.call({ "": value }, "", value); - } - if (writeNode(state, 0, value, true, true)) - return state.dump + "\n"; - return ""; - } - module2.exports.dump = dump; - } -}); - -// ../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js -var require_js_yaml = __commonJS({ - "../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js"(exports, module2) { - "use strict"; - var loader2 = require_loader(); - var dumper = require_dumper(); - function renamed(from, to) { - return function() { - throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); - }; - } - module2.exports.Type = require_type(); - module2.exports.Schema = require_schema(); - module2.exports.FAILSAFE_SCHEMA = require_failsafe(); - module2.exports.JSON_SCHEMA = require_json(); - module2.exports.CORE_SCHEMA = require_core2(); - module2.exports.DEFAULT_SCHEMA = require_default(); - module2.exports.load = loader2.load; - module2.exports.loadAll = loader2.loadAll; - module2.exports.dump = dumper.dump; - module2.exports.YAMLException = require_exception(); - module2.exports.types = { - binary: require_binary(), - float: require_float(), - map: require_map(), - null: require_null(), - pairs: require_pairs(), - set: require_set(), - timestamp: require_timestamp(), - bool: require_bool(), - int: require_int(), - merge: require_merge(), - omap: require_omap(), - seq: require_seq(), - str: require_str() - }; - module2.exports.safeLoad = renamed("safeLoad", "load"); - module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); - module2.exports.safeDump = renamed("safeDump", "dump"); - } -}); - -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/loaders.js -var require_loaders = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/loaders.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.loaders = void 0; - var importFresh2; - var loadJs = function loadJs2(filepath) { - if (importFresh2 === void 0) { - importFresh2 = require_import_fresh(); - } - const result = importFresh2(filepath); - return result; - }; - var parseJson2; - var loadJson = function loadJson2(filepath, content) { - if (parseJson2 === void 0) { - parseJson2 = require_parse_json(); + *pushTag() { + if (this.charAt(1) === "<") { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty2(ch) && ch !== ">") + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === ">" ? i + 1 : i, false); + } else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.includes(ch)) + ch = this.buffer[++i]; + else if (ch === "%" && hexDigits.includes(this.buffer[i + 1]) && hexDigits.includes(this.buffer[i + 2])) { + ch = this.buffer[i += 3]; + } else + break; + } + return yield* this.pushToIndex(i, false); + } } - try { - const result = parseJson2(content); - return result; - } catch (error3) { - error3.message = `JSON Error in ${filepath}: -${error3.message}`; - throw error3; + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === "\n") + return yield* this.pushCount(1); + else if (ch === "\r" && this.charAt(1) === "\n") + return yield* this.pushCount(2); + else + return 0; } - }; - var yaml; - var loadYaml = function loadYaml2(filepath, content) { - if (yaml === void 0) { - yaml = require_js_yaml(); + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === " " || allowTabs && ch === " "); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; } - try { - const result = yaml.load(content); - return result; - } catch (error3) { - error3.message = `YAML Error in ${filepath}: -${error3.message}`; - throw error3; + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); } }; - var loaders2 = { - loadJs, - loadJson, - loadYaml - }; - exports.loaders = loaders2; + exports.Lexer = Lexer; } }); -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/getPropertyByPath.js -var require_getPropertyByPath = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/getPropertyByPath.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/line-counter.js +var require_line_counter = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/line-counter.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getPropertyByPath = getPropertyByPath; - function getPropertyByPath(source, path26) { - if (typeof path26 === "string" && Object.prototype.hasOwnProperty.call(source, path26)) { - return source[path26]; + var LineCounter = class { + constructor() { + this.lineStarts = []; + this.addNewLine = (offset) => this.lineStarts.push(offset); + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = low + high >> 1; + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; } - const parsedPath = typeof path26 === "string" ? path26.split(".") : path26; - return parsedPath.reduce((previous, key) => { - if (previous === void 0) { - return previous; - } - return previous[key]; - }, source); - } + }; + exports.LineCounter = LineCounter; } }); -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/ExplorerBase.js -var require_ExplorerBase = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/ExplorerBase.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/parser.js +var require_parser = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/parse/parser.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ExplorerBase = void 0; - exports.getExtensionDescription = getExtensionDescription; - var _path = _interopRequireDefault(require("path")); - var _loaders = require_loaders(); - var _getPropertyByPath = require_getPropertyByPath(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; + var cst = require_cst(); + var lexer = require_lexer(); + function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; } - var ExplorerBase = class { - constructor(options) { - if (options.cache === true) { - this.loadCache = /* @__PURE__ */ new Map(); - this.searchCache = /* @__PURE__ */ new Map(); + function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case "space": + case "comment": + case "newline": + break; + default: + return i; } - this.config = options; - this.validateConfig(); } - clearLoadCache() { - if (this.loadCache) { - this.loadCache.clear(); - } + return -1; + } + function isFlowToken(token) { + switch (token?.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "flow-collection": + return true; + default: + return false; } - clearSearchCache() { - if (this.searchCache) { - this.searchCache.clear(); + } + function getPrevProps(parent) { + switch (parent.type) { + case "document": + return parent.start; + case "block-map": { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; } + case "block-seq": + return parent.items[parent.items.length - 1].start; + default: + return []; } - clearCaches() { - this.clearLoadCache(); - this.clearSearchCache(); - } - validateConfig() { - const config = this.config; - config.searchPlaces.forEach((place) => { - const loaderKey = _path.default.extname(place) || "noExt"; - const loader2 = config.loaders[loaderKey]; - if (!loader2) { - throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`); - } - if (typeof loader2 !== "function") { - throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader2}"), so searchPlaces item "${place}" is invalid`); + } + function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: + while (--i >= 0) { + switch (prev[i].type) { + case "doc-start": + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + case "newline": + break loop; + } + } + while (prev[++i]?.type === "space") { + } + return prev.splice(i, prev.length); + } + function fixFlowSeqItems(fc) { + if (fc.start.type === "flow-seq-start") { + for (const it of fc.items) { + if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + Array.prototype.push.apply(it.value.end, it.sep); + else + it.value.end = it.sep; + } else + Array.prototype.push.apply(it.start, it.sep); + delete it.sep; } - }); + } } - shouldSearchStopWithResult(result) { - if (result === null) - return false; - if (result.isEmpty && this.config.ignoreEmptySearchPlaces) - return false; - return true; + } + var Parser = class { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + this.atNewLine = true; + this.atScalar = false; + this.indent = 0; + this.offset = 0; + this.onKeyLine = false; + this.stack = []; + this.source = ""; + this.type = ""; + this.lexer = new lexer.Lexer(); + this.onNewLine = onNewLine; } - nextDirectoryToSearch(currentDir, currentResult) { - if (this.shouldSearchStopWithResult(currentResult)) { - return null; + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (process.env.LOG_TOKENS) + console.log("|", cst.prettyToken(source)); + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; } - const nextDir = nextDirUp(currentDir); - if (nextDir === currentDir || currentDir === this.config.stopDir) { - return null; + const type = cst.tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: "error", offset: this.offset, message, source }); + this.offset += source.length; + } else if (type === "scalar") { + this.atNewLine = false; + this.atScalar = true; + this.type = "scalar"; + } else { + this.type = type; + yield* this.step(); + switch (type) { + case "newline": + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case "space": + if (this.atNewLine && source[0] === " ") + this.indent += source.length; + break; + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + if (this.atNewLine) + this.indent += source.length; + break; + case "doc-mode": + case "flow-error-end": + return; + default: + this.atNewLine = false; + } + this.offset += source.length; } - return nextDir; } - loadPackageProp(filepath, content) { - const parsedContent = _loaders.loaders.loadJson(filepath, content); - const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp); - return packagePropValue || null; + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); } - getLoaderEntryForFile(filepath) { - if (_path.default.basename(filepath) === "package.json") { - const loader3 = this.loadPackageProp.bind(this); - return loader3; + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === "doc-end" && (!top || top.type !== "doc-end")) { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: "doc-end", + offset: this.offset, + source: this.source + }); + return; } - const loaderKey = _path.default.extname(filepath) || "noExt"; - const loader2 = this.config.loaders[loaderKey]; - if (!loader2) { - throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`); + if (!top) + return yield* this.stream(); + switch (top.type) { + case "document": + return yield* this.document(top); + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return yield* this.scalar(top); + case "block-scalar": + return yield* this.blockScalar(top); + case "block-map": + return yield* this.blockMap(top); + case "block-seq": + return yield* this.blockSequence(top); + case "flow-collection": + return yield* this.flowCollection(top); + case "doc-end": + return yield* this.documentEnd(top); + } + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error3) { + const token = error3 ?? this.stack.pop(); + if (!token) { + const message = "Tried to pop an empty stack"; + yield { type: "error", offset: this.offset, source: "", message }; + } else if (this.stack.length === 0) { + yield token; + } else { + const top = this.peek(1); + if (token.type === "block-scalar") { + token.indent = "indent" in top ? top.indent : 0; + } else if (token.type === "flow-collection" && top.type === "document") { + token.indent = 0; + } + if (token.type === "flow-collection") + fixFlowSeqItems(token); + switch (top.type) { + case "document": + top.value = token; + break; + case "block-scalar": + top.props.push(token); + break; + case "block-map": { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } else if (it.sep) { + it.value = token; + } else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !includesToken(it.start, "explicit-key-ind"); + return; + } + break; + } + case "block-seq": { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case "flow-collection": { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === "document" || top.type === "block-map" || top.type === "block-seq") && (token.type === "block-map" || token.type === "block-seq")) { + const last = token.items[token.items.length - 1]; + 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))) { + if (top.type === "document") + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } } - return loader2; } - loadedContentToCosmiconfigResult(filepath, loadedContent) { - if (loadedContent === null) { - return null; - } - if (loadedContent === void 0) { - return { - filepath, - config: void 0, - isEmpty: true - }; + *stream() { + switch (this.type) { + case "directive-line": + yield { type: "directive", offset: this.offset, source: this.source }; + return; + case "byte-order-mark": + case "space": + case "comment": + case "newline": + yield this.sourceToken; + return; + case "doc-mode": + case "doc-start": { + const doc = { + type: "document", + offset: this.offset, + start: [] + }; + if (this.type === "doc-start") + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } } - return { - config: loadedContent, - filepath + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source }; } - validateFilePath(filepath) { - if (!filepath) { - throw new Error("load must pass a non-empty string"); + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case "doc-start": { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } else + doc.start.push(this.sourceToken); + return; + } + case "anchor": + case "tag": + case "space": + case "comment": + case "newline": + doc.start.push(this.sourceToken); + return; } - } - }; - exports.ExplorerBase = ExplorerBase; - function nextDirUp(dir) { - return _path.default.dirname(dir); - } - function getExtensionDescription(filepath) { - const ext = _path.default.extname(filepath); - return ext ? `extension "${ext}"` : "files without extensions"; - } - } -}); - -// ../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js -var require_path_type = __commonJS({ - "../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports) { - "use strict"; - var { promisify: promisify4 } = require("util"); - var fs11 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify4(fs11[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error3) { - if (error3.code === "ENOENT") { - return false; + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; } - throw error3; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); } - try { - return fs11[fsStatType](filePath)[statsMethodName](); - } catch (error3) { - if (error3.code === "ENOENT") { - return false; + *scalar(scalar) { + if (this.type === "map-value-ind") { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep6; + if (scalar.end) { + sep6 = scalar.end; + sep6.push(this.sourceToken); + delete scalar.end; + } else + sep6 = [this.sourceToken]; + const map3 = { + type: "block-map", + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep: sep6 }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map3; + } else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case "space": + case "comment": + case "newline": + scalar.props.push(this.sourceToken); + return; + case "scalar": + scalar.source = this.source; + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; + } + } + yield* this.pop(); + break; + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map3) { + const it = map3.items[map3.items.length - 1]; + switch (this.type) { + case "newline": + this.onKeyLine = false; + if (it.value) { + const end = "end" in it.value ? it.value.end : void 0; + const last = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last?.type === "comment") + end?.push(this.sourceToken); + else + map3.items.push({ start: [this.sourceToken] }); + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + it.start.push(this.sourceToken); + } + return; + case "space": + case "comment": + if (it.value) { + map3.items.push({ start: [this.sourceToken] }); + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + if (this.atIndentedComment(it.start, map3.indent)) { + const prev = map3.items[map3.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + map3.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; } - throw error3; - } - } - exports.isFile = isType.bind(null, "stat", "isFile"); - exports.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/getDirectory.js -var require_getDirectory = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/getDirectory.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getDirectory = getDirectory; - exports.getDirectorySync = getDirectorySync; - var _path = _interopRequireDefault(require("path")); - var _pathType = require_path_type(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - async function getDirectory(filepath) { - const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath); - if (filePathIsDirectory === true) { - return filepath; - } - const directory = _path.default.dirname(filepath); - return directory; - } - function getDirectorySync(filepath) { - const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath); - if (filePathIsDirectory === true) { - return filepath; + if (this.indent >= map3.indent) { + const atNextItem = !this.onKeyLine && this.indent === map3.indent && it.sep; + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case "newline": + nl.push(i); + break; + case "space": + break; + case "comment": + if (st.indent > map3.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case "anchor": + case "tag": + if (atNextItem || it.value) { + start.push(this.sourceToken); + map3.items.push({ start }); + this.onKeyLine = true; + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + it.start.push(this.sourceToken); + } + return; + case "explicit-key-ind": + if (!it.sep && !includesToken(it.start, "explicit-key-ind")) { + it.start.push(this.sourceToken); + } else if (atNextItem || it.value) { + start.push(this.sourceToken); + map3.items.push({ start }); + } else { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }); + } + this.onKeyLine = true; + return; + case "map-value-ind": + if (includesToken(it.start, "explicit-key-ind")) { + if (!it.sep) { + if (includesToken(it.start, "newline")) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } else { + const start2 = getFirstKeyStartProps(it.start); + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key: null, sep: [this.sourceToken] }] + }); + } + } else if (it.value) { + map3.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } else if (includesToken(it.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) { + const start2 = getFirstKeyStartProps(it.start); + const key = it.key; + const sep6 = it.sep; + sep6.push(this.sourceToken); + delete it.key, delete it.sep; + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key, sep: sep6 }] + }); + } else if (start.length > 0) { + it.sep = it.sep.concat(start, this.sourceToken); + } else { + it.sep.push(this.sourceToken); + } + } else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } else if (it.value || atNextItem) { + map3.items.push({ start, key: null, sep: [this.sourceToken] }); + } else if (includesToken(it.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs12 = this.flowScalar(this.type); + if (atNextItem || it.value) { + map3.items.push({ start, key: fs12, sep: [] }); + this.onKeyLine = true; + } else if (it.sep) { + this.stack.push(fs12); + } else { + Object.assign(it, { key: fs12, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map3); + if (bv) { + if (atNextItem && bv.type !== "block-seq" && includesToken(it.start, "explicit-key-ind")) { + map3.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); } - const directory = _path.default.dirname(filepath); - return directory; - } - } -}); - -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/readFile.js -var require_readFile = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/readFile.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.readFile = readFile3; - exports.readFileSync = readFileSync4; - var _fs = _interopRequireDefault(require("fs")); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - async function fsReadFileAsync(pathname, encoding) { - return new Promise((resolve13, reject) => { - _fs.default.readFile(pathname, encoding, (error3, contents) => { - if (error3) { - reject(error3); + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case "newline": + if (it.value) { + const end = "end" in it.value ? it.value.end : void 0; + const last = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last?.type === "comment") + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } else + it.start.push(this.sourceToken); + return; + case "space": + case "comment": + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case "anchor": + case "tag": + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case "seq-item-ind": + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, "seq-item-ind")) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); return; } - resolve13(contents); - }); - }); - } - async function readFile3(filepath, options = {}) { - const throwNotFound = options.throwNotFound === true; - try { - const content = await fsReadFileAsync(filepath, "utf8"); - return content; - } catch (error3) { - if (throwNotFound === false && (error3.code === "ENOENT" || error3.code === "EISDIR")) { - return null; } - throw error3; + yield* this.pop(); + yield* this.step(); } - } - function readFileSync4(filepath, options = {}) { - const throwNotFound = options.throwNotFound === true; - try { - const content = _fs.default.readFileSync(filepath, "utf8"); - return content; - } catch (error3) { - if (throwNotFound === false && (error3.code === "ENOENT" || error3.code === "EISDIR")) { - return null; + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === "flow-error-end") { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top && top.type === "flow-collection"); + } else if (fc.end.length === 0) { + switch (this.type) { + case "comma": + case "explicit-key-ind": + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case "map-value-ind": + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case "space": + case "comment": + case "newline": + case "anchor": + case "tag": + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs12 = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs12, sep: [] }); + else if (it.sep) + this.stack.push(fs12); + else + Object.assign(it, { key: fs12, sep: [] }); + return; + } + case "flow-map-end": + case "flow-seq-end": + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } else { + const parent = this.peek(2); + if (parent.type === "block-map" && (this.type === "map-value-ind" && parent.indent === fc.indent || this.type === "newline" && !parent.items[parent.items.length - 1].sep)) { + yield* this.pop(); + yield* this.step(); + } else if (this.type === "map-value-ind" && parent.type !== "flow-collection") { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep6 = fc.end.splice(1, fc.end.length); + sep6.push(this.sourceToken); + const map3 = { + type: "block-map", + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep: sep6 }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map3; + } else { + yield* this.lineEnd(fc); + } } - throw error3; - } - } - } -}); - -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/Explorer.js -var require_Explorer = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/Explorer.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Explorer = void 0; - var _path = _interopRequireDefault(require("path")); - var _cacheWrapper = require_cacheWrapper(); - var _ExplorerBase = require_ExplorerBase(); - var _getDirectory = require_getDirectory(); - var _readFile = require_readFile(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - var Explorer = class extends _ExplorerBase.ExplorerBase { - constructor(options) { - super(options); - } - async search(searchFrom = process.cwd()) { - const startDirectory = await (0, _getDirectory.getDirectory)(searchFrom); - const result = await this.searchFromDirectory(startDirectory); - return result; } - async searchFromDirectory(dir) { - const absoluteDir = _path.default.resolve(process.cwd(), dir); - const run2 = async () => { - const result = await this.searchDirectory(absoluteDir); - const nextDir = this.nextDirectoryToSearch(absoluteDir, result); - if (nextDir) { - return this.searchFromDirectory(nextDir); + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; } - const transformResult = await this.config.transform(result); - return transformResult; - }; - if (this.searchCache) { - return (0, _cacheWrapper.cacheWrapper)(this.searchCache, absoluteDir, run2); } - return run2(); + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; } - async searchDirectory(dir) { - for await (const place of this.config.searchPlaces) { - const placeResult = await this.loadSearchPlace(dir, place); - if (this.shouldSearchStopWithResult(placeResult) === true) { - return placeResult; + startBlockValue(parent) { + switch (this.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return this.flowScalar(this.type); + case "block-scalar-header": + return { + type: "block-scalar", + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: "" + }; + case "flow-map-start": + case "flow-seq-start": + return { + type: "flow-collection", + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case "seq-item-ind": + return { + type: "block-seq", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case "explicit-key-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start }] + }; + } + case "map-value-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; } } return null; } - async loadSearchPlace(dir, place) { - const filepath = _path.default.join(dir, place); - const fileContents = await (0, _readFile.readFile)(filepath); - const result = await this.createCosmiconfigResult(filepath, fileContents); - return result; - } - async loadFileContent(filepath, content) { - if (content === null) { - return null; - } - if (content.trim() === "") { - return void 0; - } - const loader2 = this.getLoaderEntryForFile(filepath); - try { - return await loader2(filepath, content); - } catch (e) { - e.filepath = filepath; - throw e; - } - } - async createCosmiconfigResult(filepath, content) { - const fileContent = await this.loadFileContent(filepath, content); - const result = this.loadedContentToCosmiconfigResult(filepath, fileContent); - return result; + atIndentedComment(start, indent) { + if (this.type !== "comment") + return false; + if (this.indent <= indent) + return false; + return start.every((st) => st.type === "newline" || st.type === "space"); } - async load(filepath) { - this.validateFilePath(filepath); - const absoluteFilePath = _path.default.resolve(process.cwd(), filepath); - const runLoad = async () => { - const fileContents = await (0, _readFile.readFile)(absoluteFilePath, { - throwNotFound: true - }); - const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents); - const transformResult = await this.config.transform(result); - return transformResult; - }; - if (this.loadCache) { - return (0, _cacheWrapper.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad); + *documentEnd(docEnd) { + if (this.type !== "doc-mode") { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case "comma": + case "doc-start": + case "doc-end": + case "flow-seq-end": + case "flow-map-end": + case "map-value-ind": + yield* this.pop(); + yield* this.step(); + break; + case "newline": + this.onKeyLine = false; + case "space": + case "comment": + default: + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); } - return runLoad(); } }; - exports.Explorer = Explorer; + exports.Parser = Parser; } }); -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/ExplorerSync.js -var require_ExplorerSync = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/ExplorerSync.js"(exports) { +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/public-api.js +var require_public_api = __commonJS({ + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/public-api.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ExplorerSync = void 0; - var _path = _interopRequireDefault(require("path")); - var _cacheWrapper = require_cacheWrapper(); - var _ExplorerBase = require_ExplorerBase(); - var _getDirectory = require_getDirectory(); - var _readFile = require_readFile(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - var ExplorerSync = class extends _ExplorerBase.ExplorerBase { - constructor(options) { - super(options); - } - searchSync(searchFrom = process.cwd()) { - const startDirectory = (0, _getDirectory.getDirectorySync)(searchFrom); - const result = this.searchFromDirectorySync(startDirectory); - return result; - } - searchFromDirectorySync(dir) { - const absoluteDir = _path.default.resolve(process.cwd(), dir); - const run2 = () => { - const result = this.searchDirectorySync(absoluteDir); - const nextDir = this.nextDirectoryToSearch(absoluteDir, result); - if (nextDir) { - return this.searchFromDirectorySync(nextDir); - } - const transformResult = this.config.transform(result); - return transformResult; - }; - if (this.searchCache) { - return (0, _cacheWrapper.cacheWrapperSync)(this.searchCache, absoluteDir, run2); + var composer = require_composer(); + var Document = require_Document(); + var errors = require_errors2(); + var log = require_log(); + var lineCounter = require_line_counter(); + var parser2 = require_parser(); + function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter$1 = options.lineCounter || prettyErrors && new lineCounter.LineCounter() || null; + return { lineCounter: lineCounter$1, prettyErrors }; + } + function parseAllDocuments(source, options = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options); + const parser$1 = new parser2.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options); + const docs = Array.from(composer$1.compose(parser$1.parse(source))); + if (prettyErrors && lineCounter2) + for (const doc of docs) { + doc.errors.forEach(errors.prettifyError(source, lineCounter2)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter2)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer$1.streamInfo()); + } + function parseDocument(source, options = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options); + const parser$1 = new parser2.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options); + let doc = null; + for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== "silent") { + doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()")); + break; } - return run2(); } - searchDirectorySync(dir) { - for (const place of this.config.searchPlaces) { - const placeResult = this.loadSearchPlaceSync(dir, place); - if (this.shouldSearchStopWithResult(placeResult) === true) { - return placeResult; - } - } - return null; + if (prettyErrors && lineCounter2) { + doc.errors.forEach(errors.prettifyError(source, lineCounter2)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter2)); } - loadSearchPlaceSync(dir, place) { - const filepath = _path.default.join(dir, place); - const content = (0, _readFile.readFileSync)(filepath); - const result = this.createCosmiconfigResultSync(filepath, content); - return result; + return doc; + } + function parse5(src, reviver, options) { + let _reviver = void 0; + if (typeof reviver === "function") { + _reviver = reviver; + } else if (options === void 0 && reviver && typeof reviver === "object") { + options = reviver; } - loadFileContentSync(filepath, content) { - if (content === null) { - return null; - } - if (content.trim() === "") { - return void 0; - } - const loader2 = this.getLoaderEntryForFile(filepath); - try { - return loader2(filepath, content); - } catch (e) { - e.filepath = filepath; - throw e; - } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach((warning3) => log.warn(doc.options.logLevel, warning3)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== "silent") + throw doc.errors[0]; + else + doc.errors = []; } - createCosmiconfigResultSync(filepath, content) { - const fileContent = this.loadFileContentSync(filepath, content); - const result = this.loadedContentToCosmiconfigResult(filepath, fileContent); - return result; + return doc.toJS(Object.assign({ reviver: _reviver }, options)); + } + function stringify4(value, replacer, options) { + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; } - loadSync(filepath) { - this.validateFilePath(filepath); - const absoluteFilePath = _path.default.resolve(process.cwd(), filepath); - const runLoadSync = () => { - const content = (0, _readFile.readFileSync)(absoluteFilePath, { - throwNotFound: true - }); - const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content); - const transformResult = this.config.transform(cosmiconfigResult); - return transformResult; - }; - if (this.loadCache) { - return (0, _cacheWrapper.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync); - } - return runLoadSync(); + if (typeof options === "string") + options = options.length; + if (typeof options === "number") { + const indent = Math.round(options); + options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === void 0) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return void 0; } - }; - exports.ExplorerSync = ExplorerSync; - } -}); - -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/types.js -var require_types = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/types.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); + return new Document.Document(value, _replacer, options).toString(options); + } + exports.parse = parse5; + exports.parseAllDocuments = parseAllDocuments; + exports.parseDocument = parseDocument; + exports.stringify = stringify4; } }); -// ../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/index.js +// ../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/index.js var require_dist = __commonJS({ - "../node_modules/.pnpm/cosmiconfig@8.0.0/node_modules/cosmiconfig/dist/index.js"(exports) { + "../node_modules/.pnpm/yaml@2.3.4/node_modules/yaml/dist/index.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.cosmiconfig = cosmiconfig2; - exports.cosmiconfigSync = cosmiconfigSync2; - exports.defaultLoaders = void 0; - var _os = _interopRequireDefault(require("os")); - var _Explorer = require_Explorer(); - var _ExplorerSync = require_ExplorerSync(); - var _loaders = require_loaders(); - var _types = require_types(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - function cosmiconfig2(moduleName, options = {}) { - const normalizedOptions = normalizeOptions(moduleName, options); - const explorer = new _Explorer.Explorer(normalizedOptions); - return { - search: explorer.search.bind(explorer), - load: explorer.load.bind(explorer), - clearLoadCache: explorer.clearLoadCache.bind(explorer), - clearSearchCache: explorer.clearSearchCache.bind(explorer), - clearCaches: explorer.clearCaches.bind(explorer) - }; - } - function cosmiconfigSync2(moduleName, options = {}) { - const normalizedOptions = normalizeOptions(moduleName, options); - const explorerSync = new _ExplorerSync.ExplorerSync(normalizedOptions); - return { - search: explorerSync.searchSync.bind(explorerSync), - load: explorerSync.loadSync.bind(explorerSync), - clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync), - clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync), - clearCaches: explorerSync.clearCaches.bind(explorerSync) - }; - } - var defaultLoaders = Object.freeze({ - ".cjs": _loaders.loaders.loadJs, - ".js": _loaders.loaders.loadJs, - ".json": _loaders.loaders.loadJson, - ".yaml": _loaders.loaders.loadYaml, - ".yml": _loaders.loaders.loadYaml, - noExt: _loaders.loaders.loadYaml - }); - exports.defaultLoaders = defaultLoaders; - var identity = function identity2(x) { - return x; - }; - function normalizeOptions(moduleName, options) { - const defaults = { - packageProp: moduleName, - searchPlaces: ["package.json", `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `.${moduleName}rc.cjs`, `.config/${moduleName}rc`, `.config/${moduleName}rc.json`, `.config/${moduleName}rc.yaml`, `.config/${moduleName}rc.yml`, `.config/${moduleName}rc.js`, `.config/${moduleName}rc.cjs`, `${moduleName}.config.js`, `${moduleName}.config.cjs`], - ignoreEmptySearchPlaces: true, - stopDir: _os.default.homedir(), - cache: true, - transform: identity, - loaders: defaultLoaders - }; - const normalizedOptions = { - ...defaults, - ...options, - loaders: { - ...defaults.loaders, - ...options.loaders - } - }; - return normalizedOptions; - } + var composer = require_composer(); + var Document = require_Document(); + var Schema = require_Schema(); + var errors = require_errors2(); + var Alias = require_Alias(); + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var cst = require_cst(); + var lexer = require_lexer(); + var lineCounter = require_line_counter(); + var parser2 = require_parser(); + var publicApi = require_public_api(); + var visit = require_visit(); + exports.Composer = composer.Composer; + exports.Document = Document.Document; + exports.Schema = Schema.Schema; + exports.YAMLError = errors.YAMLError; + exports.YAMLParseError = errors.YAMLParseError; + exports.YAMLWarning = errors.YAMLWarning; + exports.Alias = Alias.Alias; + exports.isAlias = identity.isAlias; + exports.isCollection = identity.isCollection; + exports.isDocument = identity.isDocument; + exports.isMap = identity.isMap; + exports.isNode = identity.isNode; + exports.isPair = identity.isPair; + exports.isScalar = identity.isScalar; + exports.isSeq = identity.isSeq; + exports.Pair = Pair.Pair; + exports.Scalar = Scalar.Scalar; + exports.YAMLMap = YAMLMap.YAMLMap; + exports.YAMLSeq = YAMLSeq.YAMLSeq; + exports.CST = cst; + exports.Lexer = lexer.Lexer; + exports.LineCounter = lineCounter.LineCounter; + exports.Parser = parser2.Parser; + exports.parse = publicApi.parse; + exports.parseAllDocuments = publicApi.parseAllDocuments; + exports.parseDocument = publicApi.parseDocument; + exports.stringify = publicApi.stringify; + exports.visit = visit.visit; + exports.visitAsync = visit.visitAsync; } }); -// ../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js +// ../node_modules/.pnpm/ini@4.1.1/node_modules/ini/lib/ini.js var require_ini = __commonJS({ - "../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports, module2) { - var { hasOwnProperty: hasOwnProperty2 } = Object.prototype; - var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n"; - var encode = (obj, opt) => { - const children = []; - let out = ""; + "../node_modules/.pnpm/ini@4.1.1/node_modules/ini/lib/ini.js"(exports, module2) { + var { hasOwnProperty: hasOwnProperty4 } = Object.prototype; + var encode = (obj, opt = {}) => { if (typeof opt === "string") { - opt = { - section: opt, - whitespace: false - }; - } else { - opt = opt || /* @__PURE__ */ Object.create(null); - opt.whitespace = opt.whitespace === true; - } + opt = { section: opt }; + } + opt.align = opt.align === true; + opt.newline = opt.newline === true; + opt.sort = opt.sort === true; + opt.whitespace = opt.whitespace === true || opt.align === true; + opt.platform = opt.platform || typeof process !== "undefined" && process.platform; + opt.bracketedArray = opt.bracketedArray !== false; + const eol = opt.platform === "win32" ? "\r\n" : "\n"; const separator = opt.whitespace ? " = " : "="; - for (const k of Object.keys(obj)) { + const children = []; + const keys3 = opt.sort ? Object.keys(obj).sort() : Object.keys(obj); + let padToChars = 0; + if (opt.align) { + padToChars = safe( + keys3.filter((k) => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== "object").map((k) => Array.isArray(obj[k]) ? `${k}[]` : k).concat([""]).reduce((a, b) => safe(a).length >= safe(b).length ? a : b) + ).length; + } + let out = ""; + const arraySuffix = opt.bracketedArray ? "[]" : ""; + for (const k of keys3) { const val = obj[k]; if (val && Array.isArray(val)) { - for (const item of val) - out += safe(k + "[]") + separator + safe(item) + "\n"; - } else if (val && typeof val === "object") + for (const item of val) { + out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item) + eol; + } + } else if (val && typeof val === "object") { children.push(k); - else - out += safe(k) + separator + safe(val) + eol; + } else { + out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol; + } + } + if (opt.section && out.length) { + out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out; } - if (opt.section && out.length) - out = "[" + safe(opt.section) + "]" + eol + out; for (const k of children) { - const nk = dotSplit(k).join("\\."); + const nk = splitSections(k, ".").join("\\."); const section = (opt.section ? opt.section + "." : "") + nk; - const { whitespace } = opt; const child = encode(obj[k], { - section, - whitespace + ...opt, + section }); - if (out.length && child.length) + if (out.length && child.length) { out += eol; + } out += child; } return out; }; - var dotSplit = (str) => str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "")); - var decode2 = (str) => { + function splitSections(str, separator) { + var lastMatchIndex = 0; + var lastSeparatorIndex = 0; + var nextIndex = 0; + var sections = []; + do { + nextIndex = str.indexOf(separator, lastMatchIndex); + if (nextIndex !== -1) { + lastMatchIndex = nextIndex + separator.length; + if (nextIndex > 0 && str[nextIndex - 1] === "\\") { + continue; + } + sections.push(str.slice(lastSeparatorIndex, nextIndex)); + lastSeparatorIndex = nextIndex + separator.length; + } + } while (nextIndex !== -1); + sections.push(str.slice(lastSeparatorIndex)); + return sections; + } + var decode2 = (str, opt = {}) => { + opt.bracketedArray = opt.bracketedArray !== false; const out = /* @__PURE__ */ Object.create(null); let p = out; let section = null; - const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i; const lines = str.split(/[\r\n]+/g); + const duplicates = {}; for (const line of lines) { - if (!line || line.match(/^\s*[;#]/)) + if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) { continue; + } const match2 = line.match(re); - if (!match2) + if (!match2) { continue; + } if (match2[1] !== void 0) { section = unsafe(match2[1]); if (section === "__proto__") { @@ -39644,57 +40771,79 @@ var require_ini = __commonJS({ continue; } const keyRaw = unsafe(match2[2]); - const isArray2 = keyRaw.length > 2 && keyRaw.slice(-2) === "[]"; - const key = isArray2 ? keyRaw.slice(0, -2) : keyRaw; - if (key === "__proto__") + let isArray3; + if (opt.bracketedArray) { + isArray3 = keyRaw.length > 2 && keyRaw.slice(-2) === "[]"; + } else { + duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1; + isArray3 = duplicates[keyRaw] > 1; + } + const key = isArray3 ? keyRaw.slice(0, -2) : keyRaw; + if (key === "__proto__") { continue; + } const valueRaw = match2[3] ? unsafe(match2[4]) : true; const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw; - if (isArray2) { - if (!hasOwnProperty2.call(p, key)) + if (isArray3) { + if (!hasOwnProperty4.call(p, key)) { p[key] = []; - else if (!Array.isArray(p[key])) + } else if (!Array.isArray(p[key])) { p[key] = [p[key]]; + } } - if (Array.isArray(p[key])) + if (Array.isArray(p[key])) { p[key].push(value); - else + } else { p[key] = value; + } } const remove = []; for (const k of Object.keys(out)) { - if (!hasOwnProperty2.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) + if (!hasOwnProperty4.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) { continue; - const parts = dotSplit(k); - let p2 = out; + } + const parts = splitSections(k, "."); + p = out; const l = parts.pop(); const nl = l.replace(/\\\./g, "."); for (const part of parts) { - if (part === "__proto__") + if (part === "__proto__") { continue; - if (!hasOwnProperty2.call(p2, part) || typeof p2[part] !== "object") - p2[part] = /* @__PURE__ */ Object.create(null); - p2 = p2[part]; + } + if (!hasOwnProperty4.call(p, part) || typeof p[part] !== "object") { + p[part] = /* @__PURE__ */ Object.create(null); + } + p = p[part]; } - if (p2 === out && nl === l) + if (p === out && nl === l) { continue; - p2[nl] = out[k]; + } + p[nl] = out[k]; remove.push(k); } - for (const del of remove) + for (const del of remove) { delete out[del]; + } return out; }; - var isQuoted = (val) => val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'"; - var safe = (val) => typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#"); + var isQuoted = (val) => { + return val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'"); + }; + var safe = (val) => { + if (typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim()) { + return JSON.stringify(val); + } + return val.split(";").join("\\;").split("#").join("\\#"); + }; var unsafe = (val, doUnesc) => { val = (val || "").trim(); if (isQuoted(val)) { - if (val.charAt(0) === "'") - val = val.substr(1, val.length - 2); + if (val.charAt(0) === "'") { + val = val.slice(1, -1); + } try { val = JSON.parse(val); - } catch (_) { + } catch { } } else { let esc = false; @@ -39702,20 +40851,23 @@ var require_ini = __commonJS({ for (let i = 0, l = val.length; i < l; i++) { const c = val.charAt(i); if (esc) { - if ("\\;#".indexOf(c) !== -1) + if ("\\;#".indexOf(c) !== -1) { unesc += c; - else + } else { unesc += "\\" + c; + } esc = false; - } else if (";#".indexOf(c) !== -1) + } else if (";#".indexOf(c) !== -1) { break; - else if (c === "\\") + } else if (c === "\\") { esc = true; - else + } else { unesc += c; + } } - if (esc) + if (esc) { unesc += "\\"; + } return unesc.trim(); } return val; @@ -39731,150 +40883,13 @@ var require_ini = __commonJS({ } }); -// ../node_modules/.pnpm/global-dirs@3.0.1/node_modules/global-dirs/index.js -var require_global_dirs = __commonJS({ - "../node_modules/.pnpm/global-dirs@3.0.1/node_modules/global-dirs/index.js"(exports) { - "use strict"; - var path26 = require("path"); - var os5 = require("os"); - var fs11 = require("fs"); - var ini = require_ini(); - var isWindows2 = process.platform === "win32"; - var readRc = (filePath) => { - try { - return ini.parse(fs11.readFileSync(filePath, "utf8")).prefix; - } catch { - } - }; - var getEnvNpmPrefix = () => { - return Object.keys(process.env).reduce((prefix, name) => { - return /^npm_config_prefix$/i.test(name) ? process.env[name] : prefix; - }, void 0); - }; - var getGlobalNpmrc = () => { - if (isWindows2 && process.env.APPDATA) { - return path26.join(process.env.APPDATA, "/npm/etc/npmrc"); - } - if (process.execPath.includes("/Cellar/node")) { - const homebrewPrefix = process.execPath.slice(0, process.execPath.indexOf("/Cellar/node")); - return path26.join(homebrewPrefix, "/lib/node_modules/npm/npmrc"); - } - if (process.execPath.endsWith("/bin/node")) { - const installDir = path26.dirname(path26.dirname(process.execPath)); - return path26.join(installDir, "/etc/npmrc"); - } - }; - var getDefaultNpmPrefix = () => { - if (isWindows2) { - const { APPDATA } = process.env; - return APPDATA ? path26.join(APPDATA, "npm") : path26.dirname(process.execPath); - } - return path26.dirname(path26.dirname(process.execPath)); - }; - var getNpmPrefix = () => { - const envPrefix = getEnvNpmPrefix(); - if (envPrefix) { - return envPrefix; - } - const homePrefix = readRc(path26.join(os5.homedir(), ".npmrc")); - if (homePrefix) { - return homePrefix; - } - if (process.env.PREFIX) { - return process.env.PREFIX; - } - const globalPrefix = readRc(getGlobalNpmrc()); - if (globalPrefix) { - return globalPrefix; - } - return getDefaultNpmPrefix(); - }; - var npmPrefix = path26.resolve(getNpmPrefix()); - var getYarnWindowsDirectory = () => { - if (isWindows2 && process.env.LOCALAPPDATA) { - const dir = path26.join(process.env.LOCALAPPDATA, "Yarn"); - if (fs11.existsSync(dir)) { - return dir; - } - } - return false; - }; - var getYarnPrefix = () => { - if (process.env.PREFIX) { - return process.env.PREFIX; - } - const windowsPrefix = getYarnWindowsDirectory(); - if (windowsPrefix) { - return windowsPrefix; - } - const configPrefix = path26.join(os5.homedir(), ".config/yarn"); - if (fs11.existsSync(configPrefix)) { - return configPrefix; - } - const homePrefix = path26.join(os5.homedir(), ".yarn-config"); - if (fs11.existsSync(homePrefix)) { - return homePrefix; - } - return npmPrefix; - }; - exports.npm = {}; - exports.npm.prefix = npmPrefix; - exports.npm.packages = path26.join(npmPrefix, isWindows2 ? "node_modules" : "lib/node_modules"); - exports.npm.binaries = isWindows2 ? npmPrefix : path26.join(npmPrefix, "bin"); - var yarnPrefix = path26.resolve(getYarnPrefix()); - exports.yarn = {}; - exports.yarn.prefix = yarnPrefix; - exports.yarn.packages = path26.join(yarnPrefix, getYarnWindowsDirectory() ? "Data/global/node_modules" : "global/node_modules"); - exports.yarn.binaries = path26.join(exports.yarn.packages, ".bin"); - } -}); - -// ../node_modules/.pnpm/@cspell+cspell-resolver@8.0.0/node_modules/@cspell/cspell-resolver/dist/requireResolve.js -var require_requireResolve = __commonJS({ - "../node_modules/.pnpm/@cspell+cspell-resolver@8.0.0/node_modules/@cspell/cspell-resolver/dist/requireResolve.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.requireResolve = exports.resolveGlobal = void 0; - var global_dirs_1 = require_global_dirs(); - function resolveGlobal2(modulesName) { - const paths = [global_dirs_1.npm.packages, global_dirs_1.yarn.packages]; - return requireResolve(modulesName, paths); - } - exports.resolveGlobal = resolveGlobal2; - function requireResolve(filename, paths) { - try { - return require.resolve(filename, paths ? { paths } : void 0); - } catch (e) { - return void 0; - } - } - exports.requireResolve = requireResolve; - } -}); - -// ../node_modules/.pnpm/@cspell+cspell-resolver@8.0.0/node_modules/@cspell/cspell-resolver/dist/index.js -var require_dist2 = __commonJS({ - "../node_modules/.pnpm/@cspell+cspell-resolver@8.0.0/node_modules/@cspell/cspell-resolver/dist/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.resolveGlobal = exports.requireResolve = void 0; - var requireResolve_js_1 = require_requireResolve(); - Object.defineProperty(exports, "requireResolve", { enumerable: true, get: function() { - return requireResolve_js_1.requireResolve; - } }); - Object.defineProperty(exports, "resolveGlobal", { enumerable: true, get: function() { - return requireResolve_js_1.resolveGlobal; - } }); - } -}); - // ../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js -var require_resolve_from2 = __commonJS({ +var require_resolve_from = __commonJS({ "../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js"(exports, module2) { "use strict"; - var path26 = require("path"); + var path27 = require("path"); var Module = require("module"); - var fs11 = require("fs"); + var fs12 = require("fs"); var resolveFrom2 = (fromDirectory, moduleId, silent) => { if (typeof fromDirectory !== "string") { throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``); @@ -39883,17 +40898,17 @@ var require_resolve_from2 = __commonJS({ throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); } try { - fromDirectory = fs11.realpathSync(fromDirectory); + fromDirectory = fs12.realpathSync(fromDirectory); } catch (error3) { if (error3.code === "ENOENT") { - fromDirectory = path26.resolve(fromDirectory); + fromDirectory = path27.resolve(fromDirectory); } else if (silent) { return; } else { throw error3; } } - const fromFile = path26.join(fromDirectory, "noop.js"); + const fromFile = path27.join(fromDirectory, "noop.js"); const resolveFileName = () => Module._resolveFilename(moduleId, { id: fromFile, filename: fromFile, @@ -39913,9 +40928,9 @@ var require_resolve_from2 = __commonJS({ } }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/lib-cjs/pkg-info.cjs +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/lib-cjs/pkg-info.cjs var require_pkg_info = __commonJS({ - "../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/lib-cjs/pkg-info.cjs"(exports) { + "../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/lib-cjs/pkg-info.cjs"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.srcDirectory = void 0; @@ -39950,56 +40965,56 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs11) { + function patch(fs12) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs11); - } - if (!fs11.lutimes) { - patchLutimes(fs11); - } - fs11.chown = chownFix(fs11.chown); - fs11.fchown = chownFix(fs11.fchown); - fs11.lchown = chownFix(fs11.lchown); - fs11.chmod = chmodFix(fs11.chmod); - fs11.fchmod = chmodFix(fs11.fchmod); - fs11.lchmod = chmodFix(fs11.lchmod); - fs11.chownSync = chownFixSync(fs11.chownSync); - fs11.fchownSync = chownFixSync(fs11.fchownSync); - fs11.lchownSync = chownFixSync(fs11.lchownSync); - fs11.chmodSync = chmodFixSync(fs11.chmodSync); - fs11.fchmodSync = chmodFixSync(fs11.fchmodSync); - fs11.lchmodSync = chmodFixSync(fs11.lchmodSync); - fs11.stat = statFix(fs11.stat); - fs11.fstat = statFix(fs11.fstat); - fs11.lstat = statFix(fs11.lstat); - fs11.statSync = statFixSync(fs11.statSync); - fs11.fstatSync = statFixSync(fs11.fstatSync); - fs11.lstatSync = statFixSync(fs11.lstatSync); - if (fs11.chmod && !fs11.lchmod) { - fs11.lchmod = function(path26, mode, cb) { + patchLchmod(fs12); + } + if (!fs12.lutimes) { + patchLutimes(fs12); + } + fs12.chown = chownFix(fs12.chown); + fs12.fchown = chownFix(fs12.fchown); + fs12.lchown = chownFix(fs12.lchown); + fs12.chmod = chmodFix(fs12.chmod); + fs12.fchmod = chmodFix(fs12.fchmod); + fs12.lchmod = chmodFix(fs12.lchmod); + fs12.chownSync = chownFixSync(fs12.chownSync); + fs12.fchownSync = chownFixSync(fs12.fchownSync); + fs12.lchownSync = chownFixSync(fs12.lchownSync); + fs12.chmodSync = chmodFixSync(fs12.chmodSync); + fs12.fchmodSync = chmodFixSync(fs12.fchmodSync); + fs12.lchmodSync = chmodFixSync(fs12.lchmodSync); + fs12.stat = statFix(fs12.stat); + fs12.fstat = statFix(fs12.fstat); + fs12.lstat = statFix(fs12.lstat); + fs12.statSync = statFixSync(fs12.statSync); + fs12.fstatSync = statFixSync(fs12.fstatSync); + fs12.lstatSync = statFixSync(fs12.lstatSync); + if (fs12.chmod && !fs12.lchmod) { + fs12.lchmod = function(path27, mode, cb) { if (cb) process.nextTick(cb); }; - fs11.lchmodSync = function() { + fs12.lchmodSync = function() { }; } - if (fs11.chown && !fs11.lchown) { - fs11.lchown = function(path26, uid, gid, cb) { + if (fs12.chown && !fs12.lchown) { + fs12.lchown = function(path27, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs11.lchownSync = function() { + fs12.lchownSync = function() { }; } if (platform === "win32") { - fs11.rename = typeof fs11.rename !== "function" ? fs11.rename : function(fs$rename) { + fs12.rename = typeof fs12.rename !== "function" ? fs12.rename : function(fs$rename) { function rename(from, to, cb) { var start = Date.now(); var backoff = 0; fs$rename(from, to, function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { setTimeout(function() { - fs11.stat(to, function(stater, st) { + fs12.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -40017,9 +41032,9 @@ var require_polyfills = __commonJS({ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; - }(fs11.rename); + }(fs12.rename); } - fs11.read = typeof fs11.read !== "function" ? fs11.read : function(fs$read) { + fs12.read = typeof fs12.read !== "function" ? fs12.read : function(fs$read) { function read2(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { @@ -40027,23 +41042,23 @@ var require_polyfills = __commonJS({ callback = function(er, _, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs11, fd, buffer, offset, length, position, callback); + return fs$read.call(fs12, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs11, fd, buffer, offset, length, position, callback); + return fs$read.call(fs12, fd, buffer, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read2, fs$read); return read2; - }(fs11.read); - fs11.readSync = typeof fs11.readSync !== "function" ? fs11.readSync : /* @__PURE__ */ function(fs$readSync) { + }(fs12.read); + fs12.readSync = typeof fs12.readSync !== "function" ? fs12.readSync : /* @__PURE__ */ function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { - return fs$readSync.call(fs11, fd, buffer, offset, length, position); + return fs$readSync.call(fs12, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -40053,11 +41068,11 @@ var require_polyfills = __commonJS({ } } }; - }(fs11.readSync); - function patchLchmod(fs12) { - fs12.lchmod = function(path26, mode, callback) { - fs12.open( - path26, + }(fs12.readSync); + function patchLchmod(fs13) { + fs13.lchmod = function(path27, mode, callback) { + fs13.open( + path27, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -40066,8 +41081,8 @@ var require_polyfills = __commonJS({ callback(err); return; } - fs12.fchmod(fd, mode, function(err2) { - fs12.close(fd, function(err22) { + fs13.fchmod(fd, mode, function(err2) { + fs13.close(fd, function(err22) { if (callback) callback(err2 || err22); }); @@ -40075,68 +41090,68 @@ var require_polyfills = __commonJS({ } ); }; - fs12.lchmodSync = function(path26, mode) { - var fd = fs12.openSync(path26, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs13.lchmodSync = function(path27, mode) { + var fd = fs13.openSync(path27, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs12.fchmodSync(fd, mode); + ret = fs13.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs12.closeSync(fd); + fs13.closeSync(fd); } catch (er) { } } else { - fs12.closeSync(fd); + fs13.closeSync(fd); } } return ret; }; } - function patchLutimes(fs12) { - if (constants.hasOwnProperty("O_SYMLINK") && fs12.futimes) { - fs12.lutimes = function(path26, at, mt, cb) { - fs12.open(path26, constants.O_SYMLINK, function(er, fd) { + function patchLutimes(fs13) { + if (constants.hasOwnProperty("O_SYMLINK") && fs13.futimes) { + fs13.lutimes = function(path27, at, mt, cb) { + fs13.open(path27, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } - fs12.futimes(fd, at, mt, function(er2) { - fs12.close(fd, function(er22) { + fs13.futimes(fd, at, mt, function(er2) { + fs13.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs12.lutimesSync = function(path26, at, mt) { - var fd = fs12.openSync(path26, constants.O_SYMLINK); + fs13.lutimesSync = function(path27, at, mt) { + var fd = fs13.openSync(path27, constants.O_SYMLINK); var ret; var threw = true; try { - ret = fs12.futimesSync(fd, at, mt); + ret = fs13.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs12.closeSync(fd); + fs13.closeSync(fd); } catch (er) { } } else { - fs12.closeSync(fd); + fs13.closeSync(fd); } } return ret; }; - } else if (fs12.futimes) { - fs12.lutimes = function(_a, _b, _c, cb) { + } else if (fs13.futimes) { + fs13.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs12.lutimesSync = function() { + fs13.lutimesSync = function() { }; } } @@ -40144,7 +41159,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs11, target, mode, function(er) { + return orig.call(fs12, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) @@ -40157,7 +41172,7 @@ var require_polyfills = __commonJS({ return orig; return function(target, mode) { try { - return orig.call(fs11, target, mode); + return orig.call(fs12, target, mode); } catch (er) { if (!chownErOk(er)) throw er; @@ -40168,7 +41183,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs11, target, uid, gid, function(er) { + return orig.call(fs12, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) @@ -40181,7 +41196,7 @@ var require_polyfills = __commonJS({ return orig; return function(target, uid, gid) { try { - return orig.call(fs11, target, uid, gid); + return orig.call(fs12, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; @@ -40206,14 +41221,14 @@ var require_polyfills = __commonJS({ if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs11, target, options, callback) : orig.call(fs11, target, callback); + return options ? orig.call(fs12, target, options, callback) : orig.call(fs12, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { - var stats = options ? orig.call(fs11, target, options) : orig.call(fs11, target); + var stats = options ? orig.call(fs12, target, options) : orig.call(fs12, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; @@ -40242,19 +41257,19 @@ var require_polyfills = __commonJS({ // ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js var require_legacy_streams = __commonJS({ "../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) { - var Stream3 = require("stream").Stream; + var Stream2 = require("stream").Stream; module2.exports = legacy; - function legacy(fs11) { + function legacy(fs12) { return { ReadStream, WriteStream }; - function ReadStream(path26, options) { + function ReadStream(path27, options) { if (!(this instanceof ReadStream)) - return new ReadStream(path26, options); - Stream3.call(this); + return new ReadStream(path27, options); + Stream2.call(this); var self = this; - this.path = path26; + this.path = path27; this.fd = null; this.readable = true; this.paused = false; @@ -40262,9 +41277,9 @@ var require_legacy_streams = __commonJS({ this.mode = 438; this.bufferSize = 64 * 1024; options = options || {}; - var keys2 = Object.keys(options); - for (var index = 0, length = keys2.length; index < length; index++) { - var key = keys2[index]; + var keys3 = Object.keys(options); + for (var index = 0, length = keys3.length; index < length; index++) { + var key = keys3[index]; this[key] = options[key]; } if (this.encoding) @@ -40289,7 +41304,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs11.open(this.path, this.flags, this.mode, function(err, fd) { + fs12.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self.emit("error", err); self.readable = false; @@ -40300,11 +41315,11 @@ var require_legacy_streams = __commonJS({ self._read(); }); } - function WriteStream(path26, options) { + function WriteStream(path27, options) { if (!(this instanceof WriteStream)) - return new WriteStream(path26, options); - Stream3.call(this); - this.path = path26; + return new WriteStream(path27, options); + Stream2.call(this); + this.path = path27; this.fd = null; this.writable = true; this.flags = "w"; @@ -40312,9 +41327,9 @@ var require_legacy_streams = __commonJS({ this.mode = 438; this.bytesWritten = 0; options = options || {}; - var keys2 = Object.keys(options); - for (var index = 0, length = keys2.length; index < length; index++) { - var key = keys2[index]; + var keys3 = Object.keys(options); + for (var index = 0, length = keys3.length; index < length; index++) { + var key = keys3[index]; this[key] = options[key]; } if (this.start !== void 0) { @@ -40329,7 +41344,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs11.open; + this._open = fs12.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -40364,7 +41379,7 @@ var require_clone = __commonJS({ // ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ "../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) { - var fs11 = require("fs"); + var fs12 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); @@ -40396,12 +41411,12 @@ var require_graceful_fs = __commonJS({ m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs11[gracefulQueue]) { + if (!fs12[gracefulQueue]) { queue = global[gracefulQueue] || []; - publishQueue(fs11, queue); - fs11.close = function(fs$close) { + publishQueue(fs12, queue); + fs12.close = function(fs$close) { function close(fd, cb) { - return fs$close.call(fs11, fd, function(err) { + return fs$close.call(fs12, fd, function(err) { if (!err) { resetQueue(); } @@ -40413,48 +41428,48 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - }(fs11.close); - fs11.closeSync = function(fs$closeSync) { + }(fs12.close); + fs12.closeSync = function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs11, arguments); + fs$closeSync.apply(fs12, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - }(fs11.closeSync); + }(fs12.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug3(fs11[gracefulQueue]); - require("assert").equal(fs11[gracefulQueue].length, 0); + debug3(fs12[gracefulQueue]); + require("assert").equal(fs12[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { - publishQueue(global, fs11[gracefulQueue]); - } - module2.exports = patch(clone(fs11)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs11.__patched) { - module2.exports = patch(fs11); - fs11.__patched = true; - } - function patch(fs12) { - polyfills(fs12); - fs12.gracefulify = patch; - fs12.createReadStream = createReadStream; - fs12.createWriteStream = createWriteStream2; - var fs$readFile = fs12.readFile; - fs12.readFile = readFile3; - function readFile3(path26, options, cb) { + publishQueue(global, fs12[gracefulQueue]); + } + module2.exports = patch(clone(fs12)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs12.__patched) { + module2.exports = patch(fs12); + fs12.__patched = true; + } + function patch(fs13) { + polyfills(fs13); + fs13.gracefulify = patch; + fs13.createReadStream = createReadStream; + fs13.createWriteStream = createWriteStream2; + var fs$readFile = fs13.readFile; + fs13.readFile = readFile5; + function readFile5(path27, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path26, options, cb); - function go$readFile(path27, options2, cb2, startTime) { - return fs$readFile(path27, options2, function(err) { + return go$readFile(path27, options, cb); + function go$readFile(path28, options2, cb2, startTime) { + return fs$readFile(path28, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path27, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path28, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -40462,16 +41477,16 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs12.writeFile; - fs12.writeFile = writeFile; - function writeFile(path26, data, options, cb) { + var fs$writeFile = fs13.writeFile; + fs13.writeFile = writeFile3; + function writeFile3(path27, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path26, data, options, cb); - function go$writeFile(path27, data2, options2, cb2, startTime) { - return fs$writeFile(path27, data2, options2, function(err) { + return go$writeFile(path27, data, options, cb); + function go$writeFile(path28, data2, options2, cb2, startTime) { + return fs$writeFile(path28, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path27, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path28, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -40479,17 +41494,17 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs12.appendFile; + var fs$appendFile = fs13.appendFile; if (fs$appendFile) - fs12.appendFile = appendFile; - function appendFile(path26, data, options, cb) { + fs13.appendFile = appendFile; + function appendFile(path27, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path26, data, options, cb); - function go$appendFile(path27, data2, options2, cb2, startTime) { - return fs$appendFile(path27, data2, options2, function(err) { + return go$appendFile(path27, data, options, cb); + function go$appendFile(path28, data2, options2, cb2, startTime) { + return fs$appendFile(path28, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path27, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path28, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -40497,9 +41512,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs12.copyFile; + var fs$copyFile = fs13.copyFile; if (fs$copyFile) - fs12.copyFile = copyFile; + fs13.copyFile = copyFile; function copyFile(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -40517,34 +41532,34 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs12.readdir; - fs12.readdir = readdir; + var fs$readdir = fs13.readdir; + fs13.readdir = readdir2; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path26, options, cb) { + function readdir2(path27, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path27, options2, cb2, startTime) { - return fs$readdir(path27, fs$readdirCallback( - path27, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path28, options2, cb2, startTime) { + return fs$readdir(path28, fs$readdirCallback( + path28, options2, cb2, startTime )); - } : function go$readdir2(path27, options2, cb2, startTime) { - return fs$readdir(path27, options2, fs$readdirCallback( - path27, + } : function go$readdir2(path28, options2, cb2, startTime) { + return fs$readdir(path28, options2, fs$readdirCallback( + path28, options2, cb2, startTime )); }; - return go$readdir(path26, options, cb); - function fs$readdirCallback(path27, options2, cb2, startTime) { + return go$readdir(path27, options, cb); + function fs$readdirCallback(path28, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path27, options2, cb2], + [path28, options2, cb2], err, startTime || Date.now(), Date.now() @@ -40559,21 +41574,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs12); + var legStreams = legacy(fs13); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs12.ReadStream; + var fs$ReadStream = fs13.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs12.WriteStream; + var fs$WriteStream = fs13.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs12, "ReadStream", { + Object.defineProperty(fs13, "ReadStream", { get: function() { return ReadStream; }, @@ -40583,7 +41598,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs12, "WriteStream", { + Object.defineProperty(fs13, "WriteStream", { get: function() { return WriteStream; }, @@ -40594,7 +41609,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs12, "FileReadStream", { + Object.defineProperty(fs13, "FileReadStream", { get: function() { return FileReadStream; }, @@ -40605,7 +41620,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs12, "FileWriteStream", { + Object.defineProperty(fs13, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -40615,7 +41630,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path26, options) { + function ReadStream(path27, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -40635,7 +41650,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path26, options) { + function WriteStream(path27, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -40653,22 +41668,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream(path26, options) { - return new fs12.ReadStream(path26, options); + function createReadStream(path27, options) { + return new fs13.ReadStream(path27, options); } - function createWriteStream2(path26, options) { - return new fs12.WriteStream(path26, options); + function createWriteStream2(path27, options) { + return new fs13.WriteStream(path27, options); } - var fs$open = fs12.open; - fs12.open = open; - function open(path26, flags, mode, cb) { + var fs$open = fs13.open; + fs13.open = open; + function open(path27, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path26, flags, mode, cb); - function go$open(path27, flags2, mode2, cb2, startTime) { - return fs$open(path27, flags2, mode2, function(err, fd) { + return go$open(path27, flags, mode, cb); + function go$open(path28, flags2, mode2, cb2, startTime) { + return fs$open(path28, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path27, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path28, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -40676,20 +41691,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs12; + return fs13; } function enqueue(elem) { debug3("ENQUEUE", elem[0].name, elem[1]); - fs11[gracefulQueue].push(elem); + fs12[gracefulQueue].push(elem); retry(); } var retryTimer; function resetQueue() { var now = Date.now(); - for (var i = 0; i < fs11[gracefulQueue].length; ++i) { - if (fs11[gracefulQueue][i].length > 2) { - fs11[gracefulQueue][i][3] = now; - fs11[gracefulQueue][i][4] = now; + for (var i = 0; i < fs12[gracefulQueue].length; ++i) { + if (fs12[gracefulQueue][i].length > 2) { + fs12[gracefulQueue][i][3] = now; + fs12[gracefulQueue][i][4] = now; } } retry(); @@ -40697,9 +41712,9 @@ var require_graceful_fs = __commonJS({ function retry() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs11[gracefulQueue].length === 0) + if (fs12[gracefulQueue].length === 0) return; - var elem = fs11[gracefulQueue].shift(); + var elem = fs12[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; @@ -40721,7 +41736,7 @@ var require_graceful_fs = __commonJS({ debug3("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs11[gracefulQueue].push(elem); + fs12[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -40735,9 +41750,9 @@ var require_graceful_fs = __commonJS({ var require_imurmurhash = __commonJS({ "../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports, module2) { (function() { - var cache2; + var cache4; function MurmurHash3(key, seed) { - var m = this instanceof MurmurHash3 ? this : cache2; + var m = this instanceof MurmurHash3 ? this : cache4; m.reset(seed); if (typeof key === "string" && key.length > 0) { m.hash(key); @@ -40819,7 +41834,7 @@ var require_imurmurhash = __commonJS({ this.rem = this.k1 = this.len = 0; return this; }; - cache2 = new MurmurHash3(); + cache4 = new MurmurHash3(); if (typeof module2 != "undefined") { module2.exports = MurmurHash3; } else { @@ -41028,9 +42043,9 @@ var require_signal_exit = __commonJS({ // ../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js var require_is_typedarray = __commonJS({ "../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js"(exports, module2) { - module2.exports = isTypedArray; - isTypedArray.strict = isStrictTypedArray; - isTypedArray.loose = isLooseTypedArray; + module2.exports = isTypedArray2; + isTypedArray2.strict = isStrictTypedArray; + isTypedArray2.loose = isLooseTypedArray; var toString = Object.prototype.toString; var names = { "[object Int8Array]": true, @@ -41043,7 +42058,7 @@ var require_is_typedarray = __commonJS({ "[object Float32Array]": true, "[object Float64Array]": true }; - function isTypedArray(arr) { + function isTypedArray2(arr) { return isStrictTypedArray(arr) || isLooseTypedArray(arr); } function isStrictTypedArray(arr) { @@ -41058,9 +42073,9 @@ var require_is_typedarray = __commonJS({ // ../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js var require_typedarray_to_buffer = __commonJS({ "../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js"(exports, module2) { - var isTypedArray = require_is_typedarray().strict; + var isTypedArray2 = require_is_typedarray().strict; module2.exports = function typedarrayToBuffer(arr) { - if (isTypedArray(arr)) { + if (isTypedArray2(arr)) { var buf = Buffer.from(arr.buffer); if (arr.byteLength !== arr.buffer.byteLength) { buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); @@ -41077,15 +42092,15 @@ var require_typedarray_to_buffer = __commonJS({ var require_write_file_atomic = __commonJS({ "../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js"(exports, module2) { "use strict"; - module2.exports = writeFile; + module2.exports = writeFile3; module2.exports.sync = writeFileSync; module2.exports._getTmpname = getTmpname; module2.exports._cleanupOnExit = cleanupOnExit; - var fs11 = require("fs"); + var fs12 = require("fs"); var MurmurHash3 = require_imurmurhash(); var onExit = require_signal_exit(); - var path26 = require("path"); - var isTypedArray = require_is_typedarray(); + var path27 = require("path"); + var isTypedArray2 = require_is_typedarray(); var typedArrayToBuffer = require_typedarray_to_buffer(); var { promisify: promisify4 } = require("util"); var activeFiles = {}; @@ -41104,18 +42119,18 @@ var require_write_file_atomic = __commonJS({ function cleanupOnExit(tmpfile) { return () => { try { - fs11.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); + fs12.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); } catch (_) { } }; } function serializeActiveFile(absoluteName) { - return new Promise((resolve13) => { + return new Promise((resolve12) => { if (!activeFiles[absoluteName]) activeFiles[absoluteName] = []; - activeFiles[absoluteName].push(resolve13); + activeFiles[absoluteName].push(resolve12); if (activeFiles[absoluteName].length === 1) - resolve13(); + resolve12(); }); } function isChownErrOk(err) { @@ -41137,13 +42152,13 @@ var require_write_file_atomic = __commonJS({ let fd; let tmpfile; const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)); - const absoluteName = path26.resolve(filename); + const absoluteName = path27.resolve(filename); try { await serializeActiveFile(absoluteName); - const truename = await promisify4(fs11.realpath)(filename).catch(() => filename); + const truename = await promisify4(fs12.realpath)(filename).catch(() => filename); tmpfile = getTmpname(truename); if (!options.mode || !options.chown) { - const stats = await promisify4(fs11.stat)(truename).catch(() => { + const stats = await promisify4(fs12.stat)(truename).catch(() => { }); if (stats) { if (options.mode == null) { @@ -41154,48 +42169,48 @@ var require_write_file_atomic = __commonJS({ } } } - fd = await promisify4(fs11.open)(tmpfile, "w", options.mode); + fd = await promisify4(fs12.open)(tmpfile, "w", options.mode); if (options.tmpfileCreated) { await options.tmpfileCreated(tmpfile); } - if (isTypedArray(data)) { + if (isTypedArray2(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { - await promisify4(fs11.write)(fd, data, 0, data.length, 0); + await promisify4(fs12.write)(fd, data, 0, data.length, 0); } else if (data != null) { - await promisify4(fs11.write)(fd, String(data), 0, String(options.encoding || "utf8")); + await promisify4(fs12.write)(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { - await promisify4(fs11.fsync)(fd); + await promisify4(fs12.fsync)(fd); } - await promisify4(fs11.close)(fd); + await promisify4(fs12.close)(fd); fd = null; if (options.chown) { - await promisify4(fs11.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { + await promisify4(fs12.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } if (options.mode) { - await promisify4(fs11.chmod)(tmpfile, options.mode).catch((err) => { + await promisify4(fs12.chmod)(tmpfile, options.mode).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } - await promisify4(fs11.rename)(tmpfile, truename); + await promisify4(fs12.rename)(tmpfile, truename); } finally { if (fd) { - await promisify4(fs11.close)(fd).catch( + await promisify4(fs12.close)(fd).catch( /* istanbul ignore next */ () => { } ); } removeOnExitHandler(); - await promisify4(fs11.unlink)(tmpfile).catch(() => { + await promisify4(fs12.unlink)(tmpfile).catch(() => { }); activeFiles[absoluteName].shift(); if (activeFiles[absoluteName].length > 0) { @@ -41204,7 +42219,7 @@ var require_write_file_atomic = __commonJS({ delete activeFiles[absoluteName]; } } - function writeFile(filename, data, options, callback) { + function writeFile3(filename, data, options, callback) { if (options instanceof Function) { callback = options; options = {}; @@ -41221,13 +42236,13 @@ var require_write_file_atomic = __commonJS({ else if (!options) options = {}; try { - filename = fs11.realpathSync(filename); + filename = fs12.realpathSync(filename); } catch (ex) { } const tmpfile = getTmpname(filename); if (!options.mode || !options.chown) { try { - const stats = fs11.statSync(filename); + const stats = fs12.statSync(filename); options = Object.assign({}, options); if (!options.mode) { options.mode = stats.mode; @@ -41243,26 +42258,26 @@ var require_write_file_atomic = __commonJS({ const removeOnExitHandler = onExit(cleanup); let threw = true; try { - fd = fs11.openSync(tmpfile, "w", options.mode || 438); + fd = fs12.openSync(tmpfile, "w", options.mode || 438); if (options.tmpfileCreated) { options.tmpfileCreated(tmpfile); } - if (isTypedArray(data)) { + if (isTypedArray2(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { - fs11.writeSync(fd, data, 0, data.length, 0); + fs12.writeSync(fd, data, 0, data.length, 0); } else if (data != null) { - fs11.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); + fs12.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { - fs11.fsyncSync(fd); + fs12.fsyncSync(fd); } - fs11.closeSync(fd); + fs12.closeSync(fd); fd = null; if (options.chown) { try { - fs11.chownSync(tmpfile, options.chown.uid, options.chown.gid); + fs12.chownSync(tmpfile, options.chown.uid, options.chown.gid); } catch (err) { if (!isChownErrOk(err)) { throw err; @@ -41271,19 +42286,19 @@ var require_write_file_atomic = __commonJS({ } if (options.mode) { try { - fs11.chmodSync(tmpfile, options.mode); + fs12.chmodSync(tmpfile, options.mode); } catch (err) { if (!isChownErrOk(err)) { throw err; } } } - fs11.renameSync(tmpfile, filename); + fs12.renameSync(tmpfile, filename); threw = false; } finally { if (fd) { try { - fs11.closeSync(fd); + fs12.closeSync(fd); } catch (ex) { } } @@ -41318,8 +42333,8 @@ var require_dot_prop = __commonJS({ "constructor" ]); var isValidPath = (pathSegments) => !pathSegments.some((segment) => disallowedKeys.has(segment)); - function getPathSegments(path26) { - const pathArray = path26.split("."); + function getPathSegments(path27) { + const pathArray = path27.split("."); const parts = []; for (let i = 0; i < pathArray.length; i++) { let p = pathArray[i]; @@ -41335,11 +42350,11 @@ var require_dot_prop = __commonJS({ return parts; } module2.exports = { - get(object, path26, value) { - if (!isObj(object) || typeof path26 !== "string") { + get(object, path27, value) { + if (!isObj(object) || typeof path27 !== "string") { return value === void 0 ? object : value; } - const pathArray = getPathSegments(path26); + const pathArray = getPathSegments(path27); if (pathArray.length === 0) { return; } @@ -41354,12 +42369,12 @@ var require_dot_prop = __commonJS({ } return object === void 0 ? value : object; }, - set(object, path26, value) { - if (!isObj(object) || typeof path26 !== "string") { + set(object, path27, value) { + if (!isObj(object) || typeof path27 !== "string") { return object; } const root = object; - const pathArray = getPathSegments(path26); + const pathArray = getPathSegments(path27); for (let i = 0; i < pathArray.length; i++) { const p = pathArray[i]; if (!isObj(object[p])) { @@ -41372,11 +42387,11 @@ var require_dot_prop = __commonJS({ } return root; }, - delete(object, path26) { - if (!isObj(object) || typeof path26 !== "string") { + delete(object, path27) { + if (!isObj(object) || typeof path27 !== "string") { return false; } - const pathArray = getPathSegments(path26); + const pathArray = getPathSegments(path27); for (let i = 0; i < pathArray.length; i++) { const p = pathArray[i]; if (i === pathArray.length - 1) { @@ -41389,11 +42404,11 @@ var require_dot_prop = __commonJS({ } } }, - has(object, path26) { - if (!isObj(object) || typeof path26 !== "string") { + has(object, path27) { + if (!isObj(object) || typeof path27 !== "string") { return false; } - const pathArray = getPathSegments(path26); + const pathArray = getPathSegments(path27); if (pathArray.length === 0) { return false; } @@ -41413,8 +42428,24 @@ var require_dot_prop = __commonJS({ } }); +// ../node_modules/.pnpm/callsites@3.1.0/node_modules/callsites/index.js +var require_callsites = __commonJS({ + "../node_modules/.pnpm/callsites@3.1.0/node_modules/callsites/index.js"(exports, module2) { + "use strict"; + var callsites = () => { + const _prepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack2) => stack2; + const stack = new Error().stack.slice(1); + Error.prepareStackTrace = _prepareStackTrace; + return stack; + }; + module2.exports = callsites; + module2.exports.default = callsites; + } +}); + // ../node_modules/.pnpm/parent-module@2.0.0/node_modules/parent-module/index.js -var require_parent_module2 = __commonJS({ +var require_parent_module = __commonJS({ "../node_modules/.pnpm/parent-module@2.0.0/node_modules/parent-module/index.js"(exports, module2) { "use strict"; var callsites = require_callsites(); @@ -41449,12 +42480,12 @@ var require_parent_module2 = __commonJS({ var require_clear_module = __commonJS({ "../node_modules/.pnpm/clear-module@4.1.2/node_modules/clear-module/index.js"(exports, module2) { "use strict"; - var path26 = require("path"); - var resolveFrom2 = require_resolve_from2(); - var parentModule = require_parent_module2(); - var resolve13 = (moduleId) => { + var path27 = require("path"); + var resolveFrom2 = require_resolve_from(); + var parentModule = require_parent_module(); + var resolve12 = (moduleId) => { try { - return resolveFrom2(path26.dirname(parentModule(__filename)), moduleId); + return resolveFrom2(path27.dirname(parentModule(__filename)), moduleId); } catch (_) { } }; @@ -41462,7 +42493,7 @@ var require_clear_module = __commonJS({ if (typeof moduleId !== "string") { throw new TypeError(`Expected a \`string\`, got \`${typeof moduleId}\``); } - const filePath = resolve13(moduleId); + const filePath = resolve12(moduleId); if (!filePath) { return; } @@ -41483,7 +42514,7 @@ var require_clear_module = __commonJS({ } }; clear.all = () => { - const directory = path26.dirname(parentModule(__filename)); + const directory = path27.dirname(parentModule(__filename)); for (const moduleId of Object.keys(require.cache)) { delete require.cache[resolveFrom2(directory, moduleId)]; } @@ -41499,289 +42530,135 @@ var require_clear_module = __commonJS({ if (typeof moduleId !== "string") { throw new TypeError(`Expected a \`string\`, got \`${typeof moduleId}\``); } - delete require.cache[resolve13(moduleId)]; + delete require.cache[resolve12(moduleId)]; }; module2.exports = clear; } }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/lib-cjs/index.cjs -var require_lib_cjs = __commonJS({ - "../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/lib-cjs/index.cjs"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.srcDirectory = void 0; - var pkg_info_cjs_1 = require_pkg_info(); - Object.defineProperty(exports, "srcDirectory", { enumerable: true, get: function() { - return pkg_info_cjs_1.srcDirectory; - } }); - } -}); - -// ../node_modules/.pnpm/fast-equals@4.0.3/node_modules/fast-equals/dist/fast-equals.cjs.js -var require_fast_equals_cjs = __commonJS({ - "../node_modules/.pnpm/fast-equals@4.0.3/node_modules/fast-equals/dist/fast-equals.cjs.js"(exports) { +// ../node_modules/.pnpm/resolve-from@4.0.0/node_modules/resolve-from/index.js +var require_resolve_from2 = __commonJS({ + "../node_modules/.pnpm/resolve-from@4.0.0/node_modules/resolve-from/index.js"(exports, module2) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function createDefaultIsNestedEqual(comparator) { - return function isEqual(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, meta) { - return comparator(a, b, meta); - }; - } - function createIsCircular(areItemsEqual) { - return function isCircular2(a, b, isEqual, cache2) { - if (!a || !b || typeof a !== "object" || typeof b !== "object") { - return areItemsEqual(a, b, isEqual, cache2); - } - var cachedA = cache2.get(a); - var cachedB = cache2.get(b); - if (cachedA && cachedB) { - return cachedA === b && cachedB === a; - } - cache2.set(a, b); - cache2.set(b, a); - var result = areItemsEqual(a, b, isEqual, cache2); - cache2.delete(a); - cache2.delete(b); - return result; - }; - } - function merge4(a, b) { - var merged = {}; - for (var key in a) { - merged[key] = a[key]; + var path27 = require("path"); + var Module = require("module"); + var fs12 = require("fs"); + var resolveFrom2 = (fromDir, moduleId, silent) => { + if (typeof fromDir !== "string") { + throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``); } - for (var key in b) { - merged[key] = b[key]; + if (typeof moduleId !== "string") { + throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); } - return merged; - } - function isPlainObject(value) { - return value.constructor === Object || value.constructor == null; - } - function isPromiseLike(value) { - return typeof value.then === "function"; - } - function sameValueZeroEqual(a, b) { - return a === b || a !== a && b !== b; - } - var ARGUMENTS_TAG = "[object Arguments]"; - var BOOLEAN_TAG = "[object Boolean]"; - var DATE_TAG = "[object Date]"; - var REG_EXP_TAG = "[object RegExp]"; - var MAP_TAG = "[object Map]"; - var NUMBER_TAG = "[object Number]"; - var OBJECT_TAG = "[object Object]"; - var SET_TAG = "[object Set]"; - var STRING_TAG = "[object String]"; - var toString = Object.prototype.toString; - function createComparator(_a) { - var areArraysEqual2 = _a.areArraysEqual, areDatesEqual2 = _a.areDatesEqual, areMapsEqual2 = _a.areMapsEqual, areObjectsEqual2 = _a.areObjectsEqual, areRegExpsEqual2 = _a.areRegExpsEqual, areSetsEqual2 = _a.areSetsEqual, createIsNestedEqual = _a.createIsNestedEqual; - var isEqual = createIsNestedEqual(comparator); - function comparator(a, b, meta) { - if (a === b) { - return true; - } - if (!a || !b || typeof a !== "object" || typeof b !== "object") { - return a !== a && b !== b; - } - if (isPlainObject(a) && isPlainObject(b)) { - return areObjectsEqual2(a, b, isEqual, meta); - } - var aArray = Array.isArray(a); - var bArray = Array.isArray(b); - if (aArray || bArray) { - return aArray === bArray && areArraysEqual2(a, b, isEqual, meta); - } - var aTag = toString.call(a); - if (aTag !== toString.call(b)) { - return false; - } - if (aTag === DATE_TAG) { - return areDatesEqual2(a, b, isEqual, meta); - } - if (aTag === REG_EXP_TAG) { - return areRegExpsEqual2(a, b, isEqual, meta); - } - if (aTag === MAP_TAG) { - return areMapsEqual2(a, b, isEqual, meta); - } - if (aTag === SET_TAG) { - return areSetsEqual2(a, b, isEqual, meta); - } - if (aTag === OBJECT_TAG || aTag === ARGUMENTS_TAG) { - return isPromiseLike(a) || isPromiseLike(b) ? false : areObjectsEqual2(a, b, isEqual, meta); - } - if (aTag === BOOLEAN_TAG || aTag === NUMBER_TAG || aTag === STRING_TAG) { - return sameValueZeroEqual(a.valueOf(), b.valueOf()); + try { + fromDir = fs12.realpathSync(fromDir); + } catch (err) { + if (err.code === "ENOENT") { + fromDir = path27.resolve(fromDir); + } else if (silent) { + return null; + } else { + throw err; } - return false; } - return comparator; - } - function areArraysEqual(a, b, isEqual, meta) { - var index = a.length; - if (b.length !== index) { - return false; - } - while (index-- > 0) { - if (!isEqual(a[index], b[index], index, index, a, b, meta)) { - return false; + const fromFile = path27.join(fromDir, "noop.js"); + const resolveFileName = () => Module._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: Module._nodeModulePaths(fromDir) + }); + if (silent) { + try { + return resolveFileName(); + } catch (err) { + return null; } } - return true; - } - var areArraysEqualCircular = createIsCircular(areArraysEqual); - function areDatesEqual(a, b) { - return sameValueZeroEqual(a.valueOf(), b.valueOf()); - } - function areMapsEqual(a, b, isEqual, meta) { - var isValueEqual = a.size === b.size; - if (!isValueEqual) { - return false; - } - if (!a.size) { - return true; + return resolveFileName(); + }; + module2.exports = (fromDir, moduleId) => resolveFrom2(fromDir, moduleId); + module2.exports.silent = (fromDir, moduleId) => resolveFrom2(fromDir, moduleId, true); + } +}); + +// ../node_modules/.pnpm/parent-module@1.0.1/node_modules/parent-module/index.js +var require_parent_module2 = __commonJS({ + "../node_modules/.pnpm/parent-module@1.0.1/node_modules/parent-module/index.js"(exports, module2) { + "use strict"; + var callsites = require_callsites(); + module2.exports = (filepath) => { + const stacks = callsites(); + if (!filepath) { + return stacks[2].getFileName(); } - var matchedIndices = {}; - var indexA = 0; - a.forEach(function(aValue, aKey) { - if (!isValueEqual) { - return; + let seenVal = false; + stacks.shift(); + for (const stack of stacks) { + const parentFilepath = stack.getFileName(); + if (typeof parentFilepath !== "string") { + continue; } - var hasMatch = false; - var matchIndexB = 0; - b.forEach(function(bValue, bKey) { - if (!hasMatch && !matchedIndices[matchIndexB] && (hasMatch = isEqual(aKey, bKey, indexA, matchIndexB, a, b, meta) && isEqual(aValue, bValue, aKey, bKey, a, b, meta))) { - matchedIndices[matchIndexB] = true; - } - matchIndexB++; - }); - indexA++; - isValueEqual = hasMatch; - }); - return isValueEqual; - } - var areMapsEqualCircular = createIsCircular(areMapsEqual); - var OWNER = "_owner"; - var hasOwnProperty2 = Object.prototype.hasOwnProperty; - function areObjectsEqual(a, b, isEqual, meta) { - var keysA = Object.keys(a); - var index = keysA.length; - if (Object.keys(b).length !== index) { - return false; - } - var key; - while (index-- > 0) { - key = keysA[index]; - if (key === OWNER) { - var reactElementA = !!a.$$typeof; - var reactElementB = !!b.$$typeof; - if ((reactElementA || reactElementB) && reactElementA !== reactElementB) { - return false; - } + if (parentFilepath === filepath) { + seenVal = true; + continue; } - if (!hasOwnProperty2.call(b, key) || !isEqual(a[key], b[key], key, key, a, b, meta)) { - return false; + if (parentFilepath === "module.js") { + continue; + } + if (seenVal && parentFilepath !== filepath) { + return parentFilepath; } } - return true; - } - var areObjectsEqualCircular = createIsCircular(areObjectsEqual); - function areRegExpsEqual(a, b) { - return a.source === b.source && a.flags === b.flags; - } - function areSetsEqual(a, b, isEqual, meta) { - var isValueEqual = a.size === b.size; - if (!isValueEqual) { - return false; - } - if (!a.size) { - return true; + }; + } +}); + +// ../node_modules/.pnpm/import-fresh@3.3.0/node_modules/import-fresh/index.js +var require_import_fresh = __commonJS({ + "../node_modules/.pnpm/import-fresh@3.3.0/node_modules/import-fresh/index.js"(exports, module2) { + "use strict"; + var path27 = require("path"); + var resolveFrom2 = require_resolve_from2(); + var parentModule = require_parent_module2(); + module2.exports = (moduleId) => { + if (typeof moduleId !== "string") { + throw new TypeError("Expected a string"); } - var matchedIndices = {}; - a.forEach(function(aValue, aKey) { - if (!isValueEqual) { - return; - } - var hasMatch = false; - var matchIndex = 0; - b.forEach(function(bValue, bKey) { - if (!hasMatch && !matchedIndices[matchIndex] && (hasMatch = isEqual(aValue, bValue, aKey, bKey, a, b, meta))) { - matchedIndices[matchIndex] = true; + const parentPath = parentModule(__filename); + const cwd = parentPath ? path27.dirname(parentPath) : __dirname; + const filePath = resolveFrom2(cwd, moduleId); + const oldModule = require.cache[filePath]; + if (oldModule && oldModule.parent) { + let i = oldModule.parent.children.length; + while (i--) { + if (oldModule.parent.children[i].id === filePath) { + oldModule.parent.children.splice(i, 1); } - matchIndex++; - }); - isValueEqual = hasMatch; - }); - return isValueEqual; - } - var areSetsEqualCircular = createIsCircular(areSetsEqual); - var DEFAULT_CONFIG = Object.freeze({ - areArraysEqual, - areDatesEqual, - areMapsEqual, - areObjectsEqual, - areRegExpsEqual, - areSetsEqual, - createIsNestedEqual: createDefaultIsNestedEqual - }); - var DEFAULT_CIRCULAR_CONFIG = Object.freeze({ - areArraysEqual: areArraysEqualCircular, - areDatesEqual, - areMapsEqual: areMapsEqualCircular, - areObjectsEqual: areObjectsEqualCircular, - areRegExpsEqual, - areSetsEqual: areSetsEqualCircular, - createIsNestedEqual: createDefaultIsNestedEqual - }); - var isDeepEqual = createComparator(DEFAULT_CONFIG); - function deepEqual2(a, b) { - return isDeepEqual(a, b, void 0); - } - var isShallowEqual = createComparator(merge4(DEFAULT_CONFIG, { createIsNestedEqual: function() { - return sameValueZeroEqual; - } })); - function shallowEqual(a, b) { - return isShallowEqual(a, b, void 0); - } - var isCircularDeepEqual = createComparator(DEFAULT_CIRCULAR_CONFIG); - function circularDeepEqual(a, b) { - return isCircularDeepEqual(a, b, /* @__PURE__ */ new WeakMap()); - } - var isCircularShallowEqual = createComparator(merge4(DEFAULT_CIRCULAR_CONFIG, { - createIsNestedEqual: function() { - return sameValueZeroEqual; - } - })); - function circularShallowEqual(a, b) { - return isCircularShallowEqual(a, b, /* @__PURE__ */ new WeakMap()); - } - function createCustomEqual(getComparatorOptions) { - return createComparator(merge4(DEFAULT_CONFIG, getComparatorOptions(DEFAULT_CONFIG))); - } - function createCustomCircularEqual(getComparatorOptions) { - var comparator = createComparator(merge4(DEFAULT_CIRCULAR_CONFIG, getComparatorOptions(DEFAULT_CIRCULAR_CONFIG))); - return function(a, b, meta) { - if (meta === void 0) { - meta = /* @__PURE__ */ new WeakMap(); } - return comparator(a, b, meta); - }; - } - exports.circularDeepEqual = circularDeepEqual; - exports.circularShallowEqual = circularShallowEqual; - exports.createCustomCircularEqual = createCustomCircularEqual; - exports.createCustomEqual = createCustomEqual; - exports.deepEqual = deepEqual2; - exports.sameValueZeroEqual = sameValueZeroEqual; - exports.shallowEqual = shallowEqual; + } + delete require.cache[filePath]; + const parent = require.cache[parentPath]; + return parent === void 0 ? require(filePath) : parent.require(filePath); + }; + } +}); + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/lib-cjs/index.cjs +var require_lib_cjs = __commonJS({ + "../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/lib-cjs/index.cjs"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.srcDirectory = void 0; + var pkg_info_cjs_1 = require_pkg_info(); + Object.defineProperty(exports, "srcDirectory", { enumerable: true, get: function() { + return pkg_info_cjs_1.srcDirectory; + } }); } }); -// ../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/configFields.js +// ../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/configFields.js var require_configFields = __commonJS({ - "../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/configFields.js"(exports) { + "../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/configFields.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigFields = void 0; @@ -41839,9 +42716,9 @@ var require_configFields = __commonJS({ } }); -// ../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/CSpellReporter.js +// ../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/CSpellReporter.js var require_CSpellReporter = __commonJS({ - "../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/CSpellReporter.js"(exports) { + "../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/CSpellReporter.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageTypes = exports.IssueType = void 0; @@ -41858,9 +42735,9 @@ var require_CSpellReporter = __commonJS({ } }); -// ../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/index.js -var require_dist3 = __commonJS({ - "../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/index.js"(exports) { +// ../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/index.js +var require_dist2 = __commonJS({ + "../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageTypes = exports.IssueType = exports.ConfigFields = void 0; @@ -41878,327 +42755,12 @@ var require_dist3 = __commonJS({ } }); -// ../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js -var require_yocto_queue = __commonJS({ - "../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports, module2) { - var Node2 = class { - /// value; - /// next; - constructor(value) { - this.value = value; - this.next = void 0; - } - }; - var Queue2 = class { - // TODO: Use private class fields when targeting Node.js 12. - // #_head; - // #_tail; - // #_size; - constructor() { - this.clear(); - } - enqueue(value) { - const node = new Node2(value); - if (this._head) { - this._tail.next = node; - this._tail = node; - } else { - this._head = node; - this._tail = node; - } - this._size++; - } - dequeue() { - const current = this._head; - if (!current) { - return; - } - this._head = this._head.next; - this._size--; - return current.value; - } - clear() { - this._head = void 0; - this._tail = void 0; - this._size = 0; - } - get size() { - return this._size; - } - *[Symbol.iterator]() { - let current = this._head; - while (current) { - yield current.value; - current = current.next; - } - } - }; - module2.exports = Queue2; - } -}); - -// ../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js -var require_p_limit = __commonJS({ - "../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports, module2) { - "use strict"; - var Queue2 = require_yocto_queue(); - var pLimit2 = (concurrency) => { - if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { - throw new TypeError("Expected `concurrency` to be a number from 1 and up"); - } - const queue = new Queue2(); - let activeCount = 0; - const next = () => { - activeCount--; - if (queue.size > 0) { - queue.dequeue()(); - } - }; - const run2 = async (fn, resolve13, ...args) => { - activeCount++; - const result = (async () => fn(...args))(); - resolve13(result); - try { - await result; - } catch { - } - next(); - }; - const enqueue = (fn, resolve13, ...args) => { - queue.enqueue(run2.bind(null, fn, resolve13, ...args)); - (async () => { - await Promise.resolve(); - if (activeCount < concurrency && queue.size > 0) { - queue.dequeue()(); - } - })(); - }; - const generator = (fn, ...args) => new Promise((resolve13) => { - enqueue(fn, resolve13, ...args); - }); - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.size - }, - clearQueue: { - value: () => { - queue.clear(); - } - } - }); - return generator; - }; - module2.exports = pLimit2; - } -}); - -// ../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js -var require_p_locate = __commonJS({ - "../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js"(exports, module2) { - "use strict"; - var pLimit2 = require_p_limit(); - var EndError2 = class extends Error { - constructor(value) { - super(); - this.value = value; - } - }; - var testElement2 = async (element, tester) => tester(await element); - var finder2 = async (element) => { - const values = await Promise.all(element); - if (values[1] === true) { - throw new EndError2(values[0]); - } - return false; - }; - var pLocate2 = async (iterable, tester, options) => { - options = { - concurrency: Infinity, - preserveOrder: true, - ...options - }; - const limit = pLimit2(options.concurrency); - const items = [...iterable].map((element) => [element, limit(testElement2, element, tester)]); - const checkLimit = pLimit2(options.preserveOrder ? 1 : Infinity); - try { - await Promise.all(items.map((element) => checkLimit(finder2, element))); - } catch (error3) { - if (error3 instanceof EndError2) { - return error3.value; - } - throw error3; - } - }; - module2.exports = pLocate2; - } -}); - -// ../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js -var require_locate_path = __commonJS({ - "../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports, module2) { - "use strict"; - var path26 = require("path"); - var fs11 = require("fs"); - var { promisify: promisify4 } = require("util"); - var pLocate2 = require_p_locate(); - var fsStat = promisify4(fs11.stat); - var fsLStat = promisify4(fs11.lstat); - var typeMappings2 = { - directory: "isDirectory", - file: "isFile" - }; - function checkType2({ type }) { - if (type in typeMappings2) { - return; - } - throw new Error(`Invalid type specified: ${type}`); - } - var matchType2 = (type, stat2) => type === void 0 || stat2[typeMappings2[type]](); - module2.exports = async (paths, options) => { - options = { - cwd: process.cwd(), - type: "file", - allowSymlinks: true, - ...options - }; - checkType2(options); - const statFn = options.allowSymlinks ? fsStat : fsLStat; - return pLocate2(paths, async (path_) => { - try { - const stat2 = await statFn(path26.resolve(options.cwd, path_)); - return matchType2(options.type, stat2); - } catch { - return false; - } - }, options); - }; - module2.exports.sync = (paths, options) => { - options = { - cwd: process.cwd(), - allowSymlinks: true, - type: "file", - ...options - }; - checkType2(options); - const statFn = options.allowSymlinks ? fs11.statSync : fs11.lstatSync; - for (const path_ of paths) { - try { - const stat2 = statFn(path26.resolve(options.cwd, path_)); - if (matchType2(options.type, stat2)) { - return path_; - } - } catch { - } - } - }; - } -}); - -// ../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js -var require_path_exists = __commonJS({ - "../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports, module2) { - "use strict"; - var fs11 = require("fs"); - var { promisify: promisify4 } = require("util"); - var pAccess = promisify4(fs11.access); - module2.exports = async (path26) => { - try { - await pAccess(path26); - return true; - } catch (_) { - return false; - } - }; - module2.exports.sync = (path26) => { - try { - fs11.accessSync(path26); - return true; - } catch (_) { - return false; - } - }; - } -}); - -// ../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js -var require_find_up = __commonJS({ - "../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js"(exports, module2) { - "use strict"; - var path26 = require("path"); - var locatePath2 = require_locate_path(); - var pathExists2 = require_path_exists(); - var stop = Symbol("findUp.stop"); - module2.exports = async (name, options = {}) => { - let directory = path26.resolve(options.cwd || ""); - const { root } = path26.parse(directory); - const paths = [].concat(name); - const runMatcher = async (locateOptions) => { - if (typeof name !== "function") { - return locatePath2(paths, locateOptions); - } - const foundPath = await name(locateOptions.cwd); - if (typeof foundPath === "string") { - return locatePath2([foundPath], locateOptions); - } - return foundPath; - }; - while (true) { - const foundPath = await runMatcher({ ...options, cwd: directory }); - if (foundPath === stop) { - return; - } - if (foundPath) { - return path26.resolve(directory, foundPath); - } - if (directory === root) { - return; - } - directory = path26.dirname(directory); - } - }; - module2.exports.sync = (name, options = {}) => { - let directory = path26.resolve(options.cwd || ""); - const { root } = path26.parse(directory); - const paths = [].concat(name); - const runMatcher = (locateOptions) => { - if (typeof name !== "function") { - return locatePath2.sync(paths, locateOptions); - } - const foundPath = name(locateOptions.cwd); - if (typeof foundPath === "string") { - return locatePath2.sync([foundPath], locateOptions); - } - return foundPath; - }; - while (true) { - const foundPath = runMatcher({ ...options, cwd: directory }); - if (foundPath === stop) { - return; - } - if (foundPath) { - return path26.resolve(directory, foundPath); - } - if (directory === root) { - return; - } - directory = path26.dirname(directory); - } - }; - module2.exports.exists = pathExists2; - module2.exports.sync.exists = pathExists2.sync; - module2.exports.stop = stop; - } -}); - -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/package.json +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/package.json var require_package = __commonJS({ - "../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/package.json"(exports, module2) { + "../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/package.json"(exports, module2) { module2.exports = { name: "cspell", - version: "8.0.0", + version: "8.1.0", description: "A Spelling Checker for Code!", funding: "https://github.com/streetsidesoftware/cspell?sponsor=1", bin: { @@ -42278,20 +42840,20 @@ var require_package = __commonJS({ }, homepage: "https://streetsidesoftware.github.io/cspell/", dependencies: { - "@cspell/cspell-json-reporter": "8.0.0", - "@cspell/cspell-pipe": "8.0.0", - "@cspell/cspell-types": "8.0.0", - "@cspell/dynamic-import": "8.0.0", + "@cspell/cspell-json-reporter": "8.1.0", + "@cspell/cspell-pipe": "8.1.0", + "@cspell/cspell-types": "8.1.0", + "@cspell/dynamic-import": "8.1.0", chalk: "^5.3.0", "chalk-template": "^1.1.0", commander: "^11.1.0", - "cspell-gitignore": "8.0.0", - "cspell-glob": "8.0.0", - "cspell-io": "8.0.0", - "cspell-lib": "8.0.0", + "cspell-gitignore": "8.1.0", + "cspell-glob": "8.1.0", + "cspell-io": "8.1.0", + "cspell-lib": "8.1.0", "fast-glob": "^3.3.2", "fast-json-stable-stringify": "^2.1.0", - "file-entry-cache": "^7.0.1", + "file-entry-cache": "^7.0.2", "get-stdin": "^9.0.0", semver: "^7.5.4", "strip-ansi": "^7.1.0", @@ -42303,19 +42865,19 @@ var require_package = __commonJS({ devDependencies: { "@types/file-entry-cache": "^5.0.4", "@types/glob": "^8.1.0", - "@types/micromatch": "^4.0.4", - "@types/semver": "^7.5.4", + "@types/micromatch": "^4.0.6", + "@types/semver": "^7.5.6", micromatch: "^4.0.5", minimatch: "^9.0.3" }, - gitHead: "67c22bf98baed1c17bbc658fba8656262d17e370" + gitHead: "28568808deaf39b9ffa71fd0f722441ff1b8c794" }; } }); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/lib/pkgInfo.cjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/lib/pkgInfo.cjs var require_pkgInfo = __commonJS({ - "../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/lib/pkgInfo.cjs"(exports) { + "../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/lib/pkgInfo.cjs"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.npmPackage = exports.pkgDir = void 0; @@ -42395,9 +42957,9 @@ var require_path = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; - var os5 = require("os"); - var path26 = require("path"); - var IS_WINDOWS_PLATFORM = os5.platform() === "win32"; + var os6 = require("os"); + var path27 = require("path"); + var IS_WINDOWS_PLATFORM = os6.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; @@ -42408,7 +42970,7 @@ var require_path = __commonJS({ } exports.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path26.resolve(cwd, filepath); + return path27.resolve(cwd, filepath); } exports.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -42626,7 +43188,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; - var path26 = require("path"); + var path27 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -42721,8 +43283,8 @@ var require_pattern = __commonJS({ } exports.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename7 = path26.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename7); + const basename6 = path27.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename6); } exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; function expandPatternsWithBraceExpansion(patterns) { @@ -42772,8 +43334,8 @@ var require_pattern = __commonJS({ var require_merge2 = __commonJS({ "../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports, module2) { "use strict"; - var Stream3 = require("stream"); - var PassThrough2 = Stream3.PassThrough; + var Stream2 = require("stream"); + var PassThrough2 = Stream2.PassThrough; var slice = Array.prototype.slice; module2.exports = merge22; function merge22() { @@ -42911,7 +43473,7 @@ var require_stream = __commonJS({ }); // ../node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ +var require_string2 = __commonJS({ "../node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/string.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -42937,15 +43499,15 @@ var require_utils7 = __commonJS({ exports.array = array; var errno = require_errno(); exports.errno = errno; - var fs11 = require_fs(); - exports.fs = fs11; - var path26 = require_path(); - exports.path = path26; + var fs12 = require_fs(); + exports.fs = fs12; + var path27 = require_path(); + exports.path = path27; var pattern = require_pattern(); exports.pattern = pattern; var stream = require_stream(); exports.stream = stream; - var string = require_string(); + var string = require_string2(); exports.string = string; } }); @@ -43052,8 +43614,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.read = void 0; - function read2(path26, settings, callback) { - settings.fs.lstat(path26, (lstatError, lstat) => { + function read2(path27, settings, callback) { + settings.fs.lstat(path27, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -43062,7 +43624,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path26, (statError, stat2) => { + settings.fs.stat(path27, (statError, stat4) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -43072,9 +43634,9 @@ var require_async = __commonJS({ return; } if (settings.markSymbolicLink) { - stat2.isSymbolicLink = () => true; + stat4.isSymbolicLink = () => true; } - callSuccessCallback(callback, stat2); + callSuccessCallback(callback, stat4); }); }); } @@ -43094,17 +43656,17 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.read = void 0; - function read2(path26, settings) { - const lstat = settings.fs.lstatSync(path26); + function read2(path27, settings) { + const lstat = settings.fs.lstatSync(path27); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat2 = settings.fs.statSync(path26); + const stat4 = settings.fs.statSync(path27); if (settings.markSymbolicLink) { - stat2.isSymbolicLink = () => true; + stat4.isSymbolicLink = () => true; } - return stat2; + return stat4; } catch (error3) { if (!settings.throwErrorOnBrokenSymbolicLink) { return lstat; @@ -43122,12 +43684,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); + var fs12 = require("fs"); exports.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.statSync + lstat: fs12.lstat, + stat: fs12.stat, + lstatSync: fs12.lstatSync, + statSync: fs12.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -43144,12 +43706,12 @@ var require_settings = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var fs11 = require_fs2(); + var fs12 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs11.createFileSystemAdapter(this._options.fs); + this.fs = fs12.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -43171,20 +43733,20 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports.Settings = settings_1.default; - function stat2(path26, optionsOrSettingsOrCallback, callback) { + function stat4(path27, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path26, getSettings2(), optionsOrSettingsOrCallback); + async.read(path27, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path26, getSettings2(optionsOrSettingsOrCallback), callback); + async.read(path27, getSettings(optionsOrSettingsOrCallback), callback); } - exports.stat = stat2; - function statSync3(path26, optionsOrSettings) { - const settings = getSettings2(optionsOrSettings); - return sync.read(path26, settings); + exports.stat = stat4; + function statSync4(path27, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path27, settings); } - exports.statSync = statSync3; - function getSettings2(settingsOrOptions = {}) { + exports.statSync = statSync4; + function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } @@ -43209,15 +43771,15 @@ var require_run_parallel = __commonJS({ module2.exports = runParallel; var queueMicrotask2 = require_queue_microtask(); function runParallel(tasks, cb) { - let results, pending, keys2; + let results, pending, keys3; let isSync = true; if (Array.isArray(tasks)) { results = []; pending = tasks.length; } else { - keys2 = Object.keys(tasks); + keys3 = Object.keys(tasks); results = {}; - pending = keys2.length; + pending = keys3.length; } function done(err) { function end() { @@ -43238,8 +43800,8 @@ var require_run_parallel = __commonJS({ } if (!pending) { done(null); - } else if (keys2) { - keys2.forEach(function(key) { + } else if (keys3) { + keys3.forEach(function(key) { tasks[key](function(err, result) { each(key, err, result); }); @@ -43307,13 +43869,13 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fs = void 0; - var fs11 = require_fs3(); - exports.fs = fs11; + var fs12 = require_fs3(); + exports.fs = fs12; } }); // ../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common3 = __commonJS({ +var require_common2 = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -43338,13 +43900,13 @@ var require_async2 = __commonJS({ var rpl = require_run_parallel(); var constants_1 = require_constants7(); var utils = require_utils8(); - var common = require_common3(); + var common = require_common2(); function read2(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); return; } - readdir(directory, settings, callback); + readdir2(directory, settings, callback); } exports.read = read2; function readdirWithFileTypes(directory, settings, callback) { @@ -43393,23 +43955,23 @@ var require_async2 = __commonJS({ }); }; } - function readdir(directory, settings, callback) { + function readdir2(directory, settings, callback) { settings.fs.readdir(directory, (readdirError, names) => { if (readdirError !== null) { callFailureCallback(callback, readdirError); return; } const tasks = names.map((name) => { - const path26 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path27 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path26, settings.fsStatSettings, (error3, stats) => { + fsStat.stat(path27, settings.fsStatSettings, (error3, stats) => { if (error3 !== null) { done(error3); return; } const entry = { name, - path: path26, + path: path27, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -43428,7 +43990,7 @@ var require_async2 = __commonJS({ }); }); } - exports.readdir = readdir; + exports.readdir = readdir2; function callFailureCallback(callback, error3) { callback(error3); } @@ -43447,12 +44009,12 @@ var require_sync2 = __commonJS({ var fsStat = require_out(); var constants_1 = require_constants7(); var utils = require_utils8(); - var common = require_common3(); + var common = require_common2(); function read2(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); } - return readdir(directory, settings); + return readdir2(directory, settings); } exports.read = read2; function readdirWithFileTypes(directory, settings) { @@ -43477,7 +44039,7 @@ var require_sync2 = __commonJS({ }); } exports.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { + function readdir2(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); @@ -43493,7 +44055,7 @@ var require_sync2 = __commonJS({ return entry; }); } - exports.readdir = readdir; + exports.readdir = readdir2; } }); @@ -43503,14 +44065,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); + var fs12 = require("fs"); exports.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.statSync, - readdir: fs11.readdir, - readdirSync: fs11.readdirSync + lstat: fs12.lstat, + stat: fs12.stat, + lstatSync: fs12.lstatSync, + statSync: fs12.statSync, + readdir: fs12.readdir, + readdirSync: fs12.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -43527,15 +44089,15 @@ var require_settings2 = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path26 = require("path"); + var path27 = require("path"); var fsStat = require_out(); - var fs11 = require_fs4(); + var fs12 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs11.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path26.sep); + this.fs = fs12.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path27.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -43562,20 +44124,20 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports.Settings = settings_1.default; - function scandir(path26, optionsOrSettingsOrCallback, callback) { + function scandir(path27, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path26, getSettings2(), optionsOrSettingsOrCallback); + async.read(path27, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path26, getSettings2(optionsOrSettingsOrCallback), callback); + async.read(path27, getSettings(optionsOrSettingsOrCallback), callback); } exports.scandir = scandir; - function scandirSync(path26, optionsOrSettings) { - const settings = getSettings2(optionsOrSettings); - return sync.read(path26, settings); + function scandirSync(path27, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path27, settings); } exports.scandirSync = scandirSync; - function getSettings2(settingsOrOptions = {}) { + function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } @@ -43629,7 +44191,7 @@ var require_queue = __commonJS({ if (concurrency < 1) { throw new Error("fastqueue concurrency must be greater than 1"); } - var cache2 = reusify(Task); + var cache4 = reusify(Task); var queueHead = null; var queueTail = null; var _running = 0; @@ -43690,7 +44252,7 @@ var require_queue = __commonJS({ return _running === 0 && self.length() === 0; } function push(value, done) { - var current = cache2.get(); + var current = cache4.get(); current.context = context; current.release = release; current.value = value; @@ -43711,7 +44273,7 @@ var require_queue = __commonJS({ } } function unshift(value, done) { - var current = cache2.get(); + var current = cache4.get(); current.context = context; current.release = release; current.value = value; @@ -43732,7 +44294,7 @@ var require_queue = __commonJS({ } function release(holder) { if (holder) { - cache2.release(holder); + cache4.release(holder); } var next = queueHead; if (next) { @@ -43810,26 +44372,26 @@ var require_queue = __commonJS({ queue.drained = drained; return queue; function push(value) { - var p = new Promise(function(resolve13, reject) { + var p = new Promise(function(resolve12, reject) { pushCb(value, function(err, result) { if (err) { reject(err); return; } - resolve13(result); + resolve12(result); }); }); p.catch(noop); return p; } function unshift(value) { - var p = new Promise(function(resolve13, reject) { + var p = new Promise(function(resolve12, reject) { unshiftCb(value, function(err, result) { if (err) { reject(err); return; } - resolve13(result); + resolve12(result); }); }); p.catch(noop); @@ -43837,15 +44399,15 @@ var require_queue = __commonJS({ } function drained() { if (queue.idle()) { - return new Promise(function(resolve13) { - resolve13(); + return new Promise(function(resolve12) { + resolve12(); }); } var previousDrain = queue.drain; - var p = new Promise(function(resolve13) { + var p = new Promise(function(resolve12) { queue.drain = function() { previousDrain(); - resolve13(); + resolve12(); }; }); return p; @@ -43857,7 +44419,7 @@ var require_queue = __commonJS({ }); // ../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -43895,7 +44457,7 @@ var require_reader = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var common = require_common4(); + var common = require_common3(); var Reader = class { constructor(_root, _settings) { this._root = _root; @@ -43915,7 +44477,7 @@ var require_async3 = __commonJS({ var events_1 = require("events"); var fsScandir = require_out2(); var fastq = require_queue(); - var common = require_common4(); + var common = require_common3(); var reader_1 = require_reader(); var AsyncReader = class extends reader_1.default { constructor(_root, _settings) { @@ -44093,7 +44655,7 @@ var require_sync3 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var fsScandir = require_out2(); - var common = require_common4(); + var common = require_common3(); var reader_1 = require_reader(); var SyncReader = class extends reader_1.default { constructor() { @@ -44176,7 +44738,7 @@ var require_settings3 = __commonJS({ "../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path26 = require("path"); + var path27 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -44186,7 +44748,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path26.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path27.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -44216,25 +44778,25 @@ var require_out3 = __commonJS({ exports.Settings = settings_1.default; function walk4(directory, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings2()).read(optionsOrSettingsOrCallback); + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); return; } - new async_1.default(directory, getSettings2(optionsOrSettingsOrCallback)).read(callback); + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); } exports.walk = walk4; function walkSync(directory, optionsOrSettings) { - const settings = getSettings2(optionsOrSettings); + const settings = getSettings(optionsOrSettings); const provider = new sync_1.default(directory, settings); return provider.read(); } exports.walkSync = walkSync; function walkStream(directory, optionsOrSettings) { - const settings = getSettings2(optionsOrSettings); + const settings = getSettings(optionsOrSettings); const provider = new stream_1.default(directory, settings); return provider.read(); } exports.walkStream = walkStream; - function getSettings2(settingsOrOptions = {}) { + function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } @@ -44248,7 +44810,7 @@ var require_reader2 = __commonJS({ "../node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/readers/reader.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path26 = require("path"); + var path27 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -44261,7 +44823,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path26.resolve(this._settings.cwd, filepath); + return path27.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -44328,9 +44890,9 @@ var require_stream3 = __commonJS({ }); } _getStat(filepath) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { this._stat(filepath, this._fsStatSettings, (error3, stats) => { - return error3 === null ? resolve13(stats) : reject(error3); + return error3 === null ? resolve12(stats) : reject(error3); }); }); } @@ -44354,10 +44916,10 @@ var require_async5 = __commonJS({ this._readerStream = new stream_1.default(this._settings); } dynamic(root, options) { - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { this._walkAsync(root, options, (error3, entries) => { if (error3 === null) { - resolve13(entries); + resolve12(entries); } else { reject(error3); } @@ -44367,10 +44929,10 @@ var require_async5 = __commonJS({ async static(patterns, options) { const entries = []; const stream = this._readerStream.static(patterns, options); - return new Promise((resolve13, reject) => { + return new Promise((resolve12, reject) => { stream.once("error", reject); stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve13(entries)); + stream.once("end", () => resolve12(entries)); }); } }; @@ -44559,8 +45121,8 @@ var require_entry = __commonJS({ if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) { return false; } - const isDirectory = entry.dirent.isDirectory(); - const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory); + const isDirectory2 = entry.dirent.isDirectory(); + const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory2) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory2); if (this._settings.unique && isMatched) { this._createIndexRecord(filepath); } @@ -44585,9 +45147,9 @@ var require_entry = __commonJS({ const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); return utils.pattern.matchAny(fullpath, patternsRe); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -44655,7 +45217,7 @@ var require_provider = __commonJS({ "../node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/provider.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path26 = require("path"); + var path27 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -44669,7 +45231,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path26.resolve(this._settings.cwd, task.base); + return path27.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -44850,16 +45412,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); - var os5 = require("os"); - var CPU_COUNT = Math.max(os5.cpus().length, 1); + var fs12 = require("fs"); + var os6 = require("os"); + var CPU_COUNT = Math.max(os6.cpus().length, 1); exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - lstatSync: fs11.lstatSync, - stat: fs11.stat, - statSync: fs11.statSync, - readdir: fs11.readdir, - readdirSync: fs11.readdirSync + lstat: fs12.lstat, + lstatSync: fs12.lstatSync, + stat: fs12.stat, + statSync: fs12.statSync, + readdir: fs12.readdir, + readdirSync: fs12.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -45008,7 +45570,7 @@ var require_out4 = __commonJS({ // ../node_modules/.pnpm/json-buffer@3.0.1/node_modules/json-buffer/index.js var require_json_buffer = __commonJS({ "../node_modules/.pnpm/json-buffer@3.0.1/node_modules/json-buffer/index.js"(exports) { - exports.stringify = function stringify2(o) { + exports.stringify = function stringify4(o) { if ("undefined" == typeof o) return o; if (o && Buffer.isBuffer(o)) @@ -45030,9 +45592,9 @@ var require_json_buffer = __commonJS({ if (o[k] == void 0) s += "null"; else - s += stringify2(o[k]); + s += stringify4(o[k]); } else if (o[k] !== void 0) { - s += stringify2(k) + ":" + stringify2(o[k]); + s += stringify4(k) + ":" + stringify4(o[k]); } } } @@ -45141,17 +45703,17 @@ var require_src3 = __commonJS({ _getKeyPrefix(key) { return `${this.opts.namespace}:${key}`; } - _getKeyPrefixArray(keys2) { - return keys2.map((key) => `${this.opts.namespace}:${key}`); + _getKeyPrefixArray(keys3) { + return keys3.map((key) => `${this.opts.namespace}:${key}`); } _getKeyUnprefix(key) { return key.split(":").splice(1).join(":"); } get(key, options) { const { store } = this.opts; - const isArray2 = Array.isArray(key); - const keyPrefixed = isArray2 ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); - if (isArray2 && store.getMany === void 0) { + const isArray3 = Array.isArray(key); + const keyPrefixed = isArray3 ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); + if (isArray3 && store.getMany === void 0) { const promises = []; for (const key2 of keyPrefixed) { promises.push( @@ -45174,11 +45736,11 @@ var require_src3 = __commonJS({ return data; }); } - return Promise.resolve().then(() => isArray2 ? store.getMany(keyPrefixed) : store.get(keyPrefixed)).then((data) => typeof data === "string" ? this.opts.deserialize(data) : this.opts.compression ? this.opts.deserialize(data) : data).then((data) => { + return Promise.resolve().then(() => isArray3 ? store.getMany(keyPrefixed) : store.get(keyPrefixed)).then((data) => typeof data === "string" ? this.opts.deserialize(data) : this.opts.compression ? this.opts.deserialize(data) : data).then((data) => { if (data === void 0 || data === null) { return void 0; } - if (isArray2) { + if (isArray3) { return data.map((row, index) => { if (typeof row === "string") { row = this.opts.deserialize(row); @@ -45264,7 +45826,7 @@ var require_cjs = __commonJS({ "../node_modules/.pnpm/flatted@3.2.9/node_modules/flatted/cjs/index.js"(exports) { "use strict"; var { parse: $parse, stringify: $stringify } = JSON; - var { keys: keys2 } = Object; + var { keys: keys3 } = Object; var Primitive = String; var primitive = "string"; var ignore = {}; @@ -45274,7 +45836,7 @@ var require_cjs = __commonJS({ var Primitives = (_, value) => typeof value === primitive ? new Primitive(value) : value; var revive = (input, parsed, output, $) => { const lazy = []; - for (let ke = keys2(output), { length } = ke, y = 0; y < length; y++) { + for (let ke = keys3(output), { length } = ke, y = 0; y < length; y++) { const k = ke[y]; const value = output[k]; if (value instanceof Primitive) { @@ -45299,15 +45861,15 @@ var require_cjs = __commonJS({ known.set(value, index); return index; }; - var parse4 = (text, reviver) => { + var parse5 = (text, reviver) => { const input = $parse(text, Primitives).map(primitives); const value = input[0]; const $ = reviver || noop; const tmp = typeof value === object && value ? revive(input, /* @__PURE__ */ new Set(), value, $) : value; return $.call({ "": tmp }, "", tmp); }; - exports.parse = parse4; - var stringify2 = (value, replacer, space) => { + exports.parse = parse5; + var stringify4 = (value, replacer, space) => { const $ = replacer && typeof replacer === object ? (k, v) => k === "" || -1 < replacer.indexOf(k) ? v : void 0 : replacer || noop; const known = /* @__PURE__ */ new Map(); const input = []; @@ -45335,10 +45897,10 @@ var require_cjs = __commonJS({ return after; } }; - exports.stringify = stringify2; - var toJSON = (any3) => $parse(stringify2(any3)); + exports.stringify = stringify4; + var toJSON = (any3) => $parse(stringify4(any3)); exports.toJSON = toJSON; - var fromJSON = (any3) => parse4($stringify(any3)); + var fromJSON = (any3) => parse5($stringify(any3)); exports.fromJSON = fromJSON; } }); @@ -45346,8 +45908,8 @@ var require_cjs = __commonJS({ // ../node_modules/.pnpm/flat-cache@3.2.0/node_modules/flat-cache/src/utils.js var require_utils9 = __commonJS({ "../node_modules/.pnpm/flat-cache@3.2.0/node_modules/flat-cache/src/utils.js"(exports, module2) { - var fs11 = require("fs"); - var path26 = require("path"); + var fs12 = require("fs"); + var path27 = require("path"); var flatted = require_cjs(); module2.exports = { tryParse: function(filePath, defaultValue) { @@ -45368,7 +45930,7 @@ var require_utils9 = __commonJS({ */ readJSON: function(filePath) { return flatted.parse( - fs11.readFileSync(filePath, { + fs12.readFileSync(filePath, { encoding: "utf8" }) ); @@ -45381,10 +45943,10 @@ var require_utils9 = __commonJS({ * @param {*} data Object to serialize */ writeJSON: function(filePath, data) { - fs11.mkdirSync(path26.dirname(filePath), { + fs12.mkdirSync(path27.dirname(filePath), { recursive: true }); - fs11.writeFileSync(filePath, flatted.stringify(data)); + fs12.writeFileSync(filePath, flatted.stringify(data)); } }; } @@ -45395,7 +45957,7 @@ var require_old = __commonJS({ "../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) { var pathModule = require("path"); var isWindows2 = process.platform === "win32"; - var fs11 = require("fs"); + var fs12 = require("fs"); var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); function rethrow() { var callback; @@ -45442,10 +46004,10 @@ var require_old = __commonJS({ splitRootRe = /^[\/]*/; } var splitRootRe; - exports.realpathSync = function realpathSync2(p, cache2) { + exports.realpathSync = function realpathSync2(p, cache4) { p = pathModule.resolve(p); - if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) { - return cache2[p]; + if (cache4 && Object.prototype.hasOwnProperty.call(cache4, p)) { + return cache4[p]; } var original = p, seenLinks = {}, knownHard = {}; var pos; @@ -45460,7 +46022,7 @@ var require_old = __commonJS({ base = m[0]; previous = ""; if (isWindows2 && !knownHard[base]) { - fs11.lstatSync(base); + fs12.lstatSync(base); knownHard[base] = true; } } @@ -45471,52 +46033,52 @@ var require_old = __commonJS({ current += result[0]; base = previous + result[1]; pos = nextPartRe.lastIndex; - if (knownHard[base] || cache2 && cache2[base] === base) { + if (knownHard[base] || cache4 && cache4[base] === base) { continue; } var resolvedLink; - if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) { - resolvedLink = cache2[base]; + if (cache4 && Object.prototype.hasOwnProperty.call(cache4, base)) { + resolvedLink = cache4[base]; } else { - var stat2 = fs11.lstatSync(base); - if (!stat2.isSymbolicLink()) { + var stat4 = fs12.lstatSync(base); + if (!stat4.isSymbolicLink()) { knownHard[base] = true; - if (cache2) - cache2[base] = base; + if (cache4) + cache4[base] = base; continue; } var linkTarget = null; if (!isWindows2) { - var id = stat2.dev.toString(32) + ":" + stat2.ino.toString(32); + var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { linkTarget = seenLinks[id]; } } if (linkTarget === null) { - fs11.statSync(base); - linkTarget = fs11.readlinkSync(base); + fs12.statSync(base); + linkTarget = fs12.readlinkSync(base); } resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache2) - cache2[base] = resolvedLink; + if (cache4) + cache4[base] = resolvedLink; if (!isWindows2) seenLinks[id] = linkTarget; } p = pathModule.resolve(resolvedLink, p.slice(pos)); start(); } - if (cache2) - cache2[original] = p; + if (cache4) + cache4[original] = p; return p; }; - exports.realpath = function realpath(p, cache2, cb) { + exports.realpath = function realpath(p, cache4, cb) { if (typeof cb !== "function") { - cb = maybeCallback(cache2); - cache2 = null; + cb = maybeCallback(cache4); + cache4 = null; } p = pathModule.resolve(p); - if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) { - return process.nextTick(cb.bind(null, null, cache2[p])); + if (cache4 && Object.prototype.hasOwnProperty.call(cache4, p)) { + return process.nextTick(cb.bind(null, null, cache4[p])); } var original = p, seenLinks = {}, knownHard = {}; var pos; @@ -45531,7 +46093,7 @@ var require_old = __commonJS({ base = m[0]; previous = ""; if (isWindows2 && !knownHard[base]) { - fs11.lstat(base, function(err) { + fs12.lstat(base, function(err) { if (err) return cb(err); knownHard[base] = true; @@ -45543,8 +46105,8 @@ var require_old = __commonJS({ } function LOOP() { if (pos >= p.length) { - if (cache2) - cache2[original] = p; + if (cache4) + cache4[original] = p; return cb(null, p); } nextPartRe.lastIndex = pos; @@ -45553,33 +46115,33 @@ var require_old = __commonJS({ current += result[0]; base = previous + result[1]; pos = nextPartRe.lastIndex; - if (knownHard[base] || cache2 && cache2[base] === base) { + if (knownHard[base] || cache4 && cache4[base] === base) { return process.nextTick(LOOP); } - if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) { - return gotResolvedLink(cache2[base]); + if (cache4 && Object.prototype.hasOwnProperty.call(cache4, base)) { + return gotResolvedLink(cache4[base]); } - return fs11.lstat(base, gotStat); + return fs12.lstat(base, gotStat); } - function gotStat(err, stat2) { + function gotStat(err, stat4) { if (err) return cb(err); - if (!stat2.isSymbolicLink()) { + if (!stat4.isSymbolicLink()) { knownHard[base] = true; - if (cache2) - cache2[base] = base; + if (cache4) + cache4[base] = base; return process.nextTick(LOOP); } if (!isWindows2) { - var id = stat2.dev.toString(32) + ":" + stat2.ino.toString(32); + var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { return gotTarget(null, seenLinks[id], base); } } - fs11.stat(base, function(err2) { + fs12.stat(base, function(err2) { if (err2) return cb(err2); - fs11.readlink(base, function(err3, target) { + fs12.readlink(base, function(err3, target) { if (!isWindows2) seenLinks[id] = target; gotTarget(err3, target); @@ -45590,8 +46152,8 @@ var require_old = __commonJS({ if (err) return cb(err); var resolvedLink = pathModule.resolve(previous, target); - if (cache2) - cache2[base2] = resolvedLink; + if (cache4) + cache4[base2] = resolvedLink; gotResolvedLink(resolvedLink); } function gotResolvedLink(resolvedLink) { @@ -45611,52 +46173,52 @@ var require_fs5 = __commonJS({ realpath.realpathSync = realpathSync2; realpath.monkeypatch = monkeypatch; realpath.unmonkeypatch = unmonkeypatch; - var fs11 = require("fs"); - var origRealpath = fs11.realpath; - var origRealpathSync = fs11.realpathSync; + var fs12 = require("fs"); + var origRealpath = fs12.realpath; + var origRealpathSync = fs12.realpathSync; var version4 = process.version; var ok = /^v[0-5]\./.test(version4); var old = require_old(); function newError(er) { return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); } - function realpath(p, cache2, cb) { + function realpath(p, cache4, cb) { if (ok) { - return origRealpath(p, cache2, cb); + return origRealpath(p, cache4, cb); } - if (typeof cache2 === "function") { - cb = cache2; - cache2 = null; + if (typeof cache4 === "function") { + cb = cache4; + cache4 = null; } - origRealpath(p, cache2, function(er, result) { + origRealpath(p, cache4, function(er, result) { if (newError(er)) { - old.realpath(p, cache2, cb); + old.realpath(p, cache4, cb); } else { cb(er, result); } }); } - function realpathSync2(p, cache2) { + function realpathSync2(p, cache4) { if (ok) { - return origRealpathSync(p, cache2); + return origRealpathSync(p, cache4); } try { - return origRealpathSync(p, cache2); + return origRealpathSync(p, cache4); } catch (er) { if (newError(er)) { - return old.realpathSync(p, cache2); + return old.realpathSync(p, cache4); } else { throw er; } } } function monkeypatch() { - fs11.realpath = realpath; - fs11.realpathSync = realpathSync2; + fs12.realpath = realpath; + fs12.realpathSync = realpathSync2; } function unmonkeypatch() { - fs11.realpath = origRealpath; - fs11.realpathSync = origRealpathSync; + fs12.realpath = origRealpath; + fs12.realpathSync = origRealpathSync; } } }); @@ -45668,14 +46230,14 @@ var require_concat_map = __commonJS({ var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); - if (isArray2(x)) + if (isArray3(x)) res.push.apply(res, x); else res.push(x); } return res; }; - var isArray2 = Array.isArray || function(xs) { + var isArray3 = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; } @@ -45891,7 +46453,7 @@ var require_minimatch = __commonJS({ "../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path26 = function() { + var path27 = function() { try { return require("path"); } catch (e) { @@ -45899,7 +46461,7 @@ var require_minimatch = __commonJS({ }() || { sep: "/" }; - minimatch.sep = path26.sep; + minimatch.sep = path27.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -45990,8 +46552,8 @@ var require_minimatch = __commonJS({ if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path26.sep !== "/") { - pattern = pattern.split(path26.sep).join("/"); + if (!options.allowWindowsEscape && path27.sep !== "/") { + pattern = pattern.split(path27.sep).join("/"); } this.options = options; this.set = []; @@ -46082,9 +46644,9 @@ var require_minimatch = __commonJS({ throw new TypeError("pattern is too long"); } }; - Minimatch.prototype.parse = parse4; + Minimatch.prototype.parse = parse5; var SUBPARSE = {}; - function parse4(pattern, isSub) { + function parse5(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { @@ -46368,8 +46930,8 @@ var require_minimatch = __commonJS({ if (f === "/" && partial) return true; var options = this.options; - if (path26.sep !== "/") { - f = f.split(path26.sep).join("/"); + if (path27.sep !== "/") { + f = f.split(path27.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -46527,12 +47089,12 @@ var require_inherits = __commonJS({ var require_path_is_absolute = __commonJS({ "../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports, module2) { "use strict"; - function posix4(path26) { - return path26.charAt(0) === "/"; + function posix4(path27) { + return path27.charAt(0) === "/"; } - function win32(path26) { + function win32(path27) { var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path26); + var result = splitDeviceRe.exec(path27); var device = result[1] || ""; var isUnc = Boolean(device && device.charAt(1) !== ":"); return Boolean(result[2] || isUnc); @@ -46544,7 +47106,7 @@ var require_path_is_absolute = __commonJS({ }); // ../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js -var require_common5 = __commonJS({ +var require_common4 = __commonJS({ "../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports) { exports.setopts = setopts; exports.ownProp = ownProp; @@ -46556,10 +47118,10 @@ var require_common5 = __commonJS({ function ownProp(obj, field) { return Object.prototype.hasOwnProperty.call(obj, field); } - var fs11 = require("fs"); - var path26 = require("path"); + var fs12 = require("fs"); + var path27 = require("path"); var minimatch = require_minimatch(); - var isAbsolute = require_path_is_absolute(); + var isAbsolute2 = require_path_is_absolute(); var Minimatch = minimatch.Minimatch; function alphasort(a, b) { return a.localeCompare(b, "en"); @@ -46611,7 +47173,7 @@ var require_common5 = __commonJS({ self.stat = !!options.stat; self.noprocess = !!options.noprocess; self.absolute = !!options.absolute; - self.fs = options.fs || fs11; + self.fs = options.fs || fs12; self.maxLength = options.maxLength || Infinity; self.cache = options.cache || /* @__PURE__ */ Object.create(null); self.statCache = options.statCache || /* @__PURE__ */ Object.create(null); @@ -46622,14 +47184,14 @@ var require_common5 = __commonJS({ if (!ownProp(options, "cwd")) self.cwd = cwd; else { - self.cwd = path26.resolve(options.cwd); + self.cwd = path27.resolve(options.cwd); self.changedCwd = self.cwd !== cwd; } - self.root = options.root || path26.resolve(self.cwd, "/"); - self.root = path26.resolve(self.root); + self.root = options.root || path27.resolve(self.cwd, "/"); + self.root = path27.resolve(self.root); if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/"); - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd); + self.cwdAbs = isAbsolute2(self.cwd) ? self.cwd : makeAbs(self, self.cwd); if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/"); self.nomount = !!options.nomount; @@ -46708,30 +47270,30 @@ var require_common5 = __commonJS({ function makeAbs(self, f) { var abs = f; if (f.charAt(0) === "/") { - abs = path26.join(self.root, f); - } else if (isAbsolute(f) || f === "") { + abs = path27.join(self.root, f); + } else if (isAbsolute2(f) || f === "") { abs = f; } else if (self.changedCwd) { - abs = path26.resolve(self.cwd, f); + abs = path27.resolve(self.cwd, f); } else { - abs = path26.resolve(f); + abs = path27.resolve(f); } if (process.platform === "win32") abs = abs.replace(/\\/g, "/"); return abs; } - function isIgnored(self, path27) { + function isIgnored(self, path28) { if (!self.ignore.length) return false; return self.ignore.some(function(item) { - return item.matcher.match(path27) || !!(item.gmatcher && item.gmatcher.match(path27)); + return item.matcher.match(path28) || !!(item.gmatcher && item.gmatcher.match(path28)); }); } - function childrenIgnored(self, path27) { + function childrenIgnored(self, path28) { if (!self.ignore.length) return false; return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path27)); + return !!(item.gmatcher && item.gmatcher.match(path28)); }); } } @@ -46747,10 +47309,10 @@ var require_sync7 = __commonJS({ var Minimatch = minimatch.Minimatch; var Glob = require_glob().Glob; var util = require("util"); - var path26 = require("path"); + var path27 = require("path"); var assert22 = require("assert"); - var isAbsolute = require_path_is_absolute(); - var common = require_common5(); + var isAbsolute2 = require_path_is_absolute(); + var common = require_common4(); var setopts = common.setopts; var ownProp = common.ownProp; var childrenIgnored = common.childrenIgnored; @@ -46821,10 +47383,10 @@ var require_sync7 = __commonJS({ var read2; if (prefix === null) read2 = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + else if (isAbsolute2(prefix) || isAbsolute2(pattern.map(function(p) { return typeof p === "string" ? p : "[*]"; }).join("/"))) { - if (!prefix || !isAbsolute(prefix)) + if (!prefix || !isAbsolute2(prefix)) prefix = "/" + prefix; read2 = prefix; } else @@ -46875,7 +47437,7 @@ var require_sync7 = __commonJS({ e = prefix + e; } if (e.charAt(0) === "/" && !this.nomount) { - e = path26.join(this.root, e); + e = path27.join(this.root, e); } this._emitMatch(index, e); } @@ -46917,7 +47479,7 @@ var require_sync7 = __commonJS({ return this._readdir(abs, false); var entries; var lstat; - var stat2; + var stat4; try { lstat = this.fs.lstatSync(abs); } catch (er) { @@ -47021,12 +47583,12 @@ var require_sync7 = __commonJS({ this.matches[index] = /* @__PURE__ */ Object.create(null); if (!exists) return; - if (prefix && isAbsolute(prefix) && !this.nomount) { + if (prefix && isAbsolute2(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === "/") { - prefix = path26.join(this.root, prefix); + prefix = path27.join(this.root, prefix); } else { - prefix = path26.resolve(this.root, prefix); + prefix = path27.resolve(this.root, prefix); if (trail) prefix += "/"; } @@ -47050,8 +47612,8 @@ var require_sync7 = __commonJS({ return false; } var exists; - var stat2 = this.statCache[abs]; - if (!stat2) { + var stat4 = this.statCache[abs]; + if (!stat4) { var lstat; try { lstat = this.fs.lstatSync(abs); @@ -47063,18 +47625,18 @@ var require_sync7 = __commonJS({ } if (lstat && lstat.isSymbolicLink()) { try { - stat2 = this.fs.statSync(abs); + stat4 = this.fs.statSync(abs); } catch (er) { - stat2 = lstat; + stat4 = lstat; } } else { - stat2 = lstat; + stat4 = lstat; } } - this.statCache[abs] = stat2; + this.statCache[abs] = stat4; var c = true; - if (stat2) - c = stat2.isDirectory() ? "DIR" : "FILE"; + if (stat4) + c = stat4.isDirectory() ? "DIR" : "FILE"; this.cache[abs] = this.cache[abs] || c; if (needDir && c === "FILE") return false; @@ -47145,11 +47707,11 @@ var require_glob = __commonJS({ var Minimatch = minimatch.Minimatch; var inherits = require_inherits(); var EE = require("events").EventEmitter; - var path26 = require("path"); + var path27 = require("path"); var assert22 = require("assert"); - var isAbsolute = require_path_is_absolute(); + var isAbsolute2 = require_path_is_absolute(); var globSync = require_sync7(); - var common = require_common5(); + var common = require_common4(); var setopts = common.setopts; var ownProp = common.ownProp; var inflight = require_inflight(); @@ -47176,10 +47738,10 @@ var require_glob = __commonJS({ if (add === null || typeof add !== "object") { return origin; } - var keys2 = Object.keys(add); - var i = keys2.length; + var keys3 = Object.keys(add); + var i = keys3.length; while (i--) { - origin[keys2[i]] = add[keys2[i]]; + origin[keys3[i]] = add[keys3[i]]; } return origin; } @@ -47369,10 +47931,10 @@ var require_glob = __commonJS({ var read2; if (prefix === null) read2 = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + else if (isAbsolute2(prefix) || isAbsolute2(pattern.map(function(p) { return typeof p === "string" ? p : "[*]"; }).join("/"))) { - if (!prefix || !isAbsolute(prefix)) + if (!prefix || !isAbsolute2(prefix)) prefix = "/" + prefix; read2 = prefix; } else @@ -47428,7 +47990,7 @@ var require_glob = __commonJS({ e = prefix + e; } if (e.charAt(0) === "/" && !this.nomount) { - e = path26.join(this.root, e); + e = path27.join(this.root, e); } this._emitMatch(index, e); } @@ -47457,7 +48019,7 @@ var require_glob = __commonJS({ this._emitQueue.push([index, e]); return; } - var abs = isAbsolute(e) ? e : this._makeAbs(e); + var abs = isAbsolute2(e) ? e : this._makeAbs(e); if (this.mark) e = this._mark(e); if (this.absolute) @@ -47612,12 +48174,12 @@ var require_glob = __commonJS({ this.matches[index] = /* @__PURE__ */ Object.create(null); if (!exists) return cb(); - if (prefix && isAbsolute(prefix) && !this.nomount) { + if (prefix && isAbsolute2(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === "/") { - prefix = path26.join(this.root, prefix); + prefix = path27.join(this.root, prefix); } else { - prefix = path26.resolve(this.root, prefix); + prefix = path27.resolve(this.root, prefix); if (trail) prefix += "/"; } @@ -47642,16 +48204,16 @@ var require_glob = __commonJS({ return cb(); } var exists; - var stat2 = this.statCache[abs]; - if (stat2 !== void 0) { - if (stat2 === false) - return cb(null, stat2); + var stat4 = this.statCache[abs]; + if (stat4 !== void 0) { + if (stat4 === false) + return cb(null, stat4); else { - var type = stat2.isDirectory() ? "DIR" : "FILE"; + var type = stat4.isDirectory() ? "DIR" : "FILE"; if (needDir && type === "FILE") return cb(); else - return cb(null, type, stat2); + return cb(null, type, stat4); } } var self = this; @@ -47660,33 +48222,33 @@ var require_glob = __commonJS({ self.fs.lstat(abs, statcb); function lstatcb_(er, lstat) { if (lstat && lstat.isSymbolicLink()) { - return self.fs.stat(abs, function(er2, stat3) { + return self.fs.stat(abs, function(er2, stat5) { if (er2) self._stat2(f, abs, null, lstat, cb); else - self._stat2(f, abs, er2, stat3, cb); + self._stat2(f, abs, er2, stat5, cb); }); } else { self._stat2(f, abs, er, lstat, cb); } } }; - Glob.prototype._stat2 = function(f, abs, er, stat2, cb) { + Glob.prototype._stat2 = function(f, abs, er, stat4, cb) { if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { this.statCache[abs] = false; return cb(); } var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat2; - if (abs.slice(-1) === "/" && stat2 && !stat2.isDirectory()) - return cb(null, false, stat2); + this.statCache[abs] = stat4; + if (abs.slice(-1) === "/" && stat4 && !stat4.isDirectory()) + return cb(null, false, stat4); var c = true; - if (stat2) - c = stat2.isDirectory() ? "DIR" : "FILE"; + if (stat4) + c = stat4.isDirectory() ? "DIR" : "FILE"; this.cache[abs] = this.cache[abs] || c; if (needDir && c === "FILE") return cb(); - return cb(null, c, stat2); + return cb(null, c, stat4); }; } }); @@ -47695,8 +48257,8 @@ var require_glob = __commonJS({ var require_rimraf = __commonJS({ "../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports, module2) { var assert22 = require("assert"); - var path26 = require("path"); - var fs11 = require("fs"); + var path27 = require("path"); + var fs12 = require("fs"); var glob2 = void 0; try { glob2 = require_glob(); @@ -47718,9 +48280,9 @@ var require_rimraf = __commonJS({ "readdir" ]; methods.forEach((m) => { - options[m] = options[m] || fs11[m]; + options[m] = options[m] || fs12[m]; m = m + "Sync"; - options[m] = options[m] || fs11[m]; + options[m] = options[m] || fs12[m]; }); options.maxBusyTries = options.maxBusyTries || 3; options.emfileWait = options.emfileWait || 1e3; @@ -47779,7 +48341,7 @@ var require_rimraf = __commonJS({ }; if (options.disableGlob || !glob2.hasMagic(p)) return afterGlob(null, [p]); - options.lstat(p, (er, stat2) => { + options.lstat(p, (er, stat4) => { if (!er) return afterGlob(null, [p]); glob2(p, options.glob, afterGlob); @@ -47877,7 +48439,7 @@ var require_rimraf = __commonJS({ return options.rmdir(p, cb); let errState; files.forEach((f) => { - rimraf(path26.join(p, f), options, (er2) => { + rimraf(path27.join(p, f), options, (er2) => { if (errState) return; if (er2) @@ -47952,7 +48514,7 @@ var require_rimraf = __commonJS({ var rmkidsSync = (p, options) => { assert22(p); assert22(options); - options.readdirSync(p).forEach((f) => rimrafSync(path26.join(p, f), options)); + options.readdirSync(p).forEach((f) => rimrafSync(path27.join(p, f), options)); const retries = isWindows2 ? 100 : 1; let i = 0; do { @@ -47976,9 +48538,9 @@ var require_rimraf = __commonJS({ var require_del = __commonJS({ "../node_modules/.pnpm/flat-cache@3.2.0/node_modules/flat-cache/src/del.js"(exports, module2) { var rimraf = require_rimraf().sync; - var fs11 = require("fs"); + var fs12 = require("fs"); module2.exports = function del(file) { - if (fs11.existsSync(file)) { + if (fs12.existsSync(file)) { rimraf(file, { glob: false }); @@ -47992,13 +48554,13 @@ var require_del = __commonJS({ // ../node_modules/.pnpm/flat-cache@3.2.0/node_modules/flat-cache/src/cache.js var require_cache2 = __commonJS({ "../node_modules/.pnpm/flat-cache@3.2.0/node_modules/flat-cache/src/cache.js"(exports, module2) { - var path26 = require("path"); - var fs11 = require("fs"); + var path27 = require("path"); + var fs12 = require("fs"); var Keyv = require_src3(); var utils = require_utils9(); var del = require_del(); var writeJSON = utils.writeJSON; - var cache2 = { + var cache4 = { /** * Load a cache identified by the given Id. If the element does not exists, then initialize an empty * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted @@ -48013,8 +48575,8 @@ var require_cache2 = __commonJS({ me.keyv = new Keyv(); me.__visited = {}; me.__persisted = {}; - me._pathToFile = cacheDir ? path26.resolve(cacheDir, docId) : path26.resolve(__dirname, "../.cache/", docId); - if (fs11.existsSync(me._pathToFile)) { + me._pathToFile = cacheDir ? path27.resolve(cacheDir, docId) : path27.resolve(__dirname, "../.cache/", docId); + if (fs12.existsSync(me._pathToFile)) { me._persisted = utils.tryParse(me._pathToFile, {}); } }, @@ -48039,8 +48601,8 @@ var require_cache2 = __commonJS({ */ loadFile: function(pathToFile) { var me = this; - var dir = path26.dirname(pathToFile); - var fName = path26.basename(pathToFile); + var dir = path27.dirname(pathToFile); + var fName = path27.basename(pathToFile); me.load(fName, dir); }, /** @@ -48092,11 +48654,11 @@ var require_cache2 = __commonJS({ _prune: function() { var me = this; var obj = {}; - var keys2 = Object.keys(me._visited); - if (keys2.length === 0) { + var keys3 = Object.keys(me._visited); + if (keys3.length === 0) { return; } - keys2.forEach(function(key) { + keys3.forEach(function(key) { obj[key] = me._persisted[key]; }); me._visited = {}; @@ -48154,12 +48716,12 @@ var require_cache2 = __commonJS({ * @returns {cache} cache instance */ create: function(docId, cacheDir) { - var obj = Object.create(cache2); + var obj = Object.create(cache4); obj.load(docId, cacheDir); return obj; }, createFromFile: function(filePath) { - var obj = Object.create(cache2); + var obj = Object.create(cache4); obj.loadFile(filePath); return obj; }, @@ -48172,7 +48734,7 @@ var require_cache2 = __commonJS({ * @returns {Boolean} true if the cache folder was deleted. False otherwise */ clearCacheById: function(docId, cacheDir) { - var filePath = cacheDir ? path26.resolve(cacheDir, docId) : path26.resolve(__dirname, "../.cache/", docId); + var filePath = cacheDir ? path27.resolve(cacheDir, docId) : path27.resolve(__dirname, "../.cache/", docId); return del(filePath); }, /** @@ -48181,7 +48743,7 @@ var require_cache2 = __commonJS({ * @returns {Boolean} true if the cache folder was deleted. False otherwise */ clearAll: function(cacheDir) { - var filePath = cacheDir ? path26.resolve(cacheDir) : path26.resolve(__dirname, "../.cache/"); + var filePath = cacheDir ? path27.resolve(cacheDir) : path27.resolve(__dirname, "../.cache/"); return del(filePath); } }; @@ -48191,27 +48753,27 @@ var require_cache2 = __commonJS({ // ../node_modules/.pnpm/file-entry-cache@7.0.2/node_modules/file-entry-cache/cache.js var require_cache3 = __commonJS({ "../node_modules/.pnpm/file-entry-cache@7.0.2/node_modules/file-entry-cache/cache.js"(exports, module2) { - var path26 = require("path"); + var path27 = require("path"); var crypto6 = require("crypto"); module2.exports = { createFromFile: function(filePath, useChecksum) { - var fname = path26.basename(filePath); - var dir = path26.dirname(filePath); + var fname = path27.basename(filePath); + var dir = path27.dirname(filePath); return this.create(fname, dir, useChecksum); }, create: function(cacheId, _path, useChecksum) { - var fs11 = require("fs"); + var fs12 = require("fs"); var flatCache = require_cache2(); - var cache2 = flatCache.load(cacheId, _path); + var cache4 = flatCache.load(cacheId, _path); var normalizedEntries = {}; var removeNotFoundFiles = function removeNotFoundFiles2() { - const cachedEntries = cache2.keys(); + const cachedEntries = cache4.keys(); cachedEntries.forEach(function remover(fPath) { try { - fs11.statSync(fPath); + fs12.statSync(fPath); } catch (err) { if (err.code === "ENOENT") { - cache2.removeKey(fPath); + cache4.removeKey(fPath); } } }); @@ -48222,7 +48784,7 @@ var require_cache3 = __commonJS({ * the flat cache storage used to persist the metadata of the `files * @type {Object} */ - cache: cache2, + cache: cache4, /** * Given a buffer, calculate md5 hash of its content. * @method getHash @@ -48274,7 +48836,7 @@ var require_cache3 = __commonJS({ getFileDescriptor: function(file) { var fstat; try { - fstat = fs11.statSync(file); + fstat = fs12.statSync(file); } catch (ex) { this.removeEntry(file); return { key: file, notFound: true, err: ex }; @@ -48285,7 +48847,7 @@ var require_cache3 = __commonJS({ return this._getFileDescriptorUsingMtimeAndSize(file, fstat); }, _getFileDescriptorUsingMtimeAndSize: function(file, fstat) { - var meta = cache2.getKey(file); + var meta = cache4.getKey(file); var cacheExists = !!meta; var cSize = fstat.size; var cTime = fstat.mtime.getTime(); @@ -48305,11 +48867,11 @@ var require_cache3 = __commonJS({ return nEntry; }, _getFileDescriptorUsingChecksum: function(file) { - var meta = cache2.getKey(file); + var meta = cache4.getKey(file); var cacheExists = !!meta; var contentBuffer; try { - contentBuffer = fs11.readFileSync(file); + contentBuffer = fs12.readFileSync(file); } catch (ex) { contentBuffer = ""; } @@ -48367,24 +48929,24 @@ var require_cache3 = __commonJS({ */ removeEntry: function(entryName) { delete normalizedEntries[entryName]; - cache2.removeKey(entryName); + cache4.removeKey(entryName); }, /** * Delete the cache file from the disk * @method deleteCacheFile */ deleteCacheFile: function() { - cache2.removeCacheFile(); + cache4.removeCacheFile(); }, /** * remove the cache from the file and clear the memory cache */ destroy: function() { normalizedEntries = {}; - cache2.destroy(); + cache4.destroy(); }, _getMetaForFileUsingCheckSum: function(cacheEntry) { - var contentBuffer = fs11.readFileSync(cacheEntry.key); + var contentBuffer = fs12.readFileSync(cacheEntry.key); var hash = this.getHash(contentBuffer); var meta = Object.assign(cacheEntry.meta, { hash }); delete meta.size; @@ -48392,10 +48954,10 @@ var require_cache3 = __commonJS({ return meta; }, _getMetaForFileUsingMtimeAndSize: function(cacheEntry) { - var stat2 = fs11.statSync(cacheEntry.key); + var stat4 = fs12.statSync(cacheEntry.key); var meta = Object.assign(cacheEntry.meta, { - size: stat2.size, - mtime: stat2.mtime.getTime() + size: stat4.size, + mtime: stat4.mtime.getTime() }); delete meta.hash; return meta; @@ -48408,23 +48970,23 @@ var require_cache3 = __commonJS({ removeNotFoundFiles(); noPrune = typeof noPrune === "undefined" ? true : noPrune; var entries = normalizedEntries; - var keys2 = Object.keys(entries); - if (keys2.length === 0) { + var keys3 = Object.keys(entries); + if (keys3.length === 0) { return; } var me = this; - keys2.forEach(function(entryName) { + keys3.forEach(function(entryName) { var cacheEntry = entries[entryName]; try { var meta = useChecksum ? me._getMetaForFileUsingCheckSum(cacheEntry) : me._getMetaForFileUsingMtimeAndSize(cacheEntry); - cache2.setKey(entryName, meta); + cache4.setKey(entryName, meta); } catch (err) { if (err.code !== "ENOENT") { throw err; } } }); - cache2.save(noPrune); + cache4.save(noPrune); } }; } @@ -48432,9 +48994,9 @@ var require_cache3 = __commonJS({ } }); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/lib/file-entry-cache.cjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/lib/file-entry-cache.cjs var require_file_entry_cache = __commonJS({ - "../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/lib/file-entry-cache.cjs"(exports) { + "../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/lib/file-entry-cache.cjs"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -48482,7 +49044,7 @@ var require_file_entry_cache = __commonJS({ var import_core4 = __toESM(require_core()); var import_github2 = __toESM(require_github()); var import_context = __toESM(require_context()); -var import_assert20 = __toESM(require("assert")); +var import_assert21 = __toESM(require("assert")); // src/error.ts var AppError = class extends Error { @@ -48505,30 +49067,30 @@ function isAppError(e) { // src/action.ts var import_core3 = __toESM(require_core()); -// ../node_modules/.pnpm/cspell-glob@8.0.0/node_modules/cspell-glob/dist/esm/globHelper.js +// ../node_modules/.pnpm/cspell-glob@8.1.0/node_modules/cspell-glob/dist/esm/globHelper.js var Path = __toESM(require("path"), 1); var { posix } = Path; var relRegExp = /^\.[\\/]/; var isGlobalPatternRegExp = /^!*[*]{2}/; -function fileOrGlobToGlob(fileOrGlob, root, path26 = Path) { - const pathToGlob = path26.sep === "\\" ? (p) => p.replace(/\\/g, "/") : (p) => p; +function fileOrGlobToGlob(fileOrGlob, root, path27 = Path) { + const pathToGlob = path27.sep === "\\" ? (p) => p.replace(/\\/g, "/") : (p) => p; const isGlobalPattern = false; if (isGlobPatternWithOptionalRoot(fileOrGlob)) { const useRoot = fileOrGlob.root ?? root; const isGlobalPattern2 = isGlobPatternWithRoot(fileOrGlob) ? fileOrGlob.isGlobalPattern : isGlobalGlob(fileOrGlob.glob); return { ...fileOrGlob, root: useRoot, isGlobalPattern: isGlobalPattern2 }; } - if (doesRootContainPath(root, fileOrGlob, path26) || relRegExp.test(fileOrGlob)) { - const rel = path26.relative(root, path26.resolve(root, fileOrGlob)); + if (doesRootContainPath(root, fileOrGlob, path27) || relRegExp.test(fileOrGlob)) { + const rel = path27.relative(root, path27.resolve(root, fileOrGlob)); return { glob: pathToGlob(rel), root, isGlobalPattern }; } return { glob: pathToGlob(fileOrGlob), root, isGlobalPattern }; } -function doesRootContainPath(root, child, path26) { +function doesRootContainPath(root, child, path27) { if (child.startsWith(root)) return true; - const rel = path26.relative(root, child); - return !rel || rel !== child && !rel.startsWith("..") && !path26.isAbsolute(rel); + const rel = path27.relative(root, child); + return !rel || rel !== child && !rel.startsWith("..") && !path27.isAbsolute(rel); } function isGlobPatternWithOptionalRoot(g) { return typeof g !== "string" && typeof g.glob === "string"; @@ -48586,7 +49148,7 @@ function normalizeGlobPatterns(patterns, options) { return [...normalize3()]; } function normalizeGlobPattern(g, options) { - const { root, nodePath: path26 = Path, nested, cwd = Path.resolve() } = options; + const { root, nodePath: path27 = Path, nested, cwd = Path.resolve() } = options; g = !isGlobPatternWithOptionalRoot(g) ? { glob: g } : g; const gr = { ...g, root: g.root ?? root }; const rawRoot = gr.root; @@ -48597,30 +49159,30 @@ function normalizeGlobPattern(g, options) { gr.root = "${cwd}"; } if (gr.root.startsWith("${cwd}")) { - gr.root = path26.resolve(gr.root.replace("${cwd}", cwd)); + gr.root = path27.resolve(gr.root.replace("${cwd}", cwd)); } const isGlobalPattern = isGlobalGlob(gr.glob); - gr.root = path26.resolve(root, path26.normalize(gr.root)); + gr.root = path27.resolve(root, path27.normalize(gr.root)); const globs = normalizePattern(gr.glob, nested); return globs.map((glob2) => ({ ...gr, glob: glob2, rawGlob, rawRoot, isGlobalPattern })); } -function normalizeGlobToRoot(glob2, root, path26) { +function normalizeGlobToRoot(glob2, root, path27) { function relToGlob(relativePath2) { - return path26.sep === "\\" ? relativePath2.replace(/\\/g, "/") : relativePath2; + return path27.sep === "\\" ? relativePath2.replace(/\\/g, "/") : relativePath2; } if (glob2.root === root) { return glob2; } - const relFromRootToGlob = path26.relative(root, glob2.root); + const relFromRootToGlob = path27.relative(root, glob2.root); if (!relFromRootToGlob) { return glob2; } if (glob2.isGlobalPattern) { return { ...glob2, root }; } - const relFromGlobToRoot = path26.relative(glob2.root, root); - const globIsUnderRoot = relFromRootToGlob[0] !== "." && !path26.isAbsolute(relFromRootToGlob); - const rootIsUnderGlob = relFromGlobToRoot[0] !== "." && !path26.isAbsolute(relFromGlobToRoot); + const relFromGlobToRoot = path27.relative(glob2.root, root); + const globIsUnderRoot = relFromRootToGlob[0] !== "." && !path27.isAbsolute(relFromRootToGlob); + const rootIsUnderGlob = relFromGlobToRoot[0] !== "." && !path27.isAbsolute(relFromGlobToRoot); if (!globIsUnderRoot && !rootIsUnderGlob) { return glob2; } @@ -48666,7 +49228,7 @@ function isGlobalGlob(glob2) { return isGlobalPatternRegExp.test(glob2); } -// ../node_modules/.pnpm/cspell-glob@8.0.0/node_modules/cspell-glob/dist/esm/GlobMatcher.js +// ../node_modules/.pnpm/cspell-glob@8.1.0/node_modules/cspell-glob/dist/esm/GlobMatcher.js var import_micromatch = __toESM(require_micromatch(), 1); var Path2 = __toESM(require("path"), 1); var GlobMatcher = class { @@ -48711,7 +49273,7 @@ var GlobMatcher = class { } }; function buildMatcherFn(patterns, options) { - const { nodePath: path26, dot, nobrace } = options; + const { nodePath: path27, dot, nobrace } = options; const makeReOptions = { dot, nobrace }; const rules = patterns.map((pattern, index) => ({ pattern, index })).filter((r) => !!r.pattern.glob).filter((r) => !r.pattern.glob.startsWith("#")).map(({ pattern, index }) => { const matchNeg = pattern.glob.match(/^!/); @@ -48719,25 +49281,35 @@ function buildMatcherFn(patterns, options) { const isNeg = matchNeg && matchNeg[0].length & 1 && true || false; const reg = import_micromatch.default.makeRe(glob2, makeReOptions); const fn2 = (filename) => { - const match2 = filename.match(reg); - return !!match2; + reg.lastIndex = 0; + return reg.test(filename); }; return { pattern, index, isNeg, fn: fn2, reg }; }); const negRules = rules.filter((r) => r.isNeg); const posRules = rules.filter((r) => !r.isNeg); const fn = (filename) => { - filename = path26.resolve(path26.normalize(filename)); + filename = path27.resolve(path27.normalize(filename)); + const fNameNormalize = path27.sep === "\\" ? filename.replace(/\\/g, "/") : filename; + let lastRoot = "!!!!!!"; + let lastRel = ""; + function relativeToRoot(root) { + if (root !== lastRoot) { + lastRoot = root; + const relName = path27.relative(root, filename); + lastRel = path27.sep === "\\" ? relName.replace(/\\/g, "/") : relName; + } + return lastRel; + } function testRules(rules2, matched) { for (const rule of rules2) { const pattern = rule.pattern; const root = pattern.root; const isRelPat = !pattern.isGlobalPattern; - if (isRelPat && !doesRootContainPath(root, filename, path26)) { + if (isRelPat && !doesRootContainPath(root, filename, path27)) { continue; } - const relName = isRelPat ? path26.relative(root, filename) : filename; - const fname = path26.sep === "\\" ? relName.replace(/\\/g, "/") : relName; + const fname = isRelPat ? relativeToRoot(root) : fNameNormalize; if (rule.fn(fname)) { return { matched, @@ -48756,7 +49328,7 @@ function buildMatcherFn(patterns, options) { } // src/action.ts -var path25 = __toESM(require("path")); +var path26 = __toESM(require("path")); // src/ActionParams.ts var import_fs = require("fs"); @@ -49387,7 +49959,7 @@ function relative2(cwd, fileUri) { return path.relative(cwd, fsPath); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/index.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/index.mjs var esm_exports3 = {}; __export(esm_exports3, { IncludeExcludeFlag: () => IncludeExcludeFlag, @@ -49400,7 +49972,7 @@ __export(esm_exports3, { trace: () => trace }); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/helpers/iteratorToIterable.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/helpers/iteratorToIterable.js function* iteratorToIterable(iterator) { let n; while (!(n = iterator.next()).done) { @@ -49414,7 +49986,7 @@ async function* asyncIteratorToAsyncIterable(iterator) { } } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/helpers/util.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/helpers/util.js function toPipeFn(syncFn, asyncFn) { function _(i) { return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); @@ -49425,7 +49997,7 @@ function isAsyncIterable(i) { return typeof i[Symbol.asyncIterator] === "function"; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/helpers/toArray.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/helpers/toArray.js function toArray(i) { return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); } @@ -49440,7 +50012,7 @@ async function toArrayAsync(iter) { return collection; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/helpers/toAsyncIterable.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/helpers/toAsyncIterable.js async function* mergeAsyncIterables(iter, ...rest) { for await (const i of [iter, ...rest]) { yield* i; @@ -49448,7 +50020,7 @@ async function* mergeAsyncIterables(iter, ...rest) { } var toAsyncIterable = mergeAsyncIterables; -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/index.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/index.js var operators_exports = {}; __export(operators_exports, { opAppend: () => opAppend, @@ -49494,7 +50066,7 @@ __export(operators_exports, { opUniqueSync: () => opUniqueSync }); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/append.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/append.js function opAppendAsync(...iterablesToAppend) { async function* fn(iter) { yield* iter; @@ -49520,7 +50092,7 @@ function opAppend(...iterablesToAppend) { return _; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/await.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/await.js async function* _asyncAwait(iter) { for await (const v of iter) { yield v; @@ -49530,7 +50102,7 @@ function opAwaitAsync() { return _asyncAwait; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/combine.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/combine.js function opCombineAsync(...fns) { function combine4(iter) { for (const fn of fns) { @@ -49550,7 +50122,7 @@ function opCombineSync(...fns) { return combine4; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/concatMap.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/concatMap.js function opConcatMapAsync(mapFn) { async function* fn(iter) { for await (const v of iter) { @@ -49569,7 +50141,7 @@ function opConcatMapSync(mapFn) { } var opConcatMap = (fn) => toPipeFn(opConcatMapSync(fn), opConcatMapAsync(fn)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/filter.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/filter.js function opFilterAsync(filterFn) { async function* fn(iter) { for await (const v of iter) { @@ -49598,7 +50170,7 @@ function opFilter(fn) { return _; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/first.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/first.js function opFirstAsync(firstFn) { async function* fn(iter) { for await (const v of iter) { @@ -49631,7 +50203,7 @@ function opFirst(fn) { return _; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/flatten.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/flatten.js function opFlattenAsync() { async function* fn(iter) { for await (const v of iter) { @@ -49650,7 +50222,7 @@ function opFlattenSync() { } var opFlatten = () => toPipeFn(opFlattenSync(), opFlattenAsync()); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/joinStrings.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/joinStrings.js function opJoinStringsAsync(joinCharacter = ",") { async function* fn(iter) { for await (const v of iter) { @@ -49671,7 +50243,7 @@ function opJoinStringsSync(joinCharacter = ",") { } var opJoinStrings = (joinCharacter) => toPipeFn(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/last.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/last.js var symNotFound = Symbol("LastNotFound"); function opLastAsync(lastFn) { async function* fn(iter) { @@ -49709,7 +50281,7 @@ function opLast(fn) { return _; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/map.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/map.js function opMapAsync(mapFn) { async function* fn(iter) { for await (const v of iter) { @@ -49728,7 +50300,7 @@ function opMapSync(mapFn) { } var opMap = (fn) => toPipeFn(opMapSync(fn), opMapAsync(fn)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/reduce.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/reduce.js function opReduceAsync(reduceFn, initialValue) { async function* reduce4(head, tail) { for await (const v of tail) { @@ -49777,7 +50349,7 @@ function isIterable(i) { return typeof i[Symbol.iterator] === "function"; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/skip.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/skip.js function opSkipAsync(count3) { async function* fn(iter) { for await (const v of iter) { @@ -49804,7 +50376,7 @@ function opSkipSync(count3) { } var opSkip = (count3) => toPipeFn(opSkipSync(count3), opSkipAsync(count3)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/take.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/take.js function opTakeAsync(count3) { async function* fn(iter) { if (count3 <= 0) @@ -49831,7 +50403,7 @@ function opTakeSync(count3) { } var opTake = (count3) => toPipeFn(opTakeSync(count3), opTakeAsync(count3)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/tap.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/tap.js function opTapAsync(tapFn) { async function* fn(iter) { for await (const v of iter) { @@ -49852,7 +50424,7 @@ function opTapSync(tapFn) { } var opTap = (fn) => toPipeFn(opTapSync(fn), opTapAsync(fn)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/operators/unique.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/operators/unique.js function opUniqueAsync(k) { function fnK(k2) { async function* fn2(iter) { @@ -49905,7 +50477,7 @@ function opUniqueSync(k) { } var opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey)); -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/pipe.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/pipe.js function pipeAsync(i, ...fns) { const iter = toAsyncIterable(i); return opCombineAsync(...fns)(iter); @@ -49914,16 +50486,16 @@ function pipeSync(i, ...fns) { return opCombineSync(...fns)(i); } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/reduce.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/reduce.js function reduceSync(iter, reduceFn, initialValue) { const i = initialValue === void 0 ? pipeSync(iter, opReduceSync(reduceFn)) : pipeSync(iter, opReduceSync(reduceFn, initialValue)); return [...i][0]; } -// ../node_modules/.pnpm/@cspell+cspell-pipe@8.0.0/node_modules/@cspell/cspell-pipe/dist/index.js +// ../node_modules/.pnpm/@cspell+cspell-pipe@8.1.0/node_modules/@cspell/cspell-pipe/dist/index.js var operators = operators_exports; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/index.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/index.js var esm_exports2 = {}; __export(esm_exports2, { CompoundWordsMethod: () => CompoundWordsMethod, @@ -49944,9 +50516,10 @@ __export(esm_exports2, { checkText: () => checkText, checkTextDocument: () => checkTextDocument, clearCachedFiles: () => clearCachedFiles, - clearCachedSettingsFiles: () => clearCachedSettingsFiles, + clearCaches: () => clearCaches, combineTextAndLanguageSettings: () => combineTextAndLanguageSettings, constructSettingsForText: () => combineTextAndLanguageSettings, + createPerfTimer: () => createPerfTimer2, createSpellingDictionary: () => createSpellingDictionary, createSpellingDictionaryCollection: () => createCollection, createTextDocument: () => createTextDocument, @@ -49961,10 +50534,11 @@ __export(esm_exports2, { fileToTextDocument: () => fileToTextDocument, finalizeSettings: () => finalizeSettings, getCachedFileSize: () => getCachedFileSize, - getDefaultBundledSettings: () => getDefaultBundledSettings, + getDefaultBundledSettingsAsync: () => getDefaultBundledSettingsAsync, getDefaultSettings: () => getDefaultSettings, getDictionary: () => getDictionary, getGlobalSettings: () => getGlobalSettings, + getGlobalSettingsAsync: () => getGlobalSettingsAsync, getLanguageIdsForBaseFilename: () => getLanguagesForBasename, getLanguagesForExt: () => getLanguagesForExt, getLogger: () => getLogger, @@ -49974,11 +50548,10 @@ __export(esm_exports2, { isSpellingDictionaryLoadError: () => isSpellingDictionaryLoadError, loadConfig: () => loadConfig, loadPnP: () => loadPnP, - loadPnPSync: () => loadPnPSync, mergeInDocSettings: () => mergeInDocSettings, mergeSettings: () => mergeSettings, - readFile: () => readFileText2, - readFileSync: () => readFileTextSync2, + readFile: () => readFileText, + readFileSync: () => readFileTextSync, readRawSettings: () => readRawSettings, readSettings: () => readSettings, readSettingsFiles: () => readSettingsFiles, @@ -50001,7 +50574,7 @@ __export(esm_exports2, { writeToFileIterableP: () => writeToFileIterable }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/exclusionHelper.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/exclusionHelper.js var exclusionHelper_exports = {}; __export(exclusionHelper_exports, { extractGlobsFromExcludeFilesGlobMap: () => extractGlobsFromExcludeFilesGlobMap, @@ -50009,7 +50582,7 @@ __export(exclusionHelper_exports, { generateExclusionFunctionForUri: () => generateExclusionFunctionForUri }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/Uri.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/Uri.js var import_assert = __toESM(require("assert"), 1); var isFile = /^(?:[a-zA-Z]:|[/\\])/; var isPossibleUri = /\w:\/\//; @@ -50035,8 +50608,8 @@ function uriToFilePath(uri) { const adj = uri.scheme === "stdin" ? { scheme: "file" } : {}; return normalizeDriveLetter(URI.from(UriImpl.from(uri, adj)).fsPath); } -function normalizeDriveLetter(path26) { - return hasDriveLetter.test(path26) ? path26[0].toLowerCase() + path26.slice(1) : path26; +function normalizeDriveLetter(path27) { + return hasDriveLetter.test(path27) ? path27[0].toLowerCase() + path27.slice(1) : path27; } function isUrlLike(url) { return !!url && typeof url === "object" && typeof url.href === "string" || false; @@ -50069,20 +50642,20 @@ var UriImpl = class _UriImpl { uri.fragment && (this.fragment = uri.fragment); } toString() { - const path26 = this.path; - const base = `${this.scheme}://${this.authority || ""}${path26}`; + const path27 = this.path; + const base = `${this.scheme}://${this.authority || ""}${path27}`; const query = this.query && `?${this.query}` || ""; const fragment = this.fragment && `#${this.fragment}` || ""; const url = base + query + fragment; return encodeURI(url); } toJson() { - const { scheme, authority, path: path26, query, fragment } = this; - return { scheme, authority, path: path26, query, fragment }; + const { scheme, authority, path: path27, query, fragment } = this; + return { scheme, authority, path: path27, query, fragment }; } with(change) { - const { scheme, authority, path: path26, query, fragment } = this; - const u = { scheme, authority, path: path26, query, fragment }; + const { scheme, authority, path: path27, query, fragment } = this; + const u = { scheme, authority, path: path27, query, fragment }; for (const key of keys) { if (change[key] && typeof change[key] === "string") { u[key] = change[key]; @@ -50114,8 +50687,8 @@ var UriImpl = class _UriImpl { return _UriImpl.from(_UriImpl.file(filePath), { scheme: "stdin" }); } }; -function normalizeFilePath(path26) { - return normalizeDriveLetter(path26.replace(/\\/g, "/")); +function normalizeFilePath(path27) { + return normalizeDriveLetter(path27.replace(/\\/g, "/")); } function parseStdinUri(uri) { (0, import_assert.default)(uri.startsWith(STDIN_PROTOCOL)); @@ -50129,19 +50702,19 @@ function parseStdinUri(uri) { const iQ = uri.indexOf("?", pathStart); const idxQ = iQ > 0 && iQ < idxHash ? iQ : idxHash; const pathEnd = idxQ; - const path26 = uri.slice(pathStart, pathEnd); + const path27 = uri.slice(pathStart, pathEnd); const query = idxQ < idxHash ? uri.slice(idxQ + 1, idxHash) : ""; const hash = uri.slice(idxHash + 1); const pathPrefix = idxSlashEnd - idxSlash > 2 ? "/" : ""; return { scheme: "stdin", - path: pathPrefix + normalizeFilePath(decodeURI(path26)), + path: pathPrefix + normalizeFilePath(decodeURI(path27)), query: decodeURI(query), fragment: decodeURI(hash) }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/exclusionHelper.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/exclusionHelper.js var defaultAllowedSchemes = /* @__PURE__ */ new Set(["file", "untitled"]); function extractGlobsFromExcludeFilesGlobMap(globMap) { const globs = Object.getOwnPropertyNames(globMap).filter((glob2) => globMap[glob2]); @@ -50179,7 +50752,7 @@ function generateExclusionFunctionForFiles(globs, root) { return (file) => matcher.match(file); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/index.link.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/index.link.js var index_link_exports = {}; __export(index_link_exports, { addPathsToGlobalImports: () => addPathsToGlobalImports, @@ -50187,11 +50760,62 @@ __export(index_link_exports, { removePathsFromGlobalImports: () => removePathsFromGlobalImports }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/link.js -var fs7 = __toESM(require("fs"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/link.js +var fs8 = __toESM(require("fs"), 1); var Path3 = __toESM(require("path"), 1); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/util.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/errors.js +var import_util14 = require("util"); +var allowStringOrUndefined = { + string: true, + undefined: true +}; +var allowNumberOrUndefined = { + number: true, + undefined: true +}; +function isErrnoException(e) { + if (!e || typeof e !== "object") + return false; + if (!isError2(e)) + return false; + const ex = e; + return typeof ex.errno in allowNumberOrUndefined && typeof ex.code in allowStringOrUndefined && typeof ex.path in allowStringOrUndefined; +} +function isError2(e) { + if (e instanceof Error) + return true; + if (!e || typeof e !== "object") + return false; + const ex = e; + return typeof ex.name == "string" && typeof ex.message == "string" && typeof ex.stack in allowStringOrUndefined; +} +function toError(e, errorFactory = UnknownError) { + if (isError2(e)) + return e; + return new errorFactory(e); +} +var UnknownError = class extends Error { + cause; + constructor(cause) { + super((0, import_util14.format)(cause)); + this.cause = cause; + } +}; +function catchPromiseError(p, handler) { + if (p === void 0) + return void 0; + return _catchPromiseError(p, handler); +} +async function _catchPromiseError(p, handler) { + try { + return await p; + } catch (e) { + return handler(e); + } +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/util.js var uniqueFn = uniqueFilterFnGenerator; function uniqueFilterFnGenerator(extractFn) { const values = /* @__PURE__ */ new Set(); @@ -50255,11 +50879,395 @@ function doSetsIntersect(a, b) { return a.size <= b.size ? compare4(a, b) : compare4(b, a); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js -var json = __toESM(require_src2(), 1); -var import_cosmiconfig = __toESM(require_dist(), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js +var import_assert8 = __toESM(require("assert"), 1); + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/defaultNext.js +var defaultNextDeserializer = (content) => { + throw new Error(`Unable to parse config file: "${content.url}"`); +}; +var defaultNextSerializer = (file) => { + throw new Error(`Unable to serialize config file: "${file.url}"`); +}; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/middlewareHelper.js +function getDeserializer(middleware) { + let next = defaultNextDeserializer; + for (const des of middleware) { + next = curryDeserialize(des, next); + } + return next; +} +function getSerializer(middleware) { + let next = defaultNextSerializer; + for (const des of middleware) { + next = currySerialize(des, next); + } + return next; +} +function curryDeserialize(middle, next) { + return (content) => middle.deserialize(content, next); +} +function currySerialize(middle, next) { + return (cfg) => middle.serialize(cfg, next); +} +function curryLoader(loader2, next) { + return (req) => loader2.load(req, next); +} +async function defaultLoader(req) { + const { io, deserialize } = req.context; + const url = req.url; + const file = await io.readFile(url); + return deserialize(file); +} +function getLoader(loaders2) { + let next = defaultLoader; + for (const loader2 of loaders2) { + next = curryLoader(loader2, next); + } + return next; +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/util/toURL.js +function toURL(url) { + return typeof url === "string" ? new URL(url) : url; +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFileReaderWriter.js +var CSpellConfigFileReaderWriterImpl = class { + io; + middleware; + loaders; + /** + * @param io - an optional injectable IO interface. The default is to use the file system. + * @param deserializers - Additional deserializers to use when reading a config file. The order of the deserializers is + * important. The last one in the list will be the first one to be called. + */ + constructor(io, middleware, loaders2) { + this.io = io; + this.middleware = middleware; + this.loaders = loaders2; + } + readConfig(uri) { + const loader2 = getLoader(this.loaders); + return loader2({ url: toURL(uri), context: { deserialize: this.getDeserializer(), io: this.io } }); + } + getDeserializer() { + return getDeserializer(this.middleware); + } + serialize(configFile) { + const serializer4 = getSerializer(this.middleware); + return serializer4(configFile); + } + async writeConfig(configFile) { + if (configFile.readonly) + throw new Error(`Config file is readonly: ${configFile.url.href}`); + const content = this.serialize(configFile); + await this.io.writeFile({ url: configFile.url, content }); + return { url: configFile.url }; + } + clearCachedFiles() { + for (const loader2 of this.loaders) { + loader2.reset?.(); + } + } +}; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/defaultIO.js +var import_fs2 = require("fs"); +var defaultIO = { + readFile, + writeFile +}; +async function readFile(url) { + const content = await import_fs2.promises.readFile(url, "utf-8"); + return { url, content }; +} +async function writeFile(file) { + await import_fs2.promises.writeFile(file.url, file.content); + return { url: file.url }; +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/loaders/loaderJavaScript.js +var import_posix = require("node:path/posix"); + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile.js +var CSpellConfigFile = class { + url; + constructor(url) { + this.url = url; + } + get readonly() { + return this.settings.readonly || this.url.protocol !== "file:"; + } +}; +var ImplCSpellConfigFile = class extends CSpellConfigFile { + url; + settings; + constructor(url, settings) { + super(url); + this.url = url; + this.settings = settings; + } + addWords(words) { + if (this.readonly) + throw new Error(`Config file is readonly: ${this.url.href}`); + const w = this.settings.words || []; + this.settings.words = w; + addUniqueWordsToListAndSort(w, words); + return this; + } +}; +function addUniqueWordsToListAndSort(list, toAdd) { + list.unshift(...toAdd); + list.sort(); + for (let i = 1; i < list.length; ++i) { + if (list[i] === list[i - 1]) { + list.splice(i, 1); + --i; + } + } +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFileJavaScript.js +var CSpellConfigFileJavaScript = class extends ImplCSpellConfigFile { + url; + settings; + get readonly() { + return true; + } + constructor(url, settings) { + super(url, settings); + this.url = url; + this.settings = settings; + } + addWords(_words) { + throw new Error("Unable to add words to a JavaScript config file."); + } +}; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/loaders/loaderJavaScript.js +var _debug = false; +var _log = _debug ? console.warn.bind(console) : () => void 0; +async function importJavaScript(url, hashSuffix) { + try { + const _url = new URL(url.href); + _url.hash = `${_url.hash};loaderSuffix=${hashSuffix}`; + _log("importJavaScript: %o", { url: _url.href }); + const result = await import(_url.href); + const settings = result.default ?? result; + return new CSpellConfigFileJavaScript(url, settings); + } catch (e) { + _log("importJavaScript Error: %o", { url: url.href, error: e, hashSuffix }); + throw e; + } finally { + _log("importJavaScript Done: %o", { url: url.href, hashSuffix }); + } +} +var LoaderJavaScript = class { + hashSuffix = 1; + async _load(req, next) { + const { url } = req; + const ext = (0, import_posix.extname)(url.pathname).toLowerCase(); + switch (ext) { + case ".js": + case ".cjs": + case ".mjs": + return importJavaScript(url, this.hashSuffix); + } + return next(req); + } + load = this._load.bind(this); + reset() { + this.hashSuffix += 1; + } +}; +var loaderJavaScript = new LoaderJavaScript(); + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/loaders/index.js +var defaultLoaders = [loaderJavaScript]; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFileJson.js +var import_comment_json = __toESM(require_src2(), 1); + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/serializers/util.js +function detectIndent(content) { + const m = content.match(/^[ \t]+/m); + return m && m[0] || " "; +} +function detectIndentAsNum(content) { + const indent = detectIndent(content).replace(/\t/g, " ").replace(/[^ ]/g, ""); + return indent.length; +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFileJson.js +var CSpellConfigFileJson = class extends ImplCSpellConfigFile { + url; + settings; + serializer; + constructor(url, settings, serializer4) { + super(url, settings); + this.url = url; + this.settings = settings; + this.serializer = serializer4; + } + serialize() { + return this.serializer(this.settings); + } +}; +function parseCSpellConfigFileJson(file) { + const cspell = (0, import_comment_json.parse)(file.content); + if (!isCSpellSettings(cspell)) { + throw new Error(`Unable to parse ${file.url}`); + } + const indent = detectIndent(file.content); + function serialize(settings) { + return (0, import_comment_json.stringify)(settings, null, indent) + "\n"; + } + return new CSpellConfigFileJson(file.url, cspell, serialize); +} +function isCSpellSettings(cfg) { + return !(!cfg || typeof cfg !== "object" || Array.isArray(cfg)); +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/serializers/cspellJson.js +function deserializer(params, next) { + if (!isJsonFile(params.url.pathname)) + return next(params); + return parseCSpellConfigFileJson(params); +} +function isJsonFile(pathname) { + pathname = pathname.toLowerCase(); + return pathname.endsWith(".json") || pathname.endsWith(".jsonc"); +} +function serializer(settings, next) { + if (!(settings instanceof CSpellConfigFileJson)) + return next(settings); + return settings.serialize(); +} +var serializerCSpellJson = { deserialize: deserializer, serialize: serializer }; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFileYaml.js +var import_yaml = __toESM(require_dist(), 1); +var CSpellConfigFileYaml = class extends ImplCSpellConfigFile { + url; + settings; + serializer; + constructor(url, settings, serializer4) { + super(url, settings); + this.url = url; + this.settings = settings; + this.serializer = serializer4; + } + serialize() { + return this.serializer(this.settings); + } +}; +function parseCSpellConfigFileYaml(file) { + const { url, content } = file; + const cspell = (0, import_yaml.parse)(content) || {}; + if (!cspell || typeof cspell !== "object" || Array.isArray(cspell)) { + throw new Error(`Unable to parse ${url}`); + } + const indent = detectIndentAsNum(content); + function serialize(settings) { + return (0, import_yaml.stringify)(settings, { indent }); + } + return new CSpellConfigFileYaml(url, cspell, serialize); +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/serializers/cspellYaml.js +function deserializer2(params, next) { + if (!isYamlFile(params.url.pathname)) + return next(params); + return parseCSpellConfigFileYaml(params); +} +function isYamlFile(pathname) { + pathname = pathname.toLowerCase(); + return pathname.endsWith(".yml") || pathname.endsWith(".yaml"); +} +function serializer2(settings, next) { + if (!(settings instanceof CSpellConfigFileYaml)) + return next(settings); + return settings.serialize(); +} +var serializerCSpellYaml = { deserialize: deserializer2, serialize: serializer2 }; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFilePackageJson.js +var CSpellConfigFilePackageJson = class extends ImplCSpellConfigFile { + url; + settings; + serializer; + constructor(url, settings, serializer4) { + super(url, settings); + this.url = url; + this.settings = settings; + this.serializer = serializer4; + } + serialize() { + return this.serializer(this.settings); + } +}; +function parseCSpellConfigFilePackageJson(file) { + const { url, content } = file; + const packageJson = JSON.parse(content); + if (!packageJson || typeof packageJson !== "object" || Array.isArray(packageJson)) { + throw new Error(`Unable to parse ${url}`); + } + packageJson["cspell"] = packageJson["cspell"] || {}; + const cspell = packageJson["cspell"]; + if (typeof cspell !== "object" || Array.isArray(cspell)) { + throw new Error(`Unable to parse ${url}`); + } + const indent = detectIndent(content); + function serialize(settings) { + packageJson["cspell"] = settings; + return JSON.stringify(packageJson, null, indent) + "\n"; + } + return new CSpellConfigFilePackageJson(url, cspell, serialize); +} + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/serializers/packageJson.js +var isSupportedFormat = /\bpackage\.json$/i; +function deserializer3(params, next) { + if (!isSupportedFormat.test(params.url.pathname)) + return next(params); + return parseCSpellConfigFilePackageJson(params); +} +function serializer3(settings, next) { + if (!(settings instanceof CSpellConfigFilePackageJson)) + return next(settings); + return settings.serialize(); +} +var serializerPackageJson = { deserialize: deserializer3, serialize: serializer3 }; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/serializers/index.js +var defaultDeserializers = [ + serializerCSpellJson, + serializerCSpellYaml, + serializerPackageJson +]; + +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/createReaderWriter.js +function createReaderWriter(deserializers2 = [], loaders2 = [], io = defaultIO) { + return new CSpellConfigFileReaderWriterImpl(io, defaultDeserializers.concat(deserializers2), defaultLoaders.concat(loaders2)); +} -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/async/asyncIterable.js +// ../node_modules/.pnpm/cspell-config-lib@8.1.0/node_modules/cspell-config-lib/dist/CSpellConfigFile/CSpellConfigFileInMemory.js +var CSpellConfigFileInMemory = class extends ImplCSpellConfigFile { + url; + settings; + constructor(url, settings) { + super(url, settings); + this.url = url; + this.settings = settings; + } + get readonly() { + return true; + } +}; + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/async/asyncIterable.js async function toArray2(asyncIterable) { const data = []; for await (const item of asyncIterable) { @@ -50268,7 +51276,327 @@ async function toArray2(asyncIterable) { return data; } -// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.0.0/node_modules/@cspell/cspell-service-bus/dist/esm/errors.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/url.js +var import_path = __toESM(require("path"), 1); +var import_url = require("url"); +var isURLRegExp = /^(\w{2,64}:\/\/|data:)/i; +function isUrlLike2(filename) { + return filename instanceof URL || isURLRegExp.test(filename); +} +function toFileURL(filenameOrUrl, relativeTo2) { + if (typeof filenameOrUrl !== "string") + return filenameOrUrl; + return isUrlLike2(filenameOrUrl) ? new URL(filenameOrUrl) : relativeTo2 && isUrlLike2(relativeTo2) ? new URL(normalizePath(filenameOrUrl), relativeTo2) : relativeTo2 ? (0, import_url.pathToFileURL)(import_path.default.resolve(relativeTo2.toString(), filenameOrUrl)) : (0, import_url.pathToFileURL)(filenameOrUrl); +} +function toURL2(filenameOrUrl, relativeTo2) { + return typeof filenameOrUrl !== "string" ? filenameOrUrl : new URL(filenameOrUrl, relativeTo2); +} +var regMatchFilename = /filename=([^;,]*)/; +function urlBasename(url) { + function guessDataUrlName(header) { + const filenameMatch = header.match(regMatchFilename); + if (filenameMatch) + return filenameMatch[1]; + const mime = header.split(";", 1)[0]; + return mime.replace(/\W/g, "."); + } + url = toURL2(url); + if (url.protocol === "data:") { + return guessDataUrlName(url.pathname.split(",", 1)[0]); + } + const suffix = url.pathname.endsWith("/") ? "/" : ""; + return basename2(url.pathname) + suffix; +} +function urlDirname(url) { + url = toURL2(url); + if (url.protocol === "data:") { + return new URL("data:"); + } + return new URL(url.pathname.endsWith("/") ? ".." : ".", url); +} +function basename2(path27) { + path27 = path27.endsWith("/") ? path27.slice(0, path27.length - 1) : path27; + const idx2 = path27.lastIndexOf("/"); + return idx2 >= 0 ? path27.slice(idx2 + 1) : path27; +} +function normalizePath(filePath) { + return filePath.split(import_path.default.sep).join("/"); +} + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/CFileReference.js +var CFileReference = class _CFileReference { + url; + encoding; + baseFilename; + /** + * Use to ensure the nominal type separation between CFileReference and FileReference + * See: https://github.com/microsoft/TypeScript/wiki/FAQ#when-and-why-are-classes-nominal + */ + _; + gz; + constructor(url, encoding, baseFilename, gz) { + this.url = url; + this.encoding = encoding; + this.baseFilename = baseFilename; + this.gz = gz ?? (baseFilename?.endsWith(".gz") || void 0) ?? (url.pathname.endsWith(".gz") || void 0); + } + static isCFileReference(obj) { + return obj instanceof _CFileReference; + } + static from(fileReference, encoding, baseFilename, gz) { + if (_CFileReference.isCFileReference(fileReference)) + return fileReference; + if (fileReference instanceof URL) + return new _CFileReference(fileReference, encoding, baseFilename, gz); + return new _CFileReference(fileReference.url, fileReference.encoding, fileReference.baseFilename, fileReference.gz); + } + toJson() { + return { + url: this.url.href, + encoding: this.encoding, + baseFilename: this.baseFilename, + gz: this.gz + }; + } +}; +function toFileReference(file, encoding, baseFilename, gz) { + const fileReference = typeof file === "string" ? toFileURL(file) : file; + if (fileReference instanceof URL) + return new CFileReference(fileReference, encoding, baseFilename, gz); + return CFileReference.from(fileReference); +} +function isFileReference(ref) { + return CFileReference.isCFileReference(ref) || !(ref instanceof URL) && typeof ref !== "string"; +} + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/errors/errors.js +var ErrorNotImplemented = class extends Error { + method; + constructor(method, options) { + super(`Method ${method} is not supported.`, options); + this.method = method; + } +}; +var AssertionError = class extends Error { + message; + constructor(message, options) { + super(message, options); + this.message = message; + } +}; + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/errors/assert.js +function assert2(value, message) { + if (!value) { + throw new AssertionError(message ?? "Assertion failed"); + } +} + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/encode-decode.js +var import_node_zlib = require("node:zlib"); + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/arrayBuffers.js +function asUint8Array(data) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength); +} +function arrayBufferViewToBuffer(data) { + if (data instanceof Buffer) { + return data; + } + const buf = Buffer.from(data.buffer); + if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) { + return buf; + } + return buf.subarray(data.byteOffset, data.byteOffset + data.byteLength); +} +function copyArrayBufferView(data) { + return new Uint8Array(data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength)); +} +function swap16Poly(data) { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + for (let i = 0; i < view.byteLength; i += 2) { + view.setUint16(i, view.getUint16(i, false), true); + } + return data; +} +function swap16(data) { + if (typeof Buffer !== "undefined") { + return arrayBufferViewToBuffer(data).swap16(); + } + return swap16Poly(data); +} +function swapBytes(data) { + const buf = copyArrayBufferView(data); + return swap16(buf); +} + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/encode-decode.js +var BOM_BE = 65279; +var BOM_LE = 65534; +var decoderUTF8 = new TextDecoder("utf-8"); +var decoderUTF16LE = new TextDecoder("utf-16le"); +var decoderUTF16BE = createTextDecoderUtf16BE(); +function decodeUtf16LE(data) { + const buf = asUint8Array(data); + const bom = buf[0] << 8 | buf[1]; + return decoderUTF16LE.decode(bom === BOM_LE ? buf.subarray(2) : buf); +} +function decodeUtf16BE(data) { + const buf = asUint8Array(data); + const bom = buf[0] << 8 | buf[1]; + return decoderUTF16BE.decode(bom === BOM_BE ? buf.subarray(2) : buf); +} +function decodeToString(data, encoding) { + if (isGZipped(data)) { + return decodeToString(decompressBuffer(data), encoding); + } + const buf = asUint8Array(data); + const bom = buf[0] << 8 | buf[1]; + if (bom === BOM_BE || buf[0] === 0 && buf[1] !== 0) + return decodeUtf16BE(buf); + if (bom === BOM_LE || buf[0] !== 0 && buf[1] === 0) + return decodeUtf16LE(buf); + if (!encoding) + return decoderUTF8.decode(buf); + switch (encoding) { + case "utf-16be": + case "utf16be": + return decodeUtf16BE(buf); + case "utf-16le": + case "utf16le": + return decodeUtf16LE(buf); + case "utf-8": + case "utf8": + return decoderUTF8.decode(buf); + } + throw new UnsupportedEncodingError(encoding); +} +function decode(data, encoding) { + switch (encoding) { + case "base64": + case "base64url": + case "hex": + return arrayBufferViewToBuffer(data).toString(encoding); + } + const result = decodeToString(data, encoding); + return result; +} +function encodeString(str, encoding, bom) { + switch (encoding) { + case "utf-16be": + case "utf16be": + return encodeUtf16BE(str, bom); + case "utf-16le": + case "utf16le": + return encodeUtf16LE(str, bom); + } + return Buffer.from(str, encoding); +} +function encodeUtf16LE(str, bom = true) { + const buf = Buffer.from(str, "utf16le"); + if (bom) { + const target = Buffer.alloc(buf.length + 2); + target.writeUint16LE(BOM_BE); + buf.copy(target, 2); + return target; + } + return buf; +} +function encodeUtf16BE(str, bom = true) { + return swap16(encodeUtf16LE(str, bom)); +} +function createTextDecoderUtf16BE() { + try { + const decoder = new TextDecoder("utf-16be"); + return decoder; + } catch (e) { + return { + encoding: "utf-16be", + fatal: false, + ignoreBOM: false, + decode: (input) => decoderUTF16LE.decode(swapBytes(input)) + }; + } +} +var UnsupportedEncodingError = class extends Error { + constructor(encoding) { + super(`Unsupported encoding: ${encoding}`); + } +}; +function isGZipped(data) { + if (typeof data === "string") + return false; + const buf = asUint8Array(data); + return buf[0] === 31 && buf[1] === 139; +} +function decompressBuffer(data) { + if (!isGZipped(data)) + return data; + const buf = arrayBufferViewToBuffer(data); + return (0, import_node_zlib.gunzipSync)(buf); +} + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/CFileResource.js +var CFileResource = class _CFileResource { + url; + content; + encoding; + _text; + baseFilename; + _gz; + constructor(url, content, encoding, baseFilename, gz) { + this.url = url; + this.content = content; + this.encoding = encoding; + this.baseFilename = baseFilename ?? (url.protocol !== "data:" && url.pathname.split("/").pop() || void 0); + this._gz = gz; + } + get gz() { + if (this._gz !== void 0) + return this._gz; + if (this.url.pathname.endsWith(".gz")) + return true; + if (typeof this.content === "string") + return false; + return isGZipped(this.content); + } + getText() { + if (this._text !== void 0) + return this._text; + const text = typeof this.content === "string" ? this.content : decode(this.content, this.encoding); + this._text = text; + return text; + } + toJson() { + return { + url: this.url.href, + content: this.getText(), + encoding: this.encoding, + baseFilename: this.baseFilename, + gz: this.gz + }; + } + static isCFileResource(obj) { + return obj instanceof _CFileResource; + } + static from(urlOrFileResource, content, encoding, baseFilename, gz) { + if (_CFileResource.isCFileResource(urlOrFileResource)) + return urlOrFileResource; + if (urlOrFileResource instanceof URL) { + assert2(content !== void 0); + return new _CFileResource(urlOrFileResource, content, encoding, baseFilename, gz); + } + if (content !== void 0) { + const fileRef = urlOrFileResource; + return new _CFileResource(fileRef.url, content, fileRef.encoding, fileRef.baseFilename, fileRef.gz); + } + assert2("content" in urlOrFileResource && urlOrFileResource.content !== void 0); + const fileResource = urlOrFileResource; + return new _CFileResource(fileResource.url, fileResource.content, fileResource.encoding, fileResource.baseFilename, fileResource.gz); + } +}; + +// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.1.0/node_modules/@cspell/cspell-service-bus/dist/esm/errors.js var ErrorUnhandledRequest = class extends Error { request; constructor(request) { @@ -50297,7 +51625,7 @@ var UnhandledHandlerError = class extends Error { } }; -// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.0.0/node_modules/@cspell/cspell-service-bus/dist/esm/request.js +// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.1.0/node_modules/@cspell/cspell-service-bus/dist/esm/request.js var BaseServiceRequest = class { type; params; @@ -50321,11 +51649,8 @@ function createResponseFail(_request, error3) { function isServiceResponseSuccess(res) { return "value" in res && res.error === void 0; } -function isServiceResponseFailure(res) { - return res.error !== void 0; -} -// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.0.0/node_modules/@cspell/cspell-service-bus/dist/esm/bus.js +// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.1.0/node_modules/@cspell/cspell-service-bus/dist/esm/bus.js var MAX_DEPTH = 10; var ServiceBus = class { handlers = []; @@ -50372,7 +51697,7 @@ var ServiceBus = class { } }; -// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.0.0/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.js +// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.1.0/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.js function createRequestHandler(requestDef, fn, name, description) { return createIsRequestHandler(requestDef.is, fn, name ?? requestDef.type, description); } @@ -50387,7 +51712,7 @@ function createIsRequestHandler(isA, fn, name, description) { }; } -// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.0.0/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.js +// ../node_modules/.pnpm/@cspell+cspell-service-bus@8.1.0/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.js function requestFactory(requestType) { class RequestClass extends ServiceRequestCls { static type = requestType; @@ -50408,7 +51733,7 @@ function requestFactory(requestType) { return RequestClass; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/common/stat.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/stat.js function compareStats(left, right) { if (left === right) return 0; @@ -50418,151 +51743,48 @@ function compareStats(left, right) { return diff < 0 ? -1 : diff > 0 ? 1 : 0; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/errors/ErrorNotImplemented.js -var ErrorNotImplemented = class extends Error { - method; - constructor(method) { - super(`Method ${method} is not supported.`); - this.method = method; - } -}; - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/handlers/node/file.js -var import_assert2 = __toESM(require("assert"), 1); -var import_fs2 = require("fs"); -var import_url2 = require("url"); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/handlers/node/file.js +var import_fs3 = require("fs"); +var import_url5 = require("url"); +var import_util18 = require("util"); var import_zlib = require("zlib"); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/common/arrayBuffers.js -function arrayBufferViewToBuffer(data) { - if (data instanceof Buffer) { - return data; - } - const buf = Buffer.from(data.buffer); - if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) { - return buf; - } - return buf.subarray(data.byteOffset, data.byteOffset + data.byteLength); -} -function copyArrayBufferView(data) { - return new Uint8Array(data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength)); -} - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/common/encode-decode.js -var BOM_BE = 65279; -var BOM_LE = 65534; -function decodeUtf16LE(data) { - let buf = arrayBufferViewToBuffer(data); - const bom = buf[0] << 8 | buf[1]; - buf = bom === BOM_LE ? buf.subarray(2) : buf; - return buf.toString("utf16le"); -} -function decodeUtf16BE(buf) { - return decodeUtf16LE(swapBytes(buf)); -} -function decode(data, encoding) { - const buf = arrayBufferViewToBuffer(data); - switch (encoding) { - case "utf16be": - return decodeUtf16BE(buf); - case "utf16le": - return decodeUtf16LE(buf); - } - if (buf.length < 2 || encoding && !encoding.startsWith("utf")) - return buf.toString(encoding); - const bom = buf[0] << 8 | buf[1]; - if (bom === BOM_BE || buf[0] === 0 && buf[1] !== 0) - return decodeUtf16BE(buf); - if (bom === BOM_LE || buf[0] !== 0 && buf[1] === 0) - return decodeUtf16LE(buf); - return buf.toString(encoding); -} -function swapBytesInPlace(data) { - const buf = arrayBufferViewToBuffer(data); - buf.swap16(); - return buf; -} -function swapBytes(data) { - const buf = copyArrayBufferView(data); - return swapBytesInPlace(buf); -} -function encodeString(str, encoding, bom) { - switch (encoding) { - case "utf16be": - return encodeUtf16BE(str, bom); - case "utf16le": - return encodeUtf16LE(str, bom); - } - return Buffer.from(str, encoding); -} -function encodeUtf16LE(str, bom = true) { - const buf = Buffer.from(str, "utf16le"); - if (bom) { - const target = Buffer.alloc(buf.length + 2); - target.writeUint16LE(BOM_BE); - buf.copy(target, 2); - return target; - } - return buf; -} -function encodeUtf16BE(str, bom = true) { - return swapBytesInPlace(encodeUtf16LE(str, bom)); -} - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/errors/error.js -function toError(e) { +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/errors/error.js +function toError2(e) { if (e instanceof Error) return e; - if (typeof e === "object" && e && typeof e.message === "string") { - return e; + if (typeof e === "object" && e && "message" in e && typeof e.message === "string") { + return new Error(e.message, { cause: e }); } return Error(e && e.toString()); } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/util.js -var import_url = require("url"); -var isURLRegExp = /^(\w{2,64}:\/\/|data:)/i; -function isUrlLike2(filename) { - return filename instanceof URL || isURLRegExp.test(filename); -} -function toURL(filename) { - return filename instanceof URL || typeof filename !== "string" ? filename : isUrlLike2(filename) ? new URL(filename) : (0, import_url.pathToFileURL)(filename); -} -var regMatchFilename = /filename=([^;,]*)/; -function urlBasename(url) { - function guessDataUrlName(header) { - const filenameMatch = header.match(regMatchFilename); - if (filenameMatch) - return filenameMatch[1]; - const mime = header.split(";", 1)[0]; - return mime.replace(/\W/g, "."); - } - if (typeof url === "string" && url.startsWith("data:")) { - return guessDataUrlName(url.split(",", 1)[0].split(":", 2)[1]); - } - url = toURL(url); - if (url.protocol === "data:") { - return guessDataUrlName(url.pathname.split(",", 1)[0]); - } - return basename2(url.pathname); -} -function urlDirname(url) { - if (typeof url === "string" && url.startsWith("data:")) { - return toURL("data:"); - } - url = toURL(url); - if (url.protocol === "data:") { - return toURL("data:"); - } - return new URL(url.pathname.endsWith("/") ? ".." : ".", url); -} -function basename2(path26) { - path26 = path26.endsWith("/") ? path26.slice(0, path26.length - 1) : path26; - const idx2 = path26.lastIndexOf("/"); - return idx2 >= 0 ? path26.slice(idx2 + 1) || "" : path26; +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/dataUrl.js +function encodeDataUrl(data, mediaType, attributes) { + if (typeof data === "string") + return encodeString2(data, mediaType, attributes); + const attribs = encodeAttributes(attributes || []); + const buf = arrayBufferViewToBuffer(data); + return `data:${mediaType}${attribs};base64,${buf.toString("base64url")}`; +} +function toDataUrl(data, mediaType, attributes) { + return new URL(encodeDataUrl(data, mediaType, attributes)); +} +function encodeString2(data, mediaType, attributes) { + mediaType = mediaType || "text/plain"; + attributes = attributes || []; + const asUrlComp = encodeURIComponent(data); + const asBase64 = Buffer.from(data).toString("base64url"); + const useBase64 = asBase64.length < asUrlComp.length - 7; + const encoded = useBase64 ? asBase64 : asUrlComp; + const attribMap = new Map([["charset", "utf-8"]].concat([...attributes])); + attribMap.set("charset", "utf-8"); + const attribs = encodeAttributes(attribMap); + return `data:${mediaType}${attribs}${useBase64 ? ";base64" : ""},${encoded}`; +} +function encodeAttributes(attributes) { + return [...attributes].map(([key, value]) => `;${key}=${encodeURIComponent(value)}`).join(""); } - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/dataUrl.js var dataUrlRegExHead = /^data:(?[^;,]*)(?(?:;[^=]+=[^;,]*)*)(?;base64)?$/; function decodeDataUrl(url) { url = url.toString(); @@ -50580,8 +51802,28 @@ function decodeDataUrl(url) { const data = isBase64 ? Buffer.from(encodedData, "base64url") : Buffer.from(decodeURIComponent(encodedData)); return { mediaType, data, encoding, attributes }; } +function guessMimeType(filename) { + if (filename.endsWith(".trie")) + return { mimeType: "application/vnd.cspell.dictionary+trie", encoding: "utf-8" }; + if (filename.endsWith(".trie.gz")) + return { mimeType: "application/vnd.cspell.dictionary+trie.gz" }; + if (filename.endsWith(".txt")) + return { mimeType: "text/plain", encoding: "utf-8" }; + if (filename.endsWith(".txt.gz")) + return { mimeType: "application/gzip" }; + if (filename.endsWith(".gz")) + return { mimeType: "application/gzip" }; + if (filename.endsWith(".json")) + return { mimeType: "application/json", encoding: "utf-8" }; + if (filename.endsWith(".yaml") || filename.endsWith(".yml")) + return { mimeType: "application/x-yaml", encoding: "utf-8" }; + return void 0; +} -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/FetchError.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/_fetch.js +var _fetch = global.fetch; + +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/FetchError.js var FetchUrlError = class _FetchUrlError extends Error { code; status; @@ -50618,51 +51860,48 @@ function isNodeError(e) { return true; return false; } -function isError2(e) { +function isError3(e) { return e instanceof Error; } function isErrorWithOptionalCause(e) { - return !!e && typeof e === "object" && "cause" in e && isNodeError(e.cause); + return isError3(e) && (!("cause" in e) || isNodeError(e.cause) || isNodeError(e)); } function getCause(e) { return isErrorWithOptionalCause(e) ? e.cause : void 0; } +function toFetchUrlError(err, url) { + return err instanceof FetchUrlError ? err : FetchUrlError.fromError(url, toError3(err)); +} +function toError3(err) { + return err instanceof Error ? err : Error("Unknown Error", { cause: err }); +} -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/fetch.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/fetch.js async function fetchHead(request) { - const url = toURL2(request); + const url = toURL3(request); try { - const r = await fetch(url, { method: "HEAD" }); + const r = await _fetch(url, { method: "HEAD" }); return r.headers; } catch (e) { - console.warn("fetchHead Error %o", e); - if (isError2(e)) { - throw FetchUrlError.fromError(url, e); - } - throw e; + throw toFetchUrlError(e, url); } } async function fetchURL(url) { try { - const response = await fetch(url); + const response = await _fetch(url); if (!response.ok) { throw FetchUrlError.create(url, response.status); } return Buffer.from(await response.arrayBuffer()); } catch (e) { - if (e instanceof FetchUrlError) - throw e; - if (isError2(e)) { - throw FetchUrlError.fromError(url, e); - } - throw e; + throw toFetchUrlError(e, url); } } -function toURL2(url) { +function toURL3(url) { return typeof url === "string" ? new URL(url) : url; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/stat.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/stat.js async function getStatHttp(url) { const headers = await fetchHead(url); const eTag = headers.get("etag") || void 0; @@ -50674,108 +51913,70 @@ async function getStatHttp(url) { }; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestFsReadBinaryFile.js -var RequestType = "fs:readBinaryFile"; -var RequestFsReadBinaryFile = requestFactory(RequestType); -var RequestTypeSync = "fs:readBinaryFileSync"; -var RequestFsReadBinaryFileSync = requestFactory(RequestTypeSync); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/requests/RequestFsReadFile.js +var RequestType = "fs:readFile"; +var RequestFsReadFile = requestFactory(RequestType); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestFsReadFile.js -var RequestType2 = "fs:readFile"; -var RequestFsReadFileText = requestFactory(RequestType2); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/requests/RequestFsReadFileSync.js +var RequestType2 = "fs:readFileSync"; +var RequestFsReadFileTextSync = requestFactory(RequestType2); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestFsReadFileSync.js -var RequestType3 = "fs:readFileSync"; -var RequestFsReadFileTextSync = requestFactory(RequestType3); - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestFsStat.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/requests/RequestFsStat.js var RequestTypeStat = "fs:stat"; var RequestFsStat = requestFactory(RequestTypeStat); var RequestTypeStatSync = "fs:statSync"; var RequestFsStatSync = requestFactory(RequestTypeStatSync); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestFsWriteFile.js -var RequestType4 = "fs:writeFile"; -var RequestFsWriteFile = requestFactory(RequestType4); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/requests/RequestFsWriteFile.js +var RequestType3 = "fs:writeFile"; +var RequestFsWriteFile = requestFactory(RequestType3); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/requests/RequestZlibInflate.js -var RequestType5 = "zlib:inflate"; -var RequestZlibInflate = requestFactory(RequestType5); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/requests/RequestZlibInflate.js +var RequestType4 = "zlib:inflate"; +var RequestZlibInflate = requestFactory(RequestType4); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/handlers/node/file.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/handlers/node/file.js var isGzFileRegExp = /\.gz($|[?#])/; function isGzFile(url) { - return isGzFileRegExp.test(url.pathname); -} -var handleRequestFsReadBinaryFile = RequestFsReadBinaryFile.createRequestHandler(({ params }) => createResponse(import_fs2.promises.readFile((0, import_url2.fileURLToPath)(params.url)).then((content) => ({ url: params.url, content }))), void 0, "Node: Read Binary File."); -var handleRequestFsReadBinaryFileSync = RequestFsReadBinaryFileSync.createRequestHandler(({ params }) => createResponse({ url: params.url, content: (0, import_fs2.readFileSync)((0, import_url2.fileURLToPath)(params.url)) }), void 0, "Node: Sync Read Binary File."); -var handleRequestFsReadFile = RequestFsReadFileText.createRequestHandler((req, _, dispatcher) => { - const { url, encoding } = req.params; - const res = dispatcher.dispatch(RequestFsReadBinaryFile.create({ url })); - if (!isServiceResponseSuccess(res)) { - (0, import_assert2.default)(isServiceResponseFailure(res)); - return createResponseFail(req, res.error); - } - return createResponse(res.value.then((res2) => { - const content = bufferToText(res2.content, encoding); - return { - url, - baseFilename: res2.baseFilename, - encoding, - ...content - }; - })); -}, void 0, "Node: Read Text File."); -var handleRequestFsReadFileSync = RequestFsReadFileTextSync.createRequestHandler((req, _, dispatcher) => { - const { url, encoding } = req.params; - const res = dispatcher.dispatch(RequestFsReadBinaryFileSync.create({ url })); - if (!isServiceResponseSuccess(res)) { - (0, import_assert2.default)(isServiceResponseFailure(res)); - return createResponseFail(req, res.error); - } - return createResponse({ - encoding, - ...res.value, - ...bufferToText(res.value.content, encoding) - }); -}, void 0, "Node: Sync Read Text File."); -var handleRequestZlibInflate = RequestZlibInflate.createRequestHandler(({ params }) => createResponse((0, import_zlib.gunzipSync)(params.data).toString("utf-8")), void 0, "Node: gz deflate."); + return isGzFileRegExp.test(typeof url === "string" ? url : url.pathname); +} +var pGzip = (0, import_util18.promisify)(import_zlib.gzip); +var handleRequestFsReadFile = RequestFsReadFile.createRequestHandler(({ params }) => { + const baseFilename = urlBasename(params.url); + return createResponse(import_fs3.promises.readFile((0, import_url5.fileURLToPath)(params.url)).then((content) => CFileResource.from(params.url, content, params.encoding, baseFilename))); +}, void 0, "Node: Read Binary File."); +var handleRequestFsReadFileSync = RequestFsReadFileTextSync.createRequestHandler(({ params }) => createResponse(CFileResource.from({ ...params, content: (0, import_fs3.readFileSync)((0, import_url5.fileURLToPath)(params.url)) })), void 0, "Node: Sync Read Binary File."); +var handleRequestZlibInflate = RequestZlibInflate.createRequestHandler(({ params }) => createResponse((0, import_zlib.gunzipSync)(arrayBufferViewToBuffer(params.data))), void 0, "Node: gz deflate."); var supportedFetchProtocols = { "http:": true, "https:": true }; -var handleRequestFsReadBinaryFileHttp = RequestFsReadBinaryFile.createRequestHandler((req, next) => { +var handleRequestFsReadFileHttp = RequestFsReadFile.createRequestHandler((req, next) => { const { url } = req.params; if (!(url.protocol in supportedFetchProtocols)) return next(req); - return createResponse(fetchURL(url).then((content) => ({ url, content }))); + return createResponse(fetchURL(url).then((content) => CFileResource.from({ ...req.params, content }))); }, void 0, "Node: Read Http(s) file."); -var handleRequestFsReadBinaryFileSyncData = RequestFsReadBinaryFileSync.createRequestHandler((req, next) => { - const { url } = req.params; +var handleRequestFsReadFileSyncData = RequestFsReadFileTextSync.createRequestHandler((req, next) => { + const { url, encoding } = req.params; if (url.protocol !== "data:") return next(req); const data = decodeDataUrl(url); - return createResponse({ url, content: data.data, baseFilename: data.attributes.get("filename") }); + return createResponse(CFileResource.from({ url, content: data.data, encoding, baseFilename: data.attributes.get("filename") })); }, void 0, "Node: Read data: urls."); -var handleRequestFsReadBinaryFileData = RequestFsReadBinaryFile.createRequestHandler((req, next, dispatcher) => { +var handleRequestFsReadFileData = RequestFsReadFile.createRequestHandler((req, next, dispatcher) => { const { url } = req.params; if (url.protocol !== "data:") return next(req); - const res = dispatcher.dispatch(RequestFsReadBinaryFileSync.create(req.params)); + const res = dispatcher.dispatch(RequestFsReadFileTextSync.create(req.params)); if (!isServiceResponseSuccess(res)) return res; return createResponse(Promise.resolve(res.value)); }, void 0, "Node: Read data: urls."); -function bufferToText(data, encoding) { - const buf = arrayBufferViewToBuffer(data); - const gz = buf[0] === 31 && buf[1] === 139; - const content = gz ? decode((0, import_zlib.gunzipSync)(buf), encoding) : decode(buf, encoding); - return { content, gz }; -} -var handleRequestFsStat = RequestFsStat.createRequestHandler(({ params }) => createResponse(import_fs2.promises.stat((0, import_url2.fileURLToPath)(params.url))), void 0, "Node: fs.stat."); +var handleRequestFsStat = RequestFsStat.createRequestHandler(({ params }) => createResponse(import_fs3.promises.stat((0, import_url5.fileURLToPath)(params.url))), void 0, "Node: fs.stat."); var handleRequestFsStatSync = RequestFsStatSync.createRequestHandler((req) => { const { params } = req; try { - return createResponse((0, import_fs2.statSync)((0, import_url2.fileURLToPath)(params.url))); + return createResponse((0, import_fs3.statSync)((0, import_url5.fileURLToPath)(params.url))); } catch (e) { - return createResponseFail(req, toError(e)); + return createResponseFail(req, toError2(e)); } }, void 0, "Node: fs.stat."); var handleRequestFsStatHttp = RequestFsStat.createRequestHandler((req, next) => { @@ -50784,24 +51985,52 @@ var handleRequestFsStatHttp = RequestFsStat.createRequestHandler((req, next) => return next(req); return createResponse(getStatHttp(url)); }, void 0, "Node: http get stat"); -var handleRequestFsWriteFile = RequestFsWriteFile.createRequestHandler(({ params }) => createResponse(import_fs2.promises.writeFile(params.url, params.content)), void 0, "Node: fs.writeFile"); -var handleRequestFsWriteFileGz = RequestFsWriteFile.createRequestHandler((req, next) => { - const { url, content } = req.params; - if (!isGzFile(url)) +var handleRequestFsWriteFile = RequestFsWriteFile.createRequestHandler(({ params }) => createResponse(writeFile2(params, params.content)), void 0, "Node: fs.writeFile"); +async function writeFile2(fileRef, content) { + const gz = isGZipped(content); + const { url, encoding, baseFilename } = fileRef; + const resultRef = { url, encoding, baseFilename, gz }; + await import_fs3.promises.writeFile((0, import_url5.fileURLToPath)(fileRef.url), encodeContent(fileRef, content)); + return resultRef; +} +var handleRequestFsWriteFileDataUrl = RequestFsWriteFile.createRequestHandler((req, next) => { + const fileResource = req.params; + const { url } = req.params; + if (url.protocol !== "data:") return next(req); - return createResponse(import_fs2.promises.writeFile(url, (0, import_zlib.gzipSync)(content))); -}, void 0, "Node: http get stat"); + const gz = isGZipped(fileResource.content); + const baseFilename = fileResource.baseFilename || "file.txt" + (gz ? ".gz" : ""); + const mt = guessMimeType(baseFilename); + const mediaType = mt?.mimeType || "text/plain"; + const dataUrl = toDataUrl(fileResource.content, mediaType, [["filename", baseFilename]]); + return createResponse(Promise.resolve({ url: dataUrl, baseFilename, gz, encoding: mt?.encoding })); +}, void 0, "Node: fs.writeFile DataUrl"); +var handleRequestFsWriteFileGz = RequestFsWriteFile.createRequestHandler((req, next, dispatcher) => { + const fileResource = req.params; + if (!fileResource.gz && !isGzFile(fileResource.url) && (!fileResource.baseFilename || !isGzFile(fileResource.baseFilename))) { + return next(req); + } + if (typeof fileResource.content !== "string" && isGZipped(fileResource.content)) { + return next(req); + } + return createResponse(compressAndChainWriteRequest(dispatcher, fileResource, fileResource.content)); +}, void 0, "Node: fs.writeFile compressed"); +async function compressAndChainWriteRequest(dispatcher, fileRef, content) { + const buf = await pGzip(encodeContent(fileRef, content)); + const res = dispatcher.dispatch(RequestFsWriteFile.create({ ...fileRef, content: buf })); + assert2(isServiceResponseSuccess(res)); + return res.value; +} function registerHandlers(serviceBus) { const handlers = [ - handleRequestFsWriteFile, - handleRequestFsWriteFileGz, - handleRequestFsReadBinaryFile, - handleRequestFsReadBinaryFileSync, - handleRequestFsReadBinaryFileHttp, - handleRequestFsReadBinaryFileData, - handleRequestFsReadBinaryFileSyncData, handleRequestFsReadFile, handleRequestFsReadFileSync, + handleRequestFsWriteFile, + handleRequestFsWriteFileDataUrl, + handleRequestFsWriteFileGz, + handleRequestFsReadFileHttp, + handleRequestFsReadFileData, + handleRequestFsReadFileSyncData, handleRequestZlibInflate, handleRequestFsStatSync, handleRequestFsStat, @@ -50809,8 +52038,16 @@ function registerHandlers(serviceBus) { ]; handlers.forEach((handler) => serviceBus.addHandler(handler)); } +function encodeContent(ref, content) { + if (typeof content === "string") { + if (!ref.encoding || ref.encoding === "utf-8") + return content; + return arrayBufferViewToBuffer(encodeString(content, ref.encoding)); + } + return arrayBufferViewToBuffer(content); +} -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/CSpellIONode.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/CSpellIONode.js var defaultCSpellIONode = void 0; var CSpellIONode = class { serviceBus; @@ -50818,41 +52055,42 @@ var CSpellIONode = class { this.serviceBus = serviceBus; registerHandlers(serviceBus); } - readFile(uriOrFilename, encoding = "utf8") { - const url = toURL(uriOrFilename); - const res = this.serviceBus.dispatch(RequestFsReadFileText.create({ url, encoding })); + readFile(urlOrFilename, encoding) { + const ref = toFileReference(urlOrFilename, encoding); + const res = this.serviceBus.dispatch(RequestFsReadFile.create(ref)); if (!isServiceResponseSuccess(res)) { throw genError(res.error, "readFile"); } return res.value; } - readFileSync(uriOrFilename, encoding = "utf8") { - const url = toURL(uriOrFilename); - const res = this.serviceBus.dispatch(RequestFsReadFileTextSync.create({ url, encoding })); + readFileSync(urlOrFilename, encoding) { + const ref = toFileReference(urlOrFilename, encoding); + const res = this.serviceBus.dispatch(RequestFsReadFileTextSync.create(ref)); if (!isServiceResponseSuccess(res)) { throw genError(res.error, "readFileSync"); } return res.value; } - writeFile(uriOrFilename, content) { - const url = toURL(uriOrFilename); - const res = this.serviceBus.dispatch(RequestFsWriteFile.create({ url, content })); + writeFile(urlOrFilename, content) { + const ref = toFileReference(urlOrFilename); + const fileResource = CFileResource.from(ref, content); + const res = this.serviceBus.dispatch(RequestFsWriteFile.create(fileResource)); if (!isServiceResponseSuccess(res)) { throw genError(res.error, "writeFile"); } return res.value; } - getStat(uriOrFilename) { - const url = toURL(uriOrFilename); - const res = this.serviceBus.dispatch(RequestFsStat.create({ url })); + getStat(urlOrFilename) { + const ref = toFileReference(urlOrFilename); + const res = this.serviceBus.dispatch(RequestFsStat.create(ref)); if (!isServiceResponseSuccess(res)) { throw genError(res.error, "getStat"); } return res.value; } - getStatSync(uriOrFilename) { - const url = toURL(uriOrFilename); - const res = this.serviceBus.dispatch(RequestFsStatSync.create({ url })); + getStatSync(urlOrFilename) { + const ref = toFileReference(urlOrFilename); + const res = this.serviceBus.dispatch(RequestFsStatSync.create(ref)); if (!isServiceResponseSuccess(res)) { throw genError(res.error, "getStatSync"); } @@ -50861,14 +52099,21 @@ var CSpellIONode = class { compareStats(left, right) { return compareStats(left, right); } - toURL(uriOrFilename) { - return toURL(uriOrFilename); + toURL(urlOrFilename, relativeTo2) { + if (isFileReference(urlOrFilename)) + return urlOrFilename.url; + return toURL2(urlOrFilename, relativeTo2); } - uriBasename(uriOrFilename) { - return urlBasename(uriOrFilename); + toFileURL(urlOrFilename, relativeTo2) { + if (isFileReference(urlOrFilename)) + return urlOrFilename.url; + return toFileURL(urlOrFilename, relativeTo2); } - uriDirname(uriOrFilename) { - return urlDirname(uriOrFilename); + urlBasename(urlOrFilename) { + return urlBasename(this.toURL(urlOrFilename)); + } + urlDirname(urlOrFilename) { + return urlDirname(this.toURL(urlOrFilename)); } }; function genError(err, alt) { @@ -50882,11 +52127,13 @@ function getDefaultCSpellIO() { return cspellIO2; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/fileReader.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/fileWriter.js +var fs3 = __toESM(require("fs"), 1); var Stream = __toESM(require("stream"), 1); -var import_util17 = require("util"); +var import_util19 = require("util"); +var zlib = __toESM(require("zlib"), 1); -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/common/transformers.js +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/common/transformers.js function encoderTransformer(iterable, encoding) { return isAsyncIterable2(iterable) ? encoderAsyncIterable(iterable, encoding) : encoderIterable(iterable, encoding); } @@ -50908,36 +52155,57 @@ function isAsyncIterable2(v) { return v && typeof v === "object" && !!v[Symbol.asyncIterator]; } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/fileReader.js -var pipeline2 = (0, import_util17.promisify)(Stream.pipeline); - -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/node/file/fileWriter.js -var fs2 = __toESM(require("fs"), 1); -var Stream2 = __toESM(require("stream"), 1); -var import_util19 = require("util"); -var zlib = __toESM(require("zlib"), 1); -var pipeline4 = (0, import_util19.promisify)(Stream2.pipeline); +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/node/file/fileWriter.js +var pipeline2 = (0, import_util19.promisify)(Stream.pipeline); function writeToFile(filename, data, encoding) { return writeToFileIterable(filename, typeof data === "string" ? [data] : data, encoding); } function writeToFileIterable(filename, data, encoding) { - const stream = Stream2.Readable.from(encoderTransformer(data, encoding)); - const zip = filename.match(/\.gz$/) ? zlib.createGzip() : new Stream2.PassThrough(); - return pipeline4(stream, zip, fs2.createWriteStream(filename)); + const stream = Stream.Readable.from(encoderTransformer(data, encoding)); + const zip = filename.match(/\.gz$/) ? zlib.createGzip() : new Stream.PassThrough(); + return pipeline2(stream, zip, fs3.createWriteStream(filename)); } -// ../node_modules/.pnpm/cspell-io@8.0.0/node_modules/cspell-io/dist/esm/file/file.js -var readFileText2 = function(filename, encoding) { - return getDefaultCSpellIO().readFile(filename, encoding).then((fr) => fr.content); -}; -var readFileTextSync2 = function(filename, encoding) { - return getDefaultCSpellIO().readFileSync(filename, encoding).content; -}; +// ../node_modules/.pnpm/cspell-io@8.1.0/node_modules/cspell-io/dist/esm/file/file.js +async function readFileText(filename, encoding) { + const fr = await getDefaultCSpellIO().readFile(filename, encoding); + return fr.getText(); +} +function readFileTextSync(filename, encoding) { + return getDefaultCSpellIO().readFileSync(filename, encoding).getText(); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js +var path13 = __toESM(require("path"), 1); +var import_url24 = require("url"); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js -var path12 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/events/events.js +var ClearCacheEvent = class _ClearCacheEvent extends Event { + constructor() { + super(_ClearCacheEvent.eventName); + } + static eventName = "clear-cache"; +}; +var eventEmitter = new EventTarget(); +function addEventListener(event, listener) { + eventEmitter.addEventListener(event, listener); + return { + dispose() { + eventEmitter.removeEventListener(event, listener); + } + }; +} +function dispatchEvent(event) { + eventEmitter.dispatchEvent(event); +} +function onClearCache(listener) { + return addEventListener(ClearCacheEvent.eventName, listener); +} +function dispatchClearCache() { + dispatchEvent(new ClearCacheEvent()); +} -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Models/CSpellSettingsInternalDef.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Models/CSpellSettingsInternalDef.js var SymbolCSpellSettingsInternal = Symbol("CSpellSettingsInternal"); function cleanCSpellSettingsInternal(parts = {}) { const csi = clean(parts); @@ -50960,138 +52228,82 @@ function isDictionaryDefinitionInlineInternal(def) { return !!(defInline.words || defInline.flagWords || defInline.ignoreWords || defInline.suggestWords); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/AutoResolveLRUCache.js -var import_assert3 = __toESM(require("assert"), 1); -var AutoResolveLRUCache = class { - maxSize; - isEqual; - list = {}; - count = 0; - _misses = 0; - _hits = 0; - _added = 0; - _removed = 0; - constructor(maxSize, isEqual) { - this.maxSize = maxSize; - this.isEqual = isEqual; - (0, import_assert3.default)(maxSize > 0); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/AutoResolve.js +function autoResolve(map3, key, resolve12) { + const found = map3.get(key); + if (found !== void 0 || map3.has(key)) + return found; + const value = resolve12(key); + map3.set(key, value); + return value; +} +var AutoResolveCache = class { + map = /* @__PURE__ */ new Map(); + get(k, resolve12) { + return resolve12 ? autoResolve(this.map, k, resolve12) : this.map.get(k); } - get(params, fn) { - const isEqual = this.isEqual; - for (let n = this.list.n; n; n = n.n) { - if (isEqual(n.value.p, params)) { - this.addToHead(n); - ++this._hits; - return n.value.r; - } - } - ++this._misses; - if (!fn) - return void 0; - const value = { - p: params, - r: fn(params) - }; - this.addToHead({ value, n: void 0, p: void 0 }); - return value.r; + has(k) { + return this.map.has(k); } - get size() { - return this.count; + set(k, v) { + this.map.set(k, v); + return this; } - get hits() { - return this._hits; + delete(k) { + return this.map.delete(k); } - get misses() { - return this._misses; + clear() { + this.map.clear(); } - get added() { - return this._added; + dispose() { + this.clear(); } - get removed() { - return this._removed; +}; +function createAutoResolveCache() { + return new AutoResolveCache(); +} +function autoResolveWeak(map3, key, resolve12) { + const found = map3.get(key); + if (found !== void 0 || map3.has(key)) + return found; + const value = resolve12(key); + map3.set(key, value); + return value; +} +var AutoResolveWeakCache = class { + _map = /* @__PURE__ */ new WeakMap(); + get(k, resolve12) { + return resolve12 ? autoResolveWeak(this._map, k, resolve12) : this._map.get(k); } - clear() { - this._added = 0; - this._hits = 0; - this._misses = 0; - this._removed = 0; - this.list.n = void 0; - this.list.p = void 0; - this.count = 0; - } - addToHead(n) { - if (!this.list.n) { - this.list.n = n; - this.list.p = n; - n.n = void 0; - n.p = void 0; - this.count = 1; - this._added = 1; - return; - } - if (this.list.n === n) - return; - if (this.list.p === n) { - this.list.p = n.p; - } - const isNew = !n.n && !n.p; - n.p && (n.p.n = n.n); - n.n && (n.n.p = n.p); - n.p = void 0; - n.n = this.list.n; - n.n && (n.n.p = n); - this.list.n = n; - const add = isNew && 1 || 0; - this._added += add; - this.count += add; - if (this.count > this.maxSize) { - const prev = this.list.p?.p; - (0, import_assert3.default)(prev); - prev.n = void 0; - this.list.p = prev; - ++this._removed; - --this.count; - } + get map() { + return this._map; } - stats() { - return { size: this.count, hits: this.hits, misses: this.misses, added: this.added, removed: this.removed }; + has(k) { + return this._map.has(k); } - toJSON() { - return this.stats(); + set(k, v) { + this._map.set(k, v); + return this; } - static assertValid(cache2) { - assertValidateLL(cache2.list); + clear() { + this._map = /* @__PURE__ */ new WeakMap(); } -}; -function assertValidateLL(list) { - if (!list.n && !list.p) - return; - (0, import_assert3.default)(list.n, "Bad Next"); - (0, import_assert3.default)(list.p, "Bad Prev"); - const visited = /* @__PURE__ */ new Set(); - let n = list; - for (; n.n; n = n.n) { - (0, import_assert3.default)(!visited.has(n.n), "Circular"); - visited.add(n.n); + delete(k) { + return this._map.delete(k); } - (0, import_assert3.default)(list.p === n, "Tail matches"); - visited.clear(); - n = list; - for (; n.p; n = n.p) { - (0, import_assert3.default)(!visited.has(n.p), "Circular"); - visited.add(n.p); + dispose() { + this.clear(); } - (0, import_assert3.default)(list.n === n, "Head matches"); +}; +function createAutoResolveWeakCache() { + return new AutoResolveWeakCache(); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/logger.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/logger.js var _logger = console; function logError(...args) { _logger.error(...args); } -function logWarning(...args) { - _logger.warn(...args); -} function setLogger(logger) { const oldLogger = _logger; _logger = logger; @@ -51101,29 +52313,140 @@ function getLogger() { return _logger; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/resolveFile.js -var import_cspell_resolver = __toESM(require_dist2(), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/resolveFile.js +var import_node_module2 = require("node:module"); -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/resolve.js +// ../node_modules/.pnpm/global-directory@4.0.1/node_modules/global-directory/index.js +var import_node_process = __toESM(require("node:process"), 1); +var import_node_path = __toESM(require("node:path"), 1); +var import_node_os = __toESM(require("node:os"), 1); +var import_node_fs = __toESM(require("node:fs"), 1); +var import_ini = __toESM(require_ini(), 1); +var isWindows = import_node_process.default.platform === "win32"; +var readRc = (filePath) => { + try { + return import_ini.default.parse(import_node_fs.default.readFileSync(filePath, "utf8")).prefix; + } catch { + } +}; +var getEnvNpmPrefix = () => Object.keys(import_node_process.default.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? import_node_process.default.env[name] : prefix, void 0); +var getGlobalNpmrc = () => { + if (isWindows && import_node_process.default.env.APPDATA) { + return import_node_path.default.join(import_node_process.default.env.APPDATA, "/npm/etc/npmrc"); + } + if (import_node_process.default.execPath.includes("/Cellar/node")) { + const homebrewPrefix = import_node_process.default.execPath.slice(0, import_node_process.default.execPath.indexOf("/Cellar/node")); + return import_node_path.default.join(homebrewPrefix, "/lib/node_modules/npm/npmrc"); + } + if (import_node_process.default.execPath.endsWith("/bin/node")) { + const installDir = import_node_path.default.dirname(import_node_path.default.dirname(import_node_process.default.execPath)); + return import_node_path.default.join(installDir, "/etc/npmrc"); + } +}; +var getDefaultNpmPrefix = () => { + if (isWindows) { + const { APPDATA } = import_node_process.default.env; + return APPDATA ? import_node_path.default.join(APPDATA, "npm") : import_node_path.default.dirname(import_node_process.default.execPath); + } + return import_node_path.default.dirname(import_node_path.default.dirname(import_node_process.default.execPath)); +}; +var getNpmPrefix = () => { + const envPrefix = getEnvNpmPrefix(); + if (envPrefix) { + return envPrefix; + } + const homePrefix = readRc(import_node_path.default.join(import_node_os.default.homedir(), ".npmrc")); + if (homePrefix) { + return homePrefix; + } + if (import_node_process.default.env.PREFIX) { + return import_node_process.default.env.PREFIX; + } + const globalPrefix = readRc(getGlobalNpmrc()); + if (globalPrefix) { + return globalPrefix; + } + return getDefaultNpmPrefix(); +}; +var npmPrefix = import_node_path.default.resolve(getNpmPrefix()); +var getYarnWindowsDirectory = () => { + if (isWindows && import_node_process.default.env.LOCALAPPDATA) { + const dir = import_node_path.default.join(import_node_process.default.env.LOCALAPPDATA, "Yarn"); + if (import_node_fs.default.existsSync(dir)) { + return dir; + } + } + return false; +}; +var getYarnPrefix = () => { + if (import_node_process.default.env.PREFIX) { + return import_node_process.default.env.PREFIX; + } + const windowsPrefix = getYarnWindowsDirectory(); + if (windowsPrefix) { + return windowsPrefix; + } + const configPrefix = import_node_path.default.join(import_node_os.default.homedir(), ".config/yarn"); + if (import_node_fs.default.existsSync(configPrefix)) { + return configPrefix; + } + const homePrefix = import_node_path.default.join(import_node_os.default.homedir(), ".yarn-config"); + if (import_node_fs.default.existsSync(homePrefix)) { + return homePrefix; + } + return npmPrefix; +}; +var globalDirectory = {}; +globalDirectory.npm = {}; +globalDirectory.npm.prefix = npmPrefix; +globalDirectory.npm.packages = import_node_path.default.join(npmPrefix, isWindows ? "node_modules" : "lib/node_modules"); +globalDirectory.npm.binaries = isWindows ? npmPrefix : import_node_path.default.join(npmPrefix, "bin"); +var yarnPrefix = import_node_path.default.resolve(getYarnPrefix()); +globalDirectory.yarn = {}; +globalDirectory.yarn.prefix = yarnPrefix; +globalDirectory.yarn.packages = import_node_path.default.join(yarnPrefix, getYarnWindowsDirectory() ? "Data/global/node_modules" : "global/node_modules"); +globalDirectory.yarn.binaries = import_node_path.default.join(globalDirectory.yarn.packages, ".bin"); +var global_directory_default = globalDirectory; + +// ../node_modules/.pnpm/@cspell+cspell-resolver@8.1.0/node_modules/@cspell/cspell-resolver/dist/requireResolve.js +function resolveGlobal(modulesName) { + const paths = [global_directory_default.npm.packages, global_directory_default.yarn.packages]; + return requireResolve(modulesName, paths); +} +function requireResolve(filename, paths) { + try { + return require.resolve(filename, paths ? { paths } : void 0); + } catch (e) { + return void 0; + } +} + +// ../node_modules/.pnpm/@cspell+dynamic-import@8.1.0/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs +var import_node_fs4 = require("node:fs"); + +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/resolve.js var import_node_assert2 = __toESM(require("node:assert"), 1); -var import_node_fs2 = require("node:fs"); +var import_node_fs3 = require("node:fs"); var import_node_process2 = __toESM(require("node:process"), 1); -var import_node_url3 = require("node:url"); -var import_node_path2 = __toESM(require("node:path"), 1); +var import_node_url4 = require("node:url"); +var import_node_path3 = __toESM(require("node:path"), 1); var import_node_module = require("node:module"); -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/get-format.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/get-format.js +var import_node_url3 = require("node:url"); + +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/package-config.js var import_node_url2 = require("node:url"); -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/package-config.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/package-json-reader.js +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); var import_node_url = require("node:url"); -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/errors.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/errors.js var import_node_v8 = __toESM(require("node:v8"), 1); -var import_node_process = __toESM(require("node:process"), 1); var import_node_assert = __toESM(require("node:assert"), 1); var import_node_util = require("node:util"); -var isWindows = import_node_process.default.platform === "win32"; var own = {}.hasOwnProperty; var classRegExp = /^([A-Z][a-z\d]*)+$/; var kTypes = /* @__PURE__ */ new Set([ @@ -51238,8 +52561,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError( * @param {string} [base] * @param {string} [message] */ - (path26, base, message) => { - return `Invalid package config ${path26}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; + (path27, base, message) => { + return `Invalid package config ${path27}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; }, Error ); @@ -51269,10 +52592,10 @@ codes.ERR_MODULE_NOT_FOUND = createError( /** * @param {string} path * @param {string} base - * @param {string} [type] + * @param {boolean} [exactUrl] */ - (path26, base, type = "package") => { - return `Cannot find ${type} '${path26}' imported from ${base}`; + (path27, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? "module" : "package"} '${path27}' imported from ${base}`; }, Error ); @@ -51318,8 +52641,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError( * @param {string} ext * @param {string} path */ - (ext, path26) => { - return `Unknown file extension "${ext}" for ${path26}`; + (ext, path27) => { + return `Unknown file extension "${ext}" for ${path27}`; }, TypeError ); @@ -51342,24 +52665,6 @@ codes.ERR_INVALID_ARG_VALUE = createError( // Note: extra classes have been shaken out. // , RangeError ); -codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError( - "ERR_UNSUPPORTED_ESM_URL_SCHEME", - /** - * @param {URL} url - * @param {Array} supported - */ - (url, supported) => { - let message = `Only URLs with a scheme in: ${formatList( - supported - )} are supported by the default ESM loader`; - if (isWindows && url.protocol.length === 2) { - message += ". On Windows, absolute paths must be valid file:// URLs"; - } - message += `. Received protocol '${url.protocol}'`; - return message; - }, - Error -); function createError(sym, value, def) { messages.set(sym, value); return makeNodeErrorWithCode(def, sym); @@ -51478,101 +52783,101 @@ function determineSpecificType(value) { return `type ${typeof value} (${inspected})`; } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/package-json-reader.js -var import_node_fs = __toESM(require("node:fs"), 1); -var import_node_path = __toESM(require("node:path"), 1); +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/package-json-reader.js +var hasOwnProperty = {}.hasOwnProperty; +var { ERR_INVALID_PACKAGE_CONFIG } = codes; +var cache = /* @__PURE__ */ new Map(); var reader = { read }; var package_json_reader_default = reader; -function read(jsonPath) { - try { - const string = import_node_fs.default.readFileSync( - import_node_path.default.toNamespacedPath(import_node_path.default.join(import_node_path.default.dirname(jsonPath), "package.json")), - "utf8" - ); - return { string }; - } catch (error3) { - const exception = ( - /** @type {ErrnoException} */ - error3 - ); - if (exception.code === "ENOENT") { - return { string: void 0 }; - } - throw exception; - } -} - -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/package-config.js -var { ERR_INVALID_PACKAGE_CONFIG } = codes; -var packageJsonCache = /* @__PURE__ */ new Map(); -function getPackageConfig(path26, specifier, base) { - const existing = packageJsonCache.get(path26); - if (existing !== void 0) { +function read(jsonPath, { base, specifier }) { + const existing = cache.get(jsonPath); + if (existing) { return existing; } - const source = package_json_reader_default.read(path26).string; - if (source === void 0) { - const packageConfig2 = { - pjsonPath: path26, - exists: false, - main: void 0, - name: void 0, - type: "none", - exports: void 0, - imports: void 0 - }; - packageJsonCache.set(path26, packageConfig2); - return packageConfig2; - } - let packageJson; + let string; try { - packageJson = JSON.parse(source); + string = import_node_fs2.default.readFileSync(import_node_path2.default.toNamespacedPath(jsonPath), "utf8"); } catch (error3) { const exception = ( /** @type {ErrnoException} */ error3 ); - throw new ERR_INVALID_PACKAGE_CONFIG( - path26, - (base ? `"${specifier}" from ` : "") + (0, import_node_url.fileURLToPath)(base || specifier), - exception.message - ); + if (exception.code !== "ENOENT") { + throw exception; + } } - const { exports, imports, main, name, type } = packageJson; - const packageConfig = { - pjsonPath: path26, - exists: true, - main: typeof main === "string" ? main : void 0, - name: typeof name === "string" ? name : void 0, - type: type === "module" || type === "commonjs" ? type : "none", - // @ts-expect-error Assume `Record`. - exports, - // @ts-expect-error Assume `Record`. - imports: imports && typeof imports === "object" ? imports : void 0 + const result = { + exists: false, + pjsonPath: jsonPath, + main: void 0, + name: void 0, + type: "none", + // Ignore unknown types for forwards compatibility + exports: void 0, + imports: void 0 }; - packageJsonCache.set(path26, packageConfig); - return packageConfig; + if (string !== void 0) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const cause = ( + /** @type {ErrnoException} */ + error_ + ); + const error3 = new ERR_INVALID_PACKAGE_CONFIG( + jsonPath, + (base ? `"${specifier}" from ` : "") + (0, import_node_url.fileURLToPath)(base || specifier), + cause.message + ); + error3.cause = cause; + throw error3; + } + result.exists = true; + if (hasOwnProperty.call(parsed, "name") && typeof parsed.name === "string") { + result.name = parsed.name; + } + if (hasOwnProperty.call(parsed, "main") && typeof parsed.main === "string") { + result.main = parsed.main; + } + if (hasOwnProperty.call(parsed, "exports")) { + result.exports = parsed.exports; + } + if (hasOwnProperty.call(parsed, "imports")) { + result.imports = parsed.imports; + } + if (hasOwnProperty.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { + result.type = parsed.type; + } + } + cache.set(jsonPath, result); + return result; } + +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/package-config.js function getPackageScopeConfig(resolved) { - let packageJsonUrl = new import_node_url.URL("package.json", resolved); + let packageJSONUrl = new import_node_url2.URL("package.json", resolved); while (true) { - const packageJsonPath2 = packageJsonUrl.pathname; - if (packageJsonPath2.endsWith("node_modules/package.json")) + const packageJSONPath2 = packageJSONUrl.pathname; + if (packageJSONPath2.endsWith("node_modules/package.json")) { break; - const packageConfig2 = getPackageConfig( - (0, import_node_url.fileURLToPath)(packageJsonUrl), - resolved + } + const packageConfig = package_json_reader_default.read( + (0, import_node_url2.fileURLToPath)(packageJSONUrl), + { specifier: resolved } ); - if (packageConfig2.exists) - return packageConfig2; - const lastPackageJsonUrl = packageJsonUrl; - packageJsonUrl = new import_node_url.URL("../package.json", packageJsonUrl); - if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) + if (packageConfig.exists) { + return packageConfig; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new import_node_url2.URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { break; + } } - const packageJsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl); - const packageConfig = { - pjsonPath: packageJsonPath, + const packageJSONPath = (0, import_node_url2.fileURLToPath)(packageJSONUrl); + return { + pjsonPath: packageJSONPath, exists: false, main: void 0, name: void 0, @@ -51580,19 +52885,17 @@ function getPackageScopeConfig(resolved) { exports: void 0, imports: void 0 }; - packageJsonCache.set(packageJsonPath, packageConfig); - return packageConfig; } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/resolve-get-package-type.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/resolve-get-package-type.js function getPackageType(url) { const packageConfig = getPackageScopeConfig(url); return packageConfig.type; } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/get-format.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/get-format.js var { ERR_UNKNOWN_FILE_EXTENSION } = codes; -var hasOwnProperty = {}.hasOwnProperty; +var hasOwnProperty2 = {}.hasOwnProperty; var extensionFormatMap = { // @ts-expect-error: hush. __proto__: null, @@ -51625,7 +52928,7 @@ function getDataProtocolModuleFormat(parsed) { ) || [null, null, null]; return mimeToFormat(mime); } -function extname(url) { +function extname2(url) { const pathname = url.pathname; let index = pathname.length; while (index--) { @@ -51640,29 +52943,41 @@ function extname(url) { return ""; } function getFileProtocolModuleFormat(url, _context, ignoreErrors) { - const ext = extname(url); + const ext = extname2(url); if (ext === ".js") { - return getPackageType(url) === "module" ? "module" : "commonjs"; + const packageType = getPackageType(url); + if (packageType !== "none") { + return packageType; + } + return "commonjs"; } - const format7 = extensionFormatMap[ext]; - if (format7) - return format7; + if (ext === "") { + const packageType = getPackageType(url); + if (packageType === "none" || packageType === "commonjs") { + return "commonjs"; + } + return "module"; + } + const format6 = extensionFormatMap[ext]; + if (format6) + return format6; if (ignoreErrors) { return void 0; } - const filepath = (0, import_node_url2.fileURLToPath)(url); + const filepath = (0, import_node_url3.fileURLToPath)(url); throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); } function getHttpProtocolModuleFormat() { } function defaultGetFormatWithoutErrors(url, context) { - if (!hasOwnProperty.call(protocolHandlers, url.protocol)) { + const protocol = url.protocol; + if (!hasOwnProperty2.call(protocolHandlers, protocol)) { return null; } - return protocolHandlers[url.protocol](url, context, true) || null; + return protocolHandlers[protocol](url, context, true) || null; } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/utils.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/utils.js var { ERR_INVALID_ARG_VALUE } = codes; var DEFAULT_CONDITIONS = Object.freeze(["node", "import"]); var DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); @@ -51686,9 +53001,8 @@ function getConditionsSet(conditions) { return getDefaultConditionsSet(); } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/lib/resolve.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/lib/resolve.js var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; -var experimentalNetworkImports = false; var { ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, @@ -51697,8 +53011,7 @@ var { ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, - ERR_UNSUPPORTED_DIR_IMPORT, - ERR_UNSUPPORTED_ESM_URL_SCHEME + ERR_UNSUPPORTED_DIR_IMPORT } = codes; var own2 = {}.hasOwnProperty; var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; @@ -51709,56 +53022,63 @@ var encodedSepRegEx = /%2f|%5c/i; var emittedPackageWarnings = /* @__PURE__ */ new Set(); var doubleSlashRegEx = /[/\\]{2}/; function emitInvalidSegmentDeprecation(target, request, match2, packageJsonUrl, internal, base, isTarget) { - const pjsonPath = (0, import_node_url3.fileURLToPath)(packageJsonUrl); + if (import_node_process2.default.noDeprecation) { + return; + } + const pjsonPath = (0, import_node_url4.fileURLToPath)(packageJsonUrl); const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; import_node_process2.default.emitWarning( - `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match2 ? "" : `matched to "${match2}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, import_node_url3.fileURLToPath)(base)}` : ""}.`, + `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match2 ? "" : `matched to "${match2}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, import_node_url4.fileURLToPath)(base)}` : ""}.`, "DeprecationWarning", "DEP0166" ); } function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { - const format7 = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); - if (format7 !== "module") + if (import_node_process2.default.noDeprecation) { + return; + } + const format6 = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); + if (format6 !== "module") return; - const path26 = (0, import_node_url3.fileURLToPath)(url.href); - const pkgPath = (0, import_node_url3.fileURLToPath)(new import_node_url3.URL(".", packageJsonUrl)); - const basePath = (0, import_node_url3.fileURLToPath)(base); - if (main) + const urlPath = (0, import_node_url4.fileURLToPath)(url.href); + const pkgPath = (0, import_node_url4.fileURLToPath)(new import_node_url4.URL(".", packageJsonUrl)); + const basePath = (0, import_node_url4.fileURLToPath)(base); + if (!main) { import_node_process2.default.emitWarning( - `Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, excluding the full filename and extension to the resolved file at "${path26.slice( + `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice( pkgPath.length )}", imported from ${basePath}. - Automatic extension resolution of the "main" field isdeprecated for ES modules.`, +Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151" ); - else + } else if (import_node_path3.default.resolve(pkgPath, main) !== urlPath) { import_node_process2.default.emitWarning( - `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path26.slice( + `Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( pkgPath.length )}", imported from ${basePath}. -Default "index" lookups for the main are deprecated for ES modules.`, + Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151" ); + } } -function tryStatSync(path26) { +function tryStatSync(path27) { try { - return (0, import_node_fs2.statSync)(path26); + return (0, import_node_fs3.statSync)(path27); } catch { - return new import_node_fs2.Stats(); + return new import_node_fs3.Stats(); } } function fileExists(url) { - const stats = (0, import_node_fs2.statSync)(url, { throwIfNoEntry: false }); + const stats = (0, import_node_fs3.statSync)(url, { throwIfNoEntry: false }); const isFile2 = stats ? stats.isFile() : void 0; return isFile2 === null || isFile2 === void 0 ? false : isFile2; } function legacyMainResolve(packageJsonUrl, packageConfig, base) { let guess; if (packageConfig.main !== void 0) { - guess = new import_node_url3.URL(packageConfig.main, packageJsonUrl); + guess = new import_node_url4.URL(packageConfig.main, packageJsonUrl); if (fileExists(guess)) return guess; const tries2 = [ @@ -51771,7 +53091,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) { ]; let i2 = -1; while (++i2 < tries2.length) { - guess = new import_node_url3.URL(tries2[i2], packageJsonUrl); + guess = new import_node_url4.URL(tries2[i2], packageJsonUrl); if (fileExists(guess)) break; guess = void 0; @@ -51789,7 +53109,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) { const tries = ["./index.js", "./index.json", "./index.node"]; let i = -1; while (++i < tries.length) { - guess = new import_node_url3.URL(tries[i], packageJsonUrl); + guess = new import_node_url4.URL(tries[i], packageJsonUrl); if (fileExists(guess)) break; guess = void 0; @@ -51799,37 +53119,51 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) { return guess; } throw new ERR_MODULE_NOT_FOUND( - (0, import_node_url3.fileURLToPath)(new import_node_url3.URL(".", packageJsonUrl)), - (0, import_node_url3.fileURLToPath)(base) + (0, import_node_url4.fileURLToPath)(new import_node_url4.URL(".", packageJsonUrl)), + (0, import_node_url4.fileURLToPath)(base) ); } function finalizeResolution(resolved, base, preserveSymlinks) { - if (encodedSepRegEx.exec(resolved.pathname) !== null) + if (encodedSepRegEx.exec(resolved.pathname) !== null) { throw new ERR_INVALID_MODULE_SPECIFIER( resolved.pathname, 'must not include encoded "/" or "\\" characters', - (0, import_node_url3.fileURLToPath)(base) + (0, import_node_url4.fileURLToPath)(base) ); - const filePath = (0, import_node_url3.fileURLToPath)(resolved); + } + let filePath; + try { + filePath = (0, import_node_url4.fileURLToPath)(resolved); + } catch (error3) { + const cause = ( + /** @type {ErrnoException} */ + error3 + ); + Object.defineProperty(cause, "input", { value: String(resolved) }); + Object.defineProperty(cause, "module", { value: String(base) }); + throw cause; + } const stats = tryStatSync( filePath.endsWith("/") ? filePath.slice(-1) : filePath ); if (stats.isDirectory()) { - const error3 = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, (0, import_node_url3.fileURLToPath)(base)); + const error3 = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, (0, import_node_url4.fileURLToPath)(base)); error3.url = String(resolved); throw error3; } if (!stats.isFile()) { - throw new ERR_MODULE_NOT_FOUND( + const error3 = new ERR_MODULE_NOT_FOUND( filePath || resolved.pathname, - base && (0, import_node_url3.fileURLToPath)(base), - "module" + base && (0, import_node_url4.fileURLToPath)(base), + true ); + error3.url = String(resolved); + throw error3; } if (!preserveSymlinks) { - const real = (0, import_node_fs2.realpathSync)(filePath); + const real = (0, import_node_fs3.realpathSync)(filePath); const { search, hash } = resolved; - resolved = (0, import_node_url3.pathToFileURL)(real + (filePath.endsWith(import_node_path2.default.sep) ? "/" : "")); + resolved = (0, import_node_url4.pathToFileURL)(real + (filePath.endsWith(import_node_path3.default.sep) ? "/" : "")); resolved.search = search; resolved.hash = hash; } @@ -51838,33 +53172,33 @@ function finalizeResolution(resolved, base, preserveSymlinks) { function importNotDefined(specifier, packageJsonUrl, base) { return new ERR_PACKAGE_IMPORT_NOT_DEFINED( specifier, - packageJsonUrl && (0, import_node_url3.fileURLToPath)(new import_node_url3.URL(".", packageJsonUrl)), - (0, import_node_url3.fileURLToPath)(base) + packageJsonUrl && (0, import_node_url4.fileURLToPath)(new import_node_url4.URL(".", packageJsonUrl)), + (0, import_node_url4.fileURLToPath)(base) ); } function exportsNotFound(subpath, packageJsonUrl, base) { return new ERR_PACKAGE_PATH_NOT_EXPORTED( - (0, import_node_url3.fileURLToPath)(new import_node_url3.URL(".", packageJsonUrl)), + (0, import_node_url4.fileURLToPath)(new import_node_url4.URL(".", packageJsonUrl)), subpath, - base && (0, import_node_url3.fileURLToPath)(base) + base && (0, import_node_url4.fileURLToPath)(base) ); } function throwInvalidSubpath(request, match2, packageJsonUrl, internal, base) { - const reason = `request is not a valid match in pattern "${match2}" for the "${internal ? "imports" : "exports"}" resolution of ${(0, import_node_url3.fileURLToPath)(packageJsonUrl)}`; + const reason = `request is not a valid match in pattern "${match2}" for the "${internal ? "imports" : "exports"}" resolution of ${(0, import_node_url4.fileURLToPath)(packageJsonUrl)}`; throw new ERR_INVALID_MODULE_SPECIFIER( request, reason, - base && (0, import_node_url3.fileURLToPath)(base) + base && (0, import_node_url4.fileURLToPath)(base) ); } function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; return new ERR_INVALID_PACKAGE_TARGET( - (0, import_node_url3.fileURLToPath)(new import_node_url3.URL(".", packageJsonUrl)), + (0, import_node_url4.fileURLToPath)(new import_node_url4.URL(".", packageJsonUrl)), subpath, target, internal, - base && (0, import_node_url3.fileURLToPath)(base) + base && (0, import_node_url4.fileURLToPath)(base) ); } function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { @@ -51874,7 +53208,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas if (internal && !target.startsWith("../") && !target.startsWith("/")) { let isURL2 = false; try { - new import_node_url3.URL(target); + new import_node_url4.URL(target); isURL2 = true; } catch { } @@ -51912,9 +53246,9 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas throw invalidPackageTarget(match2, target, packageJsonUrl, internal, base); } } - const resolved = new import_node_url3.URL(target, packageJsonUrl); + const resolved = new import_node_url4.URL(target, packageJsonUrl); const resolvedPath = resolved.pathname; - const packagePath = new import_node_url3.URL(".", packageJsonUrl).pathname; + const packagePath = new import_node_url4.URL(".", packageJsonUrl).pathname; if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match2, target, packageJsonUrl, internal, base); if (subpath === "") @@ -51943,7 +53277,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas } } if (pattern) { - return new import_node_url3.URL( + return new import_node_url4.URL( RegExpPrototypeSymbolReplace.call( patternRegEx, resolved.href, @@ -51951,7 +53285,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas ) ); } - return new import_node_url3.URL(subpath, resolved); + return new import_node_url4.URL(subpath, resolved); } function isArrayIndex(key) { const keyNumber = Number(key); @@ -52018,21 +53352,21 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b throw lastException; } if (typeof target === "object" && target !== null) { - const keys2 = Object.getOwnPropertyNames(target); + const keys3 = Object.getOwnPropertyNames(target); let i = -1; - while (++i < keys2.length) { - const key = keys2[i]; + while (++i < keys3.length) { + const key = keys3[i]; if (isArrayIndex(key)) { throw new ERR_INVALID_PACKAGE_CONFIG2( - (0, import_node_url3.fileURLToPath)(packageJsonUrl), + (0, import_node_url4.fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain numeric property keys.' ); } } i = -1; - while (++i < keys2.length) { - const key = keys2[i]; + while (++i < keys3.length) { + const key = keys3[i]; if (key === "default" || conditions && conditions.has(key)) { const conditionalTarget = ( /** @type {unknown} */ @@ -52072,18 +53406,18 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { return true; if (typeof exports !== "object" || exports === null) return false; - const keys2 = Object.getOwnPropertyNames(exports); + const keys3 = Object.getOwnPropertyNames(exports); let isConditionalSugar = false; let i = 0; let j = -1; - while (++j < keys2.length) { - const key = keys2[j]; + while (++j < keys3.length) { + const key = keys3[j]; const curIsConditionalSugar = key === "" || key[0] !== "."; if (i++ === 0) { isConditionalSugar = curIsConditionalSugar; } else if (isConditionalSugar !== curIsConditionalSugar) { throw new ERR_INVALID_PACKAGE_CONFIG2( - (0, import_node_url3.fileURLToPath)(packageJsonUrl), + (0, import_node_url4.fileURLToPath)(packageJsonUrl), base, `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` ); @@ -52092,12 +53426,15 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { return isConditionalSugar; } function emitTrailingSlashPatternDeprecation(match2, pjsonUrl, base) { - const pjsonPath = (0, import_node_url3.fileURLToPath)(pjsonUrl); + if (import_node_process2.default.noDeprecation) { + return; + } + const pjsonPath = (0, import_node_url4.fileURLToPath)(pjsonUrl); if (emittedPackageWarnings.has(pjsonPath + "|" + match2)) return; emittedPackageWarnings.add(pjsonPath + "|" + match2); import_node_process2.default.emitWarning( - `Use of deprecated trailing slash pattern mapping "${match2}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, import_node_url3.fileURLToPath)(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, + `Use of deprecated trailing slash pattern mapping "${match2}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, import_node_url4.fileURLToPath)(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155" ); @@ -52127,10 +53464,10 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba } let bestMatch = ""; let bestMatchSubpath = ""; - const keys2 = Object.getOwnPropertyNames(exports); + const keys3 = Object.getOwnPropertyNames(exports); let i = -1; - while (++i < keys2.length) { - const key = keys2[i]; + while (++i < keys3.length) { + const key = keys3[i]; const patternIndex = key.indexOf("*"); if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { if (packageSubpath.endsWith("/")) { @@ -52195,12 +53532,12 @@ function patternKeyCompare(a, b) { function packageImportsResolve(name, base, conditions) { if (name === "#" || name.startsWith("#/") || name.endsWith("/")) { const reason = "is not a valid internal imports specifier name"; - throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, (0, import_node_url3.fileURLToPath)(base)); + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, (0, import_node_url4.fileURLToPath)(base)); } let packageJsonUrl; const packageConfig = getPackageScopeConfig(base); if (packageConfig.exists) { - packageJsonUrl = (0, import_node_url3.pathToFileURL)(packageConfig.pjsonPath); + packageJsonUrl = (0, import_node_url4.pathToFileURL)(packageConfig.pjsonPath); const imports = packageConfig.imports; if (imports) { if (own2.call(imports, name) && !name.includes("*")) { @@ -52221,10 +53558,10 @@ function packageImportsResolve(name, base, conditions) { } else { let bestMatch = ""; let bestMatchSubpath = ""; - const keys2 = Object.getOwnPropertyNames(imports); + const keys3 = Object.getOwnPropertyNames(imports); let i = -1; - while (++i < keys2.length) { - const key = keys2[i]; + while (++i < keys3.length) { + const key = keys3[i]; const patternIndex = key.indexOf("*"); if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { const patternTrailer = key.slice(patternIndex + 1); @@ -52279,7 +53616,7 @@ function parsePackageName(specifier, base) { throw new ERR_INVALID_MODULE_SPECIFIER( specifier, "is not a valid package name", - (0, import_node_url3.fileURLToPath)(base) + (0, import_node_url4.fileURLToPath)(base) ); } const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); @@ -52287,7 +53624,7 @@ function parsePackageName(specifier, base) { } function packageResolve(specifier, base, conditions) { if (import_node_module.builtinModules.includes(specifier)) { - return new import_node_url3.URL("node:" + specifier); + return new import_node_url4.URL("node:" + specifier); } const { packageName: packageName2, packageSubpath, isScoped } = parsePackageName( specifier, @@ -52295,7 +53632,7 @@ function packageResolve(specifier, base, conditions) { ); const packageConfig = getPackageScopeConfig(base); if (packageConfig.exists) { - const packageJsonUrl2 = (0, import_node_url3.pathToFileURL)(packageConfig.pjsonPath); + const packageJsonUrl2 = (0, import_node_url4.pathToFileURL)(packageConfig.pjsonPath); if (packageConfig.name === packageName2 && packageConfig.exports !== void 0 && packageConfig.exports !== null) { return packageExportsResolve( packageJsonUrl2, @@ -52306,24 +53643,27 @@ function packageResolve(specifier, base, conditions) { ); } } - let packageJsonUrl = new import_node_url3.URL( + let packageJsonUrl = new import_node_url4.URL( "./node_modules/" + packageName2 + "/package.json", base ); - let packageJsonPath = (0, import_node_url3.fileURLToPath)(packageJsonUrl); + let packageJsonPath = (0, import_node_url4.fileURLToPath)(packageJsonUrl); let lastPath; do { - const stat2 = tryStatSync(packageJsonPath.slice(0, -13)); - if (!stat2.isDirectory()) { + const stat4 = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat4.isDirectory()) { lastPath = packageJsonPath; - packageJsonUrl = new import_node_url3.URL( + packageJsonUrl = new import_node_url4.URL( (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName2 + "/package.json", packageJsonUrl ); - packageJsonPath = (0, import_node_url3.fileURLToPath)(packageJsonUrl); + packageJsonPath = (0, import_node_url4.fileURLToPath)(packageJsonUrl); continue; } - const packageConfig2 = getPackageConfig(packageJsonPath, specifier, base); + const packageConfig2 = package_json_reader_default.read(packageJsonPath, { + base, + specifier + }); if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { return packageExportsResolve( packageJsonUrl, @@ -52336,9 +53676,9 @@ function packageResolve(specifier, base, conditions) { if (packageSubpath === ".") { return legacyMainResolve(packageJsonUrl, packageConfig2, base); } - return new import_node_url3.URL(packageSubpath, packageJsonUrl); + return new import_node_url4.URL(packageSubpath, packageJsonUrl); } while (packageJsonPath.length !== lastPath.length); - throw new ERR_MODULE_NOT_FOUND(packageName2, (0, import_node_url3.fileURLToPath)(base)); + throw new ERR_MODULE_NOT_FOUND(packageName2, (0, import_node_url4.fileURLToPath)(base), false); } function isRelativeSpecifier(specifier) { if (specifier[0] === ".") { @@ -52362,12 +53702,12 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) { const isRemote = protocol === "http:" || protocol === "https:"; let resolved; if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - resolved = new import_node_url3.URL(specifier, base); + resolved = new import_node_url4.URL(specifier, base); } else if (!isRemote && specifier[0] === "#") { resolved = packageImportsResolve(specifier, base, conditions); } else { try { - resolved = new import_node_url3.URL(specifier); + resolved = new import_node_url4.URL(specifier); } catch { if (!isRemote) { resolved = packageResolve(specifier, base, conditions); @@ -52427,23 +53767,6 @@ function throwIfInvalidParentURL(parentURL) { ); } } -function throwIfUnsupportedURLProtocol(url) { - const protocol = url.protocol; - if (protocol !== "file:" && protocol !== "data:" && protocol !== "node:") { - throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url); - } -} -function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports2) { - const protocol = parsed?.protocol; - if (protocol && protocol !== "file:" && protocol !== "data:" && (!experimentalNetworkImports2 || protocol !== "https:" && protocol !== "http:")) { - throw new ERR_UNSUPPORTED_ESM_URL_SCHEME( - parsed, - ["file", "data"].concat( - experimentalNetworkImports2 ? ["https", "http"] : [] - ) - ); - } -} function defaultResolve(specifier, context = {}) { const { parentURL } = context; (0, import_node_assert2.default)(parentURL !== void 0, "expected `parentURL` to be defined"); @@ -52451,15 +53774,15 @@ function defaultResolve(specifier, context = {}) { let parsedParentURL; if (parentURL) { try { - parsedParentURL = new import_node_url3.URL(parentURL); + parsedParentURL = new import_node_url4.URL(parentURL); } catch { } } let parsed; try { - parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new import_node_url3.URL(specifier, parsedParentURL) : new import_node_url3.URL(specifier); + parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new import_node_url4.URL(specifier, parsedParentURL) : new import_node_url4.URL(specifier); const protocol = parsed.protocol; - if (protocol === "data:" || experimentalNetworkImports && (protocol === "https:" || protocol === "http:")) { + if (protocol === "data:") { return { url: parsed.href, format: null }; } } catch { @@ -52473,10 +53796,8 @@ function defaultResolve(specifier, context = {}) { return maybeReturn; if (parsed && parsed.protocol === "node:") return { url: specifier }; - throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports); const conditions = getConditionsSet(context.conditions); - const url = moduleResolve(specifier, new import_node_url3.URL(parentURL), conditions, false); - throwIfUnsupportedURLProtocol(url); + const url = moduleResolve(specifier, new import_node_url4.URL(parentURL), conditions, false); return { // Do NOT cast `url` to a string: that will work even when there are real // problems, silencing them @@ -52485,7 +53806,7 @@ function defaultResolve(specifier, context = {}) { }; } -// ../node_modules/.pnpm/import-meta-resolve@3.1.1/node_modules/import-meta-resolve/index.js +// ../node_modules/.pnpm/import-meta-resolve@4.0.0/node_modules/import-meta-resolve/index.js function resolve2(specifier, parent) { if (!parent) { throw new Error( @@ -52499,16 +53820,16 @@ function resolve2(specifier, parent) { /** @type {ErrnoException} */ error3 ); - if (exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" && typeof exception.url === "string") { + if ((exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" || exception.code === "ERR_MODULE_NOT_FOUND") && typeof exception.url === "string") { return exception.url; } throw error3; } } -// ../node_modules/.pnpm/@cspell+dynamic-import@8.0.0/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs -var import_path = require("path"); -var import_url3 = require("url"); +// ../node_modules/.pnpm/@cspell+dynamic-import@8.1.0/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs +var import_path2 = require("path"); +var import_url8 = require("url"); var isWindowsPath = /^[a-z]:\\/i; async function dynamicImportFrom(moduleName, paths) { paths = Array.isArray(paths) ? paths : paths ? [paths] : void 0; @@ -52517,20 +53838,30 @@ async function dynamicImportFrom(moduleName, paths) { try { return await import(modulesNameToImport.toString()); } catch (e) { - const err = toError2(e); + const err = toError4(e); throw err; } } const location = importResolveModuleName(moduleName, paths); - return await import(location.toString()); + return await import(location.href); } function importResolveModuleName(moduleName, paths) { const modulesNameToImport = normalizeModuleName(moduleName); let lastError = void 0; for (const parent of paths) { try { - const url = typeof parent === "string" ? parent.startsWith("file://") ? new URL(parent) : (0, import_url3.pathToFileURL)(parent + import_path.sep) : parent; - return new URL(resolve2(modulesNameToImport.toString(), url.toString())); + const url = typeof parent === "string" ? parent.startsWith("file://") ? new URL(parent) : (0, import_url8.pathToFileURL)(parent + import_path2.sep) : parent; + const resolvedURL = new URL(resolve2(modulesNameToImport.toString(), url.toString())); + try { + const s = (0, import_node_fs4.statSync)(resolvedURL); + if (s.isFile()) { + return resolvedURL; + } + } catch (err) { + const error3 = new Error(`Cannot find module ${moduleName}`); + error3.code = "ERR_MODULE_NOT_FOUND"; + lastError = error3; + } } catch (err) { lastError = err; } @@ -52538,166 +53869,258 @@ function importResolveModuleName(moduleName, paths) { throw lastError; } function normalizeModuleName(moduleName) { - return typeof moduleName === "string" && isWindowsPath.test(moduleName) ? (0, import_url3.pathToFileURL)(moduleName) : moduleName; + return typeof moduleName === "string" && isWindowsPath.test(moduleName) ? (0, import_url8.pathToFileURL)(moduleName) : moduleName; } -function toError2(e) { - if (isError3(e)) +function toError4(e) { + if (isError4(e)) return e; return new Error(e?.toString()); } -function isError3(e) { +function isError4(e) { return e instanceof Error; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/resolveFile.js -var fs4 = __toESM(require("fs"), 1); -var os = __toESM(require("os"), 1); -var path4 = __toESM(require("path"), 1); -var import_resolve_from = __toESM(require_resolve_from2(), 1); -var import_url4 = require("url"); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/resolveFile.js +var fs6 = __toESM(require("fs"), 1); +var os2 = __toESM(require("os"), 1); +var path7 = __toESM(require("path"), 1); +var import_resolve_from = __toESM(require_resolve_from(), 1); +var import_url10 = require("url"); +var import_pkg_info2 = __toESM(require_pkg_info(), 1); + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/url.js +var import_path3 = __toESM(require("path"), 1); +var import_url9 = require("url"); var import_pkg_info = __toESM(require_pkg_info(), 1); +var isUrlRegExp = /^(?:\w+:\/\/|data:)/i; +function toFilePathOrHref(url) { + return fileURLOrPathToPath(url); +} +function getSourceDirectoryUrl() { + const base = (0, import_url9.pathToFileURL)(import_pkg_info.srcDirectory); + const srcDirectoryURL = new URL(base.pathname + "/", base); + return srcDirectoryURL; +} +function relativeTo(path27, relativeTo2) { + return new URL(normalizePathSlashesForUrl(path27), relativeTo2 || cwdURL()); +} +function cwdURL() { + return (0, import_url9.pathToFileURL)(process.cwd() + "/"); +} +function resolveFileWithURL(file, relativeToURL) { + if (file instanceof URL) + return file; + if (isURLLike(file)) + return toURL4(file); + const isRelativeToFile = isFileURL2(relativeToURL); + if (isRelativeToFile && import_path3.default.isAbsolute(file)) { + return (0, import_url9.pathToFileURL)(file); + } + if (isRelativeToFile) { + const rootURL = new URL(".", relativeToURL); + const root = (0, import_url9.fileURLToPath)(rootURL); + const suffix = file === "." || file == ".." || file.endsWith("/") || file.endsWith(import_path3.default.sep) ? "/" : ""; + const filePath = import_path3.default.resolve(root, file); + return (0, import_url9.pathToFileURL)(filePath + suffix); + } + return relativeTo(file, relativeToURL); +} +function normalizePathSlashesForUrl(filePath, sep6 = import_path3.default.sep) { + return filePath.replace(/^([a-z]:)/i, "/$1").split(sep6).join("/"); +} +function toFileUrl(file) { + if (file instanceof URL) + return file; + return resolveFileWithURL(file, cwdURL()); +} +function toFileDirUrl(dir) { + return addTrailingSlash(toFileUrl(dir)); +} +function addTrailingSlash(url) { + if (url.pathname.endsWith("/")) + return url; + const urlWithSlash = new URL(url.href); + urlWithSlash.pathname += "/"; + return urlWithSlash; +} +function toURL4(href, relativeTo2) { + return href instanceof URL ? href : new URL(href, relativeTo2); +} +function fileURLOrPathToPath(filenameOrURL) { + return isFileURL2(filenameOrURL) ? (0, import_url9.fileURLToPath)(filenameOrURL) : filenameOrURL.toString(); +} +function isURLLike(url) { + return url instanceof URL || isUrlRegExp.test(url); +} +function isFileURL2(url) { + return isUrlWithProtocol(url, "file"); +} +function isDataURL(url) { + return isUrlWithProtocol(url, "data"); +} +function isUrlWithProtocol(url, protocol) { + protocol = protocol.endsWith(":") ? protocol : protocol + ":"; + return url instanceof URL ? url.protocol === protocol : url.startsWith(protocol); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/resolveFile.js var testNodeModules = /^node_modules\//; -function resolveFile(filename, relativeTo) { - filename = filename.replace(/^~/, os.homedir()); +function resolveFile(filename, relativeTo2) { + filename = filename.replace(/^~/, os2.homedir()); const steps = [ { filename, fn: tryUrl }, - { filename, fn: tryNodeResolve }, + { filename, fn: tryCreateRequire }, + { filename, fn: tryNodeRequireResolve }, { filename, fn: tryImportResolve }, - { filename: path4.resolve(relativeTo, filename), fn: tryResolveExists }, - { filename: path4.resolve(filename), fn: tryResolveExists }, + { filename, fn: tryResolveExists }, { filename, fn: tryNodeResolveDefaultPaths }, { filename, fn: tryResolveFrom }, { filename: filename.replace(testNodeModules, ""), fn: tryResolveFrom }, { filename, fn: tryResolveGlobal } ]; for (const step of steps) { - const r = step.fn(step.filename, relativeTo); - if (r.found) - return r; - } - return { filename: path4.resolve(relativeTo, filename), relativeTo, found: false }; + const r2 = step.fn(step.filename, relativeTo2); + if (r2?.found) + return r2; + } + const r = tryUrl(filename, relativeTo2); + return r || { + filename: isRelative(filename) ? joinWith(filename, relativeTo2) : filename.toString(), + relativeTo: relativeTo2.toString(), + found: false + }; } -var isUrlRegExp = /^\w+:\/\//i; -function tryUrl(filename, relativeTo) { - if (isUrlRegExp.test(filename)) { - return { filename, relativeTo: void 0, found: true }; +function tryUrl(filename, relativeToURL) { + if (isURLLike(filename)) { + if (isFileURL2(filename)) { + const file = (0, import_url10.fileURLToPath)(filename); + return { + filename: file, + relativeTo: void 0, + found: fs6.existsSync(file) + }; + } + return { filename: filename.toString(), relativeTo: void 0, found: true }; } - if (isUrlRegExp.test(relativeTo)) { - const url = new URL(filename, relativeTo); - return { filename: url.href, relativeTo, found: true }; + if (isURLLike(relativeToURL) && !isDataURL(relativeToURL)) { + const relToURL = toURL4(relativeToURL); + const isRelToAFile = isFileURL2(relToURL); + const url = resolveFileWithURL(filename, relToURL); + return { + filename: toFilePathOrHref(url), + relativeTo: toFilePathOrHref(relToURL), + found: !isRelToAFile || fs6.existsSync(url) + }; + } + return void 0; +} +function tryCreateRequire(filename, relativeTo2) { + if (filename instanceof URL) + return void 0; + const require2 = (0, import_node_module2.createRequire)(relativeTo2); + try { + const r = require2.resolve(filename); + return { filename: r, relativeTo: relativeTo2.toString(), found: true }; + } catch (_) { + return void 0; } - return { filename, relativeTo: void 0, found: false }; } function tryNodeResolveDefaultPaths(filename) { try { const r = require.resolve(filename); return { filename: r, relativeTo: void 0, found: true }; } catch (_) { - return { filename, relativeTo: void 0, found: false }; + return void 0; } } -function tryNodeResolve(filename, relativeTo) { - const home = os.homedir(); +function tryNodeRequireResolve(filenameOrURL, relativeTo2) { + const filename = fileURLOrPathToPath(filenameOrURL); + const relativeToPath = fileURLOrPathToPath(relativeTo2); + const home = os2.homedir(); function calcPaths(p) { const paths2 = [p]; - if (filename.startsWith(".") && (filename.startsWith("./") || filename.startsWith("." + path4.sep) || filename.startsWith(".."))) { + if (isRelative(filename)) { return paths2; } - for (; p && path4.dirname(p) !== p && p !== home; p = path4.dirname(p)) { + for (; p && path7.dirname(p) !== p && p !== home; p = path7.dirname(p)) { paths2.push(p); } return paths2; } - const paths = calcPaths(path4.resolve(relativeTo)); + const paths = calcPaths(path7.resolve(relativeToPath)); try { const r = require.resolve(filename, { paths }); - return { filename: r, relativeTo, found: true }; + return { filename: r, relativeTo: relativeToPath, found: true }; } catch (_) { - return { filename, relativeTo, found: false }; + return void 0; } } -function tryImportResolve(filename, relativeTo) { +function tryImportResolve(filename, relativeTo2) { try { - const paths = filename.startsWith(".") ? [relativeTo] : [relativeTo, import_pkg_info.srcDirectory]; - const resolved = (0, import_url4.fileURLToPath)(importResolveModuleName(filename, paths)); - return { filename: resolved, relativeTo, found: true }; + const paths = isRelative(filename) ? [relativeTo2] : [relativeTo2, import_pkg_info2.srcDirectory]; + const resolved = (0, import_url10.fileURLToPath)(importResolveModuleName(filename, paths)); + return { filename: resolved, relativeTo: relativeTo2.toString(), found: true }; } catch (_) { - return { filename, relativeTo, found: false }; + return void 0; } } function tryResolveGlobal(filename) { - const r = (0, import_cspell_resolver.resolveGlobal)(filename); - return { filename: r || filename, relativeTo: void 0, found: !!r }; + const r = resolveGlobal(filename); + return r && { filename: r, relativeTo: void 0, found: true } || void 0; } -function tryResolveExists(filename) { - return { filename, relativeTo: void 0, found: fs4.existsSync(filename) }; +function tryResolveExists(filename, relativeTo2) { + if (filename instanceof URL || isURLLike(filename) || isURLLike(relativeTo2)) + return void 0; + const toTry = [{ filename }, { filename: path7.resolve(relativeTo2.toString(), filename), relativeTo: relativeTo2 }]; + for (const { filename: filename2, relativeTo: relativeTo3 } of toTry) { + const found = path7.isAbsolute(filename2) && fs6.existsSync(filename2); + if (found) + return { filename: filename2, relativeTo: relativeTo3?.toString(), found }; + } + filename = path7.resolve(filename); + return { + filename, + relativeTo: path7.resolve("."), + found: fs6.existsSync(filename) + }; } -function tryResolveFrom(filename, relativeTo) { +function tryResolveFrom(filename, relativeTo2) { + if (relativeTo2 instanceof URL) + return void 0; try { - return { filename: (0, import_resolve_from.default)(relativeTo, filename), relativeTo, found: true }; + return { filename: (0, import_resolve_from.default)(relativeTo2, filename), relativeTo: relativeTo2, found: true }; } catch (error3) { - return { filename, relativeTo, found: false }; + return void 0; } } +function isRelative(filename) { + if (filename instanceof URL) + return false; + if (filename.startsWith("./")) + return true; + if (filename.startsWith("../")) + return true; + if (filename.startsWith("." + path7.sep)) + return true; + if (filename.startsWith(".." + path7.sep)) + return true; + return false; +} +function joinWith(filename, relativeTo2) { + return relativeTo2 instanceof URL || isURLLike(relativeTo2) ? toFilePathOrHref(new URL(filename, relativeTo2)) : path7.resolve(relativeTo2, filename); +} -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/constants.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/constants.js var configSettingsFileVersion0_1 = "0.1"; var configSettingsFileVersion0_2 = "0.2"; var currentSettingsFileVersion = configSettingsFileVersion0_2; var ENV_CSPELL_GLOB_ROOT = "CSPELL_GLOB_ROOT"; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/CSpellSettingsServer.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/CSpellSettingsServer.js var import_assert7 = __toESM(require("assert"), 1); -var path6 = __toESM(require("path"), 1); - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/AutoResolve.js -function autoResolve(map3, key, resolve13) { - const found = map3.get(key); - if (found !== void 0 || map3.has(key)) - return found; - const value = resolve13(key); - map3.set(key, value); - return value; -} -var AutoResolveCache = class { - map = /* @__PURE__ */ new Map(); - get(k, resolve13) { - return resolve13 ? autoResolve(this.map, k, resolve13) : this.map.get(k); - } - has(k) { - return this.map.has(k); - } - set(k, v) { - this.map.set(k, v); - return this; - } -}; -function createAutoResolveCache() { - return new AutoResolveCache(); -} -function autoResolveWeak(map3, key, resolve13) { - const found = map3.get(key); - if (found !== void 0 || map3.has(key)) - return found; - const value = resolve13(key); - map3.set(key, value); - return value; -} -var AutoResolveWeakCache = class { - map = /* @__PURE__ */ new WeakMap(); - get(k, resolve13) { - return resolve13 ? autoResolveWeak(this.map, k, resolve13) : this.map.get(k); - } - has(k) { - return this.map.has(k); - } - set(k, v) { - this.map.set(k, v); - return this; - } -}; +var import_url12 = require("url"); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/constants.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/constants.js var COMPOUND_FIX = "+"; var OPTIONAL_COMPOUND_FIX = "*"; var CASE_INSENSITIVE_PREFIX = "~"; @@ -52711,7 +54134,7 @@ var defaultTrieInfo = Object.freeze({ isCaseAware: true }); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/memorizeLastCall.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/memorizeLastCall.js var SymEmpty = Symbol("memorizeLastCall"); function memorizeLastCall(fn) { let lastP = void 0; @@ -52726,7 +54149,7 @@ function memorizeLastCall(fn) { return calc; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/mergeDefaults.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/mergeDefaults.js function mergeDefaults(value, defaultValue) { const result = { ...defaultValue }; if (value) { @@ -52739,7 +54162,7 @@ function mergeDefaults(value, defaultValue) { return result; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/find.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/find.js var defaultLegacyMinCompoundLength = 3; var _defaultFindOptions = { matchCase: false, @@ -52971,7 +54394,7 @@ function _createFindOptions(options) { return mergeDefaults(options, _defaultFindOptions); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/walker/walkerTypes.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/walker/walkerTypes.js var JOIN_SEPARATOR = "+"; var WORD_SEPARATOR = " "; var CompoundWordsMethod; @@ -52981,7 +54404,7 @@ var CompoundWordsMethod; CompoundWordsMethod2[CompoundWordsMethod2["JOIN_WORDS"] = 2] = "JOIN_WORDS"; })(CompoundWordsMethod || (CompoundWordsMethod = {})); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/walker/walker.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/walker/walker.js function* compoundWalker(root, compoundingMethod) { const empty = Object.freeze([]); const roots = { @@ -53091,7 +54514,7 @@ function* walkerWordsITrie(root) { } } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/trie-util.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/ITrieNode/trie-util.js function iteratorTrieWords(node) { return walkerWords(node); } @@ -53123,7 +54546,7 @@ function countWords(root) { return walk4(root); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/trie.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/trie.js function trieRootToITrieRoot(root) { return ImplITrieRoot.toITrieNode(root); } @@ -53155,9 +54578,9 @@ var ImplITrieNode = class _ImplITrieNode { keys() { if (this._keys) return this._keys; - const keys2 = this.node.c ? Object.keys(this.node.c) : EmptyKeys; - this._keys = keys2; - return keys2; + const keys3 = this.node.c ? Object.keys(this.node.c) : EmptyKeys; + this._keys = keys3; + return keys3; } /** get the child nodes */ values() { @@ -53212,7 +54635,7 @@ var ImplITrieRoot = class extends ImplITrieNode { } }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/walker/walker.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/walker/walker.js var useITrie = false; var walkerWords2 = useITrie ? _walkerWords2 : _walkerWords; function* _walkerWords(root) { @@ -53288,7 +54711,7 @@ function* walkerWordsITrie2(root) { } } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/genSuggestionsOptions.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/genSuggestionsOptions.js var defaultGenSuggestionOptions = { compoundMethod: CompoundWordsMethod.NONE, ignoreCase: true, @@ -53316,9 +54739,9 @@ var keyMapOfSuggestionOptionsStrict = { }; function createSuggestionOptions(...opts) { const options = { ...defaultSuggestionOptions }; - const keys2 = Object.keys(keyMapOfSuggestionOptionsStrict); + const keys3 = Object.keys(keyMapOfSuggestionOptionsStrict); for (const opt of opts) { - for (const key of keys2) { + for (const key of keys3) { assign(options, opt, key); } } @@ -53328,7 +54751,7 @@ function assign(dest, src, k) { dest[k] = src[k] ?? dest[k]; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/PairingHeap.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/PairingHeap.js var PairingHeap = class { compare; _heap; @@ -53422,7 +54845,7 @@ function mergeSiblings(compare4, n) { return ss ? merge(compare4, m, mergeSiblings(compare4, ss)) : m; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/constants.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/constants.js var DEFAULT_COMPOUNDED_WORD_SEPARATOR = "\u2219"; var opCosts = { baseCost: 100, @@ -53435,7 +54858,7 @@ var opCosts = { wordLengthCostFactor: 0.5 }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/orthography.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/orthography.js var intl = new Intl.Collator("en", { sensitivity: "base" }); var compare = intl.compare; var visualLetterGroups = [ @@ -53487,10 +54910,10 @@ function calcVisualLetterMasks(groups) { return map3; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/distance/distanceAStarWeighted.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/distance/distanceAStarWeighted.js var import_assert4 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/distance/weightedMaps.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/distance/weightedMaps.js var matchPossibleWordSeparators = /[+∙•・●]/g; function createWeightMap(...defs) { const map3 = _createWeightMap(); @@ -53701,7 +55124,7 @@ function normalizeMap(map3) { return map3.replace(matchPossibleWordSeparators, DEFAULT_COMPOUNDED_WORD_SEPARATOR); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/distance/distanceAStarWeighted.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/distance/distanceAStarWeighted.js function distanceAStarWeighted(wordA, wordB, map3, cost = 100) { const calc = createWeightCostCalculator(map3); const best = _distanceAStarWeightedEx(wordA, wordB, calc, cost); @@ -53802,17 +55225,17 @@ function compare2(a, b) { return a.c - b.c || b.ai + b.bi - a.ai - a.bi; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/distance/levenshtein.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/distance/levenshtein.js var initialRow = ".".repeat(50).split("").map((_, i) => i); Object.freeze(initialRow); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/distance/distance.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/distance/distance.js var defaultCost = 100; function editDistanceWeighted(wordA, wordB, weights, editCost = defaultCost) { return distanceAStarWeighted(wordA, wordB, weights, editCost); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/timer.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/timer.js function startTimer() { const start = performance.now(); return () => performance.now() - start; @@ -53916,7 +55339,7 @@ function getGlobalPerfTimer() { return timer; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/util.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/util.js function isDefined3(a) { return a !== void 0; } @@ -53943,7 +55366,7 @@ function replaceAllFactory(match2, replaceWithText) { return (text) => text.replace(r, replaceWithText); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggestCollector.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggestCollector.js var defaultMaxNumberSuggestions = 10; var BASE_COST = 100; var MAX_NUM_CHANGES = 5; @@ -54122,7 +55545,7 @@ function isSuggestionResult(s) { return !!r && typeof r === "object" && r?.cost !== void 0 && r.word != void 0; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggestAStar.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggestAStar.js function comparePath(a, b) { return a.c / (a.i + 1) - b.c / (b.i + 1) + (b.i - a.i); } @@ -54209,7 +55632,7 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) { } function calcEdges(p) { const { n, i, t } = p; - const keys2 = n.keys(); + const keys3 = n.keys(); const s = srcWord[i]; const sg = visMap[s] || 0; const cost0 = p.c; @@ -54218,7 +55641,7 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) { const costLegacyCompound = cost0 + opCosts.wordBreak; const costCompound = cost0 + opCosts.compound; if (s) { - const mIdx = keys2.indexOf(s); + const mIdx = keys3.indexOf(s); if (mIdx >= 0) { storePath(t, n.child(mIdx), i + 1, cost0, s, p, "=", s); } @@ -54230,8 +55653,8 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) { storePath(t, n.child(mIdx), i + 2, cost0 + DL, s, p, "dd", s); } storePath(t, n, i + 1, cost, "", p, "d", ""); - for (let j = 0; j < keys2.length; ++j) { - const ss = keys2[j]; + for (let j = 0; j < keys3.length; ++j) { + const ss = keys3[j]; if (j === mIdx || ss in sc) continue; const g = visMap[ss] || 0; @@ -54252,15 +55675,15 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) { } } } - if (compRoot && costCompound <= limit && keys2.includes(comp)) { + if (compRoot && costCompound <= limit && keys3.includes(comp)) { if (compRootIgnoreCase) { storePath(t, compRootIgnoreCase, i, costCompound, "", p, "~+", "~+"); } storePath(t, compRoot, i, costCompound, "", p, "+", "+"); } if (cost <= limit) { - for (let j = 0; j < keys2.length; ++j) { - const char = keys2[j]; + for (let j = 0; j < keys3.length; ++j) { + const char = keys3[j]; if (char in sc) continue; storePath(t, n.child(j), i, cost, char, p, "i", char); @@ -54370,9 +55793,9 @@ function searchTrieCostNodesMatchingTrie2(trie, node, emit, s = "") { const n = trie.n; if (!n) return; - const keys2 = node.keys(); - for (let i = 0; i < keys2.length; ++i) { - const key = keys2[i]; + const keys3 = node.keys(); + for (let i = 0; i < keys3.length; ++i) { + const key = keys3[i]; const t = n[key]; if (!t) continue; @@ -54385,19 +55808,19 @@ function searchTrieCostNodesMatchingTrie2(trie, node, emit, s = "") { } } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/assert.js -function assert7(condition, message = "Assert Failed") { +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/assert.js +function assert6(condition, message = "Assert Failed") { if (condition) return; throw new Error(message); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/mergeOptionalWithDefaults.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/mergeOptionalWithDefaults.js function mergeOptionalWithDefaults(...options) { return options.reduce((acc, opt) => mergeDefaults(opt, acc), defaultTrieInfo); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobBitMaskInfo.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobBitMaskInfo.js function extractInfo(info4) { const { NodeMaskEOW, NodeMaskChildCharIndex, NodeChildRefShift } = info4; return { @@ -54407,7 +55830,7 @@ function extractInfo(info4) { }; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobInternals.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobInternals.js var FastTrieBlobInternals = class { nodes; charIndex; @@ -54426,7 +55849,7 @@ var FastTrieBlobInternals = class { } }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobIRoot.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobIRoot.js var EmptyKeys2 = Object.freeze([]); var EmptyNodes = Object.freeze([]); var FastTrieBlobINode = class _FastTrieBlobINode { @@ -54457,15 +55880,15 @@ var FastTrieBlobINode = class _FastTrieBlobINode { return EmptyKeys2; const NodeMaskChildCharIndex = this.trie.NodeMaskChildCharIndex; const charIndex = this.trie.charIndex; - const keys2 = Array(this.size); + const keys3 = Array(this.size); const len = this.size; const node = this.trie.nodes[this.nodeIdx]; for (let i = 0; i < len; ++i) { const entry = node[i + 1]; const charIdx = entry & NodeMaskChildCharIndex; - keys2[i] = charIndex[charIdx]; + keys3[i] = charIndex[charIdx]; } - return Object.freeze(keys2); + return Object.freeze(keys3); } values() { if (!this.size) @@ -54477,12 +55900,12 @@ var FastTrieBlobINode = class _FastTrieBlobINode { return nodes; } entries() { - const keys2 = this.keys(); + const keys3 = this.keys(); const values = this.values(); - const len = keys2.length; + const len = keys3.length; const entries = Array(len); for (let i = 0; i < len; ++i) { - entries[i] = [keys2[i], values[i]]; + entries[i] = [keys3[i], values[i]]; } return entries; } @@ -54510,9 +55933,9 @@ var FastTrieBlobINode = class _FastTrieBlobINode { if (m) return m; const map3 = /* @__PURE__ */ Object.create(null); - const keys2 = this.keys(); - for (let i = 0; i < keys2.length; ++i) { - map3[keys2[i]] = i; + const keys3 = this.keys(); + for (let i = 0; i < keys3.length; ++i) { + map3[keys3[i]] = i; } this.charToIdx = map3; return map3; @@ -54529,7 +55952,7 @@ var FastTrieBlobIRoot = class extends FastTrieBlobINode { } }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/TrieBlobIRoot.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/TrieBlobIRoot.js var TrieBlobInternals = class { nodes; charIndex; @@ -54577,16 +56000,16 @@ var TrieBlobINode = class _TrieBlobINode { return EmptyKeys3; const NodeMaskChildCharIndex = this.trie.NodeMaskChildCharIndex; const charIndex = this.trie.charIndex; - const keys2 = Array(this.size); + const keys3 = Array(this.size); const offset = this.nodeIdx + 1; const len = this.size; for (let i = 0; i < len; ++i) { const entry = this.trie.nodes[i + offset]; const charIdx = entry & NodeMaskChildCharIndex; - keys2[i] = charIndex[charIdx]; + keys3[i] = charIndex[charIdx]; } - this._keys = keys2; - return keys2; + this._keys = keys3; + return keys3; } values() { if (!this.size) @@ -54598,12 +56021,12 @@ var TrieBlobINode = class _TrieBlobINode { return nodes; } entries() { - const keys2 = this.keys(); + const keys3 = this.keys(); const values = this.values(); - const len = keys2.length; + const len = keys3.length; const entries = Array(len); for (let i = 0; i < len; ++i) { - entries[i] = [keys2[i], values[i]]; + entries[i] = [keys3[i], values[i]]; } return entries; } @@ -54631,9 +56054,9 @@ var TrieBlobINode = class _TrieBlobINode { if (m) return m; const map3 = /* @__PURE__ */ Object.create(null); - const keys2 = this.keys(); - for (let i = 0; i < keys2.length; ++i) { - map3[keys2[i]] = i; + const keys3 = this.keys(); + for (let i = 0; i < keys3.length; ++i) { + map3[keys3[i]] = i; } this.charToIdx = map3; return map3; @@ -54650,7 +56073,7 @@ var TrieBlobIRoot = class extends TrieBlobINode { } }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/TrieBlob.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/TrieBlob.js var NodeHeaderNumChildrenBits = 8; var NodeHeaderNumChildrenShift = 0; var HEADER_SIZE_UINT32 = 8; @@ -54885,7 +56308,7 @@ function splitString(s, len = 64) { return splits; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlob.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlob.js var FastTrieBlob = class _FastTrieBlob { nodes; charIndex; @@ -55060,17 +56483,17 @@ function createCharToIndexMap(charIndex) { return map3; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/resolveMap.js -function resolveMap(map3, key, resolve13) { +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/resolveMap.js +function resolveMap(map3, key, resolve12) { const r = map3.get(key); if (r !== void 0) return r; - const v = resolve13(key); + const v = resolve12(key); map3.set(key, v); return v; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobBuilder.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBlob/FastTrieBlobBuilder.js var FastTrieBlobBuilder = class _FastTrieBlobBuilder { charToIndexMap = /* @__PURE__ */ Object.create(null); charIndex = [""]; @@ -55139,7 +56562,7 @@ var FastTrieBlobBuilder = class _FastTrieBlobBuilder { } return 0; } - assert7(this.nodes.length === 2); + assert6(this.nodes.length === 2); const eow = 1; const eowShifted = eow << NodeChildRefShift; const nodes = this.nodes; @@ -55195,7 +56618,7 @@ var FastTrieBlobBuilder = class _FastTrieBlobBuilder { const backStep = (num) => { if (!num) return; - assert7(num <= depth && num > 0); + assert6(num <= depth && num > 0); depth -= num; nodeIdx = stack[depth + 1].nodeIdx; }; @@ -55328,7 +56751,7 @@ var FastTrieBlobBuilder = class _FastTrieBlobBuilder { }; }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/clean.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/clean.js function clean3(t) { const copy = { ...t }; for (const key of Object.keys(copy)) { @@ -55339,7 +56762,7 @@ function clean3(t) { return copy; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/ITrie.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/ITrie.js var defaultLegacyMinCompoundLength2 = 3; var ITrieImpl = class _ITrieImpl { data; @@ -55511,17 +56934,17 @@ var ITrieImpl = class _ITrieImpl { } }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/buildITrie.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/buildITrie.js function buildITrieFromWords(words, info4 = {}) { const builder2 = new FastTrieBlobBuilder(info4); builder2.insert(words); return new ITrieImpl(builder2.build()); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNode.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNode.js var FLAG_WORD = 1; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/trie-util.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/trie-util.js function insert2(text, root = {}) { let node = root; for (let i = 0; i < text.length; ++i) { @@ -55624,7 +57047,7 @@ function trieNodeToRoot(node, options) { }; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/consolidate.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/consolidate.js function consolidate(root) { let count3 = 0; const signatures = /* @__PURE__ */ new Map(); @@ -55708,7 +57131,7 @@ function consolidate(root) { return trieNodeToRoot(process6(root), root); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/find.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/find.js var defaultLegacyMinCompoundLength3 = 3; var _defaultFindOptions2 = { matchCase: false, @@ -55741,7 +57164,7 @@ function _createFindOptions2(options) { return mergeDefaults(options, _defaultFindOptions2); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNodeTrie.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNodeTrie.js var TrieNodeTrie = class _TrieNodeTrie { root; _iTrieRoot; @@ -56274,7 +57697,7 @@ var builder = Object.freeze({ } }); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV1.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV1.js var EOW = "*"; var DATA = EOW; function* toIterableIterator2(iter) { @@ -56335,7 +57758,7 @@ function importTrie(linesX) { return trieNodeToRoot(n.root, { isCaseAware: false }); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV2.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV2.js var EOW2 = "*"; var DATA2 = "__DATA__"; function* toIterableIterator3(iter) { @@ -56398,7 +57821,7 @@ function importTrie2(linesX) { return trieNodeToRoot(n.root, { isCaseAware: false }); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/constants.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/constants.js var EOW3 = "$"; var BACK = "<"; var EOL = "\n"; @@ -56408,7 +57831,7 @@ var REF_REL = "@"; var EOR = ";"; var ESCAPE = "\\"; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV4.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV4.js var REF_INDEX_BEGIN = "["; var REF_INDEX_END = "]"; var INLINE_DATA_COMMENT_LINE = "/"; @@ -56569,10 +57992,10 @@ function parseStream(radix, iter) { } const charsetSpaces = stringToCharSet(" \r\n "); function parseReferenceIndex(acc, s) { - let json2 = ""; + let json = ""; function parserStart(acc2, s2) { if (s2 === REF_INDEX_BEGIN) { - json2 = json2 + s2; + json = json + s2; return { ...acc2, parser: parser2 }; } if (s2 in charsetSpaces) { @@ -56581,9 +58004,9 @@ function parseStream(radix, iter) { return parserMain({ ...acc2, parser: void 0 }, s2); } function parser2(acc2, s2) { - json2 = json2 + s2; + json = json + s2; if (s2 === REF_INDEX_END) { - refIndex = json2.replace(/[\s[\]]/g, "").split(",").map((n) => parseInt(n, radix)); + refIndex = json.replace(/[\s[\]]/g, "").split(",").map((n) => parseInt(n, radix)); return { ...acc2, parser: void 0 }; } return acc2; @@ -56639,10 +58062,10 @@ function tapIterable(iterable) { }; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNodeBuilder.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieNode/TrieNodeBuilder.js var EOW4 = Object.freeze({ f: 1, k: true }); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importV3.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importV3.js var specialCharacterMap2 = /* @__PURE__ */ new Map([ ["\n", "\\n"], ["\r", "\\r"], @@ -56791,12 +58214,12 @@ function stringToCharSet2(values) { return set; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importV3FastBlob.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importV3FastBlob.js function importTrieV3AsFastTrieBlob(srcLines) { return importTrieV3WithBuilder(new FastTrieBlobBuilder(), srcLines); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/decode.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/decode.js function decodeTrieData(raw) { return decodeStringFormat(typeof raw === "string" ? raw : raw.toString("utf8")); } @@ -56842,13 +58265,13 @@ function importTrie4(input) { return method(lines); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/decodeTrie.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/decodeTrie.js function decodeTrie(raw) { const data = decodeTrieData(raw); return new ITrieImpl(data); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV3.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/io/importExportV3.js var specialCharacters2 = stringToCharSet3([EOW3, BACK, EOL, REF, EOR, ESCAPE, LF, "0123456789", "`~!@#$%^&*()_-+=[]{};:'\"<>,./?\\|"].join("")); var specialPrefix2 = stringToCharSet3("~!"); function stringToCharSet3(values) { @@ -56860,7 +58283,7 @@ function stringToCharSet3(values) { return set; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/models/locale/knownLocales.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/models/locale/knownLocales.js var codes2 = [ // ['code', 'language'[', ''locale']], ["af", "Afrikaans"], @@ -56944,6 +58367,7 @@ var codes2 = [ ["de-LI", "German", "Liechtenstein"], ["de-LU", "German", "Luxembourg"], ["dz", "Dzongkha"], + // cspell:ignore Dzongkha ["dz-BT", "Dzongkha", "Bhutan"], ["ee", "Ewe"], ["ee-GH", "Ewe", "Ghana"], @@ -56979,6 +58403,7 @@ var codes2 = [ ["en-FI", "English", "Finland"], ["en-FJ", "English", "Fiji"], ["en-FK", "English", "Falkland Islands (Islas Malvinas)"], + // cspell:ignore Islas ["en-FM", "English", "Micronesia"], ["en-GB", "English", "United Kingdom"], ["en-GD", "English", "Grenada"], @@ -56999,6 +58424,7 @@ var codes2 = [ ["en-KE", "English", "Kenya"], ["en-KI", "English", "Kiribati"], ["en-KN", "English", "Saint Kitts and Nevis"], + // cspell:ignore Kitts ["en-KY", "English", "Cayman Islands"], ["en-LC", "English", "Saint Lucia"], ["en-LR", "English", "Liberia"], @@ -57038,7 +58464,9 @@ var codes2 = [ ["en-SX", "English"], ["en-SZ", "English", "Swaziland"], ["en-TC", "English", "Turks and Caicos Islands"], + // cspell:ignore Caicos ["en-TK", "English", "Tokelau"], + // cspell:ignore Tokelau ["en-TO", "English", "Tonga"], ["en-TT", "English", "Trinidad and Tobago"], ["en-TV", "English", "Tuvalu"], @@ -57063,6 +58491,7 @@ var codes2 = [ ["es-CL", "Spanish", "Chile"], ["es-CO", "Spanish", "Colombia"], ["es-CR", "Spanish", "Costa Rica"], + // cspell:ignore Rica ["es-CU", "Spanish", "Cuba"], ["es-DO", "Spanish", "Dominican Republic"], ["es-EA", "Spanish"], @@ -57091,6 +58520,7 @@ var codes2 = [ ["fa-AF", "Persian", "Afghanistan"], ["fa-IR", "Persian", "Iran"], ["ff", "Fulah"], + // cspell:ignore Fulah ["ff-CM", "Fulah", "Cameroon"], ["ff-GN", "Fulah", "Guinea"], ["ff-MR", "Fulah", "Mauritania"], @@ -57098,11 +58528,13 @@ var codes2 = [ ["fi", "Finnish"], ["fi-FI", "Finnish", "Finland"], ["fo", "Faroese"], + // cspell:ignore Faroese ["fo-DK", "Faroese", "Denmark"], ["fo-FO", "Faroese", "Faroe Islands"], ["fr", "French"], ["fr-BE", "French", "Belgium"], ["fr-BF", "French", "Burkina Faso"], + // cspell:ignore Burkina Faso ["fr-BI", "French", "Burundi"], ["fr-BJ", "French", "Benin"], ["fr-BL", "French"], @@ -57112,6 +58544,7 @@ var codes2 = [ ["fr-CG", "French", "Congo"], ["fr-CH", "French", "Switzerland"], ["fr-CI", "French, Cote d'Ivoire (Ivory Coast)"], + // cspell:ignore d'Ivoire ["fr-CM", "French", "Cameroon"], ["fr-DJ", "French", "Djibouti"], ["fr-DZ", "French", "Algeria"], @@ -57120,6 +58553,7 @@ var codes2 = [ ["fr-GF", "French", "French Guiana"], ["fr-GN", "French", "Guinea"], ["fr-GP", "French", "Saint Barthelemy"], + // cspell:ignore Barthelemy ["fr-GQ", "French", "Equatorial Guinea"], ["fr-HT", "French", "Haiti"], ["fr-KM", "French", "Comoros"], @@ -57146,6 +58580,7 @@ var codes2 = [ ["fr-TN", "French", "Tunisia"], ["fr-VU", "French", "Vanuatu"], ["fr-WF", "French", "Wallis and Futuna"], + // cspell:ignore Futuna ["fr-YT", "French", "Mayotte"], ["fy", "Western Frisian"], ["fy-NL", "Western Frisian", "Netherlands"], @@ -57186,6 +58621,7 @@ var codes2 = [ ["it-CH", "Italian", "Switzerland"], ["it-IT", "Italian", "Italy"], ["it-SM", "Italian", "San Marino"], + // cspell:ignore Marino ["it-VA", "Italian", "Vatican City"], ["ja", "Japanese"], ["ja-JP", "Japanese", "Japan"], @@ -57196,6 +58632,7 @@ var codes2 = [ ["kk", "Kazakh"], ["kk-KZ", "Kazakh", "Kazakhstan"], ["kl", "Kalaallisut"], + // cspell:ignore Kalaallisut ["kl-GL", "Kalaallisut", "Greenland"], ["km", "Central Khmer"], ["km-KH", "Central Khmer", "Cambodia"], @@ -57211,10 +58648,12 @@ var codes2 = [ ["ky", "Kirghiz"], ["ky-KG", "Kirghiz", "Kyrgyzstan"], ["lb", "Luxembourgish"], + // cspell:ignore Luxembourgish ["lb-LU", "Luxembourgish", "Luxembourg"], ["lg", "Ganda"], ["lg-UG", "Ganda", "Uganda"], ["ln", "Lingala"], + // cspell:ignore Lingala ["ln-AO", "Lingala", "Angola"], ["ln-CD", "Lingala", "Congo"], ["ln-CF", "Lingala", "Central African Republic"], @@ -57224,6 +58663,7 @@ var codes2 = [ ["lt", "Lithuanian"], ["lt-LT", "Lithuanian", "Lithuania"], ["lu", "Luba-Katanga"], + // cspell:ignore Luba ["lu-CD", "Luba-Katanga", "Congo"], ["lv", "Latvian"], ["lv-LV", "Latvian", "Latvia"], @@ -57246,9 +58686,11 @@ var codes2 = [ ["my", "Burmese"], ["my-MM", "Burmese", "Myanmar (Burma)"], ["nb", "Bokm\xE5l Norwegian"], + // cspell:ignore Bokmål ["nb-NO", "Bokm\xE5l Norwegian", "Norway"], ["nb-SJ", "Bokm\xE5l Norwegian", "Svalbard"], ["nd", "Ndebele, North"], + // cspell:ignore Ndebele ["nd-ZW", "Ndebele, North", "Zimbabwe"], ["ne", "Nepali"], ["ne-IN", "Nepali", "India"], @@ -57264,11 +58706,13 @@ var codes2 = [ ["nn", "Norwegian Nynorsk"], ["nn-NO", "Norwegian Nynorsk", "Norway"], ["om", "Oromo"], + // cspell:ignore Oromo ["om-ET", "Oromo", "Ethiopia"], ["om-KE", "Oromo", "Kenya"], ["or", "Oriya"], ["or-IN", "Oriya", "India"], ["os", "Ossetian"], + // cspell:ignore Ossetian ["os-GE", "Ossetian", "Georgia"], ["os-RU", "Ossetian", "Russia"], ["pa", "Panjabi"], @@ -57277,6 +58721,7 @@ var codes2 = [ ["pl", "Polish"], ["pl-PL", "Polish", "Poland"], ["ps", "Pushto"], + // cspell:ignore Pushto ["ps-AF", "Pushto", "Afghanistan"], ["pt", "Portuguese"], ["pt-AO", "Portuguese", "Angola"], @@ -57291,6 +58736,7 @@ var codes2 = [ ["pt-PT", "Portuguese", "Portugal"], ["pt-ST", "Portuguese", "Sao Tome and Principe"], ["pt-TL", "Portuguese", "Timor-Leste (East Timor)"], + // cspell:ignore Leste ["qu", "Quechua"], ["qu-BO", "Quechua", "Bolivia"], ["qu-EC", "Quechua", "Ecuador"], @@ -57298,6 +58744,7 @@ var codes2 = [ ["rm", "Romansh"], ["rm-CH", "Romansh", "Switzerland"], ["rn", "Rundi"], + // cspell:ignore Rundi ["rn-BI", "Rundi", "Burundi"], ["ro", "Romanian"], ["ro-MD", "Romanian", "Moldova"], @@ -57310,20 +58757,25 @@ var codes2 = [ ["ru-RU", "Russian", "Russia"], ["ru-UA", "Russian", "Ukraine"], ["rw", "Kinyarwanda"], + // cspell:ignore Kinyarwanda ["rw-RW", "Kinyarwanda", "Rwanda"], ["se", "Northern Sami"], + // cspell:ignore Sami ["se-FI", "Northern Sami", "Finland"], ["se-NO", "Northern Sami", "Norway"], ["se-SE", "Northern Sami", "Sweden"], ["sg", "Sango"], + // cspell:ignore Sango ["sg-CF", "Sango", "Central African Republic"], ["si", "Sinhala"], + // cspell:ignore Sinhala ["si-LK", "Sinhala", "Sri Lanka"], ["sk", "Slovak"], ["sk-SK", "Slovak", "Slovakia"], ["sl", "Slovenian"], ["sl-SI", "Slovenian", "Slovenia"], ["sn", "Shona"], + // cspell:ignore Shona ["sn-ZW", "Shona", "Zimbabwe"], ["so", "Somali"], ["so-DJ", "Somali", "Djibouti"], @@ -57341,6 +58793,7 @@ var codes2 = [ ["sr-XK", "Serbian"], ["sv", "Swedish"], ["sv-AX", "Swedish", "Aland"], + // cspell:ignore Aland ["sv-FI", "Swedish", "Finland"], ["sv-SE", "Swedish", "Sweden"], ["sw", "Swahili"], @@ -57380,6 +58833,7 @@ var codes2 = [ ["vi", "Vietnamese"], ["vi-VN", "Vietnamese", "Vietnam"], ["vo", "Volap\xFCk"], + // cspell:ignore Volapük ["yi", "Yiddish"], ["yi-1", "Yiddish"], ["yo", "Yoruba"], @@ -57395,7 +58849,7 @@ var codes2 = [ ["zu-ZA", "Zulu", "South Africa"] ]; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/models/locale/locale.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/models/locale/locale.js var codesByLocale; var Locale = class { _raw; @@ -57453,7 +58907,7 @@ function parseLocale(locales) { return locales.map(createLocale); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapCosts.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapCosts.js var defaultEditCosts = { accentCosts: 1, baseCost: 100, @@ -57476,7 +58930,7 @@ function mapEditCosts(costs = {}) { return { ...defaultEditCosts, ...cleanCopy(costs) }; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/text.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/text.js function expandCharacterSet(line, rangeChar = "-") { const charSet = /* @__PURE__ */ new Set(); let mode = 0; @@ -57531,13 +58985,13 @@ function stripNonAccents(characters) { return characters.normalize("NFD").replace(/[^\p{M}]/gu, ""); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/joinLetters.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/joinLetters.js function joinLetters(letters) { const v = [...letters]; return v.map((a) => a.length > 1 || !a.length ? `(${a})` : a).join(""); } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapToSuggestionCostDef.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapToSuggestionCostDef.js function parseAlphabet(cs, locale, editCost) { const { cost, penalty } = cs; const characters = expandCharacterSet(cs.characters); @@ -57635,7 +59089,7 @@ function* splitMap2(map3) { } } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapHunspellInformation.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapHunspellInformation.js function hunspellInformationToSuggestionCostDef(hunInfo, locales) { const costs = calcCosts(hunInfo.costs, locales); const operations = [ @@ -57798,7 +59252,7 @@ function asArrayOf(v) { return Array.isArray(v) ? v : [v]; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapDictionaryInfo.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapDictionaryInfo.js function mapDictionaryInformation(dictInfo) { const _locale = dictInfo.locale; const locale = _locale ? parseLocale(_locale).filter((loc) => loc.isValid()) : void 0; @@ -57855,7 +59309,7 @@ function mapAdjustment(adj) { }; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapDictionaryInfoToWeightMap.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/mappers/mapDictionaryInfoToWeightMap.js var defaultDefs = [ { map: "1234567890-.", @@ -57888,24 +59342,24 @@ function mapDictionaryInformationToWeightMap(dictInfo) { return map3; } -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggest.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/suggestions/suggest.js var baseCost = opCosts.baseCost; var swapCost = opCosts.swapCost; var postSwapCost = swapCost - baseCost; var mapSubCost = opCosts.visuallySimilar; var maxCostScale = opCosts.wordLengthCostFactor; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/TrieBuilder.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/TrieBuilder.js var SymbolFrozenNode = Symbol(); -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/utils/normalizeWord.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/utils/normalizeWord.js var normalizeWord = (text) => text.normalize(); var normalizeWordForCaseInsensitive = (text) => { const t = text.toLowerCase(); return [t, t.normalize("NFD").replace(/\p{M}/gu, "")]; }; -// ../node_modules/.pnpm/cspell-trie-lib@8.0.0/node_modules/cspell-trie-lib/dist/lib/SimpleDictionaryParser.js +// ../node_modules/.pnpm/cspell-trie-lib@8.1.0/node_modules/cspell-trie-lib/dist/lib/SimpleDictionaryParser.js var RegExpSplit = /[\s,;]/g; var _defaultOptions = { commentCharacter: LINE_COMMENT, @@ -58041,10 +59495,10 @@ function splitLine(line, regExp) { return encodeLine(line).split(regExp).map((line2) => decodeLine(line2)); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/DictionarySettings.js -var path5 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/DictionarySettings.js +var path8 = __toESM(require("path"), 1); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/DictionaryReferenceCollection.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/DictionaryReferenceCollection.js function createDictionaryReferenceCollection(dictionaries) { return new _DictionaryReferenceCollection(dictionaries); } @@ -58090,7 +59544,7 @@ function mapReference(ref) { return { name: name.trim(), weight }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/DictionarySettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/DictionarySettings.js function filterDictDefsToLoad(dictRefCol, defs) { const allActiveDefs = defs.filter(({ name }) => dictRefCol.isEnabled(name)).map(fixPath); return [...new Map(allActiveDefs.map((d) => [d.name, d])).values()]; @@ -58108,7 +59562,7 @@ function fixPath(def) { } function fixDicPath(defPath, defFile) { const parts = [defPath || "", defFile || ""].filter((p) => !!p); - return parts.length > 1 ? path5.join(...parts) : parts[0] || ""; + return parts.length > 1 ? path8.join(...parts) : parts[0] || ""; } function mapDictDefsToInternal(defs, pathToSettingsFile) { return defs?.map((def) => mapDictDefToInternal(def, pathToSettingsFile)); @@ -58121,13 +59575,14 @@ function _mapDictDefToInternal(def, pathToSettingsFile) { if (isDictionaryDefinitionWithSource(def)) { return def; } + const source = pathToSettingsFile.href; if (isDictionaryDefinitionInlineInternal(def)) { - return { ...def, __source: pathToSettingsFile }; + return { ...def, __source: source }; } return new _DictionaryDefinitionInternalWithSource(def, pathToSettingsFile); } function determineName(filename, options) { - return options.name || path5.basename(filename); + return options.name || path8.basename(filename); } function calcDictionaryDefsToLoad(settings) { const { dictionaries = [], dictionaryDefinitions = [], noSuggestDictionaries = [] } = settings; @@ -58151,7 +59606,7 @@ function isDictionaryDefinitionInlineInternalWithSource(def) { return isDictionaryDefinitionInlineInternal(def) && !!def.__source; } var _DictionaryDefinitionInternalWithSource = class { - __source; + sourceURL; _weightMap; name; path; @@ -58164,12 +59619,14 @@ var _DictionaryDefinitionInternalWithSource = class { useCompounds; noSuggest; scope; + __source; ddi; - constructor(def, __source) { - this.__source = __source; + constructor(def, sourceURL) { + this.sourceURL = sourceURL; + this.__source = sourceURL.href; const defAll = def; const { path: relPath = "", file = "", addWords, description, dictionaryInformation, type, repMap, noSuggest, scope, useCompounds } = defAll; - const defaultPath = path5.dirname(__source); + const defaultPath = sourceURL; const filePath = fixDicPath(relPath, file); const name = determineName(filePath, def); const r = resolveFile(filePath, defaultPath); @@ -58201,7 +59658,62 @@ var _DictionaryDefinitionInternalWithSource = class { } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/textRegex.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/mergeCache.js +var CalcLeftRightResultWeakCache = class { + map = new AutoResolveWeakCache(); + _toDispose; + constructor() { + this._toDispose = onClearCache(() => { + this.clear(); + }); + } + get(left, right, calc) { + const m = this.map.get(left, () => new AutoResolveWeakCache()); + return m.get(right, () => calc(left, right)); + } + clear() { + this.map.clear(); + } + dispose() { + this._toDispose.dispose(); + } +}; + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/mergeList.js +var cacheMergeListUnique = new CalcLeftRightResultWeakCache(); +var cacheMergeLists = new CalcLeftRightResultWeakCache(); +function mergeListUnique(left, right) { + if (!Array.isArray(left)) + return Array.isArray(right) ? right : void 0; + if (!Array.isArray(right)) + return left; + if (!right.length) + return left; + if (!left.length) + return right; + const result = cacheMergeListUnique.get(left, right, (left2, right2) => [.../* @__PURE__ */ new Set([...left2, ...right2])]); + Object.freeze(left); + Object.freeze(right); + Object.freeze(result); + return result; +} +function mergeList(left, right) { + if (!Array.isArray(left)) + return Array.isArray(right) ? right : void 0; + if (!Array.isArray(right)) + return left; + if (!left.length) + return right; + if (!right.length) + return left; + const result = cacheMergeLists.get(left, right, (left2, right2) => left2.concat(right2)); + Object.freeze(left); + Object.freeze(right); + Object.freeze(result); + return result; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/textRegex.js var regExUpperSOrIng = /([\p{Lu}\p{M}]+\\?['’]?(?:s|ing|ies|es|ings|ed|ning))(?!\p{Ll})/gu; var regExSplitWords = /(\p{Ll}\p{M}?)(\p{Lu})/gu; var regExSplitWords2 = /(\p{Lu}\p{M}?)(\p{Lu}\p{M}?\p{Ll})/gu; @@ -58314,8 +59826,14 @@ function removeVerboseFromRegExp(pattern) { return result.result; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/patterns.js -function resolvePatterns(regExpList = [], patternDefinitions = []) { +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/patterns.js +var emptyRegExpList = []; +var emptyPatternDefinitions = []; +var cache2 = new CalcLeftRightResultWeakCache(); +function resolvePatterns(regExpList = emptyRegExpList, patternDefinitions = emptyPatternDefinitions) { + return cache2.get(regExpList, patternDefinitions, _resolvePatterns); +} +function _resolvePatterns(regExpList, patternDefinitions) { const patternMap = new Map(patternDefinitions.map((def) => [def.name.toLowerCase(), def.pattern])); const resolved = /* @__PURE__ */ new Set(); function resolvePattern(p) { @@ -58334,38 +59852,31 @@ function resolvePatterns(regExpList = [], patternDefinitions = []) { } } const patternList = regExpList.map(resolvePattern).filter(isDefined); - return [...flatten(patternList)].map(toRegExp).filter(isDefined); + const result = [...flatten(patternList)].map(toRegExp).filter(isDefined); + Object.freeze(regExpList); + Object.freeze(patternDefinitions); + Object.freeze(result); + return result; } function toRegExp(pattern) { return pattern instanceof RegExp ? new RegExp(pattern) : stringToRegExp(pattern, "gim", "g"); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/CSpellSettingsServer.js -function mergeListUnique(left, right) { - if (!Array.isArray(left)) - return Array.isArray(right) ? right : void 0; - if (!Array.isArray(right)) - return left; - if (!right.length) - return left; - if (!left.length) - return right; - return [.../* @__PURE__ */ new Set([...left, ...right])]; -} -function mergeList(left, right) { - if (!Array.isArray(left)) - return Array.isArray(right) ? right : void 0; - if (!Array.isArray(right)) - return left; - if (!left.length) - return right; - if (!right.length) - return left; - return left.concat(right); -} +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/CSpellSettingsServer.js var emptyWords = []; Object.freeze(emptyWords); -var cachedMerges = /* @__PURE__ */ new WeakMap(); +var cachedMerges = new AutoResolveWeakCache(); +var mergeCache = new AutoResolveWeakCache(); +var cacheInternalSettings = new AutoResolveWeakCache(); +var parserCache = new AutoResolveWeakCache(); +var emptyParserMap = /* @__PURE__ */ new Map(); +onClearCache(() => { + parserCache.clear(); + emptyParserMap.clear(); + cachedMerges.clear(); + mergeCache.clear(); + cacheInternalSettings.clear(); +}); function _mergeWordsCached(left, right) { const map3 = autoResolveWeak(cachedMerges, left, () => /* @__PURE__ */ new WeakMap()); return autoResolveWeak(map3, right, () => left.concat(right)); @@ -58397,9 +59908,8 @@ function mergeSettings(left, ...settings) { return clean(rawSettings); } function isEmpty(obj) { - return Object.keys(obj).length === 0 && obj.constructor === Object; + return !obj || Object.keys(obj).length === 0; } -var mergeCache = new AutoResolveWeakCache(); function merge2(left, right) { const map3 = mergeCache.get(left, () => /* @__PURE__ */ new WeakMap()); return autoResolveWeak(map3, right, () => _merge(left, right)); @@ -58496,12 +60006,6 @@ function takeRightOtherwiseLeft(left, right) { } return left || right; } -function calcOverrideSettings(settings, filename) { - const _settings = toInternalSettings(settings); - const overrides = _settings.overrides || []; - const result = overrides.filter((override) => checkFilenameMatchesGlob(filename, override.filename)).reduce((settings2, override) => mergeSettings(settings2, override), _settings); - return result; -} function finalizeSettings(settings) { return _finalizeSettings(toInternalSettings(settings)); } @@ -58517,7 +60021,6 @@ function _finalizeSettings(settings) { finalized.source = { name: settings.name || "src", sources: [settings] }; return finalized; } -var cacheInternalSettings = new AutoResolveWeakCache(); function toInternalSettings(settings) { if (settings === void 0) return void 0; @@ -58527,17 +60030,10 @@ function toInternalSettings(settings) { } function _toInternalSettings(settings) { const { dictionaryDefinitions: defs, ...rest } = settings; - const dictionaryDefinitions = mapDictDefsToInternal(defs, filenameToDirectory(settings.source?.filename) || resolveCwd()); + const dictionaryDefinitions = mapDictDefsToInternal(defs, settings.source?.filename && toFileUrl(settings.source?.filename) || resolveCwd()); const setting = dictionaryDefinitions ? { ...rest, dictionaryDefinitions } : rest; return cleanCSpellSettingsInternal(setting); } -function filenameToDirectory(filename) { - return filename ? path6.dirname(filename) : void 0; -} -function checkFilenameMatchesGlob(filename, globs) { - const m = new GlobMatcher(globs); - return m.match(filename); -} function mergeSources(left, right) { return { name: "merged", @@ -58593,7 +60089,7 @@ function extractDependencies(settings) { function resolveCwd() { const envGlobRoot = process.env[ENV_CSPELL_GLOB_ROOT]; const cwd = envGlobRoot || process.cwd(); - return cwd; + return (0, import_url12.pathToFileURL)(cwd); } function resolveParser(settings) { if (!settings.parser) @@ -58607,8 +60103,6 @@ function resolveParser(settings) { (0, import_assert7.default)(parser2, `Parser "${parserName}" not found.`); return parser2; } -var parserCache = new AutoResolveWeakCache(); -var emptyParserMap = /* @__PURE__ */ new Map(); function* parsers(plugins) { for (const plugin of plugins) { if (!plugin.parsers) @@ -58627,83 +60121,23 @@ function extractParsers(plugins) { return parserCache.get(plugins, mapPlugins); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/GlobalSettings.js -var import_util36 = require("util"); - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/errors.js -var import_util34 = require("util"); -var allowStringOrUndefined = { - string: true, - undefined: true -}; -var allowNumberOrUndefined = { - number: true, - undefined: true -}; -function isErrnoException(e) { - if (!e || typeof e !== "object") - return false; - if (!isError4(e)) - return false; - const ex = e; - return typeof ex.errno in allowNumberOrUndefined && typeof ex.code in allowStringOrUndefined && typeof ex.path in allowStringOrUndefined; -} -function isError4(e) { - if (e instanceof Error) - return true; - if (!e || typeof e !== "object") - return false; - const ex = e; - return typeof ex.name == "string" && typeof ex.message == "string" && typeof ex.stack in allowStringOrUndefined; -} -function toError3(e, errorFactory = UnknownError) { - if (isError4(e)) - return e; - return new errorFactory(e); -} -var UnknownError = class extends Error { - cause; - constructor(cause) { - super((0, import_util34.format)(cause)); - this.cause = cause; - } -}; -function catchPromiseError(p, handler) { - if (p === void 0) - return void 0; - return _catchPromiseError(p, handler); -} -function wrapCall(fn, handler) { - return (...p) => { - try { - return fn(...p); - } catch (e) { - return handler(e); - } - }; -} -async function _catchPromiseError(p, handler) { - try { - return await p; - } catch (e) { - return handler(e); - } -} +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/GlobalSettings.js +var import_url17 = require("url"); // ../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js -var import_path3 = __toESM(require("path"), 1); +var import_path5 = __toESM(require("path"), 1); var import_os2 = __toESM(require("os"), 1); var import_graceful_fs = __toESM(require_graceful_fs(), 1); // ../node_modules/.pnpm/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js var import_os = __toESM(require("os"), 1); -var import_path2 = __toESM(require("path"), 1); +var import_path4 = __toESM(require("path"), 1); var homeDirectory = import_os.default.homedir(); var { env } = process; -var xdgData = env.XDG_DATA_HOME || (homeDirectory ? import_path2.default.join(homeDirectory, ".local", "share") : void 0); -var xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? import_path2.default.join(homeDirectory, ".config") : void 0); -var xdgState = env.XDG_STATE_HOME || (homeDirectory ? import_path2.default.join(homeDirectory, ".local", "state") : void 0); -var xdgCache = env.XDG_CACHE_HOME || (homeDirectory ? import_path2.default.join(homeDirectory, ".cache") : void 0); +var xdgData = env.XDG_DATA_HOME || (homeDirectory ? import_path4.default.join(homeDirectory, ".local", "share") : void 0); +var xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? import_path4.default.join(homeDirectory, ".config") : void 0); +var xdgState = env.XDG_STATE_HOME || (homeDirectory ? import_path4.default.join(homeDirectory, ".local", "state") : void 0); +var xdgCache = env.XDG_CACHE_HOME || (homeDirectory ? import_path4.default.join(homeDirectory, ".cache") : void 0); var xdgRuntime = env.XDG_RUNTIME_DIR || void 0; var xdgDataDirectories = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":"); if (xdgData) { @@ -58719,9 +60153,9 @@ var import_write_file_atomic = __toESM(require_write_file_atomic(), 1); var import_dot_prop = __toESM(require_dot_prop(), 1); // ../node_modules/.pnpm/crypto-random-string@4.0.0/node_modules/crypto-random-string/index.js -var import_util35 = require("util"); +var import_util33 = require("util"); var import_crypto4 = __toESM(require("crypto"), 1); -var randomBytesAsync = (0, import_util35.promisify)(import_crypto4.default.randomBytes); +var randomBytesAsync = (0, import_util33.promisify)(import_crypto4.default.randomBytes); var urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""); var numericCharacters = "0123456789".split(""); var distinguishableCharacters = "CDEHKMPRTUWXY012458".split(""); @@ -58839,14 +60273,14 @@ function uniqueString() { } // ../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js -var configDirectory = xdgConfig || import_path3.default.join(import_os2.default.tmpdir(), uniqueString()); +var configDirectory = xdgConfig || import_path5.default.join(import_os2.default.tmpdir(), uniqueString()); var permissionError = "You don't have access to this file."; var mkdirOptions = { mode: 448, recursive: true }; var writeFileOptions = { mode: 384 }; var Configstore = class { constructor(id, defaults, options = {}) { - const pathPrefix = options.globalConfigPath ? import_path3.default.join(id, "config.json") : import_path3.default.join("configstore", `${id}.json`); - this._path = options.configPath || import_path3.default.join(configDirectory, pathPrefix); + const pathPrefix = options.globalConfigPath ? import_path5.default.join(id, "config.json") : import_path5.default.join("configstore", `${id}.json`); + this._path = options.configPath || import_path5.default.join(configDirectory, pathPrefix); if (defaults) { this.all = { ...defaults, @@ -58875,7 +60309,7 @@ ${permissionError} } set all(value) { try { - import_graceful_fs.default.mkdirSync(import_path3.default.dirname(this._path), mkdirOptions); + import_graceful_fs.default.mkdirSync(import_path5.default.dirname(this._path), mkdirOptions); import_write_file_atomic.default.sync(this._path, JSON.stringify(value, void 0, " "), writeFileOptions); } catch (error3) { if (error3.code === "EACCES") { @@ -58919,19 +60353,195 @@ ${permissionError} } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/cfgStore.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/cfgStore.js var ConfigStore = Configstore; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/GlobalSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/normalizeRawSettings.js +var import_node_os2 = require("node:os"); +var import_url14 = require("url"); + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/toGlobDef.js +function toGlobDef(g, root, source) { + if (g === void 0) + return void 0; + if (Array.isArray(g)) { + return g.map((g2) => toGlobDef(g2, root, source)); + } + if (typeof g === "string") { + const glob2 = { glob: g }; + if (root !== void 0) { + glob2.root = root; + } + return toGlobDef(glob2, root, source); + } + if (source) { + return { ...g, source }; + } + return g; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/normalizeRawSettings.js +function normalizeRawConfig(config) { + if (typeof config.version === "number") { + config.version = config.version.toString(); + } + if (config.import) { + config.import = normalizeImport(config.import); + } +} +function normalizeDictionaryDefs(settings, settingsFileUrl) { + const dictionaryDefinitions = mapDictDefsToInternal(settings.dictionaryDefinitions, settingsFileUrl); + const languageSettings = settings.languageSettings?.map((langSetting) => clean({ + ...langSetting, + dictionaryDefinitions: mapDictDefsToInternal(langSetting.dictionaryDefinitions, settingsFileUrl) + })); + return clean({ + dictionaryDefinitions, + languageSettings + }); +} +function normalizeOverrides(settings, pathToSettingsFile) { + const { globRoot = toFilePathOrHref(new URL(".", pathToSettingsFile)) } = settings; + const overrides = settings.overrides?.map((override) => { + const filename = toGlobDef(override.filename, globRoot, toFilePathOrHref(pathToSettingsFile)); + const { dictionaryDefinitions, languageSettings } = normalizeDictionaryDefs(override, pathToSettingsFile); + return clean({ + ...override, + filename, + dictionaryDefinitions, + languageSettings: normalizeLanguageSettings(languageSettings) + }); + }); + return overrides ? { overrides } : {}; +} +function normalizeReporters(settings, pathToSettingsFile) { + if (settings.reporters === void 0) + return {}; + function resolve12(s) { + if (s === "default") + return s; + const r = resolveFile(s, pathToSettingsFile); + if (!r.found) { + throw new Error(`Not found: "${s}"`); + } + return r.filename; + } + function resolveReporter(s) { + if (typeof s === "string") { + return resolve12(s); + } + if (!Array.isArray(s) || typeof s[0] !== "string") + throw new Error("Invalid Reporter"); + const [r, ...rest] = s; + return [resolve12(r), ...rest]; + } + return { + reporters: settings.reporters.map(resolveReporter) + }; +} +function normalizeLanguageSettings(languageSettings) { + if (!languageSettings) + return void 0; + function fixLocale(s) { + const { local: locale, ...rest } = s; + return clean({ locale, ...rest }); + } + return languageSettings.map(fixLocale); +} +function normalizeGitignoreRoot(settings, pathToSettingsFile) { + const { gitignoreRoot } = settings; + if (!gitignoreRoot) + return {}; + const roots = Array.isArray(gitignoreRoot) ? gitignoreRoot : [gitignoreRoot]; + return { + gitignoreRoot: roots.map((p) => resolveFilePathToPath(p, pathToSettingsFile)) + }; +} +function normalizeSettingsGlobs(settings, pathToSettingsFile) { + const { globRoot } = settings; + if (settings.ignorePaths === void 0) + return {}; + const ignorePaths = toGlobDef(settings.ignorePaths, globRoot, toFilePathOrHref(pathToSettingsFile)); + return { + ignorePaths + }; +} +function normalizeCacheSettings(settings, pathToSettingsFile) { + const { cache: cache4 } = settings; + if (cache4 === void 0) + return {}; + const { cacheLocation } = cache4; + if (cacheLocation === void 0) + return { cache: cache4 }; + return { cache: { ...cache4, cacheLocation: toFilePathOrHref(resolveFilePath(cacheLocation, pathToSettingsFile)) } }; +} +function resolveFilePath(filename, pathToSettingsFile) { + const cwd = process.cwd(); + return resolveFileWithURL(filename.replace("${cwd}", cwd).replace(/^~/, (0, import_node_os2.homedir)()), pathToSettingsFile); +} +function resolveFilePathToPath(filename, pathToSettingsFile) { + const url = resolveFilePath(filename, pathToSettingsFile); + return url.protocol === "file:" ? (0, import_url14.fileURLToPath)(url) : url.toString(); +} +function normalizeImport(imports) { + if (typeof imports === "string") { + return [imports]; + } + if (Array.isArray(imports)) { + return imports; + } + return []; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configToRawSettings.js +function configErrorToRawSettings(error3, url) { + const filename = toFilePathOrHref(url); + const fileRef = { filename, error: error3 }; + const source = { name: filename, filename }; + return { __importRef: fileRef, source }; +} +function configToRawSettings(cfgFile) { + if (!cfgFile) + return {}; + const url = cfgFile.url; + const filename = toFilePathOrHref(url); + const fileRef = { + filename, + error: void 0 + }; + const source = { + name: cfgFile.settings.name || filename, + filename + }; + const rawSettings = { ...cfgFile.settings }; + rawSettings.import = normalizeImport(rawSettings.import); + normalizeRawConfig(rawSettings); + rawSettings.source = source; + rawSettings.__importRef = fileRef; + const id = rawSettings.id || urlToSimpleId(url); + const name = rawSettings.name || id; + rawSettings.id = id; + rawSettings.name = cfgFile.settings.name || name; + return rawSettings; +} +function urlToSimpleId(url) { + return url.pathname.split("/").slice(-2).join("/"); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/GlobalSettings.js var packageName = "cspell"; -function getRawGlobalSettings() { +async function getRawGlobalSettings() { + return configToRawSettings(await getGlobalConfig()); +} +function getGlobalConfig() { const name = "CSpell Configstore"; - const globalConf = { - source: { - name, - filename: void 0 - } + const configPath = getGlobalConfigPath(); + const urlGlobal = configPath ? (0, import_url17.pathToFileURL)(configPath) : new URL("global-config.json", getSourceDirectoryUrl()); + const source = { + name, + filename: toFilePathOrHref(urlGlobal) }; + const globalConf = { source }; try { const cfgStore = new ConfigStore(packageName); const cfg = cfgStore.all; @@ -58947,29 +60557,31 @@ function getRawGlobalSettings() { logError(error3); } } - return globalConf; + const settings = { ...globalConf, name, source }; + return Promise.resolve(new CSpellConfigFileInMemory(urlGlobal, settings)); } -function writeRawGlobalSettings(settings) { +async function writeRawGlobalSettings(settings) { const toWrite = { import: settings.import }; + const cfgStore = new ConfigStore(packageName); + cfgStore.set(toWrite); +} +function getGlobalConfigPath() { try { const cfgStore = new ConfigStore(packageName); - cfgStore.set(toWrite); + return cfgStore.path; + } catch (e) { return void 0; - } catch (error3) { - if (error3 instanceof Error) - return error3; - return new Error((0, import_util36.format)(error3)); } } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/ImportError.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/ImportError.js var ImportError = class extends Error { cause; constructor(msg, cause) { super(msg); - this.cause = isError4(cause) ? cause : void 0; + this.cause = isError2(cause) ? cause : void 0; } }; var UnsupportedPnpFile = class extends Error { @@ -58978,290 +60590,56 @@ var UnsupportedPnpFile = class extends Error { } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/pnpLoader.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/pnpLoader.js var import_clear_module = __toESM(require_clear_module(), 1); +var import_import_fresh = __toESM(require_import_fresh(), 1); +var import_url20 = require("url"); -// ../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js -var import_node_path4 = __toESM(require("node:path"), 1); -var import_node_url5 = require("node:url"); - -// ../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js -var import_node_process3 = __toESM(require("node:process"), 1); -var import_node_path3 = __toESM(require("node:path"), 1); -var import_node_fs3 = __toESM(require("node:fs"), 1); -var import_node_url4 = require("node:url"); - -// ../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js -var Node = class { - value; - next; - constructor(value) { - this.value = value; - } -}; -var Queue = class { - #head; - #tail; - #size; - constructor() { - this.clear(); - } - enqueue(value) { - const node = new Node(value); - if (this.#head) { - this.#tail.next = node; - this.#tail = node; - } else { - this.#head = node; - this.#tail = node; - } - this.#size++; - } - dequeue() { - const current = this.#head; - if (!current) { - return; - } - this.#head = this.#head.next; - this.#size--; - return current.value; - } - clear() { - this.#head = void 0; - this.#tail = void 0; - this.#size = 0; - } - get size() { - return this.#size; - } - *[Symbol.iterator]() { - let current = this.#head; - while (current) { - yield current.value; - current = current.next; - } - } -}; - -// ../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js -function pLimit(concurrency) { - if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) { - throw new TypeError("Expected `concurrency` to be a number from 1 and up"); - } - const queue = new Queue(); - let activeCount = 0; - const next = () => { - activeCount--; - if (queue.size > 0) { - queue.dequeue()(); - } - }; - const run2 = async (fn, resolve13, args) => { - activeCount++; - const result = (async () => fn(...args))(); - resolve13(result); - try { - await result; - } catch { - } - next(); - }; - const enqueue = (fn, resolve13, args) => { - queue.enqueue(run2.bind(void 0, fn, resolve13, args)); - (async () => { - await Promise.resolve(); - if (activeCount < concurrency && queue.size > 0) { - queue.dequeue()(); - } - })(); - }; - const generator = (fn, ...args) => new Promise((resolve13) => { - enqueue(fn, resolve13, args); - }); - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.size - }, - clearQueue: { - value: () => { - queue.clear(); - } - } - }); - return generator; -} - -// ../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js -var EndError = class extends Error { - constructor(value) { - super(); - this.value = value; - } -}; -var testElement = async (element, tester) => tester(await element); -var finder = async (element) => { - const values = await Promise.all(element); - if (values[1] === true) { - throw new EndError(values[0]); - } - return false; -}; -async function pLocate(iterable, tester, { - concurrency = Number.POSITIVE_INFINITY, - preserveOrder = true -} = {}) { - const limit = pLimit(concurrency); - const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); - const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY); - try { - await Promise.all(items.map((element) => checkLimit(finder, element))); - } catch (error3) { - if (error3 instanceof EndError) { - return error3.value; - } - throw error3; - } -} - -// ../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js -var typeMappings = { - directory: "isDirectory", - file: "isFile" -}; -function checkType(type) { - if (Object.hasOwnProperty.call(typeMappings, type)) { - return; - } - throw new Error(`Invalid type specified: ${type}`); -} -var matchType = (type, stat2) => stat2[typeMappings[type]](); -var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url4.fileURLToPath)(urlOrPath) : urlOrPath; -async function locatePath(paths, { - cwd = import_node_process3.default.cwd(), - type = "file", - allowSymlinks = true, - concurrency, - preserveOrder -} = {}) { - checkType(type); - cwd = toPath(cwd); - const statFunction = allowSymlinks ? import_node_fs3.promises.stat : import_node_fs3.promises.lstat; - return pLocate(paths, async (path_) => { - try { - const stat2 = await statFunction(import_node_path3.default.resolve(cwd, path_)); - return matchType(type, stat2); - } catch { - return false; - } - }, { concurrency, preserveOrder }); -} -function locatePathSync(paths, { - cwd = import_node_process3.default.cwd(), - type = "file", - allowSymlinks = true -} = {}) { - checkType(type); - cwd = toPath(cwd); - const statFunction = allowSymlinks ? import_node_fs3.default.statSync : import_node_fs3.default.lstatSync; - for (const path_ of paths) { - try { - const stat2 = statFunction(import_node_path3.default.resolve(cwd, path_), { - throwIfNoEntry: false - }); - if (!stat2) { - continue; - } - if (matchType(type, stat2)) { - return path_; - } - } catch { - } - } -} - -// ../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js -var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url5.fileURLToPath)(urlOrPath) : urlOrPath; -var findUpStop = Symbol("findUpStop"); -async function findUpMultiple(name, options = {}) { - let directory = import_node_path4.default.resolve(toPath2(options.cwd) || ""); - const { root } = import_node_path4.default.parse(directory); - const stopAt = import_node_path4.default.resolve(directory, options.stopAt || root); - const limit = options.limit || Number.POSITIVE_INFINITY; - const paths = [name].flat(); - const runMatcher = async (locateOptions) => { - if (typeof name !== "function") { - return locatePath(paths, locateOptions); - } - const foundPath = await name(locateOptions.cwd); - if (typeof foundPath === "string") { - return locatePath([foundPath], locateOptions); - } - return foundPath; - }; - const matches = []; - while (true) { - const foundPath = await runMatcher({ ...options, cwd: directory }); - if (foundPath === findUpStop) { - break; - } - if (foundPath) { - matches.push(import_node_path4.default.resolve(directory, foundPath)); - } - if (directory === stopAt || matches.length >= limit) { - break; - } - directory = import_node_path4.default.dirname(directory); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/findUp.js +var import_promises = require("node:fs/promises"); +var import_path6 = __toESM(require("path"), 1); +var import_url19 = require("url"); +async function findUp(name, options = {}) { + const { cwd = process.cwd(), type: entryType = "file", stopAt } = options; + let dir = import_path6.default.resolve(toDirPath(cwd)); + const root = import_path6.default.parse(dir).root; + const predicate = makePredicate(name, entryType); + const stopAtDir = import_path6.default.resolve(toDirPath(stopAt || root)); + while (dir !== root && dir !== stopAtDir) { + const found = await predicate(dir); + if (found !== void 0) + return found; + dir = import_path6.default.dirname(dir); } - return matches; + return void 0; } -function findUpMultipleSync(name, options = {}) { - let directory = import_node_path4.default.resolve(toPath2(options.cwd) || ""); - const { root } = import_node_path4.default.parse(directory); - const stopAt = options.stopAt || root; - const limit = options.limit || Number.POSITIVE_INFINITY; - const paths = [name].flat(); - const runMatcher = (locateOptions) => { - if (typeof name !== "function") { - return locatePathSync(paths, locateOptions); - } - const foundPath = name(locateOptions.cwd); - if (typeof foundPath === "string") { - return locatePathSync([foundPath], locateOptions); +function makePredicate(name, entryType) { + if (typeof name === "function") + return name; + const checkStat = entryType === "file" ? "isFile" : "isDirectory"; + function checkName(dir, name2) { + const f = import_path6.default.join(dir, name2); + return (0, import_promises.stat)(f).then((stats) => stats[checkStat]() && f || void 0).catch(() => void 0); + } + if (!Array.isArray(name)) + return (dir) => checkName(dir, name); + return async (dir) => { + const pending = name.map((n) => checkName(dir, n)); + for (const p of pending) { + const found = await p; + if (found) + return found; } - return foundPath; + return void 0; }; - const matches = []; - while (true) { - const foundPath = runMatcher({ ...options, cwd: directory }); - if (foundPath === findUpStop) { - break; - } - if (foundPath) { - matches.push(import_node_path4.default.resolve(directory, foundPath)); - } - if (directory === stopAt || matches.length >= limit) { - break; - } - directory = import_node_path4.default.dirname(directory); - } - return matches; -} -async function findUp(name, options = {}) { - const matches = await findUpMultiple(name, { ...options, limit: 1 }); - return matches[0]; } -function findUpSync(name, options = {}) { - const matches = findUpMultipleSync(name, { ...options, limit: 1 }); - return matches[0]; +function toDirPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_url19.fileURLToPath)(new URL(".", urlOrPath)) : urlOrPath; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/pnpLoader.js -var import_import_fresh = __toESM(require_import_fresh(), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/pnpLoader.js var defaultPnpFiles = [".pnp.cjs", ".pnp.js"]; -var supportedSchemas = /* @__PURE__ */ new Set(["file"]); +var supportedSchemas = /* @__PURE__ */ new Set(["file:"]); var cachedRequests = /* @__PURE__ */ new Map(); var lock = void 0; var cachedPnpImportsSync = /* @__PURE__ */ new Map(); @@ -59275,72 +60653,45 @@ var PnpLoader = class { } /** * Request that the nearest .pnp file gets loaded - * @param uriDirectory starting directory + * @param urlDirectory starting directory * @returns promise - rejects on error - success if loaded or not found. */ - async load(uriDirectory) { - if (!supportedSchemas.has(uriDirectory.scheme)) + async load(urlDirectory) { + if (!isSupported(urlDirectory)) return void 0; await lock; - const cacheKey = this.calcKey(uriDirectory); + const cacheKey = this.calcKey(urlDirectory); const cached = cachedRequests.get(cacheKey); if (cached) return cached; - const r = findPnpAndLoad(uriDirectory, this.pnpFiles); + const r = findPnpAndLoad(urlDirectory, this.pnpFiles); cachedRequests.set(cacheKey, r); const result = await r; cachedRequestsSync.set(cacheKey, result); return result; } - async peek(uriDirectory) { - if (!supportedSchemas.has(uriDirectory.scheme)) + async peek(urlDirectory) { + if (!isSupported(urlDirectory)) return void 0; await lock; - const cacheKey = this.calcKey(uriDirectory); + const cacheKey = this.calcKey(urlDirectory); return cachedRequests.get(cacheKey) ?? Promise.resolve(void 0); } - /** - * Request that the nearest .pnp file gets loaded - * @param uriDirectory starting directory - * @returns promise - rejects on error - success if loaded or not found. - */ - loadSync(uriDirectory) { - if (!supportedSchemas.has(uriDirectory.scheme)) - return void 0; - const cacheKey = this.calcKey(uriDirectory); - const cached = cachedRequestsSync.get(cacheKey); - if (cached) - return cached; - const r = findPnpAndLoadSync(uriDirectory, this.pnpFiles); - cachedRequestsSync.set(cacheKey, r); - cachedRequests.set(cacheKey, Promise.resolve(r)); - return r; - } - peekSync(uriDirectory) { - if (!supportedSchemas.has(uriDirectory.scheme)) - return void 0; - const cacheKey = this.calcKey(uriDirectory); - return cachedRequestsSync.get(cacheKey); - } /** * Clears the cached so .pnp files will get reloaded on request. */ clearCache() { return clearPnPGlobalCache(); } - calcKey(uriDirectory) { - return uriDirectory.toString() + this.cacheKeySuffix; + calcKey(urlDirectory) { + return urlDirectory.toString() + this.cacheKeySuffix; } }; function pnpLoader(pnpFiles) { return new PnpLoader(pnpFiles); } -async function findPnpAndLoad(uriDirectory, pnpFiles) { - const found = await findUp(pnpFiles, { cwd: uriToFilePath(uriDirectory) }); - return loadPnpIfNeeded(found); -} -function findPnpAndLoadSync(uriDirectory, pnpFiles) { - const found = findUpSync(pnpFiles, { cwd: uriToFilePath(uriDirectory) }); +async function findPnpAndLoad(urlDirectory, pnpFiles) { + const found = await findUp(pnpFiles, { cwd: (0, import_url20.fileURLToPath)(urlDirectory) }); return loadPnpIfNeeded(found); } function loadPnpIfNeeded(found) { @@ -59357,7 +60708,7 @@ function loadPnp(pnpFile) { const pnp = (0, import_import_fresh.default)(pnpFile); if (pnp.setup) { pnp.setup(); - return toUri(pnpFile); + return toFileUrl(pnpFile); } throw new UnsupportedPnpFile(`Unsupported pnp file: "${pnpFile}"`); } @@ -59372,7 +60723,7 @@ function clearPnPGlobalCache() { async function _cleanCache() { await Promise.all([...cachedRequests.values()].map(rejectToUndefined)); const modules = [...cachedPnpImportsSync.values()]; - modules.forEach((r) => r && import_clear_module.default.single(uriToFilePath(r))); + modules.forEach((r) => r && import_clear_module.default.single((0, import_url20.fileURLToPath)(r))); cachedRequests.clear(); cachedRequestsSync.clear(); cachedPnpImportsSync.clear(); @@ -59381,159 +60732,13 @@ async function _cleanCache() { function rejectToUndefined(p) { return p.catch(() => void 0); } - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/defaultSettings.js -var defaultSettings = createCSpellSettingsInternal({ - id: "default", - name: "default", - version: currentSettingsFileVersion -}); - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/normalizeRawSettings.js -var path11 = __toESM(require("path"), 1); - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/toGlobDef.js -function toGlobDef(g, root, source) { - if (g === void 0) - return void 0; - if (Array.isArray(g)) { - return g.map((g2) => toGlobDef(g2, root, source)); - } - if (typeof g === "string") { - const glob2 = { glob: g }; - if (root !== void 0) { - glob2.root = root; - } - return toGlobDef(glob2, root, source); - } - if (source) { - return { ...g, source }; - } - return g; +function isSupported(url) { + return supportedSchemas.has(url.protocol); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/normalizeRawSettings.js -function normalizeRawConfig(config) { - if (typeof config.version === "number") { - config.version = config.version.toString(); - } -} -function normalizeDictionaryDefs(settings, pathToSettingsFile) { - const dictionaryDefinitions = mapDictDefsToInternal(settings.dictionaryDefinitions, pathToSettingsFile); - const languageSettings = settings.languageSettings?.map((langSetting) => clean({ - ...langSetting, - dictionaryDefinitions: mapDictDefsToInternal(langSetting.dictionaryDefinitions, pathToSettingsFile) - })); - return clean({ - dictionaryDefinitions, - languageSettings - }); -} -function normalizeOverrides(settings, pathToSettingsFile) { - const { globRoot = path11.dirname(pathToSettingsFile) } = settings; - const overrides = settings.overrides?.map((override) => { - const filename = toGlobDef(override.filename, globRoot, pathToSettingsFile); - const { dictionaryDefinitions, languageSettings } = normalizeDictionaryDefs(override, pathToSettingsFile); - return clean({ - ...override, - filename, - dictionaryDefinitions, - languageSettings: normalizeLanguageSettings(languageSettings) - }); - }); - return overrides ? { overrides } : {}; -} -function normalizeReporters(settings, pathToSettingsFile) { - if (settings.reporters === void 0) - return {}; - const folder = path11.dirname(pathToSettingsFile); - function resolve13(s) { - if (s === "default") - return s; - const r = resolveFile(s, folder); - if (!r.found) { - throw new Error(`Not found: "${s}"`); - } - return r.filename; - } - function resolveReporter(s) { - if (typeof s === "string") { - return resolve13(s); - } - if (!Array.isArray(s) || typeof s[0] !== "string") - throw new Error("Invalid Reporter"); - const [r, ...rest] = s; - return [resolve13(r), ...rest]; - } - return { - reporters: settings.reporters.map(resolveReporter) - }; -} -function normalizeLanguageSettings(languageSettings) { - if (!languageSettings) - return void 0; - function fixLocale(s) { - const { local: locale, ...rest } = s; - return clean({ locale, ...rest }); - } - return languageSettings.map(fixLocale); -} -function normalizeGitignoreRoot(settings, pathToSettingsFile) { - const { gitignoreRoot } = settings; - if (!gitignoreRoot) - return {}; - const dir = path11.dirname(pathToSettingsFile); - const roots = Array.isArray(gitignoreRoot) ? gitignoreRoot : [gitignoreRoot]; - return { - gitignoreRoot: roots.map((p) => path11.resolve(dir, p)) - }; -} -function normalizeSettingsGlobs(settings, pathToSettingsFile) { - const { globRoot } = settings; - if (settings.ignorePaths === void 0) - return {}; - const ignorePaths = toGlobDef(settings.ignorePaths, globRoot, pathToSettingsFile); - return { - ignorePaths - }; -} -function normalizeCacheSettings(settings, pathToSettingsDir) { - const { cache: cache2 } = settings; - if (cache2 === void 0) - return {}; - const { cacheLocation } = cache2; - if (cacheLocation === void 0) - return { cache: cache2 }; - return { cache: { ...cache2, cacheLocation: resolveFilePath(cacheLocation, pathToSettingsDir) } }; -} -function resolveFilePath(filename, pathToSettingsFile) { - const cwd = process.cwd(); - return path11.resolve(pathToSettingsFile, filename.replace("${cwd}", cwd)); -} - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/PnPSettings.js -var defaultPnPSettings = Object.freeze({}); -var lastPnP = defaultPnPSettings; -function normalizePnPSettings(settings) { - if (equal(lastPnP, settings)) - return lastPnP; - if (equal(defaultPnPSettings, settings)) - return defaultPnPSettings; - const { usePnP, pnpFiles } = settings; - return lastPnP = clean({ usePnP, pnpFiles }); -} -function equal(a, b) { - return a === b || a.usePnP === b.usePnP && (a.pnpFiles === b.pnpFiles || a.pnpFiles?.join("|") === b.pnpFiles?.join("|")); -} - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js -var supportedCSpellConfigVersions = [configSettingsFileVersion0_2]; -var setOfSupportedConfigVersions = Object.freeze(new Set(supportedCSpellConfigVersions)); -var sectionCSpell = "cSpell"; -var defaultFileName = "cspell.json"; -var gcl = getDefaultConfigLoaderInternal; -var CACHE_SIZE_SEARCH_CONFIG = 32; -var searchPlaces = Object.freeze([ +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLocations.js +var supportedExtensions = [".json", ".jsonc", ".yaml", ".yml", ".mjs", ".cjs", ".js"]; +var setOfLocations = /* @__PURE__ */ new Set([ "package.json", // Original locations ".cspell.json", @@ -59556,173 +60761,394 @@ var searchPlaces = Object.freeze([ "cspell.config.jsonc", "cspell.config.yaml", "cspell.config.yml", + // Dynamic config is looked for last + ...genCfgLoc("cspell.config", supportedExtensions), + ...genCfgLoc(".cspell.config", supportedExtensions), + // .config ".cspell.yaml", ".cspell.yml", "cspell.yaml", "cspell.yml", - // Dynamic config is looked for last - "cspell.config.js", - "cspell.config.cjs", - // .config ".config/.cspell.json", ".config/cspell.json", ".config/.cSpell.json", ".config/cSpell.json", ".config/.cspell.jsonc", ".config/cspell.jsonc", - ".config/cspell.config.json", - ".config/cspell.config.jsonc", - ".config/cspell.config.yaml", - ".config/cspell.config.yml", + ...genCfgLoc(".config/cspell.config", supportedExtensions), + ...genCfgLoc(".config/.cspell.config", supportedExtensions), ".config/cspell.yaml", - ".config/cspell.yml", - ".config/cspell.config.js", - ".config/cspell.config.cjs" + ".config/cspell.yml" ]); -var cspellCosmiconfig = { - searchPlaces: searchPlaces.concat(), - loaders: { - ".json": parseJson, - ".jsonc": parseJson +var searchPlaces = Object.freeze([...setOfLocations]); +var defaultConfigFilenames = Object.freeze(searchPlaces.concat()); +function genCfgLoc(filename, extensions) { + return extensions.map((ext) => filename + ext); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configSearch.js +var import_promises2 = require("node:fs/promises"); +var import_node_path4 = __toESM(require("node:path"), 1); +var import_url22 = require("url"); +var ConfigSearch = class { + searchPlaces; + searchCache = /* @__PURE__ */ new Map(); + searchDirCache = /* @__PURE__ */ new Map(); + constructor(searchPlaces2) { + this.searchPlaces = searchPlaces2; + this.searchPlaces = searchPlaces2; + } + async searchForConfig(searchFrom) { + if (typeof searchFrom === "string") { + if (!searchFrom.startsWith("file:")) { + return void 0; + } + } else { + if (searchFrom.protocol !== "file:") { + return void 0; + } + } + const searchFromURL = toURL4(searchFrom); + let dirUrl = new URL(".", searchFrom); + if (dirUrl.toString() !== searchFrom.toString()) { + const isDir2 = await isDirectory(searchFrom); + dirUrl = isDir2 ? addTrailingSlash(searchFromURL) : dirUrl; + } + const searchHref = dirUrl.href; + const searchCache = this.searchCache; + const cached = searchCache.get(searchHref); + if (cached) { + return cached; + } + const toPatchCache = []; + const foundPath = await this.findUpConfigPath(fileURLOrPathToPath(dirUrl), storeVisit); + const foundUrl = foundPath ? (0, import_url22.pathToFileURL)(foundPath) : void 0; + const pFoundPath = Promise.resolve(foundPath); + const pFoundUrl = Promise.resolve(foundUrl); + const searchDirCache = this.searchDirCache; + for (const dir of toPatchCache) { + searchDirCache.set(dir, searchDirCache.get(dir) || pFoundPath); + const dirHref = toFileDirUrl(dir).href; + searchCache.set(dirHref, searchCache.get(dirHref) || pFoundUrl); + } + const result = searchCache.get(searchHref) || pFoundUrl; + searchCache.set(searchHref, result); + return result; + function storeVisit(dir) { + toPatchCache.push(dir); + } + } + clearCache() { + this.searchCache.clear(); + } + async findUpConfig(searchFromPath, visit) { + const cwd = fileURLOrPathToPath(searchFromPath); + const found = await this.findUpConfigPath(cwd, visit); + return found ? (0, import_url22.pathToFileURL)(found) : void 0; + } + findUpConfigPath(cwd, visit) { + const searchDirCache = this.searchDirCache; + const cached = searchDirCache.get(cwd); + if (cached) + return cached; + return findUp((dir) => this.hasConfig(dir, visit), { cwd, type: "file" }); + } + async hasConfig(dir, visited) { + dir = import_node_path4.default.normalize(dir + "/"); + const cached = this.searchDirCache.get(dir); + if (cached) + return cached; + visited(dir); + const dirInfoCache = createAutoResolveCache(); + async function hasFile(filename) { + const dirInfo = await dirInfoCache.get(import_node_path4.default.dirname(filename), async (dir2) => new Map((await (0, import_promises2.readdir)(dir2, { withFileTypes: true }).catch(() => [])).map((ent) => [ent.name, ent]))); + const name = import_node_path4.default.basename(filename); + const found = dirInfo.get(name); + return !!found?.isFile(); + } + for (const searchPlace of this.searchPlaces) { + const file = import_node_path4.default.join(dir, searchPlace); + const found = await hasFile(file); + if (found) { + if (import_node_path4.default.basename(file) !== "package.json") + return file; + if (await checkPackageJson(file)) + return file; + } + } + return void 0; } }; -function parseJson(_filename, content) { - return json.parse(content); +async function checkPackageJson(filename) { + try { + const content = await (0, import_promises2.readFile)(filename, "utf8"); + const pkg = JSON.parse(content); + return typeof pkg.cspell === "object"; + } catch (e) { + return false; + } } -var defaultConfigFilenames = Object.freeze(searchPlaces.concat()); +async function isDirectory(path27) { + try { + return (await (0, import_promises2.stat)(path27)).isDirectory(); + } catch (e) { + return false; + } +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/defaultSettings.js +var defaultSettings = createCSpellSettingsInternal({ + id: "default", + name: "default", + version: currentSettingsFileVersion +}); + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/PnPSettings.js +var defaultPnPSettings = Object.freeze({}); +var lastPnP = defaultPnPSettings; +function normalizePnPSettings(settings) { + if (equal(lastPnP, settings)) + return lastPnP; + if (equal(defaultPnPSettings, settings)) + return defaultPnPSettings; + const { usePnP, pnpFiles } = settings; + return lastPnP = clean({ usePnP, pnpFiles }); +} +function equal(a, b) { + return a === b || a.usePnP === b.usePnP && (a.pnpFiles === b.pnpFiles || a.pnpFiles?.join("|") === b.pnpFiles?.join("|")); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/configLoader.js +var supportedCSpellConfigVersions = [configSettingsFileVersion0_2]; +var setOfSupportedConfigVersions = Object.freeze(new Set(supportedCSpellConfigVersions)); +var sectionCSpell = "cSpell"; +var defaultFileName = "cspell.json"; var defaultConfigLoader = void 0; var ConfigLoader = class { cspellIO; + onReady; /** * Use `createConfigLoader` * @param cspellIO - CSpellIO interface for reading files. */ constructor(cspellIO2) { this.cspellIO = cspellIO2; + this.cspellConfigFileReaderWriter = createReaderWriter(void 0, void 0, createIO(cspellIO2)); + this.onReady = this.getGlobalSettingsAsync().then(() => void 0, (e) => logError(e)); + this.subscribeToEvents(); } - cachedFiles = /* @__PURE__ */ new Map(); - cspellConfigExplorer = (0, import_cosmiconfig.cosmiconfig)("cspell", cspellCosmiconfig); - cspellConfigExplorerSync = (0, import_cosmiconfig.cosmiconfigSync)("cspell", cspellCosmiconfig); + subscribeToEvents() { + this.toDispose.push(onClearCache(() => this.clearCachedSettingsFiles())); + } + cachedConfig = /* @__PURE__ */ new Map(); + cachedConfigFiles = /* @__PURE__ */ new Map(); + cachedPendingConfigFile = new AutoResolveCache(); + cachedMergedConfig = /* @__PURE__ */ new WeakMap(); globalSettings; - readSettings(filename, relativeToOrDefault, defaultValue) { - const relativeTo = (typeof relativeToOrDefault === "string" ? relativeToOrDefault : "") || process.cwd(); - defaultValue = defaultValue || (typeof relativeToOrDefault !== "string" ? relativeToOrDefault : void 0); - const ref = resolveFilename(filename, relativeTo); - return this.importSettings(ref, defaultValue, defaultValue || defaultPnPSettings); + cspellConfigFileReaderWriter; + configSearch = new ConfigSearch(searchPlaces); + toDispose = []; + async readSettingsAsync(filename, relativeTo2, pnpSettings) { + const ref = resolveFilename(filename, relativeTo2 || process.cwd()); + const entry = this.importSettings(ref, pnpSettings || defaultPnPSettings, []); + return entry.onReady; + } + async readConfigFile(filenameOrURL, relativeTo2) { + const ref = resolveFilename(filenameOrURL.toString(), relativeTo2 || process.cwd()); + const url = this.cspellIO.toFileURL(ref.filename); + const href = url.href; + if (ref.error) + return new ImportError(`Failed to read config file: "${ref.filename}"`, ref.error); + const cached = this.cachedConfigFiles.get(href); + if (cached) + return cached; + return this.cachedPendingConfigFile.get(href, async () => { + try { + const file = await this.cspellConfigFileReaderWriter.readConfig(href); + this.cachedConfigFiles.set(href, file); + return file; + } catch (error3) { + return new ImportError(`Failed to read config file: "${ref.filename}"`, error3); + } finally { + setTimeout(() => this.cachedPendingConfigFile.delete(href), 1); + } + }); } - async readSettingsAsync(filename, relativeTo, pnpSettings) { - const ref = resolveFilename(filename, relativeTo || process.cwd()); - return this.importSettings(ref, void 0, pnpSettings || defaultPnPSettings); + searchForConfigFileLocation(searchFrom) { + const url = this.cspellIO.toFileURL(searchFrom || cwdURL()); + return this.configSearch.searchForConfig(url); + } + async searchForConfigFile(searchFrom) { + const location = await this.searchForConfigFileLocation(searchFrom); + if (!location) + return void 0; + const file = await this.readConfigFile(location); + return file instanceof Error ? void 0 : file; } /** * - * @param searchFrom the directory / file to start searching from. + * @param searchFrom the directory / file URL to start searching from. * @param pnpSettings - related to Using Yarn PNP. * @returns the resulting settings */ - searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) { - pnpSettings = normalizePnPSettings(pnpSettings); - return this.searchConfigLRU.get({ searchFrom, pnpSettings }, (p) => this._searchForConfig(p)); - } - searchConfigLRU = new AutoResolveLRUCache(CACHE_SIZE_SEARCH_CONFIG, (a, b) => a.searchFrom === b.searchFrom && a.pnpSettings === b.pnpSettings); - _searchForConfig(params) { - return gcl().normalizeSearchForConfigResultAsync(params.searchFrom || process.cwd(), this.cspellConfigExplorer.search(params.searchFrom), params.pnpSettings).then((r) => r.filepath ? r.config : void 0); + async searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) { + const configFile = await this.searchForConfigFile(searchFrom); + if (!configFile) + return void 0; + return this.mergeConfigFileWithImports(configFile, pnpSettings); } getGlobalSettings() { + (0, import_assert8.default)(this.globalSettings); + return this.globalSettings; + } + async getGlobalSettingsAsync() { if (!this.globalSettings) { - const globalConf = getRawGlobalSettings(); - this.globalSettings = { - id: "global_config", - ...this.normalizeSettings(globalConf || {}, "./global_config", {}) - }; + const globalConfFile = await getGlobalConfig(); + const normalized = await this.mergeConfigFileWithImports(globalConfFile, void 0); + normalized.id ??= "global_config"; + this.globalSettings = normalized; } return this.globalSettings; } clearCachedSettingsFiles() { - this.searchConfigLRU.clear(); this.globalSettings = void 0; - this.cachedFiles.clear(); - this.cspellConfigExplorer.clearCaches(); - this.cspellConfigExplorerSync.clearCaches(); + this.cachedConfig.clear(); + this.cachedConfigFiles.clear(); + this.configSearch.clearCache(); + this.cachedPendingConfigFile.clear(); + this.cspellConfigFileReaderWriter.clearCachedFiles(); + this.cachedMergedConfig = /* @__PURE__ */ new WeakMap(); + } + importSettings(fileRef, pnpSettings, backReferences) { + const url = this.cspellIO.toFileURL(fileRef.filename); + const cacheKey = url.href; + const cachedImport = this.cachedConfig.get(cacheKey); + if (cachedImport) { + backReferences.forEach((ref) => cachedImport.referencedSet.add(ref)); + return cachedImport; + } + if (fileRef.error) { + const settings = createCSpellSettingsInternal({ + __importRef: fileRef, + source: { name: fileRef.filename, filename: fileRef.filename } + }); + const importedConfig2 = { + href: cacheKey, + fileRef, + configFile: void 0, + settings, + isReady: true, + onReady: Promise.resolve(settings), + onConfigFileReady: Promise.resolve(fileRef.error), + referencedSet: new Set(backReferences) + }; + this.cachedConfig.set(cacheKey, importedConfig2); + return importedConfig2; + } + const source = { + name: fileRef.filename, + filename: fileRef.filename + }; + const mergeImports = (cfgFile) => { + if (cfgFile instanceof Error) { + fileRef.error = cfgFile; + return createCSpellSettingsInternal({ __importRef: fileRef, source }); + } + return this.mergeConfigFileWithImports(cfgFile, pnpSettings, backReferences); + }; + const referencedSet = new Set(backReferences); + const onConfigFileReady = onConfigFileReadyFixUp(this.readConfigFile(fileRef.filename)); + const importedConfig = { + href: cacheKey, + fileRef, + configFile: void 0, + settings: void 0, + isReady: false, + onReady: onReadyFixUp(onConfigFileReady.then(mergeImports)), + onConfigFileReady, + referencedSet + }; + this.cachedConfig.set(cacheKey, importedConfig); + return importedConfig; + async function onReadyFixUp(pSettings) { + const settings = await pSettings; + settings.source ??= source; + settings.__importRef ??= fileRef; + importedConfig.isReady = true; + importedConfig.settings = settings; + return settings; + } + async function onConfigFileReadyFixUp(pCfgFile) { + const cfgFile = await pCfgFile; + if (cfgFile instanceof Error) { + importedConfig.fileRef.error = cfgFile; + return cfgFile; + } + source.name = cfgFile.settings.name || source.name; + importedConfig.configFile = cfgFile; + return cfgFile; + } + } + async setupPnp(cfgFile, pnpSettings) { + if (!pnpSettings?.usePnP || pnpSettings === defaultPnPSettings) + return; + if (cfgFile.url.protocol !== "file:") + return; + const { usePnP = pnpSettings.usePnP, pnpFiles = pnpSettings.pnpFiles } = cfgFile.settings; + const pnpSettingsToUse = normalizePnPSettings({ usePnP, pnpFiles }); + const pathToSettingsDir = new URL(".", cfgFile.url); + await loadPnP(pnpSettingsToUse, pathToSettingsDir); } - /** - * Read a config file and inject the fileRef. - * @param fileRef - filename plus context, injected into the resulting config. - */ - readConfig(fileRef) { - const { filename, error: error3 } = fileRef; - if (error3) { - fileRef.error = error3 instanceof ImportError ? error3 : new ImportError(`Failed to read config file: "${filename}"`, error3); - return { __importRef: fileRef }; - } - const s = {}; - try { - const r = this.cspellConfigExplorerSync.load(filename); - if (!r?.config) - throw new Error(`not found: "${filename}"`); - Object.assign(s, r.config); - normalizeRawConfig(s); - validateRawConfig(s, fileRef); - } catch (err) { - fileRef.error = err instanceof ImportError ? err : new ImportError(`Failed to read config file: "${filename}"`, err); + mergeConfigFileWithImports(cfgFile, pnpSettings, referencedBy) { + const cached = this.cachedMergedConfig.get(cfgFile); + if (cached && cached.pnpSettings === pnpSettings && cached.referencedBy === referencedBy) { + return cached.result; } - s.__importRef = fileRef; - return s; + const result = this._mergeConfigFileWithImports(cfgFile, pnpSettings, referencedBy); + this.cachedMergedConfig.set(cfgFile, { pnpSettings, referencedBy, result }); + return result; } - importSettings(fileRef, defaultValues, pnpSettings) { - defaultValues = defaultValues ?? defaultSettings; - const { filename } = fileRef; - const importRef = { ...fileRef }; - const cached = this.cachedFiles.get(filename); - if (cached) { - const cachedImportRef = cached.__importRef || importRef; - cachedImportRef.referencedBy = mergeSourceList(cachedImportRef.referencedBy || [], importRef.referencedBy); - cached.__importRef = cachedImportRef; - return cached; - } - const id = [path12.basename(path12.dirname(filename)), path12.basename(filename)].join("/"); - const name = ""; - const finalizeSettings2 = createCSpellSettingsInternal({ id, name, __importRef: importRef }); - this.cachedFiles.set(filename, finalizeSettings2); - const settings = { ...defaultValues, id, name, ...this.readConfig(importRef) }; - Object.assign(finalizeSettings2, this.normalizeSettings(settings, filename, pnpSettings)); - const finalizeSrc = { name: path12.basename(filename), ...finalizeSettings2.source }; - finalizeSettings2.source = { ...finalizeSrc, filename }; - this.cachedFiles.set(filename, finalizeSettings2); - return finalizeSettings2; + async _mergeConfigFileWithImports(cfgFile, pnpSettings, referencedBy = []) { + await this.setupPnp(cfgFile, pnpSettings); + const href = cfgFile.url.href; + const referencedSet = new Set(referencedBy); + const imports = normalizeImport(cfgFile.settings.import); + const __imports = imports.map((name) => resolveFilename(name, cfgFile.url)); + const toImport = __imports.map((ref) => this.importSettings(ref, pnpSettings, [...referencedBy, href])); + toImport.forEach((entry) => { + entry.referencedSet.add(href); + }); + const pendingImports = toImport.map((entry) => { + return referencedSet.has(entry.href) ? entry.settings || configToRawSettings(entry.configFile) : entry.onReady; + }); + const importSettings = await Promise.all(pendingImports); + const cfg = this.mergeImports(cfgFile, importSettings); + return cfg; } /** * normalizeSettings handles correcting all relative paths, anchoring globs, and importing other config files. * @param rawSettings - raw configuration settings * @param pathToSettingsFile - path to the source file of the configuration settings. */ - normalizeSettings(rawSettings, pathToSettingsFile, pnpSettings) { - const id = rawSettings.id || [path12.basename(path12.dirname(pathToSettingsFile)), path12.basename(pathToSettingsFile)].join("/"); - const name = rawSettings.name || id; - const { usePnP = pnpSettings.usePnP, pnpFiles = pnpSettings.pnpFiles } = rawSettings; - const pnpSettingsToUse = normalizePnPSettings({ usePnP, pnpFiles }); - const pathToSettingsDir = path12.dirname(pathToSettingsFile); - loadPnPSync(pnpSettingsToUse, toUri(pathToSettingsDir)); + mergeImports(cfgFile, importedSettings) { + const rawSettings = configToRawSettings(cfgFile); + const url = cfgFile.url; + const fileRef = rawSettings.__importRef; + const source = rawSettings.source; + (0, import_assert8.default)(fileRef); + (0, import_assert8.default)(source); const settings = { version: defaultSettings.version, ...rawSettings, - id, - name, - globRoot: resolveGlobRoot(rawSettings, pathToSettingsFile), + globRoot: resolveGlobRoot(rawSettings, cfgFile.url), languageSettings: normalizeLanguageSettings(rawSettings.languageSettings) }; - const pathToSettings = path12.dirname(pathToSettingsFile); - const normalizedDictionaryDefs = normalizeDictionaryDefs(settings, pathToSettingsFile); - const normalizedSettingsGlobs = normalizeSettingsGlobs(settings, pathToSettingsFile); - const normalizedOverrides = normalizeOverrides(settings, pathToSettingsFile); - const normalizedReporters = normalizeReporters(settings, pathToSettingsFile); - const normalizedGitignoreRoot = normalizeGitignoreRoot(settings, pathToSettingsFile); - const normalizedCacheSettings = normalizeCacheSettings(settings, pathToSettingsDir); - const imports = typeof settings.import === "string" ? [settings.import] : settings.import || []; - const source = settings.source || { - name: settings.name, - filename: pathToSettingsFile - }; + const normalizedDictionaryDefs = normalizeDictionaryDefs(settings, url); + const normalizedSettingsGlobs = normalizeSettingsGlobs(settings, url); + const normalizedOverrides = normalizeOverrides(settings, url); + const normalizedReporters = normalizeReporters(settings, url); + const normalizedGitignoreRoot = normalizeGitignoreRoot(settings, url); + const normalizedCacheSettings = normalizeCacheSettings(settings, url); const fileSettings = createCSpellSettingsInternal({ ...settings, source, @@ -59733,100 +61159,37 @@ var ConfigLoader = class { ...normalizedGitignoreRoot, ...normalizedCacheSettings }); - if (!imports.length) { + if (!importedSettings.length) { return fileSettings; } - const importedSettings = imports.map((name2) => resolveFilename(name2, pathToSettings)).map((ref) => (ref.referencedBy = [source], ref)).map((ref) => this.importSettings(ref, void 0, pnpSettingsToUse)).reduce((a, b) => mergeSettings(a, b)); - const finalizeSettings2 = mergeSettings(importedSettings, fileSettings); + const mergedImportedSettings = importedSettings.reduce((a, b) => mergeSettings(a, b)); + const finalizeSettings2 = mergeSettings(mergedImportedSettings, fileSettings); finalizeSettings2.name = settings.name || finalizeSettings2.name || ""; finalizeSettings2.id = settings.id || finalizeSettings2.id || ""; + finalizeSettings2.__importRef = fileRef; return finalizeSettings2; } + createCSpellConfigFile(filename, settings) { + return new CSpellConfigFileInMemory(this.cspellIO.toFileURL(filename), settings); + } + dispose() { + while (this.toDispose.length) { + try { + this.toDispose.pop()?.dispose(); + } catch (e) { + logError(e); + } + } + } }; var ConfigLoaderInternal = class extends ConfigLoader { constructor(cspellIO2) { super(cspellIO2); } get _cachedFiles() { - return this.cachedFiles; - } - get _cspellConfigExplorer() { - return this.cspellConfigExplorer; - } - get _cspellConfigExplorerSync() { - return this.cspellConfigExplorerSync; - } - _readConfig = this.readConfig.bind(this); - _normalizeSettings = this.normalizeSettings.bind(this); - async normalizeSearchForConfigResultAsync(searchPath, searchResult, pnpSettings) { - let result; - try { - result = await searchResult || void 0; - } catch (cause) { - result = new ImportError(`Failed to find config file at: "${searchPath}"`, cause); - } - return this.normalizeSearchForConfigResult(searchPath, result, pnpSettings); - } - normalizeSearchForConfigResult(searchPath, searchResult, pnpSettings) { - const error3 = searchResult instanceof ImportError ? searchResult : void 0; - const result = searchResult instanceof ImportError ? void 0 : searchResult; - const filepath = result?.filepath; - if (filepath) { - const cached = cachedFiles().get(filepath); - if (cached) { - return { - config: cached, - filepath, - error: error3 - }; - } - } - const { config = createCSpellSettingsInternal({}) } = result || {}; - const filename = result?.filepath ?? searchPath; - const importRef = { filename, error: error3 }; - const id = [path12.basename(path12.dirname(filename)), path12.basename(filename)].join("/"); - const name = result?.filepath ? id : `Config not found: ${id}`; - const finalizeSettings2 = createCSpellSettingsInternal({ id, name, __importRef: importRef }); - const settings = { id, ...config }; - cachedFiles().set(filename, finalizeSettings2); - Object.assign(finalizeSettings2, this.normalizeSettings(settings, filename, pnpSettings)); - return { - config: finalizeSettings2, - filepath, - error: error3 - }; + return this.cachedConfig; } }; -function mergeSourceList(orig, append) { - const collection = new Map(orig.map((s) => [s.name + (s.filename || ""), s])); - for (const s of append || []) { - const key = s.name + (s.filename || ""); - if (!collection.has(key)) { - collection.set(key, s); - } - } - return [...collection.values()]; -} -function searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) { - return gcl().searchForConfig(searchFrom, pnpSettings); -} -function searchForConfigSync(searchFrom, pnpSettings = defaultPnPSettings) { - pnpSettings = normalizePnPSettings(pnpSettings); - let searchResult; - try { - searchResult = cspellConfigExplorerSync().search(searchFrom) || void 0; - } catch (err) { - searchResult = new ImportError(`Failed to find config file from: "${searchFrom}"`, err); - } - return gcl().normalizeSearchForConfigResult(searchFrom || process.cwd(), searchResult, pnpSettings).config; -} -async function loadConfig(file, pnpSettings = defaultPnPSettings) { - return gcl().readSettingsAsync(file, void 0, pnpSettings); -} -function loadConfigSync(filename, pnpSettings = defaultPnPSettings) { - const pnp = normalizePnPSettings(pnpSettings); - return gcl().readSettings(filename, pnp); -} function loadPnP(pnpSettings, searchFrom) { if (!pnpSettings.usePnP) { return Promise.resolve(void 0); @@ -59834,80 +61197,32 @@ function loadPnP(pnpSettings, searchFrom) { const loader2 = pnpLoader(pnpSettings.pnpFiles); return loader2.load(searchFrom); } -function loadPnPSync(pnpSettings, searchFrom) { - if (!pnpSettings.usePnP) { - return void 0; - } - const loader2 = pnpLoader(pnpSettings.pnpFiles); - return loader2.loadSync(searchFrom); -} -function readRawSettings(filename, relativeTo) { - relativeTo = relativeTo || process.cwd(); - const ref = resolveFilename(filename, relativeTo); - return gcl()._readConfig(ref); -} -function resolveFilename(filename, relativeTo) { - const r = resolveFile(filename, relativeTo); +function resolveFilename(filename, relativeTo2) { + if (filename instanceof URL) + return { filename: toFilePathOrHref(filename) }; + const r = resolveFile(filename, relativeTo2); return { - filename: r.filename, + filename: r.filename.startsWith("file:/") ? (0, import_url24.fileURLToPath)(r.filename) : r.filename, error: r.found ? void 0 : new Error(`Failed to resolve file: "${filename}"`) }; } -function getGlobalSettings() { - return gcl().getGlobalSettings(); -} -function getCachedFileSize() { - return cachedFiles().size; -} -function clearCachedSettingsFiles() { - return gcl().clearCachedSettingsFiles(); -} var nestedConfigDirectories = { ".vscode": true, ".config": true }; -function resolveGlobRoot(settings, pathToSettingsFile) { - const settingsFileDirRaw = path12.dirname(pathToSettingsFile); - const settingsFileDirName = path12.basename(settingsFileDirRaw); +function resolveGlobRoot(settings, urlSettingsFile) { + const pathToSettingsFile = (0, import_url24.fileURLToPath)(urlSettingsFile); + const settingsFileDirRaw = path13.dirname(pathToSettingsFile); + const settingsFileDirName = path13.basename(settingsFileDirRaw); const isNestedConfig = settingsFileDirName in nestedConfigDirectories; const isVSCode = settingsFileDirName === ".vscode"; - const settingsFileDir = isNestedConfig ? path12.dirname(settingsFileDirRaw) : settingsFileDirRaw; + const settingsFileDir = isNestedConfig ? path13.dirname(settingsFileDirRaw) : settingsFileDirRaw; const envGlobRoot = process.env[ENV_CSPELL_GLOB_ROOT]; const defaultGlobRoot = envGlobRoot ?? "${cwd}"; const rawRoot = settings.globRoot ?? (settings.version === configSettingsFileVersion0_1 || envGlobRoot && !settings.version || isVSCode && !settings.version ? defaultGlobRoot : settingsFileDir); - const globRoot = rawRoot.startsWith("${cwd}") ? rawRoot : path12.resolve(settingsFileDir, rawRoot); + const globRoot = rawRoot.startsWith("${cwd}") ? rawRoot : path13.resolve(settingsFileDir, rawRoot); return globRoot; } -function validationMessage(msg, fileRef) { - return msg + ` - File: "${fileRef.filename}"`; -} -function validateRawConfigVersion(config, fileRef) { - const { version: version4 } = config; - if (version4 === void 0) - return; - if (typeof version4 !== "string") { - logError(validationMessage(`Unsupported config file version: "${version4}", string expected`, fileRef)); - return; - } - if (setOfSupportedConfigVersions.has(version4)) - return; - if (!/^\d+(\.\d+)*$/.test(version4)) { - logError(validationMessage(`Unsupported config file version: "${version4}"`, fileRef)); - return; - } - const msg = version4 > currentSettingsFileVersion ? `Newer config file version found: "${version4}". Supported version is "${currentSettingsFileVersion}"` : `Legacy config file version found: "${version4}", upgrade to "${currentSettingsFileVersion}"`; - logWarning(validationMessage(msg, fileRef)); -} -function validateRawConfigExports(config, fileRef) { - if (config.default) { - throw new ImportError(validationMessage("Module `export default` is not supported.\n Use `module.exports =` instead.", fileRef)); - } -} -function validateRawConfig(config, fileRef) { - const validations = [validateRawConfigExports, validateRawConfigVersion]; - validations.forEach((fn) => fn(config, fileRef)); -} function createConfigLoaderInternal(cspellIO2) { return new ConfigLoaderInternal(cspellIO2 ?? getDefaultCSpellIO()); } @@ -59916,17 +61231,55 @@ function getDefaultConfigLoaderInternal() { return defaultConfigLoader; return defaultConfigLoader = createConfigLoaderInternal(); } +function createIO(cspellIO2) { + const readFile5 = (url) => cspellIO2.readFile(url).then((file) => ({ url: file.url, content: file.getText() })); + const writeFile3 = (file) => cspellIO2.writeFile(file.url, file.content); + return { + readFile: readFile5, + writeFile: writeFile3 + }; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/defaultConfigLoader.js +var gcl = getDefaultConfigLoaderInternal; +function searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) { + return gcl().searchForConfig(searchFrom, pnpSettings); +} +async function loadConfig(file, pnpSettings) { + return gcl().readSettingsAsync(file, void 0, pnpSettings); +} +async function readConfigFile(filename, relativeTo2) { + const result = await gcl().readConfigFile(filename, relativeTo2); + if (result instanceof Error) { + throw result; + } + return result; +} +function getGlobalSettings() { + return gcl().getGlobalSettings(); +} +function getGlobalSettingsAsync() { + return gcl().getGlobalSettingsAsync(); +} +function getCachedFileSize() { + return cachedFiles().size; +} function getDefaultConfigLoader() { return getDefaultConfigLoaderInternal(); } function cachedFiles() { return gcl()._cachedFiles; } -function cspellConfigExplorerSync() { - return gcl()._cspellConfigExplorerSync; +async function readRawSettings(filename, relativeTo2) { + try { + const cfg = await readConfigFile(filename, relativeTo2); + return configToRawSettings(cfg); + } catch (e) { + return configErrorToRawSettings(toError(e), toFileUrl(filename)); + } } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/extractImportErrors.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/extractImportErrors.js function extractImportErrors(settings) { const imports = mergeImportRefs2(settings); return !imports ? [] : [...imports.values()].filter(isImportFileRefWithError); @@ -59949,23 +61302,25 @@ function isImportFileRefWithError(ref) { return !!ref.error; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/readSettings.js -function readSettings(filename, relativeToOrDefault, defaultValue) { +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/readSettings.js +async function readSettings(filename, relativeToOrPnP, pnpSettings) { const loader2 = getDefaultConfigLoader(); - if (typeof relativeToOrDefault !== "string" || defaultValue === void 0) - return loader2.readSettings(filename, relativeToOrDefault); - return loader2.readSettings(filename, relativeToOrDefault, defaultValue); + await loader2.onReady; + const relativeTo2 = typeof relativeToOrPnP === "string" || relativeToOrPnP instanceof URL ? relativeToOrPnP : void 0; + const pnp = pnpSettings ? pnpSettings : !(typeof relativeToOrPnP === "string" || relativeToOrPnP instanceof URL) ? relativeToOrPnP : void 0; + return loader2.readSettingsAsync(filename, relativeTo2, pnp); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/readSettingsFiles.js -function readSettingsFiles(filenames) { - return filenames.map((filename) => readSettings(filename)).reduce((a, b) => mergeSettings(a, b), defaultSettings); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/Controller/configLoader/readSettingsFiles.js +async function readSettingsFiles(filenames) { + const settings = await Promise.all(filenames.map((filename) => readSettings(filename))); + return settings.reduce((a, b) => mergeSettings(a, b), defaultSettings); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/link.js -function listGlobalImports() { - const globalSettings = getRawGlobalSettings(); - const list = resolveImports(globalSettings).map(({ filename, settings, error: error3 }) => ({ +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/link.js +async function listGlobalImports() { + const globalSettings = await getRawGlobalSettings(); + const list = (await resolveImports(globalSettings)).map(({ filename, settings, error: error3 }) => ({ filename, error: error3, id: settings.id, @@ -59982,8 +61337,8 @@ function listGlobalImports() { function isString2(s) { return s !== void 0; } -function addPathsToGlobalImports(paths) { - const resolvedSettings = paths.map(resolveSettings); +async function addPathsToGlobalImports(paths) { + const resolvedSettings = await Promise.all(paths.map(resolveSettings)); const hasError = resolvedSettings.filter((r) => !!r.error).length > 0; if (hasError) { return { @@ -59992,22 +61347,27 @@ function addPathsToGlobalImports(paths) { error: "Unable to resolve files." }; } - const rawGlobalSettings = getRawGlobalSettings(); - const resolvedImports = resolveImports(rawGlobalSettings); + const rawGlobalSettings = await getRawGlobalSettings(); + const resolvedImports = await resolveImports(rawGlobalSettings); const imports = new Set(resolvedImports.map((r) => r.resolvedToFilename || r.filename)); resolvedSettings.map((s) => s.resolvedToFilename).filter(isString2).reduce((imports2, s) => imports2.add(s), imports); const globalSettings = { import: [...imports] }; - const error3 = writeRawGlobalSettings(globalSettings); + let error3; + try { + await writeRawGlobalSettings(globalSettings); + } catch (e) { + error3 = toError(e); + } return { success: !error3, error: error3?.message, resolvedSettings }; } -function removePathsFromGlobalImports(paths) { - const listResult = listGlobalImports(); +async function removePathsFromGlobalImports(paths) { + const listResult = await listGlobalImports(); const toRemove = /* @__PURE__ */ new Set(); function matchPackage(pathToRemove) { return ({ package: pkg, id }) => pathToRemove === pkg?.name || pathToRemove === id; @@ -60044,8 +61404,8 @@ function removePathsFromGlobalImports(paths) { error: error3?.toString() }; } -function resolveSettings(filename) { - const settings = readRawSettings(filename); +async function resolveSettings(filename) { + const settings = await readRawSettings(filename); const ref = settings.__importRef; const resolvedToFilename = ref?.filename; const error3 = ref?.error?.message || !resolvedToFilename && "File not Found" || void 0; @@ -60061,12 +61421,12 @@ function normalizeImports(imports) { } function resolveImports(s) { const imported = normalizeImports(s.import); - return imported.map(resolveSettings); + return Promise.all(imported.map(resolveSettings)); } function findPackageForCSpellConfig(pathToConfig) { try { const filename = Path3.join(pathToConfig, "package.json"); - const pkg = JSON.parse(fs7.readFileSync(filename, "utf8")); + const pkg = JSON.parse(fs8.readFileSync(filename, "utf8")); return { filename, name: pkg["name"] @@ -60076,7 +61436,7 @@ function findPackageForCSpellConfig(pathToConfig) { } } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/text.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/text.js var text_exports = {}; __export(text_exports, { __testing__: () => __testing__2, @@ -60109,7 +61469,7 @@ __export(text_exports, { ucFirst: () => ucFirst }); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/search.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/search.js function binarySearch(arr, item, leftOffset, rightOffset) { let left = Math.max(leftOffset ?? 0, 0); let right = Math.min(rightOffset ?? arr.length, arr.length); @@ -60124,7 +61484,7 @@ function binarySearch(arr, item, leftOffset, rightOffset) { return left; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/text.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/text.js function splitCamelCaseWordWithOffset(wo) { return splitCamelCaseWord(wo.text).map(scanMap((last, text) => ({ text, offset: last.offset + last.text.length }), { text: "", @@ -60283,7 +61643,7 @@ var __testing__2 = { regExWordsAndDigits }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/LanguageIds.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/LanguageIds.js var languageExtensionDefinitions = [ { id: "ada", extensions: [".adb", ".ads"] }, { id: "apiblueprint", extensions: [".apib", ".apiblueprint"] }, @@ -60518,8 +61878,8 @@ var generatedFiles = /* @__PURE__ */ new Set([...binaryLanguages, "map", "lock", var languageIds = languageExtensionDefinitions.map(({ id }) => id); var mapExtensionToSetOfLanguageIds = buildLanguageExtensionMapSet(languageExtensionDefinitions); var mapExtensionToLanguageIds = buildExtensionToLanguageIdMap(mapExtensionToSetOfLanguageIds); -function isGeneratedFile(basename7) { - return isGenerated(getLanguagesForBasename(basename7)); +function isGeneratedFile(basename6) { + return isGenerated(getLanguagesForBasename(basename6)); } function isGenerated(languageId) { return doesSetContainAnyOf(generatedFiles, languageId); @@ -60554,27 +61914,27 @@ function _getLanguagesForExt(ext) { function getLanguagesForExt(ext) { return _getLanguagesForExt(ext) || _getLanguagesForExt(ext.toLowerCase()) || []; } -function _getLanguagesForBasename(basename7) { - const found = mapExtensionToLanguageIds.get(basename7); +function _getLanguagesForBasename(basename6) { + const found = mapExtensionToLanguageIds.get(basename6); if (found) return found; - for (let pos = basename7.indexOf("."); pos >= 0; pos = basename7.indexOf(".", pos + 1)) { - const ids = mapExtensionToLanguageIds.get(basename7.slice(pos)); + for (let pos = basename6.indexOf("."); pos >= 0; pos = basename6.indexOf(".", pos + 1)) { + const ids = mapExtensionToLanguageIds.get(basename6.slice(pos)); if (ids) return ids; } return void 0; } -function getLanguagesForBasename(basename7) { - return _getLanguagesForBasename(basename7) || _getLanguagesForBasename(basename7.toLowerCase()) || []; +function getLanguagesForBasename(basename6) { + return _getLanguagesForBasename(basename6) || _getLanguagesForBasename(basename6.toLowerCase()) || []; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Document/normalizeLanguageIds.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Document/normalizeLanguageIds.js function normalizeLanguageIds(languageId) { return (Array.isArray(languageId) ? languageId.join(",") : languageId).split(",").map((s) => s.trim()); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Document/isBinaryDoc.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Document/isBinaryDoc.js function isBinaryDoc(document) { return isBinaryFile(toUri(document.uri), document.languageId); } @@ -60589,11 +61949,11 @@ function isBinaryFile(filename, languageId) { return isGeneratedFile(file); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Document/resolveDocument.js -var import_promises = require("fs/promises"); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Document/resolveDocument.js +var import_promises3 = require("fs/promises"); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Models/TextDocument.js -var import_assert8 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Models/TextDocument.js +var import_assert9 = __toESM(require("assert"), 1); // ../node_modules/.pnpm/vscode-languageserver-textdocument@1.0.11/node_modules/vscode-languageserver-textdocument/lib/esm/main.js var FullTextDocument = class _FullTextDocument { @@ -60805,7 +62165,7 @@ function getWellformedEdit(textEdit) { return textEdit; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Models/TextDocument.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Models/TextDocument.js var TextDocumentImpl = class { uri; languageId; @@ -60896,7 +62256,7 @@ function createTextDocument({ uri, content, languageId, locale, version: version return new TextDocumentImpl(uri, content, languageId, locale, version4); } function updateTextDocument(doc, edits, version4) { - (0, import_assert8.default)(isTextDocumentImpl(doc), "Unknown TextDocument type"); + (0, import_assert9.default)(isTextDocumentImpl(doc), "Unknown TextDocument type"); return doc.update(edits, version4); } function isTextDocumentImpl(doc) { @@ -60904,7 +62264,7 @@ function isTextDocumentImpl(doc) { } var isTextDocument = isTextDocumentImpl; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Document/resolveDocument.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Document/resolveDocument.js var defaultEncoding = "utf8"; function fileToDocument(file, text, languageId, locale) { return clean({ @@ -60925,7 +62285,7 @@ async function resolveDocumentToTextDocument(doc) { return documentToTextDocument(await resolveDocument(doc)); } async function readDocument(filename, encoding = defaultEncoding) { - const text = await (0, import_promises.readFile)(filename, encoding); + const text = await (0, import_promises3.readFile)(filename, encoding); const uri = toUri(filename).toString(); return { uri, @@ -60945,7 +62305,7 @@ function isDocumentWithText(doc) { return doc.text !== void 0; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/FeatureFlags/FeatureFlags.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/FeatureFlags/FeatureFlags.js var systemFeatureFlags; var FeatureFlags = class { flags; @@ -61015,7 +62375,54 @@ function toBool(value) { return boolValues[value.toLowerCase()]; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/grammarTypesHelpers.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/globs/getGlobMatcher.js +var simpleGlobCache = /* @__PURE__ */ new Map(); +var globCache = /* @__PURE__ */ new WeakMap(); +onClearCache(() => { + globCache = /* @__PURE__ */ new WeakMap(); + simpleGlobCache.clear(); +}); +var emptyIgnorePaths = []; +function getGlobMatcherForExcluding(glob2) { + if (!glob2 || Array.isArray(glob2) && !glob2.length) + return getGlobMatcherGlobGlob(emptyIgnorePaths); + return typeof glob2 === "string" ? getGlobMatcherGlobString(glob2) : getGlobMatcherGlobGlob(glob2); +} +function getGlobMatcherGlobString(glob2) { + const cached = simpleGlobCache.get(glob2); + if (cached) + return cached; + const m = new GlobMatcher(glob2); + simpleGlobCache.set(glob2, m); + return m; +} +function getGlobMatcherGlobGlob(glob2) { + const cached = globCache.get(glob2); + if (cached) + return cached; + const m = new GlobMatcher(glob2); + globCache.set(glob2, m); + return m; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/globs/checkFilenameMatchesGlob.js +function checkFilenameMatchesExcludeGlob(filename, globs) { + const m = getGlobMatcherForExcluding(globs); + return m.match(filename); +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/calcOverrideSettings.js +function calcOverrideSettings(settings, filename) { + const _settings = toInternalSettings(settings); + const overrides = _settings.overrides || []; + const result = overrides.filter((override) => checkFilenameMatchesExcludeGlob(filename, override.filename)).reduce((settings2, override) => mergeSettings(settings2, override), _settings); + return result; +} + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/checkFilenameMatchesGlob.js +var checkFilenameMatchesGlob = checkFilenameMatchesExcludeGlob; + +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/grammarTypesHelpers.js function isPatternInclude(p) { return !!p.include; } @@ -61037,7 +62444,7 @@ function isPatternPatterns(p) { return Array.isArray(p.patterns); } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/matchResult.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/matchResult.js function segmentMatch(mr) { const { matches, index, groups, input } = mr; const segments = []; @@ -61074,8 +62481,8 @@ function createSimpleMatchResult(match2, input, index, lineNumber) { return { index, input, match: match2, matches: [match2], groups, lineNumber }; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/scope.js -var import_assert9 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/scope.js +var import_assert10 = __toESM(require("assert"), 1); var Scope = class _Scope { value; parent; @@ -61133,7 +62540,7 @@ var ScopePool = class { for (const value of parentToChild) { parent = this.getScope(value, parent); } - (0, import_assert9.default)(parent, "Empty scope is not allowed."); + (0, import_assert10.default)(parent, "Empty scope is not allowed."); return parent; } }; @@ -61141,7 +62548,7 @@ function isScopeLike(value) { return typeof value === "object" && !Array.isArray(value) && value.value !== void 0; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/grammarNormalizer.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/grammarNormalizer.js function normalizeGrammar(grammar2) { return new ImplNGrammar(grammar2); } @@ -61411,20 +62818,20 @@ var ImplNPatternPatterns = class { } }; -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/grammar.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/grammar.js function compileGrammar(grammar2) { return normalizeGrammar(grammar2); } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/tokenizeLine.js -var import_assert10 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/tokenizeLine.js +var import_assert11 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/util.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/util.js function isDefined4(t) { return t !== void 0 && t !== null; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/processors/procMatchingRule.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/processors/procMatchingRule.js function applyCaptureToBeginOrMatch(matchRuleResult) { const { match: match2, rule } = matchRuleResult; const bePattern = rule.pattern; @@ -61550,7 +62957,7 @@ function applyCaptures(rule, match2, captures) { return parsedText; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/tokenizeLine.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/tokenizeLine.js function tokenizeLine(line, rule) { const text = line.text; const lineLen = line.text.length; @@ -61649,7 +63056,7 @@ function calcRuleStack(rule) { return rules; } function must(t, msg = "Must be defined") { - (0, import_assert10.default)(t !== void 0 && t !== null, msg); + (0, import_assert11.default)(t !== void 0 && t !== null, msg); return t; } function findParentWithEnd(ctx) { @@ -61662,7 +63069,7 @@ function findNearestWithEnd(ctx) { return ctx; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/grammars/typescript.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/grammars/typescript.js var repository = { statements: { name: "code.ts", @@ -61825,8 +63232,8 @@ var grammar = { repository }; -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/mappers/appendMappedText.js -var import_assert11 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/mappers/appendMappedText.js +var import_assert12 = __toESM(require("assert"), 1); function appendMappedText(a, b) { if (!a.map && !b.map) { return { text: a.text + b.text }; @@ -61835,10 +63242,10 @@ function appendMappedText(a, b) { const bLen = b.text.length; const aMap = [0, 0].concat(a.map || [0, 0, aLen, aLen]); const bMap = [0, 0].concat(b.map || [0, 0, bLen, bLen]); - (0, import_assert11.default)(aMap[aMap.length - 1] === aLen); - (0, import_assert11.default)(bMap[bMap.length - 1] === bLen); - (0, import_assert11.default)((aMap.length & 1) === 0); - (0, import_assert11.default)((bMap.length & 1) === 0); + (0, import_assert12.default)(aMap[aMap.length - 1] === aLen); + (0, import_assert12.default)(bMap[bMap.length - 1] === bLen); + (0, import_assert12.default)((aMap.length & 1) === 0); + (0, import_assert12.default)((bMap.length & 1) === 0); return { text: a.text + b.text, map: joinMaps(aMap, bMap) @@ -61863,7 +63270,7 @@ function joinMaps(aMap, bMap) { return r; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/mappers/typescript.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/mappers/typescript.js var hexChars = { "0": 0, "1": 1, @@ -61997,7 +63404,7 @@ function mapRawString(text) { }; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parser/parser.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parser/parser.js function mapTokenizedLine(tl) { return tl.tokens.map((t) => ({ text: t.text, @@ -62009,14 +63416,14 @@ function mapTokenizedLines(itl) { return pipeSync(itl, opMapSync(mapTokenizedLine), opFlattenSync()); } function createParser(grammar2, name, transform2 = mapTokenizedLines) { - function parse4(content, filename) { + function parse5(content, filename) { const parsedTexts = pipeSync(tokenizeTextIterable(content, grammar2), transform2); return { content, filename, parsedTexts }; } - return { name, parse: parse4 }; + return { name, parse: parse5 }; } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parsers/typescript/TypeScriptParser.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parsers/typescript/TypeScriptParser.js var tsGrammar = compileGrammar(grammar); var pool = new ScopePool(); var useScope = /* @__PURE__ */ new WeakMap(); @@ -62098,13 +63505,13 @@ function doesScopeMatch(s, match2) { return typeof s === "string" ? s.startsWith(match2) : s.value.startsWith(match2); } -// ../node_modules/.pnpm/cspell-grammar@8.0.0/node_modules/cspell-grammar/dist/parsers/index.js +// ../node_modules/.pnpm/cspell-grammar@8.1.0/node_modules/cspell-grammar/dist/parsers/index.js var parsers2 = [parser]; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/DefaultSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/DefaultSettings.js var import_lib_cjs = __toESM(require_lib_cjs(), 1); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Models/PatternRegExp.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Models/PatternRegExp.js var PatternRegExp = class extends RegExp { constructor(pattern) { super(pattern); @@ -62114,7 +63521,7 @@ var PatternRegExp = class extends RegExp { } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/LanguageSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/LanguageSettings.js var defaultLocale = "en"; var defaultLanguageSettings = []; function getDefaultLanguageSettings() { @@ -62127,8 +63534,8 @@ function stringToList(sList) { return sList.replace(/[|;]/g, ",").split(",").map((s) => s.trim()).filter((s) => !!s); } function memorizer(resolver) { - const cache2 = createAutoResolveCache(); - return (k) => cache2.get(k, resolver); + const cache4 = createAutoResolveCache(); + return (k) => cache4.get(k, resolver); } var _normalizeLanguageId = memorizer(__normalizeLanguageId); function __normalizeLanguageId(langId) { @@ -62166,11 +63573,9 @@ function isValidLocaleIntlFormat(locale, strict = false) { } return locale.length > 0; } -var cacheCalcSettingsForLanguage = /* @__PURE__ */ new WeakMap(); +var cacheCalcSettingsForLanguage = createAutoResolveWeakCache(); function calcSettingsForLanguage(languageSettings, languageId, locale) { - const mapLang = autoResolveWeak(cacheCalcSettingsForLanguage, languageSettings, () => /* @__PURE__ */ new Map()); - const mapLocale = autoResolve(mapLang, languageId, () => /* @__PURE__ */ new Map()); - return autoResolve(mapLocale, locale, () => _calcSettingsForLanguage(languageSettings, languageId, locale)); + return cacheCalcSettingsForLanguage.get(languageSettings, () => new AutoResolveCache()).get(languageId, () => new AutoResolveCache()).get(locale, () => _calcSettingsForLanguage(languageSettings, languageId, locale)); } function _calcSettingsForLanguage(languageSettings, languageId, locale) { languageId = languageId.toLowerCase(); @@ -62183,17 +63588,9 @@ function _calcSettingsForLanguage(languageSettings, languageId, locale) { ls.locale = locale; return ls; } -var cacheDoesLanguageSettingMatchLanguageId = /* @__PURE__ */ new WeakMap(); +var cacheDoesLanguageSettingMatchLanguageId = createAutoResolveWeakCache(); function doesLanguageSettingMatchLanguageId(s, languageId) { - const r = cacheDoesLanguageSettingMatchLanguageId.get(s) ?? /* @__PURE__ */ new Map(); - const f = r.get(languageId); - if (f !== void 0) { - return f; - } - const v = _doesLanguageSettingMatchLanguageId(s, languageId); - r.set(languageId, v); - cacheDoesLanguageSettingMatchLanguageId.set(s, r); - return v; + return cacheDoesLanguageSettingMatchLanguageId.get(s, () => new AutoResolveCache()).get(languageId, () => _doesLanguageSettingMatchLanguageId(s, languageId)); } function _doesLanguageSettingMatchLanguageId(s, languageId) { const languageSettingsLanguageIds = s.languageId; @@ -62224,7 +63621,7 @@ function calcSettingsForLanguageId(baseSettings, languageId) { return langSettings; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/RegExpPatterns.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/RegExpPatterns.js var regExMatchUrls = /(?:https?|ftp):\/\/[^\s"]+/gi; var regExHRef = /\bhref\s*=\s*".*?"/gi; var regExMatchCommonHexFormats = /(?:#[0-9a-f]{3,8})|(?:0x[0-9a-f]+)|(?:\\u[0-9a-f]{4})|(?:\\x\{[0-9a-f]{4}\})/gi; @@ -62253,7 +63650,7 @@ var regExRepeatedChar = /^(\w)\1{3,}$/i; var regExSha = /\bsha\d+-[a-z0-9+/]{25,}={0,3}/gi; var regExHashStrings = /(?:\b(?:sha\d+|md5|base64|crypt|bcrypt|scrypt|security-token|assertion)[-,:$=]|#code[/])[-\w/+%.]{25,}={0,3}(?:(['"])\s*\+?\s*\1?[-\w/+%.]+={0,3})*(?![-\w/+=%.])/gi; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/DefaultSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/DefaultSettings.js var defaultConfigFileModuleRef = "@cspell/cspell-bundled-dicts/cspell-default.json"; var defaultConfigFile = resolveConfigModule(defaultConfigFileModuleRef); var regExpSpellCheckerDisable = [ @@ -62365,24 +63762,6 @@ var _defaultSettings = Object.freeze(createCSpellSettingsInternal({ ignoreRegExpList: defaultRegExpExcludeList, languageSettings: getDefaultLanguageSettings() })); -var getSettings = /* @__PURE__ */ function() { - let settings = void 0; - return function(useDefaultDictionaries) { - if (!useDefaultDictionaries) { - return _defaultSettingsBasis; - } - if (!settings) { - const jsonSettings = readSettings(defaultConfigFile); - settings = mergeSettings(_defaultSettings, jsonSettings); - if (jsonSettings.name !== void 0) { - settings.name = jsonSettings.name; - } else { - delete settings.name; - } - } - return settings; - }; -}(); function resolveConfigModule(configModuleName) { return resolveFile(configModuleName, import_lib_cjs.srcDirectory).filename; } @@ -62396,14 +63775,42 @@ function normalizePattern2(pat) { description }; } +var DefaultSettingsLoader = class { + settings = void 0; + pending = void 0; + constructor() { + this.getDefaultSettingsAsync().catch(() => void 0); + } + getDefaultSettingsAsync(useDefaultDictionaries = true) { + if (!useDefaultDictionaries) { + return Promise.resolve(_defaultSettingsBasis); + } + if (this.settings) + return Promise.resolve(this.settings); + if (this.pending) + return this.pending; + this.pending = (async () => { + const jsonSettings = await readSettings(defaultConfigFile); + this.settings = mergeSettings(_defaultSettings, jsonSettings); + if (jsonSettings.name !== void 0) { + this.settings.name = jsonSettings.name; + } else { + delete this.settings.name; + } + return this.settings; + })(); + return this.pending; + } +}; +var defaultSettingsLoader = new DefaultSettingsLoader(); function getDefaultSettings(useDefaultDictionaries = true) { - return getSettings(useDefaultDictionaries); + return defaultSettingsLoader.getDefaultSettingsAsync(useDefaultDictionaries); } -function getDefaultBundledSettings() { - return getDefaultSettings(); +function getDefaultBundledSettingsAsync() { + return defaultSettingsLoader.getDefaultSettingsAsync(); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/AutoCache.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/AutoCache.js var CACHE_SIZE = 100; var Cache01 = class { maxSize; @@ -62449,20 +63856,20 @@ function createCache01(size) { return new Cache01(size); } function autoCache(fn, size = CACHE_SIZE) { - const cache2 = createCache01(size); + const cache4 = createCache01(size); const ac = get; ac.hits = 0; ac.misses = 0; ac.swaps = 0; function get(k) { - const f = cache2.get(k); + const f = cache4.get(k); if (f !== void 0) { ++ac.hits; return f; } const r = fn(k); - cache2.set(k, r); - ac.swaps = cache2.swaps; + cache4.set(k, r); + ac.swaps = cache4.swaps; ++ac.misses; return r; } @@ -62473,7 +63880,7 @@ function extractStats(ac) { return { hits, misses, swaps }; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/text.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/text.js var regExAllUpper2 = /^(?:\p{Lu}\p{M}?)+$/u; var regExAccents2 = /\p{M}/gu; function isUpperCase2(word) { @@ -62489,7 +63896,7 @@ function removeUnboundAccents(text) { return text.replace(regExAccents2, ""); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryMethods.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryMethods.js var defaultNumSuggestions = 10; function wordSearchForms(word, isDictionaryCaseSensitive, ignoreCase2) { const forms2 = /* @__PURE__ */ new Set(); @@ -62554,7 +63961,7 @@ function createWeightMapFromDictionaryInformation(di) { return di ? mapDictionaryInformationToWeightMap(di) : void 0; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/CachingDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/CachingDictionary.js var dictionaryCounter = 0; var DefaultAutoCacheSize = 1e3; var CachedDict = class { @@ -62598,19 +64005,19 @@ function createCachingDictionary(dict, options) { return cached; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/AutoResolve.js -function autoResolveWeak2(map3, key, resolve13) { +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/AutoResolve.js +function autoResolveWeak2(map3, key, resolve12) { const found = map3.get(key); if (found !== void 0 || map3.has(key)) return found; - const value = resolve13(key); + const value = resolve12(key); map3.set(key, value); return value; } var AutoResolveWeakCache2 = class { map = /* @__PURE__ */ new WeakMap(); - get(k, resolve13) { - return resolve13 ? autoResolveWeak2(this.map, k, resolve13) : this.map.get(k); + get(k, resolve12) { + return resolve12 ? autoResolveWeak2(this.map, k, resolve12) : this.map.get(k); } has(k) { return this.map.has(k); @@ -62620,19 +64027,383 @@ var AutoResolveWeakCache2 = class { return this; } }; -function createAutoResolveWeakCache() { +function createAutoResolveWeakCache2() { return new AutoResolveWeakCache2(); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/util.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/util.js function isDefined5(v) { return v !== void 0; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createSpellingDictionary.js -var import_fast_equals = __toESM(require_fast_equals_cjs(), 1); +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createSpellingDictionary.js +var import_node_url5 = require("node:url"); -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/simpleCache.js +// ../node_modules/.pnpm/fast-equals@5.0.1/node_modules/fast-equals/dist/esm/index.mjs +var getOwnPropertyNames = Object.getOwnPropertyNames; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty3 = Object.prototype.hasOwnProperty; +function combineComparators(comparatorA, comparatorB) { + return function isEqual(a, b, state) { + return comparatorA(a, b, state) && comparatorB(a, b, state); + }; +} +function createIsCircular(areItemsEqual) { + return function isCircular2(a, b, state) { + if (!a || !b || typeof a !== "object" || typeof b !== "object") { + return areItemsEqual(a, b, state); + } + var cache4 = state.cache; + var cachedA = cache4.get(a); + var cachedB = cache4.get(b); + if (cachedA && cachedB) { + return cachedA === b && cachedB === a; + } + cache4.set(a, b); + cache4.set(b, a); + var result = areItemsEqual(a, b, state); + cache4.delete(a); + cache4.delete(b); + return result; + }; +} +function getStrictProperties(object) { + return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)); +} +var hasOwn = Object.hasOwn || function(object, property) { + return hasOwnProperty3.call(object, property); +}; +function sameValueZeroEqual(a, b) { + return a || b ? a === b : a === b || a !== a && b !== b; +} +var OWNER = "_owner"; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var keys2 = Object.keys; +function areArraysEqual(a, b, state) { + var index = a.length; + if (b.length !== index) { + return false; + } + while (index-- > 0) { + if (!state.equals(a[index], b[index], index, index, a, b, state)) { + return false; + } + } + return true; +} +function areDatesEqual(a, b) { + return sameValueZeroEqual(a.getTime(), b.getTime()); +} +function areMapsEqual(a, b, state) { + if (a.size !== b.size) { + return false; + } + var matchedIndices = {}; + var aIterable = a.entries(); + var index = 0; + var aResult; + var bResult; + while (aResult = aIterable.next()) { + if (aResult.done) { + break; + } + var bIterable = b.entries(); + var hasMatch = false; + var matchIndex = 0; + while (bResult = bIterable.next()) { + if (bResult.done) { + break; + } + var _a = aResult.value, aKey = _a[0], aValue = _a[1]; + var _b = bResult.value, bKey = _b[0], bValue = _b[1]; + if (!hasMatch && !matchedIndices[matchIndex] && (hasMatch = state.equals(aKey, bKey, index, matchIndex, a, b, state) && state.equals(aValue, bValue, aKey, bKey, a, b, state))) { + matchedIndices[matchIndex] = true; + } + matchIndex++; + } + if (!hasMatch) { + return false; + } + index++; + } + return true; +} +function areObjectsEqual(a, b, state) { + var properties = keys2(a); + var index = properties.length; + if (keys2(b).length !== index) { + return false; + } + var property; + while (index-- > 0) { + property = properties[index]; + if (property === OWNER && (a.$$typeof || b.$$typeof) && a.$$typeof !== b.$$typeof) { + return false; + } + if (!hasOwn(b, property) || !state.equals(a[property], b[property], property, property, a, b, state)) { + return false; + } + } + return true; +} +function areObjectsEqualStrict(a, b, state) { + var properties = getStrictProperties(a); + var index = properties.length; + if (getStrictProperties(b).length !== index) { + return false; + } + var property; + var descriptorA; + var descriptorB; + while (index-- > 0) { + property = properties[index]; + if (property === OWNER && (a.$$typeof || b.$$typeof) && a.$$typeof !== b.$$typeof) { + return false; + } + if (!hasOwn(b, property)) { + return false; + } + if (!state.equals(a[property], b[property], property, property, a, b, state)) { + return false; + } + descriptorA = getOwnPropertyDescriptor(a, property); + descriptorB = getOwnPropertyDescriptor(b, property); + if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) { + return false; + } + } + return true; +} +function arePrimitiveWrappersEqual(a, b) { + return sameValueZeroEqual(a.valueOf(), b.valueOf()); +} +function areRegExpsEqual(a, b) { + return a.source === b.source && a.flags === b.flags; +} +function areSetsEqual(a, b, state) { + if (a.size !== b.size) { + return false; + } + var matchedIndices = {}; + var aIterable = a.values(); + var aResult; + var bResult; + while (aResult = aIterable.next()) { + if (aResult.done) { + break; + } + var bIterable = b.values(); + var hasMatch = false; + var matchIndex = 0; + while (bResult = bIterable.next()) { + if (bResult.done) { + break; + } + if (!hasMatch && !matchedIndices[matchIndex] && (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) { + matchedIndices[matchIndex] = true; + } + matchIndex++; + } + if (!hasMatch) { + return false; + } + } + return true; +} +function areTypedArraysEqual(a, b) { + var index = a.length; + if (b.length !== index) { + return false; + } + while (index-- > 0) { + if (a[index] !== b[index]) { + return false; + } + } + return true; +} +var ARGUMENTS_TAG = "[object Arguments]"; +var BOOLEAN_TAG = "[object Boolean]"; +var DATE_TAG = "[object Date]"; +var MAP_TAG = "[object Map]"; +var NUMBER_TAG = "[object Number]"; +var OBJECT_TAG = "[object Object]"; +var REG_EXP_TAG = "[object RegExp]"; +var SET_TAG = "[object Set]"; +var STRING_TAG = "[object String]"; +var isArray = Array.isArray; +var isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null; +var assign2 = Object.assign; +var getTag = Object.prototype.toString.call.bind(Object.prototype.toString); +function createEqualityComparator(_a) { + var areArraysEqual2 = _a.areArraysEqual, areDatesEqual2 = _a.areDatesEqual, areMapsEqual2 = _a.areMapsEqual, areObjectsEqual2 = _a.areObjectsEqual, arePrimitiveWrappersEqual2 = _a.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a.areRegExpsEqual, areSetsEqual2 = _a.areSetsEqual, areTypedArraysEqual2 = _a.areTypedArraysEqual; + return function comparator(a, b, state) { + if (a === b) { + return true; + } + if (a == null || b == null || typeof a !== "object" || typeof b !== "object") { + return a !== a && b !== b; + } + var constructor = a.constructor; + if (constructor !== b.constructor) { + return false; + } + if (constructor === Object) { + return areObjectsEqual2(a, b, state); + } + if (isArray(a)) { + return areArraysEqual2(a, b, state); + } + if (isTypedArray != null && isTypedArray(a)) { + return areTypedArraysEqual2(a, b, state); + } + if (constructor === Date) { + return areDatesEqual2(a, b, state); + } + if (constructor === RegExp) { + return areRegExpsEqual2(a, b, state); + } + if (constructor === Map) { + return areMapsEqual2(a, b, state); + } + if (constructor === Set) { + return areSetsEqual2(a, b, state); + } + var tag = getTag(a); + if (tag === DATE_TAG) { + return areDatesEqual2(a, b, state); + } + if (tag === REG_EXP_TAG) { + return areRegExpsEqual2(a, b, state); + } + if (tag === MAP_TAG) { + return areMapsEqual2(a, b, state); + } + if (tag === SET_TAG) { + return areSetsEqual2(a, b, state); + } + if (tag === OBJECT_TAG) { + return typeof a.then !== "function" && typeof b.then !== "function" && areObjectsEqual2(a, b, state); + } + if (tag === ARGUMENTS_TAG) { + return areObjectsEqual2(a, b, state); + } + if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) { + return arePrimitiveWrappersEqual2(a, b, state); + } + return false; + }; +} +function createEqualityComparatorConfig(_a) { + var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict; + var config = { + areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual, + areDatesEqual, + areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual, + areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual, + arePrimitiveWrappersEqual, + areRegExpsEqual, + areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual, + areTypedArraysEqual: strict ? areObjectsEqualStrict : areTypedArraysEqual + }; + if (createCustomConfig) { + config = assign2({}, config, createCustomConfig(config)); + } + if (circular) { + var areArraysEqual$1 = createIsCircular(config.areArraysEqual); + var areMapsEqual$1 = createIsCircular(config.areMapsEqual); + var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual); + var areSetsEqual$1 = createIsCircular(config.areSetsEqual); + config = assign2({}, config, { + areArraysEqual: areArraysEqual$1, + areMapsEqual: areMapsEqual$1, + areObjectsEqual: areObjectsEqual$1, + areSetsEqual: areSetsEqual$1 + }); + } + return config; +} +function createInternalEqualityComparator(compare4) { + return function(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) { + return compare4(a, b, state); + }; +} +function createIsEqual(_a) { + var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict; + if (createState) { + return function isEqual(a, b) { + var _a2 = createState(), _b = _a2.cache, cache4 = _b === void 0 ? circular ? /* @__PURE__ */ new WeakMap() : void 0 : _b, meta = _a2.meta; + return comparator(a, b, { + cache: cache4, + equals, + meta, + strict + }); + }; + } + if (circular) { + return function isEqual(a, b) { + return comparator(a, b, { + cache: /* @__PURE__ */ new WeakMap(), + equals, + meta: void 0, + strict + }); + }; + } + var state = { + cache: void 0, + equals, + meta: void 0, + strict + }; + return function isEqual(a, b) { + return comparator(a, b, state); + }; +} +var deepEqual = createCustomEqual(); +var strictDeepEqual = createCustomEqual({ strict: true }); +var circularDeepEqual = createCustomEqual({ circular: true }); +var strictCircularDeepEqual = createCustomEqual({ + circular: true, + strict: true +}); +var shallowEqual = createCustomEqual({ + createInternalComparator: function() { + return sameValueZeroEqual; + } +}); +var strictShallowEqual = createCustomEqual({ + strict: true, + createInternalComparator: function() { + return sameValueZeroEqual; + } +}); +var circularShallowEqual = createCustomEqual({ + circular: true, + createInternalComparator: function() { + return sameValueZeroEqual; + } +}); +var strictCircularShallowEqual = createCustomEqual({ + circular: true, + createInternalComparator: function() { + return sameValueZeroEqual; + }, + strict: true +}); +function createCustomEqual(options) { + if (options === void 0) { + options = {}; + } + var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b; + var config = createEqualityComparatorConfig(options); + var comparator = createEqualityComparator(config); + var equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator); + return createIsEqual({ circular, comparator, createState, equals, strict }); +} + +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/simpleCache.js var SimpleWeakCache = class { size; L0 = /* @__PURE__ */ new WeakMap(); @@ -62750,12 +64521,12 @@ var SimpleCache = class { } }; -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.js var defaultOptions = Object.freeze({ weightMap: void 0 }); -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/clean.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/clean.js function clean4(src) { const r = src; for (const key of Object.keys(r)) { @@ -62766,12 +64537,12 @@ function clean4(src) { return r; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/regexHelper.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/regexHelper.js function escapeRegEx(s) { return s.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/repMap.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/repMap.js function createMapper(repMap, ignoreCharset) { if (!repMap && !ignoreCharset) return (a) => a; @@ -62786,12 +64557,12 @@ function createMapper(repMap, ignoreCharset) { } const regEx = createMapperRegExp(repMap); const values = repMap.filter(([match2, _]) => !!match2).map(([_, into]) => into); - function resolve13(m, ...matches) { + function resolve12(m, ...matches) { const index = matches.findIndex((a) => !!a); return 0 <= index && index < values.length ? values[index] : m; } return function(s) { - return s.replace(regEx, resolve13); + return s.replace(regEx, resolve12); }; } function charsetToRepMapRegEx(charset, replaceWith = "") { @@ -62898,11 +64669,11 @@ function addToTrie(node, match2, replaceWith) { node.rep = [...s]; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/defaults.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/defaults.js var ignoreCase = true; var isForbiddenIgnoreCaseAndAccents = false; -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryFromTrie.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryFromTrie.js var findWordOptionsCaseSensitive = Object.freeze({ caseSensitive: true }); var findWordOptionsNotCaseSensitive = Object.freeze({ caseSensitive: false }); var SpellingDictionaryFromTrie = class { @@ -63042,16 +64813,16 @@ function createSpellingDictionaryFromTrieFile(data, name, source, options) { return new SpellingDictionaryFromTrie(trie, name, options, source); } function findCache(fn, size = 2e3) { - const cache2 = createCache01(size); + const cache4 = createCache01(size); function find(word, useCompounds, ignoreCase2) { - const r = cache2.get(word); + const r = cache4.get(word); if (r !== void 0) { if (r.useCompounds === useCompounds && r.ignoreCase === ignoreCase2) { return r.findResult; } } const findResult = fn(word, useCompounds, ignoreCase2); - cache2.set(word, { useCompounds, ignoreCase: ignoreCase2, findResult }); + cache4.set(word, { useCompounds, ignoreCase: ignoreCase2, findResult }); return findResult; } return find; @@ -63061,18 +64832,18 @@ function outerWordForms(word, mapWord) { return new Set(forms2); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createSpellingDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createSpellingDictionary.js var cachedDictionaries = new AutoWeakCache(_createSpellingDictionary, 64); var maxSetSize = 3; var cachedParamsByWordList = new SimpleCache(64); function createSpellingDictionary(wordList, name, source, options) { - const params = [wordList, name, source, options]; + const params = [wordList, name, source.toString(), options]; if (!Array.isArray(wordList)) { return _createSpellingDictionary(params); } const cached = cachedParamsByWordList.get(name) || /* @__PURE__ */ new Set(); for (const cachedParams of cached) { - if ((0, import_fast_equals.deepEqual)(params, cachedParams)) { + if (deepEqual(params, cachedParams)) { return cachedDictionaries.get(cachedParams); } } @@ -63093,7 +64864,9 @@ function _createSpellingDictionary(params) { } return new SpellingDictionaryFromTrie(trie, name, opts, source); } -function createFailedToLoadDictionary(name, source, error3, options) { +function createFailedToLoadDictionary(name, sourceUrl, error3, options) { + const sourceHref = typeof sourceUrl === "string" ? sourceUrl : sourceUrl.href; + const source = sourceHref.startsWith("file:") ? (0, import_node_url5.fileURLToPath)(sourceUrl) : sourceHref; options = options || {}; return { name, @@ -63116,7 +64889,7 @@ function createFailedToLoadDictionary(name, source, error3, options) { }; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/util/textMappers.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/util/textMappers.js function* mapperRemoveCaseAndAccents(words) { for (const word of words) { const lc = word.toLowerCase(); @@ -63127,10 +64900,10 @@ function* mapperRemoveCaseAndAccents(words) { } } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/typosParser.js -var import_assert12 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/typosParser.js +var import_assert13 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/util.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/util.js function normalizeTyposDefValue(value) { if (!value) return false; @@ -63203,16 +64976,16 @@ function isDefined6(v) { function isString3(v) { return typeof v === "string"; } -function isArray(v) { +function isArray2(v) { return Array.isArray(v); } function hasSuggestions(v) { - return isString3(v) || isArray(v); + return isString3(v) || isArray2(v); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/typosParser.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/Typos/typosParser.js function assertString(v) { - (0, import_assert12.default)(typeof v === "string", "A string was expected."); + (0, import_assert13.default)(typeof v === "string", "A string was expected."); return true; } var suggestionsSeparator = /[,]/; @@ -63248,7 +65021,7 @@ function sanitizeIntoTypoDef(dirtyDef) { def[key] = sugs; continue; } - (0, import_assert12.default)(value === false, "Unexpected suggestion type."); + (0, import_assert13.default)(value === false, "Unexpected suggestion type."); def[key] = false; } return def; @@ -63256,7 +65029,7 @@ function sanitizeIntoTypoDef(dirtyDef) { function processEntriesToTyposDef(entries) { const def = isIterable3(entries) ? reduceToTyposDef(entries) : entries; const result = sanitizeIntoTypoDef(def); - (0, import_assert12.default)(result); + (0, import_assert13.default)(result); return result; } function reduceToTyposDef(entries) { @@ -63299,7 +65072,7 @@ function isIterable3(v) { return Symbol.iterator in v; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/TyposDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/TyposDictionary.js var TyposDictionaryImpl = class { name; source; @@ -63426,7 +65199,7 @@ var TyposDictionaryImpl = class { return []; } }; -var createCache = createAutoResolveWeakCache(); +var createCache = createAutoResolveWeakCache2(); function createTyposDictionary(entries, name, source) { return createCache.get(entries, () => { const def = processEntriesToTyposDef(entries); @@ -63434,7 +65207,7 @@ function createTyposDictionary(entries, name, source) { }); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/FlagWordsDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/FlagWordsDictionary.js var FlagWordsDictionaryTrie = class extends SpellingDictionaryFromTrie { name; source; @@ -63530,7 +65303,7 @@ var FlagWordsDictionary = class { return []; } }; -var createCache2 = createAutoResolveWeakCache(); +var createCache2 = createAutoResolveWeakCache2(); function createFlagWordsDictionary(wordList, name, source) { return createCache2.get(wordList, () => { const testSpecialCharacters = /[~*+]/; @@ -63560,7 +65333,7 @@ function bisect(values, predicate) { return { t, f }; } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/IgnoreWordsDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/IgnoreWordsDictionary.js var NormalizeForm = "NFC"; var IgnoreWordsDictionary = class { name; @@ -63631,7 +65404,7 @@ var IgnoreWordsDictionary = class { return []; } }; -var createCache3 = createAutoResolveWeakCache(); +var createCache3 = createAutoResolveWeakCache2(); function createIgnoreWordsDictionary(wordList, name, source) { return createCache3.get(wordList, () => { const testSpecialCharacters = /[*+]/; @@ -63649,7 +65422,7 @@ function createIgnoreWordsDictionary(wordList, name, source) { }); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js function identityString(w) { return w; } @@ -63762,7 +65535,7 @@ function isWordForbiddenInAnyDictionary(dicts, word, ignoreCase2) { return genSequence(dicts).first((dict) => dict.isForbidden(word, ignoreCase2)); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SuggestDictionary.js +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/SuggestDictionary.js var SuggestDictionaryImpl = class { name; source; @@ -63854,7 +65627,7 @@ var SuggestDictionaryImpl = class { return []; } }; -var createCache4 = createAutoResolveWeakCache(); +var createCache4 = createAutoResolveWeakCache2(); function createSuggestDictionary(entries, name, source) { return createCache4.get(entries, () => { const def = processEntriesToTyposDef(entries); @@ -63862,10 +65635,10 @@ function createSuggestDictionary(entries, name, source) { }); } -// ../node_modules/.pnpm/cspell-dictionary@8.0.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js -var cache = createAutoResolveWeakCache(); +// ../node_modules/.pnpm/cspell-dictionary@8.1.0/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js +var cache3 = createAutoResolveWeakCache2(); function createInlineSpellingDictionary(inlineDict, source) { - return cache.get(inlineDict, () => { + return cache3.get(inlineDict, () => { const { words, flagWords, ignoreWords, suggestWords, name } = inlineDict; const dictSources = [ words && createSpellingDictionary(words, name + "-words", source, inlineDict), @@ -63877,13 +65650,13 @@ function createInlineSpellingDictionary(inlineDict, source) { }); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/static.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/static.js var cspellIO = new CSpellIONode(); function getCSpellIO() { return cspellIO; } -// ../node_modules/.pnpm/@cspell+strong-weak-map@8.0.0/node_modules/@cspell/strong-weak-map/dist/esm/StrongWeakMap.js +// ../node_modules/.pnpm/@cspell+strong-weak-map@8.1.0/node_modules/@cspell/strong-weak-map/dist/esm/StrongWeakMap.js var StrongWeakMap = class { map; constructor(init) { @@ -64000,7 +65773,7 @@ var StrongWeakMap = class { [Symbol.toStringTag] = "StrongWeakMap"; }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/SpellingDictionaryError.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/SpellingDictionaryError.js var SpellingDictionaryLoadError = class extends Error { uri; options; @@ -64018,7 +65791,7 @@ function isSpellingDictionaryLoadError(e) { return e instanceof SpellingDictionaryLoadError; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/DictionaryController/DictionaryLoader.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/DictionaryController/DictionaryLoader.js var MAX_AGE = 1e4; var loaders = { S: loadSimpleWordList, @@ -64069,7 +65842,7 @@ var DictionaryLoader = class { if (entry?.dictionary && entry.loadingState === LoadingState.Loaded) { return entry.dictionary; } - const loadedEntry = this.loadEntrySync(def.path, def); + const loadedEntry = this.loadEntrySync(this.cspellIO.toFileURL(def.path), def); this.setCacheEntry(key, loadedEntry, def); return loadedEntry.dictionary; } @@ -64086,7 +65859,7 @@ var DictionaryLoader = class { if (defEntry) { return defEntry; } - const key = calcKey(def); + const key = this.calcKey(def); const entry = this.dictionaryCache.get(key); if (entry) { entry.options = def; @@ -64108,21 +65881,22 @@ var DictionaryLoader = class { const sigMatches = entry.sig === sig; if (sigMatches && hasChanged) { entry.loadingState = LoadingState.Loading; - const key = calcKey(entry.options); + const key = this.calcKey(entry.options); const newEntry = this.loadEntry(entry.uri, entry.options); this.dictionaryCache.set(key, newEntry); this.dictionaryCacheByDef.set(entry.options, { key, entry: newEntry }); } } } - loadEntry(uri, options, now = Date.now()) { - options = this.normalizeOptions(uri, options); - const pDictionary = load(this.reader, uri, options).catch((e) => createFailedToLoadDictionary(options.name, uri, new SpellingDictionaryLoadError(uri, options, e, "failed to load"), options)); - const pStat = this.getStat(uri); + loadEntry(fileOrUri, options, now = Date.now()) { + const url = this.cspellIO.toFileURL(fileOrUri); + options = this.normalizeOptions(url, options); + const pDictionary = load(this.reader, this.cspellIO.toFileURL(fileOrUri), options).catch((e) => createFailedToLoadDictionary(options.name, fileOrUri, new SpellingDictionaryLoadError(url.href, options, e, "failed to load"), options)); + const pStat = this.getStat(fileOrUri); const pending = Promise.all([pDictionary, pStat]); const sig = now + Math.random(); const entry = { - uri, + uri: url.href, options, ts: now, stat: void 0, @@ -64131,40 +65905,41 @@ var DictionaryLoader = class { loadingState: LoadingState.Loading, sig }; - pending.then(([dictionary, stat2]) => { - entry.stat = stat2; + pending.then(([dictionary, stat4]) => { + entry.stat = stat4; entry.dictionary = dictionary; entry.loadingState = LoadingState.Loaded; return; }); return entry; } - loadEntrySync(uri, options, now = Date.now()) { - options = this.normalizeOptions(uri, options); - const stat2 = this.getStatSync(uri); + loadEntrySync(fileOrUri, options, now = Date.now()) { + const url = this.cspellIO.toFileURL(fileOrUri); + options = this.normalizeOptions(url, options); + const stat4 = this.getStatSync(url); const sig = now + Math.random(); try { - const dictionary = loadSync(this.reader, uri, options); - const pending = Promise.resolve([dictionary, stat2]); + const dictionary = loadSync(this.reader, url, options); + const pending = Promise.resolve([dictionary, stat4]); return { - uri, + uri: url.href, options, ts: now, - stat: stat2, + stat: stat4, dictionary, pending, loadingState: LoadingState.Loaded, sig }; } catch (e) { - const error3 = toError3(e); - const dictionary = createFailedToLoadDictionary(options.name, uri, new SpellingDictionaryLoadError(uri, options, error3, "failed to load"), options); - const pending = Promise.resolve([dictionary, stat2]); + const error3 = toError(e); + const dictionary = createFailedToLoadDictionary(options.name, fileOrUri, new SpellingDictionaryLoadError(url.href, options, error3, "failed to load"), options); + const pending = Promise.resolve([dictionary, stat4]); return { - uri, + uri: url.href, options, ts: now, - stat: stat2, + stat: stat4, dictionary, pending, loadingState: LoadingState.Loaded, @@ -64173,13 +65948,13 @@ var DictionaryLoader = class { } } getStat(uri) { - return this.cspellIO.getStat(uri).catch(toError3); + return this.cspellIO.getStat(this.cspellIO.toFileURL(uri)).catch(toError); } getStatSync(uri) { try { - return this.cspellIO.getStatSync(uri); + return this.cspellIO.getStatSync(this.cspellIO.toFileURL(uri)); } catch (e) { - return toError3(e); + return toError(e); } } isEqual(a, b) { @@ -64193,28 +65968,28 @@ var DictionaryLoader = class { normalizeOptions(uri, options) { if (options.name) return options; - return { ...options, name: this.cspellIO.uriBasename(uri) }; + return { ...options, name: this.cspellIO.urlBasename(uri) }; } loadInlineDict(def) { return this.inlineDictionaryCache.get(def, (def2) => createInlineSpellingDictionary(def2, def2.__source || "memory")); } + calcKey(def) { + const path27 = def.path; + const loaderType = determineType(this.cspellIO.toFileURL(path27), def); + const optValues = importantOptionKeys.map((k) => def[k]?.toString() || ""); + const parts = [path27, loaderType].concat(optValues); + return parts.join("|"); + } }; function toReader(cspellIO2) { return { - read: async (filename) => (await cspellIO2.readFile(filename)).content, - readLines: async (filename) => toLines((await cspellIO2.readFile(filename)).content), - readSync: (filename) => cspellIO2.readFileSync(filename).content, - readLinesSync: (filename) => toLines(cspellIO2.readFileSync(filename).content) + read: async (filename) => (await cspellIO2.readFile(filename)).getText(), + readLines: async (filename) => toLines((await cspellIO2.readFile(filename)).getText()), + readSync: (filename) => cspellIO2.readFileSync(filename).getText(), + readLinesSync: (filename) => toLines(cspellIO2.readFileSync(filename).getText()) }; } var importantOptionKeys = ["name", "noSuggest", "useCompounds", "type"]; -function calcKey(def) { - const path26 = def.path; - const loaderType = determineType(path26, def); - const optValues = importantOptionKeys.map((k) => def[k]?.toString() || ""); - const parts = [path26, loaderType].concat(optValues); - return parts.join("|"); -} function isError5(e) { const err = e; return !!err.message; @@ -64222,9 +65997,9 @@ function isError5(e) { function determineType(uri, opts) { const t = opts.type && opts.type in loaders && opts.type || "S"; const defLoaderType = t; - const defType = uri.endsWith(".trie.gz") ? "T" : defLoaderType; + const defType = uri.pathname.endsWith(".trie.gz") ? "T" : defLoaderType; const regTrieTest = /\.trie\b/i; - return regTrieTest.test(uri) ? "T" : defType; + return regTrieTest.test(uri.pathname) ? "T" : defType; } function load(reader2, uri, options) { const type = determineType(uri, options); @@ -64253,15 +66028,15 @@ function _legacyWordListSync(lines, filename, options) { opConcatMapSync((line) => line.split(/[^\w\p{L}\p{M}'’]+/gu)), opFilterSync((word) => !!word) ); - return createSpellingDictionary(words, options.name, filename, options); + return createSpellingDictionary(words, options.name, filename.toString(), options); } async function wordsPerLineWordList(reader2, filename, options) { const lines = await reader2.readLines(filename); - return _wordsPerLineWordList(lines, filename, options); + return _wordsPerLineWordList(lines, filename.toString(), options); } function wordsPerLineWordListSync(reader2, filename, options) { const lines = reader2.readLinesSync(filename); - return _wordsPerLineWordList(lines, filename, options); + return _wordsPerLineWordList(lines, filename.toString(), options); } function _wordsPerLineWordList(lines, filename, options) { const words = pipeSync( @@ -64276,25 +66051,25 @@ function _wordsPerLineWordList(lines, filename, options) { } async function loadSimpleWordList(reader2, filename, options) { const lines = await reader2.readLines(filename); - return createSpellingDictionary(lines, options.name, filename, options); + return createSpellingDictionary(lines, options.name, filename.href, options); } function loadSimpleWordListSync(reader2, filename, options) { const lines = reader2.readLinesSync(filename); - return createSpellingDictionary(lines, options.name, filename, options); + return createSpellingDictionary(lines, options.name, filename.href, options); } async function loadTrie(reader2, filename, options) { const content = await reader2.read(filename); - return createSpellingDictionaryFromTrieFile(content, options.name, filename, options); + return createSpellingDictionaryFromTrieFile(content, options.name, filename.href, options); } function loadTrieSync(reader2, filename, options) { const content = reader2.readSync(filename); - return createSpellingDictionaryFromTrieFile(content, options.name, filename, options); + return createSpellingDictionaryFromTrieFile(content, options.name, filename.href, options); } function toLines(content) { return content.split(/\n|\r\n|\r/); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/DictionaryLoader.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/DictionaryLoader.js var loader; function getDictionaryLoader(cspellIO2) { if (loader) @@ -64311,7 +66086,7 @@ async function refreshCacheEntries(maxAge, now) { return getDictionaryLoader().refreshCacheEntries(maxAge, now); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/Dictionaries.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/SpellingDictionary/Dictionaries.js function loadDictionaryDefs(defsToLoad) { return defsToLoad.map(loadDictionary); } @@ -64354,7 +66129,7 @@ function _getDictionaryInternal(settings, spellDictionaries) { return createCollection(dictionaries, "dictionary collection"); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/InDocSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/InDocSettings.js var regExMatchRegEx = /\/.*\/[gimuy]*/; var regExCSpellInDocDirective = /\b(?:spell-?checker|c?spell)::?(.*)/gi; var regExCSpellDirectiveKey = /(?<=\b(?:spell-?checker|c?spell)::?)(?!:)(.*)/i; @@ -64375,6 +66150,7 @@ var officialDirectives = [ "includeRegExp", "ignoreRegExp", "local", + // Do not suggest. "locale", "language", "dictionaries", @@ -64458,6 +66234,7 @@ var settingParsers = [ [/^locale?\b(?!-)/i, parseLocale2], [/^language\s\b(?!-)/i, parseLocale2], [/^dictionar(?:y|ies)\b(?!-)/i, parseDictionaries], + // cspell:disable-line [/^LocalWords:/, (w) => parseWords(w.replace(/^LocalWords:?/gi, " "))] ]; var emptySettings = Object.freeze({}); @@ -64570,7 +66347,7 @@ function parseDisable(_match) { return {}; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/Settings/TextDocumentSettings.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/Settings/TextDocumentSettings.js function combineTextAndLanguageSettings(settings, text, languageId) { if (!text) { return toInternalSettings(calcSettingsForLanguageId(settings, languageId)); @@ -64584,11 +66361,47 @@ function extractSettingsFromText(text) { return getInDocumentSettings(text); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/determineTextDocumentSettings.js -var path13 = __toESM(require("path"), 1); -function determineTextDocumentSettings(doc, settings) { +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/perf/timer.js +function createPerfTimer2(name, onEnd, timeNowFn) { + return new SimpleTimer(name, onEnd, timeNowFn); +} +var SimpleTimer = class { + name; + onEnd; + timeNowFn; + _start = performance.now(); + _elapsed = void 0; + _running = true; + constructor(name, onEnd, timeNowFn = performance.now) { + this.name = name; + this.onEnd = onEnd; + this.timeNowFn = timeNowFn; + } + get startTime() { + return this._start; + } + get elapsed() { + return this._elapsed ?? performance.now() - this._start; + } + end() { + if (!this._running) + return; + this._running = false; + const end = performance.now(); + this._elapsed = end - this._start; + this.onEnd?.(this._elapsed, this.name); + } + start() { + this._start = performance.now(); + this._running = true; + } +}; + +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/determineTextDocumentSettings.js +var path14 = __toESM(require("path"), 1); +async function determineTextDocumentSettings(doc, settings) { const filename = uriToFilePath(doc.uri); - const settingsWithDefaults = mergeSettings(getDefaultSettings(settings.loadDefaultConfiguration ?? true), getGlobalSettings(), settings); + const settingsWithDefaults = mergeSettings(await getDefaultSettings(settings.loadDefaultConfiguration ?? true), getGlobalSettings(), settings); const fileSettings = calcOverrideSettings(settingsWithDefaults, filename); const languageIds2 = fileSettings?.languageId?.length ? fileSettings.languageId : doc.languageId ? doc.languageId : getLanguageForFilename(filename); if (doc.locale) { @@ -64597,25 +66410,24 @@ function determineTextDocumentSettings(doc, settings) { return combineTextAndLanguageSettings(fileSettings, doc.text, languageIds2); } function getLanguageForFilename(filename) { - const basename7 = path13.basename(filename); - return getLanguagesForBasename(basename7); + const basename6 = path14.basename(filename); + return getLanguagesForBasename(basename6); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/checkText.js -var import_assert16 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/checkText.js +var import_assert17 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/@cspell+cspell-types@8.0.0/node_modules/@cspell/cspell-types/dist/index.mjs +// ../node_modules/.pnpm/@cspell+cspell-types@8.1.0/node_modules/@cspell/cspell-types/dist/index.mjs var dist_exports = {}; -__reExport(dist_exports, __toESM(require_dist3(), 1)); +__reExport(dist_exports, __toESM(require_dist2(), 1)); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/docValidator.js -var import_assert15 = __toESM(require("assert"), 1); -var import_path4 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/docValidator.js +var import_assert16 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/suggestions.js -var import_assert13 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/suggestions.js +var import_assert14 = __toESM(require("assert"), 1); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/memorizeLastCall.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/memorizeLastCall.js function memorizeLastCall2(fn) { let last; return (...p) => { @@ -64629,7 +66441,7 @@ function memorizeLastCall2(fn) { }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/suggestions.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/suggestions.js var emptySuggestionOptions = Object.freeze({}); var emptyCSpellSettings = Object.freeze({}); async function* suggestionsForWords(words, options, settings) { @@ -64639,8 +66451,8 @@ async function* suggestionsForWords(words, options, settings) { } var memorizeSuggestions = memorizeLastCall2(cacheSuggestionsForWord); function cacheSuggestionsForWord(options, settings) { - const cache2 = createAutoResolveCache(); - return (word) => cache2.get(word, (word2) => _suggestionsForWord(word2, options, settings)); + const cache4 = createAutoResolveCache(); + return (word) => cache4.get(word, (word2) => _suggestionsForWord(word2, options, settings)); } function suggestionsForWord(word, options = emptySuggestionOptions, settings = emptyCSpellSettings) { return memorizeSuggestions(options, settings)(word); @@ -64665,15 +66477,15 @@ async function _suggestionsForWord(word, options, settings) { }; } await refreshDictionaryCache(); - const config = includeDefaultConfig ? mergeSettings(getDefaultSettings(settings.loadDefaultConfiguration ?? true), getGlobalSettings(), settings) : settings; + const config = includeDefaultConfig ? mergeSettings(await getDefaultSettings(settings.loadDefaultConfiguration ?? true), await getGlobalSettingsAsync(), settings) : settings; const { dictionaryCollection, allDictionaryCollection } = await determineDictionaries(config); - return _suggestionsForWordSync(word, options, settings, dictionaryCollection, allDictionaryCollection); + return _suggestionsForWordAsync(word, options, settings, dictionaryCollection, allDictionaryCollection); } -function _suggestionsForWordSync(word, options, settings, dictionaryCollection, allDictionaryCollection) { +async function _suggestionsForWordAsync(word, options, settings, dictionaryCollection, allDictionaryCollection) { const extendsDictionaryCollection = allDictionaryCollection || dictionaryCollection; const { locale: language, strict = true, numChanges = 4, numSuggestions = 8, includeTies = true, includeDefaultConfig = true } = options; const ignoreCase2 = !strict; - const config = includeDefaultConfig ? mergeSettings(getDefaultSettings(settings.loadDefaultConfiguration ?? true), getGlobalSettings(), settings) : settings; + const config = includeDefaultConfig ? mergeSettings(await getDefaultSettings(settings.loadDefaultConfiguration ?? true), await getGlobalSettingsAsync(), settings) : settings; const opts = { ignoreCase: ignoreCase2, numChanges, numSuggestions, includeTies }; const suggestionsByDictionary = dictionaryCollection.dictionaries.flatMap((dict) => dict.suggest(word, opts).map((r) => ({ ...r, dictName: dict.name }))); const locale = adjustLocale(language || config.language || void 0); @@ -64770,7 +66582,7 @@ function matchCase2(word, isPreferred, style) { return word; if (style.isAllCaps) return word.toLocaleUpperCase(locale); - (0, import_assert13.default)(style.isTitleCase); + (0, import_assert14.default)(style.isTitleCase); return word.replace(/^\p{L}/u, (firstLetter) => firstLetter.toLocaleUpperCase(locale)); } var regExpHasCaps = /\p{Lu}/u; @@ -64800,7 +66612,7 @@ var SuggestionError = class extends Error { } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/simpleCache.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/simpleCache.js var SimpleCache2 = class { size; L0 = /* @__PURE__ */ new Map(); @@ -64866,45 +66678,12 @@ var AutoCache = class extends SimpleCache2 { } }; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/timer.js -var _hrTime = process?.hrtime || polyHrTime; -function createTimer(hrTimeFn = _hrTime) { - let start = hrTimeFn(); - let lastLap = 0; - function elapsed() { - return toMilliseconds(hrTimeFn(start)); - } - return { - start() { - start = hrTimeFn(); - lastLap = 0; - }, - elapsed, - lap() { - const now = elapsed(); - const diff = now - lastLap; - lastLap = now; - return diff; - } - }; -} -function toMilliseconds(t) { - return (t[0] + t[1] * 1e-9) * 1e3; -} -function polyHrTime(time) { - const now = Date.now() - (time ? toMilliseconds(time) : 0); - const inSeconds = now * 1e-3; - const s = Math.floor(inSeconds); - const n = (inSeconds - s) * 1e9; - return [s, n]; -} - -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/defaultConstants.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/defaultConstants.js var defaultMaxNumberOfProblems = 200; var defaultMaxDuplicateProblems = 5; var defaultMinWordLength = 4; -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/PairingHeap.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/PairingHeap.js var PairingHeap2 = class { compare; _heap; @@ -64988,12 +66767,12 @@ function mergeSiblings2(compare4, n) { return ss ? merge3(compare4, m, mergeSiblings2(compare4, ss)) : m; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/regexHelper.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/regexHelper.js function escapeRegEx2(s) { return s.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/wordSplitter.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/wordSplitter.js var ignoreBreak = Object.freeze([]); function split(line, offset, isValidWord, options = {}) { const relWordToSplit = findNextWordText({ text: line.text, offset: offset - line.offset }); @@ -65140,6 +66919,7 @@ function genOptionalWordBreaks(line, optionalBreakCharacters) { offset: i, breaks: [ [i, j], + // Remove the characters ignoreBreak ] }; @@ -65164,8 +66944,11 @@ function genSymbolBreaks(line) { offset: i, breaks: [ [i, j], + // Remove the characters [i, i], + // keep characters with word to right [j, j], + // keep characters with word to left ignoreBreak ] }; @@ -65224,25 +67007,25 @@ function splitIntoWords(lineSeg, breaks, has2) { } return results; } - function addToKnownPaths(candidate, path26) { + function addToKnownPaths(candidate, path27) { for (let can = candidate; can !== void 0; can = can.p) { const t = can.text; const i = can.i; - const cost = (!t || t.isFound ? 0 : t.text.length) + (path26?.c ?? 0); + const cost = (!t || t.isFound ? 0 : t.text.length) + (path27?.c ?? 0); const exitingPath = knownPathsByIndex.get(i); if (exitingPath && exitingPath.c <= cost) { return void 0; } const node = { - n: path26, + n: path27, i, c: cost, text: t }; knownPathsByIndex.set(i, node); - path26 = node; + path27 = node; } - return path26; + return path27; } let maxCost = lineSeg.relEnd - lineSeg.relStart; const candidates = new PairingHeap2(compare4); @@ -65297,7 +67080,7 @@ function mergeSortedBreaks(...maps) { return [].concat(...maps).sort((a, b) => a.offset - b.offset); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/isWordValid.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/isWordValid.js function hasWordCheck(dict, word) { word = word.includes("\\") ? word.replace(/\\/g, "") : word; return dict.has(word); @@ -65308,8 +67091,8 @@ function isWordValidWithEscapeRetry(dict, wo, line) { line.text[wo.offset - line.offset - 1] === "\\" && hasWordCheck(dict, wo.text.slice(1)); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/TextMap.js -var import_assert14 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/TextMap.js +var import_assert15 = __toESM(require("assert"), 1); function extractTextMapRangeOrigin(textMap, extractRange) { const { text: srcTxt, range: srcRange, map: srcMap } = textMap; const [r0, r1] = srcRange; @@ -65322,7 +67105,7 @@ function extractTextMapRangeOrigin(textMap, extractRange) { const text2 = srcTxt.slice(a, b); return { text: text2, range }; } - (0, import_assert14.default)((srcMap.length & 1) === 0, "Map must be pairs of values."); + (0, import_assert15.default)((srcMap.length & 1) === 0, "Map must be pairs of values."); const mapLen = srcMap.length; const mapEndSrc = srcMap[mapLen - 2]; const mapEndDst = srcMap[mapLen - 1]; @@ -65351,7 +67134,7 @@ function extractTextMapRangeOrigin(textMap, extractRange) { return { text, range, map: map3 }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/parsedText.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/parsedText.js function mapRangeBackToOriginalPos(offRange, map3) { if (!map3 || !map3.length) return offRange; @@ -65410,7 +67193,7 @@ function createMappedTextSegmenter(includeRanges) { return segmenter; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/lineValidatorFactory.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/lineValidatorFactory.js function lineValidatorFactory(sDict, options) { const { minWordLength = defaultMinWordLength, flagWords = [], allowCompoundWords = false, ignoreCase: ignoreCase2 = true } = options; const hasWordOptions = { @@ -65538,7 +67321,7 @@ function textValidatorFactory(dict, options) { }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/settingsToValidateOptions.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/settingsToValidateOptions.js function settingsToValidateOptions(settings) { const opt = { ...settings, @@ -65547,7 +67330,7 @@ function settingsToValidateOptions(settings) { return opt; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/util/TextRange.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/util/TextRange.js function toMatchRangeWithText(m) { const index = m.index || 0; const _text = m[0]; @@ -65647,7 +67430,7 @@ function makeSortedMatchRangeArray(sortedValues) { return sorted; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/textValidator.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/textValidator.js function validateText(text, dict, options) { const { maxNumberOfProblems = defaultMaxNumberOfProblems, maxDuplicateProblems = defaultMaxDuplicateProblems } = options; const mapOfProblems = /* @__PURE__ */ new Map(); @@ -65717,9 +67500,8 @@ function mapLineSegmentAgainstRangesFactory(includeRanges) { return mapper; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/docValidator.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/docValidator.js var ERROR_NOT_PREPARED = "Validator Must be prepared before calling this function."; -var skipValidation = false; var DocumentValidator = class { settings; _document; @@ -65730,6 +67512,8 @@ var DocumentValidator = class { _preparationTime = -1; _suggestions = new AutoCache((text) => this.genSuggestions(text), 1e3); options; + perfTiming = {}; + skipValidation; /** * @param doc - Document to validate * @param config - configuration to use (not finalized). @@ -65742,81 +67526,45 @@ var DocumentValidator = class { if (numSuggestions !== void 0) { this.options.numSuggestions = numSuggestions; } + this.skipValidation = !!options.skipValidation; } get ready() { return this._ready; } - /** - * Prepare to validate a document. - * This will load all the necessary configuration and dictionaries. - * - * @deprecated - * @deprecationMessage Use the async `prepare` method. - */ - prepareSync() { - if (this._ready) - return; - const timer = createTimer(); - const { options, settings } = this; - const useSearchForConfig = !options.noConfigSearch && !settings.noConfigSearch || options.noConfigSearch === false; - const optionsConfigFile = options.configFile; - const localConfigFn = optionsConfigFile ? () => loadConfigSync(optionsConfigFile, settings) : useSearchForConfig ? () => searchForDocumentConfigSync(this._document, settings, settings) : void 0; - const localConfig = localConfigFn && wrapCall(localConfigFn, (e) => this.addPossibleError(e))(); - this.addPossibleError(localConfig?.__importRef?.error); - const config = mergeSettings(settings, localConfig); - const docSettings = determineTextDocumentSettings(this._document, config); - const dict = getDictionaryInternalSync(docSettings); - const matcher = new GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); - const uri = this._document.uri; - const shouldCheck = !matcher.match(uriToFilePath(uri)) && (docSettings.enabled ?? true); - const finalSettings = finalizeSettings(docSettings); - const validateOptions = settingsToValidateOptions(finalSettings); - const includeRanges = calcTextInclusionRanges(this._document.text, validateOptions); - const segmenter = createMappedTextSegmenter(includeRanges); - const textValidator = textValidatorFactory(dict, validateOptions); - this._preparations = { - config, - dictionary: dict, - docSettings, - finalSettings, - shouldCheck, - validateOptions, - includeRanges, - segmenter, - textValidator, - localConfig, - localConfigFilepath: localConfig?.__importRef?.filename - }; - this._ready = true; - this._preparationTime = timer.elapsed(); - } - async prepare() { + prepare() { if (this._ready) - return; + return Promise.resolve(); if (this._prepared) return this._prepared; this._prepared = this._prepareAsync(); return this._prepared; } async _prepareAsync() { - (0, import_assert15.default)(!this._ready); - const timer = createTimer(); + (0, import_assert16.default)(!this._ready); + const timer = createPerfTimer2("_prepareAsync"); const { options, settings } = this; const useSearchForConfig = !options.noConfigSearch && !settings.noConfigSearch || options.noConfigSearch === false; - const pLocalConfig = options.configFile ? loadConfig(options.configFile, settings) : useSearchForConfig ? searchForDocumentConfig(this._document, settings, settings) : void 0; + const pLocalConfig = options.configFile ? loadConfig(options.configFile, settings) : useSearchForConfig ? timePromise(this.perfTiming, "__searchForDocumentConfig", searchForDocumentConfig(this._document, settings, settings)) : void 0; + pLocalConfig && timePromise(this.perfTiming, "_loadConfig", pLocalConfig); const localConfig = await catchPromiseError(pLocalConfig, (e) => this.addPossibleError(e)) || {}; this.addPossibleError(localConfig?.__importRef?.error); const config = mergeSettings(settings, localConfig); - const docSettings = determineTextDocumentSettings(this._document, config); - const dict = await getDictionaryInternal(docSettings); - const matcher = new GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); + const docSettings = await timePromise(this.perfTiming, "_determineTextDocumentSettings", determineTextDocumentSettings(this._document, config)); + const dict = await timePromise(this.perfTiming, "_getDictionaryInternal", getDictionaryInternal(docSettings)); + const recGlobMatcherTime = recordPerfTime(this.perfTiming, "_GlobMatcher"); + const matcher = getGlobMatcherForExcluding(localConfig?.ignorePaths); const uri = this._document.uri; + recGlobMatcherTime(); + const recShouldCheckTime = recordPerfTime(this.perfTiming, "_shouldCheck"); const shouldCheck = !matcher.match(uriToFilePath(uri)) && (docSettings.enabled ?? true); + recShouldCheckTime(); + const recFinalizeTime = recordPerfTime(this.perfTiming, "_finalizeSettings"); const finalSettings = finalizeSettings(docSettings); const validateOptions = settingsToValidateOptions(finalSettings); const includeRanges = calcTextInclusionRanges(this._document.text, validateOptions); const segmenter = createMappedTextSegmenter(includeRanges); const textValidator = textValidatorFactory(dict, validateOptions); + recFinalizeTime(); this._preparations = { config, dictionary: dict, @@ -65831,13 +67579,14 @@ var DocumentValidator = class { localConfigFilepath: localConfig?.__importRef?.filename }; this._ready = true; - this._preparationTime = timer.elapsed(); + this._preparationTime = timer.elapsed; + this.perfTiming.prepTime = this._preparationTime; } - _updatePrep() { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); - const timer = createTimer(); + async _updatePrep() { + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); + const timer = createPerfTimer2("_updatePrep"); const prep = this._preparations; - const docSettings = determineTextDocumentSettings(this._document, prep.config); + const docSettings = await determineTextDocumentSettings(this._document, prep.config); const dict = getDictionaryInternalSync(docSettings); const shouldCheck = docSettings.enabled ?? true; const finalSettings = finalizeSettings(docSettings); @@ -65855,7 +67604,7 @@ var DocumentValidator = class { segmenter, textValidator }; - this._preparationTime = timer.elapsed(); + this._preparationTime = timer.elapsed; } /** * The amount of time in ms to prepare for validation. @@ -65871,8 +67620,8 @@ var DocumentValidator = class { return this.check({ text, range, scope: scope.join(" ") }); } check(parsedText) { - (0, import_assert15.default)(this._ready); - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._ready); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const { segmenter, textValidator } = this._preparations; const document = this._document; let line = void 0; @@ -65880,7 +67629,7 @@ var DocumentValidator = class { const { range, text, isFlagged, isFound, suggestionsEx } = issue; const offset = range[0]; const length = range[1] - range[0]; - (0, import_assert15.default)(!line || line.offset <= offset); + (0, import_assert16.default)(!line || line.offset <= offset); if (!line || line.offset + line.text.length <= offset) { line = document.lineAt(offset); } @@ -65922,18 +67671,23 @@ var DocumentValidator = class { * @returns the validation issues. */ checkDocument(forceCheck = false) { - if (skipValidation) - return []; - (0, import_assert15.default)(this._ready); - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); - const spellingIssues = forceCheck || this.shouldCheckDocument() ? [...this._checkParsedText(this._parse())] : []; - const directiveIssues = this.checkDocumentDirectives(); - const allIssues = spellingIssues.concat(directiveIssues).sort((a, b) => a.offset - b.offset); - return allIssues; + const timerDone = recordPerfTime(this.perfTiming, "checkDocument"); + try { + if (this.skipValidation) + return []; + (0, import_assert16.default)(this._ready); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); + const spellingIssues = forceCheck || this.shouldCheckDocument() ? [...this._checkParsedText(this._parse())] : []; + const directiveIssues = this.checkDocumentDirectives(); + const allIssues = spellingIssues.concat(directiveIssues).sort((a, b) => a.offset - b.offset); + return allIssues; + } finally { + timerDone(); + } } checkDocumentDirectives(forceCheck = false) { - (0, import_assert15.default)(this._ready); - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._ready); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const validateDirectives = forceCheck || this.validateDirectives; if (!validateDirectives) return []; @@ -65952,9 +67706,9 @@ var DocumentValidator = class { get document() { return this._document; } - updateDocumentText(text) { + async updateDocumentText(text) { updateTextDocument(this._document, [{ text }]); - this._updatePrep(); + await this._updatePrep(); } defaultParser() { return pipeSync(this.document.getLines(), opMapSync((line) => { @@ -65964,7 +67718,7 @@ var DocumentValidator = class { })); } *_checkParsedText(parsedTexts) { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const { maxNumberOfProblems = defaultMaxNumberOfProblems, maxDuplicateProblems = defaultMaxDuplicateProblems } = this._preparations.validateOptions; let numProblems = 0; const mapOfProblems = /* @__PURE__ */ new Map(); @@ -65984,10 +67738,10 @@ var DocumentValidator = class { addPossibleError(error3) { if (!error3) return; - error3 = this.errors.push(toError3(error3)); + error3 = this.errors.push(toError(error3)); } _parse() { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const parser2 = this._preparations.finalSettings.parserFn; if (typeof parser2 !== "object") return this.defaultParser(); @@ -65997,7 +67751,7 @@ var DocumentValidator = class { return this._suggestions.get(text); } genSuggestions(text) { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const settings = this._preparations.docSettings; const dict = this._preparations.dictionary; const sugOptions = { @@ -66012,7 +67766,7 @@ var DocumentValidator = class { return this.adjustSuggestions(text, rawSuggestions); } adjustSuggestions(text, rawSuggestions) { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); const settings = this._preparations.docSettings; const ignoreCase2 = !(settings.caseSensitive ?? false); const locale = this._preparations.config.language; @@ -66021,8 +67775,8 @@ var DocumentValidator = class { return sugsWithAlt.map(sanitizeSuggestion); } getFinalizedDocSettings() { - (0, import_assert15.default)(this._ready); - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._ready); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); return this._preparations.docSettings; } /** @@ -66033,7 +67787,7 @@ var DocumentValidator = class { * @returns true if the document settings have resolved to be `enabled` */ shouldCheckDocument() { - (0, import_assert15.default)(this._preparations, ERROR_NOT_PREPARED); + (0, import_assert16.default)(this._preparations, ERROR_NOT_PREPARED); return this._preparations.shouldCheck; } /** @@ -66057,23 +67811,17 @@ async function searchForDocumentConfig(document, defaultConfig, pnpSettings) { const { uri } = document; if (uri.scheme !== "file") return Promise.resolve(defaultConfig); - return searchForConfig(import_path4.default.dirname(uriToFilePath(uri)), pnpSettings).then((s) => s || defaultConfig); + return searchForConfig(uri.toString(), pnpSettings).then((s) => s || defaultConfig); } function mapSug(sug) { return { cost: 999, ...sug }; } -function searchForDocumentConfigSync(document, defaultConfig, pnpSettings) { - const { uri } = document; - if (uri.scheme !== "file") - defaultConfig; - return searchForConfigSync(uriToFilePath(uri), pnpSettings) || defaultConfig; -} async function shouldCheckDocument(doc, options, settings) { const errors = []; function addPossibleError(error3) { if (!error3) return void 0; - error3 = errors.push(toError3(error3)); + error3 = errors.push(toError(error3)); return void 0; } async function shouldCheck() { @@ -66082,15 +67830,22 @@ async function shouldCheckDocument(doc, options, settings) { const localConfig = await catchPromiseError(pLocalConfig, addPossibleError) || {}; addPossibleError(localConfig?.__importRef?.error); const config = mergeSettings(settings, localConfig); - const matcher = new GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); - const docSettings = determineTextDocumentSettings(doc, config); + const matcher = getGlobMatcherForExcluding(localConfig?.ignorePaths); + const docSettings = await determineTextDocumentSettings(doc, config); const uri = doc.uri; return !matcher.match(uriToFilePath(uri)) && (docSettings.enabled ?? true); } return { errors, shouldCheck: await shouldCheck() }; } +function recordPerfTime(timings, name) { + const timer = createPerfTimer2(name, (elapsed) => timings[name] = elapsed); + return () => timer.end(); +} +function timePromise(timings, name, p) { + return p.finally(recordPerfTime(timings, name)); +} -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/validator.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/validator.js async function validateText2(text, settings, options = {}) { const finalSettings = finalizeSettings(settings); const dict = await getDictionaryInternal(finalSettings); @@ -66134,7 +67889,7 @@ function mapValidationIssues(text, valIssues) { return issues.map(toValidationIssue); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/textValidation/checkText.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/textValidation/checkText.js async function checkText(text, settings) { const languageId = settings.languageId || "plaintext"; const doc = clean({ @@ -66158,7 +67913,7 @@ async function genCheckText(docValidator) { await docValidator.prepare(); const issues = docValidator.checkDocument(true); const preparations = docValidator._getPreparations(); - (0, import_assert16.default)(preparations); + (0, import_assert17.default)(preparations); return genResult(docValidator.document.text, issues, preparations.includeRanges); } function genResult(text, issues, includeRanges) { @@ -66219,7 +67974,7 @@ function genResult(text, issues, includeRanges) { }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/spellCheckFile.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/spellCheckFile.js function spellCheckFile(file, options, settings) { const doc = { uri: toUri(file).toString() @@ -66239,9 +67994,15 @@ async function spellCheckDocument(document, options, settings) { }; } try { - return spellCheckFullDocument(await resolveDocument(document), options, settings); + const timer = createPerfTimer2("loadFile"); + const doc = await resolveDocument(document).finally(() => timer.end()); + const result = await spellCheckFullDocument(doc, options, settings); + const perf = result.perf || {}; + perf.loadTimeMs = timer.elapsed; + result.perf = perf; + return result; } catch (e) { - const errors = isError4(e) ? [e] : []; + const errors = isError2(e) ? [e] : []; return { document, options, @@ -66254,10 +68015,15 @@ async function spellCheckDocument(document, options, settings) { } } async function spellCheckFullDocument(document, options, settings) { + const perf = {}; + const timer = createPerfTimer2("spellCheckFullDocument", (elapsed) => perf.totalTimeMs = elapsed); + const timerCheck = createPerfTimer2("check", (elapsed) => perf.checkTimeMs = elapsed); + const timerPrepare = createPerfTimer2("prepare", (elapsed) => perf.prepareTimeMs = elapsed); const doc = documentToTextDocument(document); const docValOptions = options; const docValidator = new DocumentValidator(doc, docValOptions, settings); - await docValidator.prepare(); + await docValidator.prepare().finally(() => timerPrepare.end()); + Object.assign(perf, Object.fromEntries(Object.entries(docValidator.perfTiming).map(([k, v]) => ["_" + k, v]))); const prep = docValidator._getPreparations(); if (docValidator.errors.length) { return { @@ -66267,10 +68033,14 @@ async function spellCheckFullDocument(document, options, settings) { localConfigFilepath: prep?.localConfigFilepath, issues: [], checked: false, - errors: docValidator.errors + errors: docValidator.errors, + perf }; } + timerCheck.start(); const issues = docValidator.checkDocument(); + timerCheck.end(); + Object.assign(perf, Object.fromEntries(Object.entries(docValidator.perfTiming).map(([k, v]) => ["_" + k, v]))); const result = { document, options, @@ -66278,11 +68048,13 @@ async function spellCheckFullDocument(document, options, settings) { localConfigFilepath: prep?.localConfigFilepath, issues, checked: docValidator.shouldCheckDocument(), - errors: void 0 + errors: void 0, + perf }; + timer.end(); return result; } -function determineFinalDocumentSettings(document, settings) { +async function determineFinalDocumentSettings(document, settings) { const doc = createTextDocument({ uri: document.uri, content: document.text, @@ -66291,11 +68063,12 @@ function determineFinalDocumentSettings(document, settings) { }); return { document, - settings: determineTextDocumentSettings(doc, settings) + settings: await determineTextDocumentSettings(doc, settings) }; } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/trace.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/trace.js +var import_node_url6 = require("node:url"); async function traceWords(words, settings, options) { const results = await asyncIterableToArray(traceWordsAsync(words, settings, options)); const s = genSequence(results).concatMap((p) => p).toArray(); @@ -66338,7 +68111,7 @@ async function* traceWordsAsync(words, settings, options) { forbidden: findResult?.forbidden || false, noSuggest: findResult?.noSuggest || false, dictName: dict.name, - dictSource: dict.source, + dictSource: dictSourceToFilename(dict.source), dictActive: setOfActiveDicts.has(dict.name), configSource: config.name || "", errors: normalizeErrors(dict.getErrors?.()) @@ -66348,17 +68121,31 @@ async function* traceWordsAsync(words, settings, options) { yield processWord(word); } } +function dictSourceToFilename(source) { + if (source.startsWith("file:")) { + return (0, import_node_url6.fileURLToPath)(source); + } + return source; +} -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/index.js +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/index.js __reExport(esm_exports2, dist_exports); -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/clearCachedFiles.js -async function clearCachedFiles() { - await Promise.all([clearCachedSettingsFiles(), refreshDictionaryCache(0)]); +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/clearCachedFiles.js +function clearCachedFiles() { + return _clearCachedFiles(); +} +function _clearCachedFiles() { + dispatchClearCache(); + return Promise.all([refreshDictionaryCache(0)]).then(() => void 0); +} +function clearCaches() { + clearCachedFiles().catch(() => { + }); } -// ../node_modules/.pnpm/cspell-lib@8.0.0/node_modules/cspell-lib/dist/esm/getDictionary.js -function getDictionary(settings) { +// ../node_modules/.pnpm/cspell-lib@8.1.0/node_modules/cspell-lib/dist/esm/getDictionary.js +async function getDictionary(settings) { return getDictionaryInternal(toInternalSettings(settings)); } @@ -66549,16 +68336,16 @@ var ansiStyles = assembleStyles(); var ansi_styles_default = ansiStyles; // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js -var import_node_process4 = __toESM(require("node:process"), 1); -var import_node_os = __toESM(require("node:os"), 1); +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_os3 = __toESM(require("node:os"), 1); var import_node_tty = __toESM(require("node:tty"), 1); -function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process4.default.argv) { +function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process3.default.argv) { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); } -var { env: env2 } = import_node_process4.default; +var { env: env2 } = import_node_process3.default; var flagForceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { flagForceColor = 0; @@ -66614,8 +68401,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { if (env2.TERM === "dumb") { return min3; } - if (import_node_process4.default.platform === "win32") { - const osRelease = import_node_os.default.release().split("."); + if (import_node_process3.default.platform === "win32") { + const osRelease = import_node_os3.default.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -66999,8 +68786,32 @@ var chalk_template_default = makeChalkTemplate(template); var templateStderr = makeTemplate(chalkStderr); var chalkTemplateStderr = makeChalkTemplate(templateStderr); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/cli-reporter.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/cli-reporter.mjs var path15 = __toESM(require("path"), 1); + +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/util.mjs +var uniqueFn2 = uniqueFilterFnGenerator2; +function uniqueFilterFnGenerator2(extractFn) { + const values = /* @__PURE__ */ new Set(); + const extractor = extractFn || ((a) => a); + return (v) => { + const vv = extractor(v); + const ret = !values.has(vv); + values.add(vv); + return ret; + }; +} +function clean5(src) { + const r = src; + for (const key of Object.keys(r)) { + if (r[key] === void 0) { + delete r[key]; + } + } + return r; +} + +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/cli-reporter.mjs var templateIssue = `{green $filename}:{yellow $row:$col} - $message ({red $text}) $quickFix`; var templateIssueNoFix = `{green $filename}:{yellow $row:$col} - $message ({red $text})`; var templateIssueWithSuggestions = `{green $filename}:{yellow $row:$col} - $message ({red $text}) Suggestions: {yellow [$suggestions]}`; @@ -67009,11 +68820,14 @@ var templateIssueWithContextWithSuggestions = `{green $filename}:{yellow $row:$c Suggestions: {yellow [$suggestions]}`; var templateIssueLegacy = `${source_default.green("$filename")}[$row, $col]: $message: ${source_default.red("$text")}`; var templateIssueWordsOnly = "$text"; -function genIssueEmitter(template3) { +function genIssueEmitter(template3, uniqueIssues) { + const uniqueFilter = uniqueIssues ? uniqueFilterFnGenerator2((issue) => issue.text) : () => true; const defaultWidth = 10; let maxWidth = defaultWidth; let uri; return function issueEmitter(issue) { + if (!uniqueFilter(issue)) + return; if (uri !== issue.uri) { maxWidth = defaultWidth; uri = issue.uri; @@ -67072,7 +68886,8 @@ function reportTime(elapsedTimeMs, cached) { const color = elapsedTimeMs < 1e3 ? source_default.white : elapsedTimeMs < 2e3 ? source_default.yellow : source_default.redBright; return color(elapsedTimeMs.toFixed(2) + "ms"); } -function getReporter(options) { +function getReporter(options, config) { + const uniqueIssues = config?.unique || false; const issueTemplate = options.wordsOnly ? templateIssueWordsOnly : options.legacy ? templateIssueLegacy : options.showContext ? options.showSuggestions ? templateIssueWithContextWithSuggestions : templateIssueWithContext : options.showSuggestions ? templateIssueWithSuggestions : options.showSuggestions === false ? templateIssueNoFix : templateIssue; const { fileGlobs, silent, summary, issues, progress, verbose, debug: debug3 } = options; const emitters = { @@ -67104,7 +68919,7 @@ function getReporter(options) { console.error("CSpell: Files checked: %d, Issues found: %d in %d files", result.files, result.issues, result.filesWithIssues.size); }; return { - issue: relativeIssue(silent || !issues ? nullEmitter2 : genIssueEmitter(issueTemplate)), + issue: relativeIssue(silent || !issues ? nullEmitter2 : genIssueEmitter(issueTemplate, uniqueIssues)), error: silent ? nullEmitter2 : errorEmitter, info: infoEmitter, debug: emitters.Debug, @@ -67192,7 +69007,7 @@ function substitute(text, substitutions) { return parts.join("") + text.slice(i); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/featureFlags/featureFlags.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/featureFlags/featureFlags.mjs function getFeatureFlags() { return getSystemFeatureFlags(); } @@ -67211,65 +69026,91 @@ function parseFeatureFlags(flags, featureFlags = getFeatureFlags()) { return featureFlags; } -// ../node_modules/.pnpm/cspell-gitignore@8.0.0/node_modules/cspell-gitignore/dist/GitIgnore.js +// ../node_modules/.pnpm/cspell-gitignore@8.1.0/node_modules/cspell-gitignore/dist/GitIgnore.js +var path19 = __toESM(require("path"), 1); + +// ../node_modules/.pnpm/cspell-gitignore@8.1.0/node_modules/cspell-gitignore/dist/GitIgnoreFile.js +var import_fs4 = require("fs"); var path18 = __toESM(require("path"), 1); -// ../node_modules/.pnpm/cspell-gitignore@8.0.0/node_modules/cspell-gitignore/dist/GitIgnoreFile.js -var import_fs3 = require("fs"); -var path17 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/find-up-simple@1.0.0/node_modules/find-up-simple/index.js +var import_node_process4 = __toESM(require("node:process"), 1); +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_url7 = require("node:url"); +var import_node_path5 = __toESM(require("node:path"), 1); +var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url7.fileURLToPath)(urlOrPath) : urlOrPath; +async function findUp2(name, { + cwd = import_node_process4.default.cwd(), + type = "file", + stopAt +} = {}) { + let directory = import_node_path5.default.resolve(toPath(cwd) ?? ""); + const { root } = import_node_path5.default.parse(directory); + stopAt = import_node_path5.default.resolve(directory, toPath(stopAt ?? root)); + while (directory && directory !== stopAt && directory !== root) { + const filePath = import_node_path5.default.isAbsolute(name) ? name : import_node_path5.default.join(directory, name); + try { + const stats = await import_promises4.default.stat(filePath); + if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) { + return filePath; + } + } catch { + } + directory = import_node_path5.default.dirname(directory); + } +} -// ../node_modules/.pnpm/cspell-gitignore@8.0.0/node_modules/cspell-gitignore/dist/helpers.js -var import_find_up2 = __toESM(require_find_up(), 1); -var path16 = __toESM(require("path"), 1); -function factoryPathHelper(path26) { +// ../node_modules/.pnpm/cspell-gitignore@8.1.0/node_modules/cspell-gitignore/dist/helpers.js +var path17 = __toESM(require("path"), 1); +function factoryPathHelper(path27) { function directoryRoot2(directory) { - const p = path26.parse(directory); + const p = path27.parse(directory); return p.root; } async function findRepoRoot2(directory) { - const found = await (0, import_find_up2.default)(".git", { cwd: directory, type: "directory" }); + const found = await findUp2(".git", { cwd: directory, type: "directory" }); if (!found) return void 0; - return path26.dirname(found); + return path27.dirname(found); } function isParentOf2(parent, child) { - const rel = path26.relative(parent, child); - return !!rel && !path26.isAbsolute(rel) && rel[0] !== "."; + const rel = path27.relative(parent, child); + return !!rel && !path27.isAbsolute(rel) && rel[0] !== "."; } function contains2(parent, child) { - const rel = path26.relative(parent, child); - return !rel || !path26.isAbsolute(rel) && rel[0] !== "."; + const rel = path27.relative(parent, child); + return !rel || !path27.isAbsolute(rel) && rel[0] !== "."; } function makeRelativeTo2(child, parent) { - const rel = path26.relative(parent, child); - if (path26.isAbsolute(rel) || rel[0] === ".") + const rel = path27.relative(parent, child); + if (path27.isAbsolute(rel) || rel[0] === ".") return void 0; - return normalizePath3(rel); + return normalizePath4(rel); } - function normalizePath3(path27) { - return path27.replace(/\\/g, "/"); + function normalizePath4(path28) { + return path28.replace(/\\/g, "/"); } return { directoryRoot: directoryRoot2, findRepoRoot: findRepoRoot2, isParentOf: isParentOf2, contains: contains2, - normalizePath: normalizePath3, + normalizePath: normalizePath4, makeRelativeTo: makeRelativeTo2 }; } -var defaultHelper = factoryPathHelper(path16); +var defaultHelper = factoryPathHelper(path17); var directoryRoot = defaultHelper.directoryRoot; var findRepoRoot = defaultHelper.findRepoRoot; var isParentOf = defaultHelper.isParentOf; var contains = defaultHelper.contains; var makeRelativeTo = defaultHelper.makeRelativeTo; -var normalizePath = defaultHelper.normalizePath; +var normalizePath2 = defaultHelper.normalizePath; function isDefined7(v) { return v !== void 0 && v !== null; } -// ../node_modules/.pnpm/cspell-gitignore@8.0.0/node_modules/cspell-gitignore/dist/GitIgnoreFile.js +// ../node_modules/.pnpm/cspell-gitignore@8.1.0/node_modules/cspell-gitignore/dist/GitIgnoreFile.js var GitIgnoreFile = class _GitIgnoreFile { matcher; gitignore; @@ -67296,11 +69137,11 @@ var GitIgnoreFile = class _GitIgnoreFile { getGlobPatters() { return this.matcher.patterns; } - getGlobs(relativeTo) { - return this.getGlobPatters().map((pat) => globToString(pat, relativeTo)).filter(isDefined7); + getGlobs(relativeTo2) { + return this.getGlobPatters().map((pat) => globToString(pat, relativeTo2)).filter(isDefined7); } static parseGitignore(content, gitignoreFilename) { - const options = { root: path17.dirname(gitignoreFilename) }; + const options = { root: path18.dirname(gitignoreFilename) }; const globs = content.split(/\r?\n/g).map((glob2, index) => ({ glob: glob2.replace(/^#.*/, ""), source: gitignoreFilename, @@ -67310,8 +69151,8 @@ var GitIgnoreFile = class _GitIgnoreFile { return new _GitIgnoreFile(globMatcher, gitignoreFilename); } static async loadGitignore(gitignore) { - gitignore = path17.resolve(gitignore); - const content = await import_fs3.promises.readFile(gitignore, "utf8"); + gitignore = path18.resolve(gitignore); + const content = await import_fs4.promises.readFile(gitignore, "utf8"); return this.parseGitignore(content, gitignore); } }; @@ -67344,12 +69185,12 @@ var GitIgnoreHierarchy = class { getGlobPatters() { return this.gitIgnoreChain.flatMap((gf) => gf.getGlobPatters()); } - getGlobs(relativeTo) { - return this.gitIgnoreChain.flatMap((gf) => gf.getGlobs(relativeTo)); + getGlobs(relativeTo2) { + return this.gitIgnoreChain.flatMap((gf) => gf.getGlobs(relativeTo2)); } }; async function loadGitIgnore(dir) { - const file = path17.join(dir, ".gitignore"); + const file = path18.join(dir, ".gitignore"); try { return await GitIgnoreFile.loadGitignore(file); } catch (e) { @@ -67365,18 +69206,18 @@ function mustBeHierarchical(chain) { root = file.root; } } -function globToString(glob2, relativeTo) { +function globToString(glob2, relativeTo2) { if (glob2.isGlobalPattern) return glob2.glob; - if (isParentOf(glob2.root, relativeTo) && glob2.glob.startsWith("**/")) + if (isParentOf(glob2.root, relativeTo2) && glob2.glob.startsWith("**/")) return glob2.glob; - const base = makeRelativeTo(glob2.root, relativeTo); + const base = makeRelativeTo(glob2.root, relativeTo2); if (base === void 0) return void 0; return (base ? base + "/" : "") + glob2.glob; } -// ../node_modules/.pnpm/cspell-gitignore@8.0.0/node_modules/cspell-gitignore/dist/GitIgnore.js +// ../node_modules/.pnpm/cspell-gitignore@8.1.0/node_modules/cspell-gitignore/dist/GitIgnore.js var GitIgnore = class { resolvedGitIgnoreHierarchies = /* @__PURE__ */ new Map(); knownGitIgnoreHierarchies = /* @__PURE__ */ new Map(); @@ -67395,15 +69236,15 @@ var GitIgnore = class { return this.resolvedGitIgnoreHierarchies.get(directory); } isIgnoredQuick(file) { - const gh = this.findResolvedGitIgnoreHierarchy(path18.dirname(file)); + const gh = this.findResolvedGitIgnoreHierarchy(path19.dirname(file)); return gh?.isIgnored(file); } async isIgnored(file) { - const gh = await this.findGitIgnoreHierarchy(path18.dirname(file)); + const gh = await this.findGitIgnoreHierarchy(path19.dirname(file)); return gh.isIgnored(file); } async isIgnoredEx(file) { - const gh = await this.findGitIgnoreHierarchy(path18.dirname(file)); + const gh = await this.findGitIgnoreHierarchy(path19.dirname(file)); return gh.isIgnoredEx(file); } async findGitIgnoreHierarchy(directory) { @@ -67433,7 +69274,7 @@ var GitIgnore = class { return this._sortedRoots; } addRoots(roots) { - const rootsToAdd = roots.map((p) => path18.resolve(p)).filter((r) => !this._roots.has(r)); + const rootsToAdd = roots.map((p) => path19.resolve(p)).filter((r) => !this._roots.has(r)); if (!rootsToAdd.length) return; rootsToAdd.forEach((r) => this._roots.add(r)); @@ -67453,7 +69294,7 @@ var GitIgnore = class { } async _findGitIgnoreHierarchy(directory) { const root = this.determineRoot(directory); - const parent = path18.dirname(directory); + const parent = path19.dirname(directory); const parentHierarchy = parent !== directory && contains(root, parent) ? await this.findGitIgnoreHierarchy(parent) : void 0; const git = await loadGitIgnore(directory); if (!git) { @@ -67469,11 +69310,11 @@ var GitIgnore = class { if (contains(r, directory)) return r; } - return path18.parse(directory).root; + return path19.parse(directory).root; } }; function resolveAndSortRoots(roots) { - const sortedRoots = roots.map((a) => path18.resolve(a)); + const sortedRoots = roots.map((a) => path19.resolve(a)); sortRoots(sortedRoots); Object.freeze(sortedRoots); return sortedRoots; @@ -67494,18 +69335,18 @@ async function asyncIterableToArray2(iter) { return r; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/lint/lint.mjs -var path23 = __toESM(require("path"), 1); -var import_util58 = require("util"); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/lint/lint.mjs +var path24 = __toESM(require("path"), 1); +var import_util56 = require("util"); var import_pkgInfo2 = __toESM(require_pkgInfo(), 1); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/createCache.mjs -var import_assert18 = __toESM(require("assert"), 1); -var import_promises2 = require("fs/promises"); -var import_path7 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/createCache.mjs +var import_assert19 = __toESM(require("assert"), 1); +var import_promises5 = require("fs/promises"); +var import_path9 = __toESM(require("path"), 1); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/errors.mjs -var import_util55 = require("util"); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/errors.mjs +var import_util53 = require("util"); var CheckFailed = class extends Error { exitCode; constructor(message, exitCode = 1) { @@ -67535,10 +69376,10 @@ var IOError = class extends ApplicationError { return this.cause.code === "ENOENT"; } }; -function toError4(e) { +function toError5(e) { if (isError6(e)) return e; - const message = (0, import_util55.format)(e); + const message = (0, import_util53.format)(e); return { name: "error", message, @@ -67556,18 +69397,18 @@ function isError6(e) { function toApplicationError(e, message) { if (e instanceof ApplicationError && !message) return e; - const err = toError4(e); + const err = toError5(e); return new ApplicationError(message ?? err.message, void 0, err); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/DiskCache.mjs -var import_assert17 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/DiskCache.mjs +var import_assert18 = __toESM(require("assert"), 1); var crypto5 = __toESM(require("crypto"), 1); -var fs10 = __toESM(require("fs"), 1); -var import_path6 = require("path"); +var fs11 = __toESM(require("fs"), 1); +var import_path8 = require("path"); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/fileHelper.mjs -var import_fs5 = require("fs"); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/fileHelper.mjs +var import_fs6 = require("fs"); // ../node_modules/.pnpm/get-stdin@9.0.0/node_modules/get-stdin/index.js var { stdin } = process; @@ -67595,48 +69436,24 @@ getStdin.buffer = async () => { return Buffer.concat(result, length); }; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/fileHelper.mjs -var path20 = __toESM(require("path"), 1); -var import_url5 = require("url"); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/fileHelper.mjs +var path21 = __toESM(require("path"), 1); +var import_url27 = require("url"); -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/async.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/async.mjs var { opMapAsync: asyncMap, opFilterAsync: asyncFilter, opAwaitAsync: asyncAwait, opFlattenAsync: asyncFlatten } = operators; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/constants.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/constants.mjs var UTF8 = "utf8"; var STDIN = "stdin"; var STDINProtocol = "stdin://"; var FileProtocol = "file://"; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/glob.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/glob.mjs var import_fast_glob = __toESM(require_out4(), 1); -var import_fs4 = require("fs"); -var path19 = __toESM(require("path"), 1); -var import_path5 = require("path"); - -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/util.mjs -var uniqueFn2 = uniqueFilterFnGenerator2; -function uniqueFilterFnGenerator2(extractFn) { - const values = /* @__PURE__ */ new Set(); - const extractor = extractFn || ((a) => a); - return (v) => { - const vv = extractor(v); - const ret = !values.has(vv); - values.add(vv); - return ret; - }; -} -function clean5(src) { - const r = src; - for (const key of Object.keys(r)) { - if (r[key] === void 0) { - delete r[key]; - } - } - return r; -} - -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/glob.mjs +var import_fs5 = require("fs"); +var path20 = __toESM(require("path"), 1); +var import_path7 = require("path"); var defaultExcludeGlobs = ["node_modules/**"]; async function globP(pattern, options) { const cwd = options?.root || options?.cwd || process.cwd(); @@ -67654,7 +69471,7 @@ async function globP(pattern, options) { }); const compare4 = new Intl.Collator("en").compare; const absolutePaths = (await (0, import_fast_glob.default)(patterns, useOptions)).sort(compare4); - const relativePaths = absolutePaths.map((absFilename) => path19.relative(cwd, absFilename)); + const relativePaths = absolutePaths.map((absFilename) => path20.relative(cwd, absFilename)); return relativePaths; } function calcGlobs(commandLineExclude) { @@ -67719,11 +69536,11 @@ async function adjustPossibleDirectory(glob2, root) { if (isPossibleUrlRegExp.test(g.glob)) { return glob2; } - const dirPath = path19.resolve(g.root, g.glob); + const dirPath = path20.resolve(g.root, g.glob); try { - const stat2 = await import_fs4.promises.stat(dirPath); - if (stat2.isDirectory()) { - const useGlob = import_path5.posix.join(posixPath(g.glob), "**"); + const stat4 = await import_fs5.promises.stat(dirPath); + if (stat4.isDirectory()) { + const useGlob = import_path7.posix.join(posixPath(g.glob), "**"); return typeof glob2 === "string" ? useGlob : { ...glob2, glob: useGlob }; } } catch (e) { @@ -67732,20 +69549,20 @@ async function adjustPossibleDirectory(glob2, root) { return glob2; } function posixPath(p) { - return path19.sep === "\\" ? p.replace(/\\/g, "/") : p; + return path20.sep === "\\" ? p.replace(/\\/g, "/") : p; } async function normalizeFileOrGlobsToRoot(globs, root) { const adjustedGlobs = await Promise.all(globs.map((g) => adjustPossibleDirectory(g, root))); return normalizeGlobsToRoot(adjustedGlobs, root, false); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/stdin.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/stdin.mjs var readline = __toESM(require("readline"), 1); function readStdin() { return readline.createInterface(process.stdin); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/fileHelper.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/fileHelper.mjs var doesMatchUrl = /^(file|stdin|https?):\/\//; async function readConfig(configFile, root) { if (configFile) { @@ -67775,12 +69592,12 @@ function filenameToUrlString(filename, cwd = ".") { return "stdin:///"; if (filename.startsWith(STDINProtocol)) { const filePath = filename.slice(STDINProtocol.length); - const fullPath = path20.resolve(cwd, filePath); - return (0, import_url5.pathToFileURL)(fullPath).toString(); + const fullPath = path21.resolve(cwd, filePath); + return (0, import_url27.pathToFileURL)(fullPath).toString(); } if (doesMatchUrl.test(filename)) return filename; - return (0, import_url5.pathToFileURL)(path20.resolve(cwd, filename)).toString(); + return (0, import_url27.pathToFileURL)(path21.resolve(cwd, filename)).toString(); } function filenameToUri(filename, cwd) { return URI.parse(filenameToUrlString(filename, cwd)); @@ -67796,22 +69613,22 @@ function resolveFilename2(filename, cwd) { if (filename === STDIN) return STDINProtocol; if (filename.startsWith(FileProtocol)) { - const url = new URL(filename.slice(FileProtocol.length), (0, import_url5.pathToFileURL)(cwd + path20.sep)); - return (0, import_url5.fileURLToPath)(url); + const url = new URL(filename.slice(FileProtocol.length), (0, import_url27.pathToFileURL)(cwd + path21.sep)); + return (0, import_url27.fileURLToPath)(url); } const scheme = filename.startsWith(STDINProtocol) ? STDINProtocol : ""; const pathname = filename.slice(scheme.length); - return scheme + path20.resolve(cwd, pathname); + return scheme + path21.resolve(cwd, pathname); } function readFileInfo(filename, encoding = UTF8, handleNotFound = false) { filename = resolveFilename2(filename); - const pText = filename.startsWith(STDINProtocol) ? getStdin() : readFileText2(filename, encoding); + const pText = filename.startsWith(STDINProtocol) ? getStdin() : readFileText(filename, encoding); return pText.then((text) => ({ text, filename }), (e) => { - const error3 = toError4(e); + const error3 = toError5(e); return handleNotFound && error3.code === "EISDIR" ? Promise.resolve({ text: "", filename, errorCode: error3.code }) : handleNotFound && error3.code === "ENOENT" ? Promise.resolve({ text: "", filename, errorCode: error3.code }) : Promise.reject(new IOError(`Error reading file: "${filename}"`, error3)); }); } -function readFile2(filename, encoding = UTF8) { +function readFile4(filename, encoding = UTF8) { return readFileInfo(filename, encoding).then((info4) => info4.text); } async function findFiles(globPatterns, options) { @@ -67835,9 +69652,9 @@ function readFileListFiles(listFiles) { } async function readFileListFile(listFile) { try { - const relTo = path20.resolve(path20.dirname(listFile)); - const content = await readFile2(listFile); - const lines = content.split("\n").map((a) => a.trim()).filter((a) => !!a).map((file) => path20.resolve(relTo, file)); + const relTo = path21.resolve(path21.dirname(listFile)); + const content = await readFile4(listFile); + const lines = content.split("\n").map((a) => a.trim()).filter((a) => !!a).map((file) => path21.resolve(relTo, file)); return lines; } catch (err) { throw toApplicationError(err, `Error reading file list from: "${listFile}"`); @@ -67845,8 +69662,8 @@ async function readFileListFile(listFile) { } async function isDir(filename) { try { - const stat2 = await import_fs5.promises.stat(filename); - return stat2.isDirectory(); + const stat4 = await import_fs6.promises.stat(filename); + return stat4.isDirectory(); } catch (e) { return false; } @@ -67855,15 +69672,15 @@ function isNotDir(filename) { return isDir(filename).then((a) => !a); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/fileEntryCache.mjs -var import_fs6 = require("fs"); -var path21 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/fileEntryCache.mjs +var import_fs7 = require("fs"); +var path22 = __toESM(require("path"), 1); var import_worker_threads = require("worker_threads"); var fec = __toESM(require_file_entry_cache(), 1); function createFromFile2(pathToCache, useCheckSum, useRelative) { - const absPathToCache = path21.resolve(pathToCache); - const relDir = path21.dirname(absPathToCache); - (0, import_fs6.mkdirSync)(relDir, { recursive: true }); + const absPathToCache = path22.resolve(pathToCache); + const relDir = path22.dirname(absPathToCache); + (0, import_fs7.mkdirSync)(relDir, { recursive: true }); const create = wrap(() => fec.createFromFile(absPathToCache, useCheckSum)); const feCache = create(); const cacheWrapper = { @@ -67907,8 +69724,8 @@ function createFromFile2(pathToCache, useCheckSum, useRelative) { function resolveFile2(cwd, file) { if (!useRelative) return file; - const r = path21.relative(relDir, path21.resolve(cwd, file)); - return normalizePath2(r); + const r = path22.relative(relDir, path22.resolve(cwd, file)); + return normalizePath3(r); } function resolveFiles(cwd, files) { return files?.map((file) => resolveFile2(cwd, file)); @@ -67925,11 +69742,11 @@ function createFromFile2(pathToCache, useCheckSum, useRelative) { }; } } -function normalizePath2(filePath) { +function normalizePath3(filePath) { return filePath; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/ObjectCollection.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/ObjectCollection.mjs var compare3 = Intl.Collator().compare; var ShallowObjectCollection = class { tree = {}; @@ -67937,9 +69754,9 @@ var ShallowObjectCollection = class { if (typeof v !== "object" || v === null) { return v; } - const keys2 = Object.entries(v).filter((entry) => entry[1] !== void 0).sort((a, b) => compare3(a[0], b[0])); + const keys3 = Object.entries(v).filter((entry) => entry[1] !== void 0).sort((a, b) => compare3(a[0], b[0])); let t = this.tree; - for (const [key, obj] of keys2) { + for (const [key, obj] of keys3) { if (!t.c) { t.c = /* @__PURE__ */ new Map(); } @@ -67962,7 +69779,7 @@ var ShallowObjectCollection = class { } }; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/DiskCache.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/DiskCache.mjs var cacheDataKeys = { v: "v", r: "r", @@ -67986,13 +69803,13 @@ var DiskCache = class { this.useCheckSum = useCheckSum; this.cspellVersion = cspellVersion; this.useUniversalCache = useUniversalCache; - this.cacheFileLocation = (0, import_path6.resolve)(cacheFileLocation); - this.cacheDir = (0, import_path6.dirname)(this.cacheFileLocation); + this.cacheFileLocation = (0, import_path8.resolve)(cacheFileLocation); + this.cacheDir = (0, import_path8.dirname)(this.cacheFileLocation); this.fileEntryCache = createFromFile2(this.cacheFileLocation, useCheckSum, useUniversalCache); this.version = calcVersion(cspellVersion); } async getCachedLintResults(filename) { - filename = normalizePath2(filename); + filename = normalizePath3(filename); const fileDescriptor = this.fileEntryCache.getFileDescriptor(filename); const meta = fileDescriptor.meta; const data = meta?.data; @@ -68080,11 +69897,11 @@ var DiskCache = class { return d; } getFileDep(file) { - (0, import_assert17.default)((0, import_path6.isAbsolute)(file), `Dependency must be absolute "${file}"`); + (0, import_assert18.default)((0, import_path8.isAbsolute)(file), `Dependency must be absolute "${file}"`); const f = this.toRelFile(file); let h; try { - const buffer = fs10.readFileSync(file); + const buffer = fs11.readFileSync(file); h = this.getHash(buffer); } catch (e) { return { f }; @@ -68105,15 +69922,15 @@ var DiskCache = class { return crypto5.createHash("md5").update(buffer).digest("hex"); } resolveFile(file) { - return normalizePath2((0, import_path6.resolve)(this.cacheDir, file)); + return normalizePath3((0, import_path8.resolve)(this.cacheDir, file)); } toRelFile(file) { - return normalizePath2(this.useUniversalCache ? (0, import_path6.relative)(this.cacheDir, file) : file); + return normalizePath3(this.useUniversalCache ? (0, import_path8.relative)(this.cacheDir, file) : file); } }; -function getTreeEntry(tree, keys2) { +function getTreeEntry(tree, keys3) { let r = tree; - for (const k of keys2) { + for (const k of keys3) { r = r.c?.get(k); if (!r) return r; @@ -68148,7 +69965,7 @@ function calcVersion(version4) { return version4 + META_DATA_VERSION_SUFFIX; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/DummyCache.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/DummyCache.mjs var DummyCache = class { getCachedLintResults() { return Promise.resolve(void 0); @@ -68164,23 +69981,23 @@ var DummyCache = class { } }; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/cache/createCache.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/cache/createCache.mjs var DEFAULT_CACHE_LOCATION = ".cspellcache"; var versionSuffix = ""; function createCache5(options) { const { useCache, cacheLocation, cacheStrategy, reset } = options; - const location = import_path7.default.resolve(cacheLocation); + const location = import_path9.default.resolve(cacheLocation); const useChecksum = cacheStrategy === "content"; const version4 = normalizeVersion(options.version); const useUniversal = options.cacheFormat === "universal"; - const cache2 = useCache ? new DiskCache(location, useChecksum, version4, useUniversal) : new DummyCache(); - reset && cache2.reset(); - return cache2; + const cache4 = useCache ? new DiskCache(location, useChecksum, version4, useUniversal) : new DummyCache(); + reset && cache4.reset(); + return cache4; } async function calcCacheSettings(config, cacheOptions, root) { const cs = config.cache ?? {}; const useCache = cacheOptions.cache ?? cs.useCache ?? false; - const cacheLocation = await resolveCacheLocation(import_path7.default.resolve(root, cacheOptions.cacheLocation ?? cs.cacheLocation ?? DEFAULT_CACHE_LOCATION)); + const cacheLocation = await resolveCacheLocation(import_path9.default.resolve(root, cacheOptions.cacheLocation ?? cs.cacheLocation ?? DEFAULT_CACHE_LOCATION)); const cacheStrategy = cacheOptions.cacheStrategy ?? cs.cacheStrategy ?? "metadata"; const cacheFormat = cacheOptions.cacheFormat ?? cs.cacheFormat ?? "legacy"; const optionals = {}; @@ -68198,10 +70015,10 @@ async function calcCacheSettings(config, cacheOptions, root) { } async function resolveCacheLocation(cacheLocation) { try { - const s = await (0, import_promises2.stat)(cacheLocation); + const s = await (0, import_promises5.stat)(cacheLocation); if (s.isFile()) return cacheLocation; - return import_path7.default.join(cacheLocation, DEFAULT_CACHE_LOCATION); + return import_path9.default.join(cacheLocation, DEFAULT_CACHE_LOCATION); } catch (err) { if (isError6(err) && err.code === "ENOENT") { return cacheLocation; @@ -68211,14 +70028,14 @@ async function resolveCacheLocation(cacheLocation) { } function normalizeVersion(version4) { const parts = version4.split(".").slice(0, 2); - (0, import_assert18.default)(parts.length === 2); + (0, import_assert19.default)(parts.length === 2); return parts.join(".") + versionSuffix; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/prefetch.mjs -var import_assert19 = __toESM(require("assert"), 1); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/prefetch.mjs +var import_assert20 = __toESM(require("assert"), 1); function* prefetchIterable(iterable, size) { - (0, import_assert19.default)(size >= 0); + (0, import_assert20.default)(size >= 0); const iter = iterable[Symbol.iterator](); const buffer = []; for (let next = iter.next(); !next.done; next = iter.next()) { @@ -68232,7 +70049,7 @@ function* prefetchIterable(iterable, size) { yield* buffer; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/reporters.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/reporters.mjs var import_pkgInfo = __toESM(require_pkgInfo(), 1); function callAll(methods) { return (...p) => { @@ -68272,7 +70089,7 @@ async function loadReporters(reporters, defaultReporter, config) { const { getReporter: getReporter2 } = await dynamicImportFrom(moduleName, [process.cwd(), import_pkgInfo.pkgDir]); return getReporter2(settings, config); } catch (e) { - throw new ApplicationError(`Failed to load reporter ${moduleName}: ${toError4(e).message}`); + throw new ApplicationError(`Failed to load reporter ${moduleName}: ${toError5(e).message}`); } } reporters = !reporters || !reporters.length ? ["default"] : [...reporters]; @@ -68283,16 +70100,13 @@ function finalizeReporter(reporter) { return reporter && mergeReporters(reporter); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/util/timer.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/util/timer.mjs function getTimeMeasurer() { - const start = process.hrtime(); - return () => hrTimeToMs(process.hrtime(start)); -} -function hrTimeToMs(hrTime) { - return hrTime[0] * 1e3 + hrTime[1] * 1e-6; + const timer = createPerfTimer2("timer"); + return () => timer.elapsed; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/lint/lint.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/lint/lint.mjs var version3 = import_pkgInfo2.npmPackage.version; var BATCH_SIZE = 8; var { opFilterAsync: opFilterAsync2 } = operators; @@ -68308,12 +70122,12 @@ async function runLint(cfg) { console.log(`Elapsed Time: ${elapsed.toFixed(2)}ms`); } return lintResult; - function prefetch(filename, configInfo, cache2) { + function prefetch(filename, configInfo, cache4) { if (isBinaryFile2(filename, cfg.root)) return { filename, result: Promise.resolve({ skip: true }) }; - async function fetch2() { + async function fetch() { const getElapsedTimeMs = getTimeMeasurer(); - const cachedResult = await cache2.getCachedLintResults(filename); + const cachedResult = await cache4.getCachedLintResults(filename); if (cachedResult) { reporter.debug(`Filename: ${filename}, using cache`); const fileResult = { ...cachedResult, elapsedTimeMs: getElapsedTimeMs() }; @@ -68326,14 +70140,14 @@ async function runLint(cfg) { const fileInfo = await readFileInfo(filename, void 0, true); return { fileInfo }; } - const result = fetch2(); + const result = fetch(); return { filename, result }; } - async function processFile(filename, configInfo, cache2, prefetch2) { + async function processFile(filename, configInfo, cache4, prefetch2) { if (prefetch2?.fileResult) return prefetch2.fileResult; const getElapsedTimeMs = getTimeMeasurer(); - const cachedResult = await cache2.getCachedLintResults(filename); + const cachedResult = await cache4.getCachedLintResults(filename); if (cachedResult) { reporter.debug(`Filename: ${filename}, using cache`); return { ...cachedResult, elapsedTimeMs: getElapsedTimeMs() }; @@ -68351,7 +70165,7 @@ async function runLint(cfg) { const fileInfo = prefetch2?.fileInfo || await readFileInfo(filename, void 0, true); if (fileInfo.errorCode) { if (fileInfo.errorCode !== "EISDIR" && cfg.options.mustFindFiles) { - const err = toError4(`File not found: "${filename}"`); + const err = toError5(`File not found: "${filename}"`); reporter.error("Linter:", err); result.errors += 1; } @@ -68363,23 +70177,29 @@ async function runLint(cfg) { let spellResult = {}; reporter.info(`Checking: ${filename}, File type: ${doc.languageId ?? "auto"}, Language: ${doc.locale ?? "default"}`, dist_exports.MessageTypes.Info); try { - const { showSuggestions: generateSuggestions, validateDirectives } = cfg.options; + const { showSuggestions: generateSuggestions, validateDirectives, skipValidation } = cfg.options; const numSuggestions = configInfo.config.numSuggestions ?? 5; - const validateOptions = clean5({ generateSuggestions, numSuggestions, validateDirectives }); + const validateOptions = clean5({ + generateSuggestions, + numSuggestions, + validateDirectives, + skipValidation + }); const r = await spellCheckDocument(doc, validateOptions, configInfo.config); spellResult = r; result.processed = r.checked; + result.perf = r.perf ? { ...r.perf } : void 0; result.issues = text_exports.calculateTextDocumentOffsets(doc.uri, text, r.issues).map(mapIssue); } catch (e) { - reporter.error(`Failed to process "${filename}"`, toError4(e)); + reporter.error(`Failed to process "${filename}"`, toError5(e)); result.errors += 1; } result.elapsedTimeMs = getElapsedTimeMs(); const config = spellResult.settingsUsed ?? {}; result.configErrors += await reportConfigurationErrors(config); - const elapsed2 = result.elapsedTimeMs / 1e3; + const elapsed2 = result.elapsedTimeMs; const dictionaries = config.dictionaries || []; - reporter.info(`Checked: ${filename}, File type: ${config.languageId}, Language: ${config.language} ... Issues: ${result.issues.length} ${elapsed2}S`, dist_exports.MessageTypes.Info); + reporter.info(`Checked: ${filename}, File type: ${config.languageId}, Language: ${config.language} ... Issues: ${result.issues.length} ${elapsed2.toFixed(2)}ms`, dist_exports.MessageTypes.Info); reporter.info(`Config file Used: ${spellResult.localConfigFilepath || configInfo.source}`, dist_exports.MessageTypes.Info); reporter.info(`Dictionaries Used: ${dictionaries.join(", ")}`, dist_exports.MessageTypes.Info); if (cfg.options.debug) { @@ -68393,7 +70213,7 @@ async function runLint(cfg) { reporter.debug(JSON.stringify(debugCfg, void 0, 2)); } const dep = calcDependencies(config); - cache2.setCachedLintResults(result, dep.files); + cache4.setCachedLintResults(result, dep.files); return result; } function mapIssue({ doc: _, ...tdo }) { @@ -68403,7 +70223,7 @@ async function runLint(cfg) { async function processFiles(files, configInfo, cacheSettings) { const fileCount = files instanceof Array ? files.length : void 0; const status = runResult(); - const cache2 = createCache5(cacheSettings); + const cache4 = createCache5(cacheSettings); const failFast = cfg.options.failFast ?? configInfo.config.failFast ?? false; const emitProgressBegin = (filename, fileNum, fileCount2) => reporter.progress({ type: "ProgressFileBegin", @@ -68422,14 +70242,14 @@ async function runLint(cfg) { cached: result?.cached })); function* prefetchFiles(files2) { - const iter = prefetchIterable(pipeSync(files2, opMapSync((filename) => prefetch(filename, configInfo, cache2))), BATCH_SIZE); + const iter = prefetchIterable(pipeSync(files2, opMapSync((filename) => prefetch(filename, configInfo, cache4))), BATCH_SIZE); for (const v of iter) { yield v; } } async function* prefetchFilesAsync(files2) { for await (const filename of files2) { - yield prefetch(filename, configInfo, cache2); + yield prefetch(filename, configInfo, cache4); } } const emptyResult = { @@ -68452,7 +70272,7 @@ async function runLint(cfg) { result: { ...emptyResult, fileInfo: { filename }, elapsedTimeMs: getElapsedTimeMs() } }; } - const result = await processFile(filename, configInfo, cache2, fetchResult); + const result = await processFile(filename, configInfo, cache4, fetchResult); return { filename, fileNum: index, result }; } async function* loadAndProcessFiles() { @@ -68464,7 +70284,7 @@ async function runLint(cfg) { } else { for (const pf of prefetchFiles(files)) { await pf.result; - yield await processPrefetchFileResult(pf, ++i); + yield processPrefetchFileResult(pf, ++i); } } } @@ -68484,7 +70304,7 @@ async function runLint(cfg) { } status.errors += result.configErrors; } - cache2.reconcile(); + cache4.reconcile(); return status; } function calcDependencies(config) { @@ -68625,11 +70445,11 @@ async function determineFilesToCheck(configInfo, cfg, reporter, globInfo) { return true; } const { root } = cfg; - const absFilename = path23.resolve(root, filename); + const absFilename = path24.resolve(root, filename); const r = globMatcherExclude.matchEx(absFilename); if (r.matched) { const { glob: glob2, source } = extractGlobSource(r.pattern); - reporter.info(`Excluded File: ${path23.relative(root, absFilename)}; Excluded by ${glob2} from ${source}`, dist_exports.MessageTypes.Info); + reporter.info(`Excluded File: ${path24.relative(root, absFilename)}; Excluded by ${glob2} from ${source}`, dist_exports.MessageTypes.Info); } return r.matched; } @@ -68685,16 +70505,16 @@ function yesNo(value) { } function getLoggerFromReporter(reporter) { const log = (...params) => { - const msg = (0, import_util58.format)(...params); + const msg = (0, import_util56.format)(...params); reporter.info(msg, "Info"); }; const error3 = (...params) => { - const msg = (0, import_util58.format)(...params); + const msg = (0, import_util56.format)(...params); const err = { message: "", name: "error", toString: () => "" }; reporter.error(msg, err); }; const warn = (...params) => { - const msg = (0, import_util58.format)(...params); + const msg = (0, import_util56.format)(...params); reporter.info(msg, "Warning"); }; return { @@ -68710,7 +70530,7 @@ async function generateGitIgnore(roots) { const repo = await findRepoRoot(cwd) || cwd; root.push(repo); } - return new GitIgnore(root?.map((p) => path23.resolve(p))); + return new GitIgnore(root?.map((p) => path24.resolve(p))); } async function useFileLists(fileListFiles, includeGlobPatterns, root, dot) { includeGlobPatterns = includeGlobPatterns.length ? includeGlobPatterns : ["**"]; @@ -68724,8 +70544,8 @@ async function useFileLists(fileListFiles, includeGlobPatterns, root, dot) { return pipeAsync(files, opFilter(filterFiles2), opFilterAsync2(isNotDir)); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/lint/LintRequest.mjs -var path24 = __toESM(require("path"), 1); +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/lint/LintRequest.mjs +var path25 = __toESM(require("path"), 1); var defaultContextRange = 20; var LintRequest = class { fileGlobs; @@ -68743,18 +70563,18 @@ var LintRequest = class { this.fileGlobs = fileGlobs; this.options = options; this.reporter = reporter; - this.root = path24.resolve(options.root || process.cwd()); + this.root = path25.resolve(options.root || process.cwd()); this.configFile = options.config; this.excludes = calcExcludeGlobInfo(this.root, options.exclude); this.locale = options.locale || ""; this.enableGlobDot = options.dot; - this.uniqueFilter = options.unique ? uniqueFilterFnGenerator2((issue) => issue.text) : () => true; + this.uniqueFilter = () => true; this.showContext = options.showContext === true ? defaultContextRange : options.showContext ? options.showContext : 0; this.fileLists = (options.fileList ?? options.fileLists) || []; } }; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/options.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/options.mjs function fixLegacy(opts) { const { local, ...rest } = opts; if (local && !rest.locale) { @@ -68763,7 +70583,7 @@ function fixLegacy(opts) { return rest; } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/repl/index.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/repl/index.mjs var readline2 = __toESM(require("readline"), 1); function simpleRepl() { return new SimpleRepl(); @@ -68788,8 +70608,8 @@ var SimpleRepl = class { this.rl.on("history", (h) => (this._history = h, void 0)); } question(query) { - return new Promise((resolve13) => { - this.rl.question(query, resolve13); + return new Promise((resolve12) => { + this.rl.question(query, resolve12); }); } _completer(line) { @@ -68811,10 +70631,10 @@ var SimpleRepl = class { } }; -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/application.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/application.mjs function lint(fileGlobs, options, reporter) { options = fixLegacy(options); - const cfg = new LintRequest(fileGlobs, options, finalizeReporter(reporter) ?? getReporter({ ...options, fileGlobs })); + const cfg = new LintRequest(fileGlobs, options, finalizeReporter(reporter) ?? getReporter({ ...options, fileGlobs }, options)); return runLint(cfg); } async function* trace(words, options) { @@ -68823,7 +70643,7 @@ async function* trace(words, options) { const { languageId, locale, allowCompoundWords, ignoreCase: ignoreCase2 } = options; const configFile = await readConfig(options.config, void 0); const loadDefault = options.defaultConfiguration ?? configFile.config.loadDefaultConfiguration ?? true; - const config = mergeSettings(getDefaultSettings(loadDefault), getGlobalSettings(), configFile.config); + const config = mergeSettings(await getDefaultSettings(loadDefault), await getGlobalSettingsAsync(), configFile.config); yield* traceWordsAsync(iWords, config, clean5({ languageId, locale, ignoreCase: ignoreCase2, allowCompoundWords })); } async function checkText2(filename, options) { @@ -68882,7 +70702,7 @@ function parseApplicationFeatureFlags(flags) { return parseFeatureFlags(flags, ff); } -// ../node_modules/.pnpm/cspell@8.0.0/node_modules/cspell/dist/esm/index.mjs +// ../node_modules/.pnpm/cspell@8.1.0/node_modules/cspell/dist/esm/index.mjs __reExport(esm_exports3, dist_exports); // src/spell.ts @@ -69035,11 +70855,11 @@ function normalizeResult(result) { } function normalizeFiles(files) { const cwd = process.cwd(); - return [...files].map((file) => path25.relative(cwd, file)); + return [...files].map((file) => path26.relative(cwd, file)); } // src/main.ts -var import_util59 = require("util"); +var import_util57 = require("util"); function getGithubToken() { const t0 = (0, import_core4.getInput)("github_token", { required: true }); if (t0[0] !== "$") { @@ -69052,14 +70872,14 @@ async function run() { (0, import_core4.info)("cspell-action"); const githubContext = new import_context.Context(); const githubToken = getGithubToken(); - (0, import_assert20.default)(githubToken, "GITHUB_TOKEN is required."); + (0, import_assert21.default)(githubToken, "GITHUB_TOKEN is required."); await action(githubContext, (0, import_github2.getOctokit)(githubToken)); (0, import_core4.info)("Done."); return void 0; } catch (error3) { console.error(error3); - (0, import_core4.setFailed)(isAppError(error3) ? error3.message : isError(error3) ? error3 : (0, import_util59.format)(error3)); - return isError(error3) ? error3 : Error((0, import_util59.format)(error3)); + (0, import_core4.setFailed)(isAppError(error3) ? error3.message : isError(error3) ? error3 : (0, import_util57.format)(error3)); + return isError(error3) ? error3 : Error((0, import_util57.format)(error3)); } } diff --git a/action/node_modules/@cspell/cspell-bundled-dicts/package.json b/action/node_modules/@cspell/cspell-bundled-dicts/package.json index 2807aad59..671d62303 100644 --- a/action/node_modules/@cspell/cspell-bundled-dicts/package.json +++ b/action/node_modules/@cspell/cspell-bundled-dicts/package.json @@ -1,6 +1,6 @@ { "name": "@cspell/cspell-bundled-dicts", - "version": "8.0.0", + "version": "8.1.0", "description": "Dictionaries bundled with cspell", "publishConfig": { "access": "public" @@ -47,8 +47,8 @@ "@cspell/dict-ada": "^4.0.2", "@cspell/dict-aws": "^4.0.0", "@cspell/dict-bash": "^4.1.2", - "@cspell/dict-companies": "^3.0.27", - "@cspell/dict-cpp": "^5.0.9", + "@cspell/dict-companies": "^3.0.28", + "@cspell/dict-cpp": "^5.0.10", "@cspell/dict-cryptocurrencies": "^4.0.0", "@cspell/dict-csharp": "^4.0.2", "@cspell/dict-css": "^4.0.12", @@ -59,14 +59,14 @@ "@cspell/dict-elixir": "^4.0.3", "@cspell/dict-en-common-misspellings": "^1.0.2", "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-en_us": "^4.3.11", - "@cspell/dict-filetypes": "^3.0.2", + "@cspell/dict-en_us": "^4.3.12", + "@cspell/dict-filetypes": "^3.0.3", "@cspell/dict-fonts": "^4.0.0", "@cspell/dict-fsharp": "^1.0.1", "@cspell/dict-fullstack": "^3.1.5", "@cspell/dict-gaming-terms": "^1.0.4", "@cspell/dict-git": "^2.0.0", - "@cspell/dict-golang": "^6.0.4", + "@cspell/dict-golang": "^6.0.5", "@cspell/dict-haskell": "^4.0.1", "@cspell/dict-html": "^4.0.5", "@cspell/dict-html-symbol-entities": "^4.0.0", @@ -77,7 +77,7 @@ "@cspell/dict-lua": "^4.0.2", "@cspell/dict-makefile": "^1.0.0", "@cspell/dict-node": "^4.0.3", - "@cspell/dict-npm": "^5.0.12", + "@cspell/dict-npm": "^5.0.13", "@cspell/dict-php": "^4.0.4", "@cspell/dict-powershell": "^5.0.2", "@cspell/dict-public-licenses": "^2.0.5", @@ -86,7 +86,7 @@ "@cspell/dict-ruby": "^5.0.1", "@cspell/dict-rust": "^4.0.1", "@cspell/dict-scala": "^5.0.0", - "@cspell/dict-software-terms": "^3.3.9", + "@cspell/dict-software-terms": "^3.3.11", "@cspell/dict-sql": "^2.1.2", "@cspell/dict-svelte": "^1.0.2", "@cspell/dict-swift": "^2.0.1", @@ -97,8 +97,8 @@ "node": ">=18" }, "devDependencies": { - "@cspell/cspell-tools": "8.0.0", - "@cspell/cspell-types": "8.0.0" + "@cspell/cspell-tools": "8.1.0", + "@cspell/cspell-types": "8.1.0" }, - "gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370" + "gitHead": "28568808deaf39b9ffa71fd0f722441ff1b8c794" } diff --git a/action/package.json b/action/package.json index b88d6744b..bb7d7a733 100644 --- a/action/package.json +++ b/action/package.json @@ -9,7 +9,7 @@ "@cspell/cspell-bundled-dicts" ], "dependencies": { - "@cspell/cspell-bundled-dicts": "^8.0.0" + "@cspell/cspell-bundled-dicts": "^8.1.0" }, "files": [ "lib" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10f279198..b0b697447 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@cspell/cspell-bundled-dicts': - specifier: ^8.0.0 - version: 8.0.0 + specifier: ^8.1.0 + version: 8.1.0 '@octokit/core': specifier: ^5.0.2 version: 5.0.2 @@ -69,11 +69,11 @@ importers: specifier: ^20.0.2 version: 20.0.2 cspell: - specifier: ^8.0.0 - version: 8.0.0 + specifier: ^8.1.0 + version: 8.1.0 cspell-glob: - specifier: ^8.0.0 - version: 8.0.0 + specifier: ^8.1.0 + version: 8.1.0 vscode-uri: specifier: ^3.0.8 version: 3.0.8 @@ -126,6 +126,7 @@ packages: dependencies: '@babel/highlight': 7.23.4 chalk: 2.4.2 + dev: true /@babel/compat-data@7.23.5: resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} @@ -239,6 +240,7 @@ packages: /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} + dev: true /@babel/helper-validator-option@7.23.5: resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} @@ -263,6 +265,7 @@ packages: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 + dev: true /@babel/parser@7.23.5: resolution: {integrity: sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==} @@ -308,8 +311,8 @@ packages: to-fast-properties: 2.0.0 dev: true - /@cspell/cspell-bundled-dicts@8.0.0: - resolution: {integrity: sha512-Phbb1ij1TQQuqxuuvxf5P6fvV9U+EVoATNLmDqFHvRZfUyuhgbJuCMzIPeBx4GfTTDWlPs51FYRvZ/Q8xBHsyA==} + /@cspell/cspell-bundled-dicts@8.1.0: + resolution: {integrity: sha512-o/R/kR1QO9SQV2hUroaguTlHD6MDDtrVY6Xj5eG0loM7T0Pm3TEdlGYQ0LP6O9/CfUiHTntIFUM+PJ999+LuHQ==} engines: {node: '>=18'} dependencies: '@cspell/dict-ada': 4.0.2 @@ -362,32 +365,32 @@ packages: '@cspell/dict-vue': 3.0.0 dev: false - /@cspell/cspell-json-reporter@8.0.0: - resolution: {integrity: sha512-1ltK5N4xMGWjDSIkU+GJd3rXV8buXgO/lAgnpM1RhKWqAmG+u0k6pnhk2vIo/4qZQpgfK0l3J3h/Ky2FcE95vA==} + /@cspell/cspell-json-reporter@8.1.0: + resolution: {integrity: sha512-Iss9dq5XBc5wYADv/Z59W4DgRQYs8BSHNVD6+LbQctuqmeJAte426/oi4x0Y76AJtEe0N6BZouj8HXykovwP5w==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-types': 8.0.0 + '@cspell/cspell-types': 8.1.0 dev: false - /@cspell/cspell-pipe@8.0.0: - resolution: {integrity: sha512-1MH+9q3AmbzwK1BYhSGla8e4MAAYzzPApGvv8eyv0rWDmgmDTkGqJPTTvYj1wFvll5ximQ5OolpPQGv3JoWvtQ==} + /@cspell/cspell-pipe@8.1.0: + resolution: {integrity: sha512-HDNX7MFAPAJ9acyYBa1bG+P4WiHHMFNYeywYBf3h6ScVhHobAqnhqS6b8R7MVhVRivwnKIQPG3zK7UpcwfyRcw==} engines: {node: '>=18'} dev: false - /@cspell/cspell-resolver@8.0.0: - resolution: {integrity: sha512-gtALHFLT2vSZ7BZlIg26AY3W9gkiqxPGE75iypWz06JHJs05ngnAR+h6VOu0+rmgx98hNfzPPEh4g+Tjm8Ma0A==} + /@cspell/cspell-resolver@8.1.0: + resolution: {integrity: sha512-nlppKh2o6g0zz+oIQ/dZB+oFQFf8lvn3mJKBpDwoeQY7/o9ZORPibXjtqXM83OhhdpoUVuk+3RFMsnFBBffa2Q==} engines: {node: '>=18'} dependencies: - global-dirs: 3.0.1 + global-directory: 4.0.1 dev: false - /@cspell/cspell-service-bus@8.0.0: - resolution: {integrity: sha512-1EYhIHoZnhxpfEp6Bno6yVWYBuYfaQrwIfeDMntnezUcSmi7RyroQEcp5U7sLv69vhRD2c81o7r8iUaAbPSmIg==} + /@cspell/cspell-service-bus@8.1.0: + resolution: {integrity: sha512-9Enayhkef732f15kHgiUe4QKyJgKk1dcZ4EFq4eyzUUDFF/eBv6qTQo5k2juUhPIjaKosqqMBHg4ffXcpkhr+Q==} engines: {node: '>=18'} dev: false - /@cspell/cspell-types@8.0.0: - resolution: {integrity: sha512-dPdxQI8dLJoJEjylaPYfCJNnm2XNMYPuowHE2FMcsnFR9hEchQAhnKVc/aD63IUYnUtUrPxPlUJdoAoj569e+g==} + /@cspell/cspell-types@8.1.0: + resolution: {integrity: sha512-1SxBjQdZtVjrTs3Ftw5I3nNpuDjdpsFMvfbbt6EnxqMpmZiUwkqxLCKla0pEy5R9CZcFFlntlOTMTmNsIkgmWg==} engines: {node: '>=18'} dev: false @@ -589,15 +592,15 @@ packages: resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==} dev: false - /@cspell/dynamic-import@8.0.0: - resolution: {integrity: sha512-HNkCepopgiEGuI1QGA6ob4+ayvoSMxvAqetLxP0u1sZzc50LH2DEWwotcNrpVdzZOtERHvIBcGaQKIBEx8pPRQ==} + /@cspell/dynamic-import@8.1.0: + resolution: {integrity: sha512-TJ1OnP0ubdVr5YTMU15rVs8R6ROuPvP/Z5lY2gtHscEsf9tZxvIt3924uMc9fTJXgNsITNWSoCzgwJYcDvGM6A==} engines: {node: '>=18.0'} dependencies: - import-meta-resolve: 3.1.1 + import-meta-resolve: 4.0.0 dev: false - /@cspell/strong-weak-map@8.0.0: - resolution: {integrity: sha512-fRlqPSdpdub52vFtulDgLPzGPGe75I04ScId1zOO9ABP7/ro8VmaG//m1k7hsPkm6h7FG4jWympoA3aXDAcXaA==} + /@cspell/strong-weak-map@8.1.0: + resolution: {integrity: sha512-yBc3ejGpx3QLbfS+Sec8ycS+lKuou5rnnpfz3aVBCnNHUPozosFuNYPFB6Iah2CBY6v6rkDCkIp5vnp1IwQzdA==} engines: {node: '>=18'} dev: false @@ -1478,6 +1481,7 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 + dev: true /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -1493,6 +1497,7 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} @@ -1649,6 +1654,7 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 + dev: true /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -1681,6 +1687,7 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 + dev: true /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -1691,6 +1698,7 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1768,16 +1776,6 @@ packages: vary: 1.1.2 dev: true - /cosmiconfig@8.0.0: - resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==} - engines: {node: '>=14'} - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - dev: false - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1794,70 +1792,78 @@ packages: type-fest: 1.4.0 dev: false - /cspell-dictionary@8.0.0: - resolution: {integrity: sha512-R/AzUj7W7F4O4fAOL8jvIiUqPYGy6jIBlDkxO9SZe/A6D2kOICZZzGSXMZ0M7OKYqxc6cioQUMKOJsLkDXfDXw==} + /cspell-config-lib@8.1.0: + resolution: {integrity: sha512-mIv8etMAp05OapdxJQt0nkfzclMti8AfACPryWnVePrwB89A2KjErHYBa7hX6gn20B4K+KgD7ckPcOi6L8vLYA==} + engines: {node: '>=18'} + dependencies: + '@cspell/cspell-types': 8.1.0 + comment-json: 4.2.3 + yaml: 2.3.4 + dev: false + + /cspell-dictionary@8.1.0: + resolution: {integrity: sha512-nwvlPiM7jsZThZ2bUS2CYzqwAbxWC4OL5GozQfbGEwW/8unNhifBpJzlOZuzLyX4Vu94ETExeIc625wBqPWjVA==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.0.0 - '@cspell/cspell-types': 8.0.0 - cspell-trie-lib: 8.0.0 - fast-equals: 4.0.3 + '@cspell/cspell-pipe': 8.1.0 + '@cspell/cspell-types': 8.1.0 + cspell-trie-lib: 8.1.0 + fast-equals: 5.0.1 gensequence: 6.0.0 dev: false - /cspell-gitignore@8.0.0: - resolution: {integrity: sha512-Uv+ENdUm+EXwQuG9187lKmE1t8b2KW+6VaQHP7r01WiuhkwhfzmWA7C30iXVcwRcsMw07wKiWvMEtG6Zlzi6lQ==} + /cspell-gitignore@8.1.0: + resolution: {integrity: sha512-upMIEjbBz1g92Vt80h2hMMRZ9057iAmCWxi05l0WrwGrtc3CGsA8gQQIFIbVZ0x86Sbmv1cBZms1Y/hKWPWuvg==} engines: {node: '>=18'} hasBin: true dependencies: - cspell-glob: 8.0.0 - find-up: 5.0.0 + cspell-glob: 8.1.0 + find-up-simple: 1.0.0 dev: false - /cspell-glob@8.0.0: - resolution: {integrity: sha512-wOkRA1OTIPhyN7a+k9Qq45yFXM+tBFi9DS5ObiLv6t6VTBIeMQpwRK0KLViHmjTgiA6eWx53Dnr+DZfxcAkcZA==} + /cspell-glob@8.1.0: + resolution: {integrity: sha512-onPRqJqPZaaUQ1CKeuh2fJJ9UjIBicRq6Ffd6bqWCu7IdwfEBPtjWa/nlEjCVp1CMRwhS3Y0zG3jHkKLydsR4Q==} engines: {node: '>=18'} dependencies: micromatch: 4.0.5 dev: false - /cspell-grammar@8.0.0: - resolution: {integrity: sha512-uxpRvbBxOih6SjFQvKTBPTA+YyqYM5UFTNTFuRnA6g6WZeg+NJaTkbQrTgXja4B2r8MJ6XU22YrKTtHNNcP7bQ==} + /cspell-grammar@8.1.0: + resolution: {integrity: sha512-E28SDJYOOuHk8eBtMSIGyCu8qiKb/H4LX1J/kw8+eV0RLvnllmq2FAYFBk8jtu4uW49TW5n/eLg7J2TvPONYAA==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-pipe': 8.0.0 - '@cspell/cspell-types': 8.0.0 + '@cspell/cspell-pipe': 8.1.0 + '@cspell/cspell-types': 8.1.0 dev: false - /cspell-io@8.0.0: - resolution: {integrity: sha512-NVdVmQd7SU/nxYwWtO/6gzux/kp1Dt36zKds0+QHZhQ18JJjXduF5e+WUttqKi2oj/vvmjiG4HGFKQVDBcBz3w==} + /cspell-io@8.1.0: + resolution: {integrity: sha512-oPRMS/XUWcdZXMj6Zhs65mgOVyRZajAhHLm18o6cPLOGUD0770oMqi8ZNKj7LuvubkyP/NL0m4AEcWwvmz/Cbw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-service-bus': 8.0.0 + '@cspell/cspell-service-bus': 8.1.0 dev: false - /cspell-lib@8.0.0: - resolution: {integrity: sha512-X/BzUjrzHOx7YlhvSph/OlMu1RmCTnybeZvIE67d1Pd7wT1TmZhFTnmvruUhoHxWEudOEe4HjzuNL9ph6Aw+aA==} + /cspell-lib@8.1.0: + resolution: {integrity: sha512-tatdY9teElqqPtKHAY1osOhV68h/f3x+4Niw7rV12OXmJ9El1lPka59bVTV401fODWRoF3WWJXUpTg012zhdrQ==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-bundled-dicts': 8.0.0 - '@cspell/cspell-pipe': 8.0.0 - '@cspell/cspell-resolver': 8.0.0 - '@cspell/cspell-types': 8.0.0 - '@cspell/dynamic-import': 8.0.0 - '@cspell/strong-weak-map': 8.0.0 + '@cspell/cspell-bundled-dicts': 8.1.0 + '@cspell/cspell-pipe': 8.1.0 + '@cspell/cspell-resolver': 8.1.0 + '@cspell/cspell-types': 8.1.0 + '@cspell/dynamic-import': 8.1.0 + '@cspell/strong-weak-map': 8.1.0 clear-module: 4.1.2 comment-json: 4.2.3 configstore: 6.0.0 - cosmiconfig: 8.0.0 - cspell-dictionary: 8.0.0 - cspell-glob: 8.0.0 - cspell-grammar: 8.0.0 - cspell-io: 8.0.0 - cspell-trie-lib: 8.0.0 + cspell-config-lib: 8.1.0 + cspell-dictionary: 8.1.0 + cspell-glob: 8.1.0 + cspell-grammar: 8.1.0 + cspell-io: 8.1.0 + cspell-trie-lib: 8.1.0 fast-equals: 5.0.1 - find-up: 6.3.0 gensequence: 6.0.0 import-fresh: 3.3.0 resolve-from: 5.0.0 @@ -1865,31 +1871,31 @@ packages: vscode-uri: 3.0.8 dev: false - /cspell-trie-lib@8.0.0: - resolution: {integrity: sha512-0rC5e1C0uM78uuS+lC1T18EojWZyNvq4bPOPCisnwuhuWrAfCqrFrX/qDNslWk3VTOPbsEMlFj6OnIGQnfwSKg==} + /cspell-trie-lib@8.1.0: + resolution: {integrity: sha512-OF5ZNuGPIGg2CCMdMeAgd1I2iVDjoelpMjVDyqpuNu+RVpAkmNRqMFDBlsnJPWCCeOLn7blWPMBZW2KXctsm3Q==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.0.0 - '@cspell/cspell-types': 8.0.0 + '@cspell/cspell-pipe': 8.1.0 + '@cspell/cspell-types': 8.1.0 gensequence: 6.0.0 dev: false - /cspell@8.0.0: - resolution: {integrity: sha512-Nayy25Dh+GAlDFDpVZaQhmidP947rpj1Pn9lmZ3nUFjD9W/yj0h0vrjMLMN4dbonddkmKh4t51C+7NuMP405hg==} + /cspell@8.1.0: + resolution: {integrity: sha512-oxQLyhW3yIAfvDdtoobvriWqfWVqOBo1o+WWRxlDyJdKDBH6my++p6KU3ZjxcJb7VG+CRLGfU7zASWwTPxMXRA==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-json-reporter': 8.0.0 - '@cspell/cspell-pipe': 8.0.0 - '@cspell/cspell-types': 8.0.0 - '@cspell/dynamic-import': 8.0.0 + '@cspell/cspell-json-reporter': 8.1.0 + '@cspell/cspell-pipe': 8.1.0 + '@cspell/cspell-types': 8.1.0 + '@cspell/dynamic-import': 8.1.0 chalk: 5.3.0 chalk-template: 1.1.0 commander: 11.1.0 - cspell-gitignore: 8.0.0 - cspell-glob: 8.0.0 - cspell-io: 8.0.0 - cspell-lib: 8.0.0 + cspell-gitignore: 8.1.0 + cspell-glob: 8.1.0 + cspell-io: 8.1.0 + cspell-lib: 8.1.0 fast-glob: 3.3.2 fast-json-stable-stringify: 2.1.0 file-entry-cache: 7.0.2 @@ -2004,12 +2010,6 @@ packages: cross-spawn: 7.0.3 dev: true - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: false - /esbuild@0.19.8: resolution: {integrity: sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==} engines: {node: '>=12'} @@ -2052,6 +2052,7 @@ packages: /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -2205,10 +2206,6 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-equals@4.0.3: - resolution: {integrity: sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==} - dev: false - /fast-equals@5.0.1: resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} engines: {node: '>=6.0.0'} @@ -2271,20 +2268,18 @@ packages: - supports-color dev: true + /find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + dev: false + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - - /find-up@6.3.0: - resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - locate-path: 7.2.0 - path-exists: 5.0.0 - dev: false + dev: true /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} @@ -2382,11 +2377,11 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 - /global-dirs@3.0.1: - resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} - engines: {node: '>=10'} + /global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} dependencies: - ini: 2.0.0 + ini: 4.1.1 dev: false /globals@11.12.0: @@ -2429,6 +2424,7 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + dev: true /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -2506,8 +2502,8 @@ packages: parent-module: 1.0.1 resolve-from: 4.0.0 - /import-meta-resolve@3.1.1: - resolution: {integrity: sha512-qeywsE/KC3w9Fd2ORrRDUw6nS/nLwZpXgfrOc2IILvZYnCaEMd+D56Vfg9k4G29gIeVi3XKql1RQatME8iYsiw==} + /import-meta-resolve@4.0.0: + resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} dev: false /imurmurhash@0.1.4: @@ -2523,9 +2519,9 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /ini@2.0.0: - resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} - engines: {node: '>=10'} + /ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: false /interpret@1.4.0: @@ -2543,10 +2539,6 @@ packages: engines: {node: '>=8'} dev: true - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: false - /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: @@ -2633,12 +2625,14 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 + dev: true /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} @@ -2649,10 +2643,6 @@ packages: /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: false - /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -2696,10 +2686,6 @@ packages: type-check: 0.4.0 dev: true - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: false - /local-pkg@0.4.3: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} @@ -2710,13 +2696,7 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - - /locate-path@7.2.0: - resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-locate: 6.0.0 - dev: false + dev: true /lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -2934,25 +2914,21 @@ packages: engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 + dev: true /p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: yocto-queue: 1.0.0 + dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - - /p-locate@6.0.0: - resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-limit: 4.0.0 - dev: false + dev: true /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -2967,16 +2943,6 @@ packages: callsites: 3.1.0 dev: false - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.23.5 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: false - /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -2985,11 +2951,7 @@ packages: /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - - /path-exists@5.0.0: - resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false + dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -3011,6 +2973,7 @@ packages: /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + dev: true /pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} @@ -3391,6 +3354,7 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 + dev: true /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -3754,10 +3718,17 @@ packages: /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} + dev: false + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + dev: true /yocto-queue@1.0.0: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} + dev: true